• 0 Posts
  • 718 Comments
Joined 3 years ago
cake
Cake day: June 16th, 2023

help-circle





  • I stayed at one AirBnB where the owner had replaced all the kitchen counters with untreated butcher block. The instructions basically said “don’t use the kitchen”. For bonus points, my parents got the one bedroom and I had to sleep in the kids’ room … on the bottom bunk with the actual kid’s sheets because there weren’t any other sheets in the house. I just felt sorry for the kid.





  • Ironically, one of the universal things I’ve noticed in programmers (myself included) is that newbie coders always go through a phase of thinking “why am I writing SQL? I’ll write a set of classes to write the SQL for me!” resulting in a massively overcomplicated mess that is a hundred times harder to use (and maintain) than a simple SQL statement would be. The most hilarious example of this I ever saw was when I took over a young colleague’s code base and found two classes named “OR.cs” and “AND.cs”. All they did was take a String as a parameter, append " OR " or " AND " to it, and return it as the output. Very forward-thinking, in case the meanings of “OR” and “AND” were ever to change in future versions of SQL.



  • I had a friend in college whose parents were big into world government and had founded an organization to promote that. Talking to them was a weird experience because 1) they felt every problem facing the world could be solved by a one-world government, and 2) they actually felt achieving that world government was a realistic possibility. And it wasn’t like they thought the solution was just the USA taking over everything; they were very critical of everything about this country.

    I don’t know if this is irony or not, but that friend is now worth $34 million after her parents’ company went public. She doesn’t say anything about world government any more.



  • It’s funny, the exact same logic applies to method and variable names. There’s no compiler that ensures that a method’s name accurately describes what the method does or ensures that a variable’s name accurately describes what the variable represents. Yet nobody ever says “you shouldn’t use descriptive method and variable names because they might be misleading”. And this is hardly academic: I can’t count the number of times I’ve run into methods that no longer do what the method name implies they do.

    And yet method and variable names are exactly what people mean when they talk about “self-documenting” code.