🐈 naming things is often called "the easiest problem in computer science" because you can just call it x or i or whatever
@lovegame cache invalidation is nearly as easy cause you can just always clear the cache before every read.
@lovegame anyone have a solution for off by one errors? :P

@demofox @lovegame I don't think they really exist

[edit: picture added because that's probably too obscure for anyone to get without it]

@demofox @lovegame i have 1 solution, no wait that's 0 solutions

@demofox @lovegame

Cant be off by one if you downgrade nullpointer exceptions too nullpointer warnings :))

@demofox @lovegame This is actually trivial. If you add two you won't be off by one.
@demofox @lovegame make every array one element longer than you think you need to
@demofox @lovegame arguably off-by-one problems is the only class of problems that's relevant to tech jobs that also get taught in school
@lovegame you can call things anything if you put "test" at the end of the name
@lovegame well we used to call it X. THANKS ELON, NOT! ha
@lovegame
Everything started going downhill when we started using names like x and i instead of the old descriptive names of foo and bar.

@wikicliff @lovegame I preferred it when we just had blocks of memory and it was up to us to remember where each variable started, which ones were numbers and which were letters. And how big each one was. And the byte order.

This was so easy that even BASIC supported it with PEEK() and POKE().

@lovegame i like to name my variables in order so the first variable i make in my program is "one" and then the next is "two" and so on
@lovegame is this like how 4 is a perfectly good random number
@lovegame I just call all of them x, even when I have more than one variable. The interpreter sorts it all out behind the scenes. It's only ever a problem if you do "unit testing," which is frowned upon.
@lovegame Naming variables is often a hard obstacle for me because of option paralysis.