5 ms·
New Programming Jargon
- squidsoup 16y agoGreat, but perhaps would have been better to simply link to the SO thread. Loved "hot potato/hot potatoes" for http/https.
- die_sekte 16y agoBut it has pictures! Funny pictures! Actually, yeah, it would have been better.
- kdeberk 16y agoI'm actually guilty of using Yoda conditions in anything but Lisp. It is now hardwired in my brain since I learned it early. I'm using it for the same reason as all other Yoda conditioners are, -Wall wasn't really an option then since the source code normally spouted 50+ warning lines due to some included header file.
- jallmann 16y agoI use them too, but can't figure out if TFA is being derisive or not. I always thought Yoda conditions were good defensive programming, especially in C-type languages.
- aaronbrethorst 16y agoI use Yoda conditions all the time. Never knew there was a name for it besides 'a good defensive programming convention to keep you from doing something stupid when programming C.'
- squidsoup 16y agoI liked the variation on this - Yoda Exception Handling (or the lack thereof): there is no try.
- neilk 16y agoMostly just in-jokes, but I loved "yoda conditions" and "stringly-typed". Those deserve wider usage.
- fhars 16y agoWhat he calls yoda conditions is actually considered best practice in C-like languages, as it will result in a compile time error instead of wrong run time behaviour if you forget to type the second equals sign. The name is still funny, but the way he has written it up betrays a certain lack of understanding.
- BrandonM 16y agoShouldn't best practice be to compile with something like "gcc -Wall" instead of making the code less readable?
- philwelch 16y agoYoda conditions, like ternary operators[1], are perfectly readable if you have more than a week's experience working with them IMO. Of course, you also turn all the warnings on. [1] By "ternary operators" I mean "pretty-printed, non-nested ternary operators".
- mgrouchy 16y agoThis is something I learned to do when I first started programming and just continued to do. I didn't think it was that uncommon (I also do this in non c-like languages as well because while it produces a runtime error you won't get incorrect behavior, just breakage).
- jemfinch 16y agoI'm not sure you should instantly jump to thinking the term "yoda condition" is derogatory. Yoda is generally considered positively by most nerds.
- fhars 16y ago
- davidalln 16y agoMy favorite is "mechanical issue". I use it all the time whenever the build team on my robotics team blames me (i.e., the coder) for an issue on the robot. Build Team: DAVID! The robot is continuously driving in circles whenever we turn it on. Me: Must be a mechanical issue
- jcromartie 16y agoI've been called out for Yoda conditions with comparisons, but it's actually just number-line order. I.e. instead of writing "x > 0" I write "0 < x", but I read both as "x greater-than 0."
- adriand 16y agoI've just put a web app into production and one of my client's associates is driving me nuts with his "shrug reports" ('A bug report with no error message or “how to reproduce” steps and only a vague description of the problem. Usually contains the phrase "doesn’t work."'). So I really enjoyed this list.
- merraksh 16y agoI was surprised not to find "heisenbug". It's on Wikipedia, along with other families of bugs. http://en.wikipedia.org/wiki/Unusual_software_bug http://en.wikipedia.org/wiki/Unusual_software_bug
- carussell 16y agoWhy were you surprised, then? It's already been coined.
- mahmud 16y agoYoda Conditions: if (5 == count) Folks, conditions != conditionals.
- dmoney 16y ago5 == count is the condition, so if (5 == count) ... uses a Yoda condition in a conditional.
- paulitex 16y agoThe Duck is genius.
- iamdave 16y agoI successfully used a duck when designing a site for my old company, who insisted I place the CMS in the root directory, so users don't get confused when the URL shows up in the address bar. I told them it would get addressed immediately. It got addressed via an .htaccess file that masked the URL. Ducks ftw
- joubert 16y agoBloombug is my favorite