Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 A very thorough guide to style
Index -> General Programming
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Hikaru79




PostPosted: 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 Wink
Sponsor
Sponsor
Sponsor
sponsor
[Gandalf]




PostPosted: 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' Wink.
eklypze




PostPosted: Tue Dec 06, 2005 8:45 pm   Post subject: (No subject)

Thanks, this guide was very interesting and helpful to me. Wink
Martin




PostPosted: 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




PostPosted: 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




PostPosted: 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. Smile
Martin




PostPosted: 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




PostPosted: Wed Dec 07, 2005 7:35 pm   Post subject: (No subject)

I'd be very frightened if you weren't confused.
Sponsor
Sponsor
Sponsor
sponsor
bugzpodder




PostPosted: 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 Wink


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.
Laughing Laughing

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;
Display posts from previous:   
   Index -> General Programming
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 9 Posts ]
Jump to:   


Style:  
Search: