Skip to content

Instantly share code, notes, and snippets.

@jorendorff
Last active August 29, 2015 14:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jorendorff/f1f6454f48848b264d49 to your computer and use it in GitHub Desktop.
Save jorendorff/f1f6454f48848b264d49 to your computer and use it in GitHub Desktop.

Today on the Internet we were discussing some code one of us had written. He said that although his function would silently categorize the array [3, 7, 0] as having adjacent duplicate elements, that is not a bug, because no array in the program's input will contain 0. It said so right in his problem statement, which none of us had read.

I totally sympathize with this stance. It is the same thing as how when you ask something on Stack Overflow, almost no matter what it is, one of the top-voted answers will be, you shouldn't be asking that because you should be doing this other thing instead, which always turns out to be something sensible enough under ordinary circumstances, but hopelessly inappropriate for your actual situation. The main cost of asking a question therefore turns out to be convincing every stranger on the entire Internet that the question really is what you meant to ask, and that you are competent to ask it.

It reminds me of a situation at my house. I find that when I put something in the refrigerator on top of a smaller thing, it tends to fall out later as people jostle things around in there, and that can make a mess. This of course is not my fault. It was stable enough when I left it there and sat there just fine for hours; it only leapt from its shelf when my son reached in to get pickles. All you need to know about my son is that it has been medically established that he is 97% elbows by volume, and that the mess on the kitchen floor is his fault. Not mine.

Still, even when someone else makes a mess it is a hassle, and wastes food. So. I tried putting a note on the outside of the refrigerator saying "// WARNING: careful with all the things I stacked up on the top shelf today". Nobody reads the warnings. To my chagrin, I find I don't even read my own warnings.

I'm starting to think it might be better as a rule not to leave things in such a precarious state to begin with, even though it is more work and when I jam things into the fridge I am often in a hurry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment