(1) cache invalidation
(2) off-by-one errors
(1) cache invalidation
(2) off-by-one errors
1) naming
2) cache invalidation
...
3) off-by-one errors
Alas.
- a good name should be descriptive
- avoid being overly clever, call a spade a spade
- don't optimise for generalisation, naming things is a time to be specific
- aim for short but not at the expense of losing context
- avoid redundancy in naming of things nearby, leverage spatial context
- avoid qualifiers or type information where possible - type should be obvious from context and use, if it's not qualify or refactor
Anything else?
1) naming
4) concurr2) cache invalidationency
...
3) off-by-one errors
0) Race consegmentation fault (core dumped)
(I know I was ninja’d but didn’t see until after)
1) Those who number lists starting at 1.
1) Those who number lists starting at 0.
2.5) Stan Kelly-Bootle, who proposed a compromise.For the simplest example: compare the old C-style for loop vs a Python style for-each loop.
Oh, and slicing. I will never get Python slicing right the first time. The fact that the range is [begin, end) is just never the way I expect it to work.
In [0, len) ')' means less than. As in 0≤ x< len.
The formulation of this joke I tend to see is,
The two hardest problems in programming:
(1) cache invalidation
(2) appropriately naming things
(3) off-by-one errors
(Cache invalidation is essentially the same problem as managing mutable state -- "Out of the Tar Pit" frames mutable state as either essential or incidental, the latter being rederivable in principle from essential state. Incidental mutable state is no more and no less than a cache, and usually one with an informal and undocumented invalidation policy.)
(And naming things has a very real technical counterpart in addressing, which comes up obviously in networking, but you can also see its shadows in quite a lot of concerns around architecture and modularity.)
(1) cache invalidation
(3) off-by-one errors
(2) appropriately naming things
(4) parallel execution [leading to race conditions / ordering bugs]
1) Naming 3) Cache Invalidation 2) Off-by-one errors 3) In-order once-only delivery of distributed messages
And an almost fanatical devotion to the Pope
1) naming
4) concurr2) cache invalidation
ency
3) off-by-one errors