Posted: Mon Nov 21, 2005 6:29 pm Post subject: A very thorough guide to style
This was posted on Slashdot as a joke -- its titled "How to Write Unmaintainable Code." However, if you look at it carefully, and make sure to always do the OPPOSITE of what it tells you, this article is undoubtedly the most thorough code style guide I have ever read. It claims to be for Java but the tips are so universal that it'll benefit almost anyone. The detail is staggering.
Again, just make sure you always do the OPPOSITE of what it tells you
Sponsor Sponsor
[Gandalf]
Posted: Mon Nov 21, 2005 7:39 pm Post subject: (No subject)
Hehe, not bad, I'll have to read the whole thing some time.
code:
typedef struct { int i; } Ãnt;
Java? I would think this is C... Ahaah, it's an accented 'i' .
eklypze
Posted: Tue Dec 06, 2005 8:45 pm Post subject: (No subject)
Thanks, this guide was very interesting and helpful to me.
Martin
Posted: Wed Dec 07, 2005 3:24 am Post subject: (No subject)
You think that's bad -- the code I'm working with is documented in Japanese and uses Engrish notation.
Martin
Posted: Wed Dec 07, 2005 7:20 pm Post subject: (No subject)
Speaking of which, I really should go back and delete some of these comments I wrote.
Just found a:
//So this works... hmmm...
wtd
Posted: Wed Dec 07, 2005 7:22 pm Post subject: (No subject)
Martin wrote:
Speaking of which, I really should go back and delete some of these comments I wrote.
Just found a:
//So this works... hmmm...
That just oozes confidence.
Martin
Posted: Wed Dec 07, 2005 7:33 pm Post subject: (No subject)
JavaServer Faces + Japanese Error messages + Japanese Specification makes for one very confused Canadian code monkey.
wtd
Posted: Wed Dec 07, 2005 7:35 pm Post subject: (No subject)
I'd be very frightened if you weren't confused.
Sponsor Sponsor
bugzpodder
Posted: Fri Dec 09, 2005 10:57 pm Post subject: Re: A very thorough guide to style
Hikaru79 wrote:
This was posted on Slashdot as a joke -- its titled "How to Write Unmaintainable Code." However, if you look at it carefully, and make sure to always do the OPPOSITE of what it tells you, this article is undoubtedly the most thorough code style guide I have ever read. It claims to be for Java but the tips are so universal that it'll benefit almost anyone. The detail is staggering.
Again, just make sure you always do the OPPOSITE of what it tells you
Quote:
A very simple way to confound people trying to understand your code by tracing it with a line debugger, is to make the lines long. In particular, put the then clause on the same line as the if. They can't place breakpoints. They can't tell which branch of an if was taken.
Quote:
If your compiler issues "unused local variable" warnings, don't get rid of the variable. Instead, just find a clever way to use it. My favorite is...
i = i;