Frankly speaking, nesting code that deep makes it extremely hard to read and follow. Much more so than the very clear "filter weird cases then move down the line" paradigm that the previous example uses.
Additionally, you're moving the end of the blocks so far from their start that it's nearly impossible to remember what conditions you're in by the time you're 3 deep, and even more difficult to refactor-as-you-go which I'm constantly doing to make better code.
Almost all of my code, with very few exceptions, is 2 indents or less.
I remember in 1st grade when we used to play a really old version of Oregon Trail all free-time long (btw, the 'Hunting' was made up of guessing which line of the screen (1-32?) a piece of 'Food' was, and then you shot to see if you were right... after a while you are right every time).
Anyway, that was my first experience with computers, and I already knew more than the teachers ^^.
Then, they decided to get rid of the non-working models, so they had me go and check each one to see if it was in good working order (What an honor for a 1st grader, ne?).
This is when the bad thing happened. As it turned out, one of the computers I had never used before was not only broken, but the cylindrical plastic cover near the 'on/off' switch on the back left of the machine was broken off, and had been replaced by nylon tape (which had fallen off) so that when I reached back to turn it on, I managed to give myself a good jolt of electrity.
I don't know how bad it was, but it was bad enough that my hand clutched the computer so that I couldn't do anything but stand there and get fried until I fell over.
Anyways, This is the story of how I got into computers. Anybody know how many volts I got? I've been wondering that for a long time.
and getting a kick out of these replies.
You guys are so CUTE with your little download speeds!
Are separate things. Don't confuse the two, or you end up with the following annoying conversation:
"You got your laws in my morals!"
"You got your morals in my laws!"
I personally find this EXTREMELY hard to read.
Frankly speaking, nesting code that deep makes it extremely hard to read and follow. Much more so than the very clear "filter weird cases then move down the line" paradigm that the previous example uses.
Additionally, you're moving the end of the blocks so far from their start that it's nearly impossible to remember what conditions you're in by the time you're 3 deep, and even more difficult to refactor-as-you-go which I'm constantly doing to make better code.
Almost all of my code, with very few exceptions, is 2 indents or less.
I dare anyone to play this game and have it not ellicit a strong, sad emotion. Cried a lot on this one.
http://wurb.com/if/game/255
I remember the Commadore PET Computer...
I remember in 1st grade when we used to play a really old version of Oregon Trail all free-time long (btw, the 'Hunting' was made up of guessing which line of the screen (1-32?) a piece of 'Food' was, and then you shot to see if you were right... after a while you are right every time).
Anyway, that was my first experience with computers, and I already knew more than the teachers ^^.
Then, they decided to get rid of the non-working models, so they had me go and check each one to see if it was in good working order (What an honor for a 1st grader, ne?).
This is when the bad thing happened. As it turned out, one of the computers I had never used before was not only broken, but the cylindrical plastic cover near the 'on/off' switch on the back left of the machine was broken off, and had been replaced by nylon tape (which had fallen off) so that when I reached back to turn it on, I managed to give myself a good jolt of electrity.
I don't know how bad it was, but it was bad enough that my hand clutched the computer so that I couldn't do anything but stand there and get fried until I fell over.
Anyways, This is the story of how I got into computers. Anybody know how many volts I got? I've been wondering that for a long time.