YourDadVPN's comments

YourDadVPN | 2 years ago | on: Ask HN: How do you go from good to great Programmer?

Well, almost. I use a lot of assertions to check the obvious (value out of range, null pointer, etc.) and test the happy path(s) to prove the code at least works in the cases I can anticipate. I add unit tests for complex algorithms, and to prove a reported bug is what I think it is and that it has been fixed. Otherwise, I think using unit tests to find bugs is mostly busywork.

For even a fairly trivial piece of code, the search space for bugs can be vast or even infinite. Writing unit tests to find bugs within that space is like throwing darts at an infinitely large wall and trying to hit an unknown number of invisible targets. You can only write tests for the potential bugs you anticipate - if you could anticipate a bug, you wouldn't write it, right? You end up with dozens or hundreds of tests that probably never failed, except when you have to change something. Such was my experience when I tried to maintain high code coverage. When I switched to writing assertions and acceptance tests, my rate of bug reports did not change, and I was more agile.

YourDadVPN | 2 years ago | on: Ask HN: How do you go from good to great Programmer?

What is your opinion of code coverage requirements now? I have been in a "phase" of seeing them as "code quality theatre". Considering that a function which takes a single 8-bit integer as an argument already has 256 unique inputs, and may bug only on 1-2 values, 100% statement coverage can be very misleading. A typical function has billions or trillions of unique inputs and 100% statement coverage could be very nearly 0% state space coverage. I'm 5y into my career (but 15y into programming) and aware that my opinions will change and develop as I progress. This one has been stable for a while though.

YourDadVPN | 2 years ago | on: Everything that uses configuration files should report where they're located

I think the best way to achieve this is by providing an OS API that results in the files always being created in the same place. Applications/libraries could still choose their own filenames and syntax, just the location would be OS controlled. I think there is room for a new desktop/laptop OS to emerge and one good idea from mobile OS design I would like to see is having everything be an API call that allows the OS to impose standardisation, permissions and user preferences rather than the free-for-all desktop OSes have (though I propose letting the user run non-compliant applications, and not porting the iOS app store only model into the OS).

YourDadVPN | 2 years ago | on: Apple reveals Vision Pro, a AR/VR headset unlike any other

I was talking about the posts/linked articles rather than the comments. I counted six in the first 20 posts, and the titles are mostly quite ad-like.

While I was initially interested by the announcement, the size, lack of internal battery and price makes this a hard no for me. Idk what they were thinking - doesn't anyone remember Google Glass? That was half the price and size and nobody wanted it.

YourDadVPN | 2 years ago | on: Ask HN: Anyone noticed the quality of spam has improved?

No! Since I made a new email account with email aliases allowing me to give a unique address to every company I haven't received a single spam email (apart from advertising from said companies) in over a year.

I have however been getting spam WhatsApp and Telegram messages claiming to be from recruiters. These are quite obvious though as they lack any of the details recruiters usually include when they reach out on LinkedIn.

YourDadVPN | 2 years ago | on: Don't Try to Outsmart the Compiler

A real implementation should swap bytes until the pointers are both aligned correctly. On some platforms unaligned memory accesses cause an exception, but on x86 it will work but be much slower.

YourDadVPN | 2 years ago | on: Ask HN: I have 176 logins/accounts. How many do you have?

Roughly 350, all with unique passwords and mostly with unique email addresses too. They're categorised, and the only categories with more than about 20 entries are catch-alls I never look at anyway. It's pretty useful and sometimes interesting to go on a website and find out I made an account there two years ago.
page 1