Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Top stupidest programming polemics

Name: Anonymous 2013-05-22 21:46

1. Gotos considered evil
For too long, schools have been successfully spreading the fallacy that gotos should never be used. Whenever I write code for someone and I use a goto, someone always complain:
"Man, you used gotos to [Handle errors/Break out of multiple loops/we]"
So knowing usually the kind of people I'm dealing with I respond:
"Why?"
But people always fail to know the real reason gotos used to be bashed on:
"They're just evil..."

2. Tabs vs. Spaces for indentation
Everyone using a real text editor knows that tabs are by far superior to spaces. There are easily at least five times more reasons to use tabs than to use spaces. Even worse than that, the reason I hear the most often to use spaces is that "tabs don't have the same number of spaces in text editors" while IT IS THE WHOLE FUCKING IDEA OF USING TABS, ANYONE CAN SEE AS MANY SPACES AS THEY WANT.


3. Global variables are bad

No. Just like gotos, they are when idiots don't know when to use them.

Name: Cudder !MhMRSATORI!fR8duoqGZdD/iE5 2013-05-23 8:31

5. gets is unsafe and should never be used
With the exception of some very esoteric program where it is absolutely guaranteed that its input will not exceed a certain length and for some reason fgets() doesn't work, I agree with this.

(If you haven't thought about how long a line could be, you shouldn't be trying to read a whole one into memory either; try to come up with an algorithm that doesn't require that first.)

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List