
Xkcd comics which can illustrate programming questions - MarkusWinand
http://explainextended.com/2014/07/09/top-5-xkcd-comics-which-can-illustrate-programming-questions/
======
ufmace
What I think is odd is the apparent SO hate on #1. That sounds like a good
idea to me - to better understand what SQL injection is and how to find and
plug vulnerabilities, try to write your own vulnerable application and then
exploit it. At least, I'd much rather have them do that then copy and paste
generic code off of some learning site which is vulnerable without even
thinking about it.

------
vezzy-fnord
I usually associate fanatical goto hatred (as in #4) with people who don't do
systems programming, particularly in C, where using a goto to jump to a label
that executes instructions (like cleanup and freeing memory) in the event of
an error condition, is a very common pattern.

These people would probably be shocked if they read the source code of the
average GNU/Linux distro's software stack.

~~~
InclinedPlane
To be fair, the example in #4 is EXACTLY WHY IT'S BAD TO USE GOTO. It's a
horrible abuse of the construct that makes program flow much more difficult to
follow and should have been replaced with moving some of the code off into
methods.

~~~
username42
'GOTO considered harmful' is practically biblical law amongst many
programmers, but it's worth remembering that he made that statement in the
context of an argument with Donald Knuth. Knuth won: (
[http://web.archive.org/web/20070927094626/http://pplab.snu.a...](http://web.archive.org/web/20070927094626/http://pplab.snu.ac.kr/courses/adv_pl05/papers/p261-knuth.pdf)
See also
[http://web.archive.org/web/20051128093253/http://kerneltrap....](http://web.archive.org/web/20051128093253/http://kerneltrap.org/node/553/2131)
about goto

Good uses of goto are very rare with current programming languages. The only
cases where I have found good uses were with languages that did not have
exception handling and in each cases, there was some deficiencies in the
specifications and the code containing the goto has disappeared with the
corrected specifications. Maybe this was luck.

I still think it is ridiculous to hate goto.

------
EugeneOZ
This is my favorite: [http://xkcd.com/1024/](http://xkcd.com/1024/)

------
InclinedPlane
Pretty funny stuff. But man the code examples there made me want to take a
shower.

------
renke1
#2 is my all-time favorite. It's such a common situation.

~~~
B0jan
Lol! Mine too!

