Hacker News new | ask | show | jobs
by semicolonandson 2229 days ago
My current philosophy is that programming is mostly about not making mistakes, so I'm most interested in cutting my error rate than in learning the latest tech, whatever that might be.

To that end, I keep a mistake log, into which I insert an entry after doing something that either caused down-time or that caused my team to lose over an hour of productive time. It now has over 500 entries in story format, along with the relevant code. Some example titles (along with their tags in square brackets):

- [gotchas] references to relative file paths are brittle when there are multiple entry points to a program

- [gotchas] lazy evaluation cannot be cached in most systems

- [unix] adding `sudo` affects $PATH and can cause commands not to be found

- [gotchas] never confuse STDOUT with return value

- [collaboration] never remove a flow in code without consulting all possible stake-holders

- [algorithms] when calling a sorting function, always ask yourself if alphabetical or numerical

I plan on posting a video with more details on my YouTube channel soon.