I hate the whole ++ thing... in Clarion (the language i've written the most 'stuff' in, it's += ;)
Pet peeves
I have a commenting peeve:
People who, in C++, prefix every line of a multiline comment with a star, thus:
/*
* A line of the comment
* Another line of the comment
* More commenting.
*/
People who, in C++, use /**/ commenting for single line comments, thus:
/* A single line comment */
And the absolute winner: people who, in C++, use /**/ commenting for single line comments, but make the comment take up 3 lines, thus:
/*
* A single line comment spread over three lines.
*/
Now, I can understand the origins of the "* on every line" being business, being rooted in programming in C using simple text editors, but there are three issues here:
1) C++ has // for that sort of thing
2) C IS A DIFFERENT LANGUAGE.
3) In a commercial environment, where we all use the same IDE, we all have syntax highlighting, We can see that it is a comment, because it is green (or your colour of choice).
People who, in C++, prefix every line of a multiline comment with a star, thus:
/*
* A line of the comment
* Another line of the comment
* More commenting.
*/
People who, in C++, use /**/ commenting for single line comments, thus:
/* A single line comment */
And the absolute winner: people who, in C++, use /**/ commenting for single line comments, but make the comment take up 3 lines, thus:
/*
* A single line comment spread over three lines.
*/
Now, I can understand the origins of the "* on every line" being business, being rooted in programming in C using simple text editors, but there are three issues here:
1) C++ has // for that sort of thing
2) C IS A DIFFERENT LANGUAGE.
3) In a commercial environment, where we all use the same IDE, we all have syntax highlighting, We can see that it is a comment, because it is green (or your colour of choice).
Alright - I'll join the flamewar [smile]
My coding style:
I'm using the { on the same line, EXCEPT the function declarations.
And what I totally hate? When someone is using while (1) instead of while (true) for infinite loop
Oxyd
My coding style:
/* Multiline * comment =) */void foo (){ if (cond) { something (); } else { nothing (); }}
I'm using the { on the same line, EXCEPT the function declarations.
And what I totally hate? When someone is using while (1) instead of while (true) for infinite loop
Oxyd
When people don't indent the opening and closing braces. Argh! I spend about three days going through the HL SDK fixing that... and the spacing.
And I also hate when someone writes return type on separate line from the rest of function definition:
I feel like killing some innocent animal, when I see this [smile]
Oxyd
intsum (int a, int b){ return a + b;}
I feel like killing some innocent animal, when I see this [smile]
Oxyd
Quote:Original post by Oxyd
And what I totally hate? When someone is using while (1) instead of while (true) for infinite loop
Not as bad as:
#define EVER ;;for(EVER) // lolz{}
Quote:Original post by SandmanQuote:Original post by Oxyd
And what I totally hate? When someone is using while (1) instead of while (true) for infinite loop
Not as bad as:
*** Source Snippet Removed ***
or even
#define ever (;;)for ever{}
:P
<script type="text/javascript"> // browser-detection code if (browser_is_ie) { // IE-specific code } else { // standard-conforming code that works on all browsers, including IE }</script>
So let us mix the worst ones together :D
This is how I code everyday :D
int main( int argc, char **argv, char** env ) { for (int i=0;i < argc;i += 1) { char *a = (char *) malloc ( 65536 ); /* * To be sure, some way to huge size * */ strcpy ( a, argv ); printf ( "%s", a ); /* * Printing a out via %s, a bit pointless and problematic if a contains a white space ;) */ /* * free? let the operating system take care of that? lol */ }}/* * Note that there is no useful comment! :D */
This is how I code everyday :D
#define BEGIN {#define END } /* * Hey, I'm used to Pascal, and feel this to be clearer than all those {'s and }'s =) */void main( int argc, char **argv, char** env ) BEGIN register int counter ; counter = 0 ; while ( ( counter < argc) == 1 ) BEGIN char *a = (char *) malloc ( 65536 ) ; /* * To be sure, some way to huge size * */ strcpy ( a, argv[counter] ) ; printf ( "%s", a ) ; /* * Printing a out via %s, a bit pointless and problematic if a contains a white space ;) */ counter = counter + 1 ; /* * free? let the operating system take care of that? lol Who uses 98, anyway? */ ENDEND/* * Note that there is no useful comment! :D */
You see - things can be even worse [smile]
Oxyd
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement