Computer Science Canada A very thorough guide to style |
Author: | Hikaru79 [ 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 ![]() |
Author: | [Gandalf] [ Mon Nov 21, 2005 7:39 pm ] | ||
Post subject: | |||
Hehe, not bad, I'll have to read the whole thing some time.
Java? I would think this is C... Ahaah, it's an accented 'i' ![]() |
Author: | eklypze [ Tue Dec 06, 2005 8:45 pm ] |
Post subject: | |
Thanks, this guide was very interesting and helpful to me. ![]() |
Author: | Martin [ Wed Dec 07, 2005 3:24 am ] |
Post subject: | |
You think that's bad -- the code I'm working with is documented in Japanese and uses Engrish notation. |
Author: | Martin [ Wed Dec 07, 2005 7:20 pm ] |
Post subject: | |
Speaking of which, I really should go back and delete some of these comments I wrote. Just found a: //So this works... hmmm... |
Author: | wtd [ Wed Dec 07, 2005 7:22 pm ] |
Post 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. ![]() |
Author: | Martin [ Wed Dec 07, 2005 7:33 pm ] |
Post subject: | |
JavaServer Faces + Japanese Error messages + Japanese Specification makes for one very confused Canadian code monkey. |
Author: | wtd [ Wed Dec 07, 2005 7:35 pm ] |
Post subject: | |
I'd be very frightened if you weren't confused. |
Author: | bugzpodder [ 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; |