Hacker News new | ask | show | jobs
by petersumskas 36 days ago
There are only two hard problems in computer programming:

1. Naming things 2. Cache invalidation 3. off-by-one errors

2 comments

Length 3 lists always feel better, and my favorite formulation of this is,

  There are only three hard problems in computer science:

  1. Naming things
  2. Cache invalidation
  3. Off-by4. Multi-threading
  -one errors.
My favorite version of this but is like "An engineer has one problem he decides to solve with multi-threading. Now problems. has two he"
there are actually 10 problems: naming things, cache invalidation, base conversions, off by one errors, and cache invalidation
Base conversions are easy, but which off by one is it? base 4 or base 6?
10 base 2 is 2 base 10. i gave four unique hard problems. and now typing this out i see that I was off by 1 (or two)
Off-by-two is a subset of all possible off-by-one errors.
All off-by-one errors can be reproduced by producing an off-by-one error of some other off-by-one error.