if (a) {
return x;
}
else if (!a) {
return y;
}
else {
return z;
}
In college I worked as a consultant. One day this grad student was having trouble with his Fortran program and brought the printout to me. He said he kept changing things but couldn't get it to run correctly. His analysis: "I get the feeling that the computer just skips over all the comments."
While working on a programming project in highschool with a friend, I mentioned to him that if he really wants to name his variables things like x, xx, and xx2, he should at least put comments saying what they're used for.
The next time I looked over his shoulder, I saw this:
int x; // x is an int
lol I am ashamed as a programmer to only realise on the 2nd read through that it will never return z...Code:if (a) { return x; } else if (!a) { return y; } else { return z; }
Hey, a quick question, what code do you guys prefer? And what engines/editors (if any)lol I am ashamed as a programmer to only realise on the 2nd read through that it will never return z...
Well I'm only web dev, so I'm in a complicated relationship with notepad++ / jsfiddleHey, a quick question, what code do you guys prefer? And what engines/editors (if any)
Personally, I use lua in love2d, using sublime text 2.
You should put that as your Facebook Relationship statusWell I'm only web dev, so I'm in a complicated relationship with notepad++ / jsfiddle
But why doesn't it react?Argon walks into a bar. The barman tells him to get the hell out. Argon doesn't react.
It's a noble gas. Far right of the periodic table.But why doesn't it react?