>>9
It hurts the eyes, it does. Also, why the fuck do you have a space after if but not after while?
What annoys you the most to see in someones code?
- Inconsistent whitespacing (see
>>9).
- Unnecessary "clarifications", such as if (x == false) instead of just fucking writing if (!x); but the most annoying of all in this category are people who eliminate pre- or post-increments from code because they're "confusing". I want to kill these people.
- Incomplete use of constants, i.e. defining LOOPCOUNT=5, then using it some places and just using 5 elsewhere. Then the program segfaults when you change LOOPCOUNT.
- Hungarian notation.
- Mixed use of tabs and spaces. Actually scratch that, just "tabs" in general annoy me. As far as I'm concerned, tabs should be abolished.
What annoys you the msot in a programming language?
- Unenforced file naming scheme. I fucking *hate* having to grep "class Class" *|less just to find which goddamn cpp file a class is in. This is one of the few things Java did right. I don't care if a helper class has 6 lines, put it in its own fucking file.
I could add like 50 things here about Fortran, since I'm in science and have to use it for a lot of things. But it's not worth it.
Add to this pretty much everything
>>8 said, except the complaint about shitCase. Class/Struct declarations should be in CamelCase, variable names and function names in shitCase, and #defines and enumerations in ALL_CAPS. This is above all consistent, and immediately tells you what a thing is just by looking at it. Note also that nothing uses strict lowercase or lazy_case, so there is no ambiguity in one word variables or functions.
whatsThis() ? Why that's a function.
WHATS_THIS ? Why that's a constant (either #define or enum)
whatsThis ? Why that's a variable.
WhatsThis ? Why that's a class or struct.
intWhatsThis ? Why that's a Visual Basic Programmer.
I find this notation gives the nicest looking code:
Box* box;
Ball::Ball(Box* box) {
this->box = box;
box->addBall(this);
}