
-----------------------------------
Hikaru79
Mon Nov 21, 2005 6:29 pm

A very thorough guide to style
-----------------------------------
This was posted on Slashdot as a joke -- its titled [url=http://thc.org/root/phun/unmaintain.html]"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 ;)

-----------------------------------
[Gandalf]
Mon Nov 21, 2005 7:39 pm


-----------------------------------
Hehe, not bad, I'll have to read the whole thing some time.

 typedef struct { int i; } Ã­nt;
Java?  I would think this is C...  Ahaah, it's an accented 'i' ;).

-----------------------------------
eklypze
Tue Dec 06, 2005 8:45 pm


-----------------------------------
Thanks, this guide was very interesting and helpful to me.  :wink:

-----------------------------------
Martin
Wed Dec 07, 2005 3:24 am


-----------------------------------
You think that's bad -- the code I'm working with is documented in Japanese and uses Engrish notation.

-----------------------------------
Martin
Wed Dec 07, 2005 7:20 pm


-----------------------------------
Speaking of which, I really should go back and delete some of these comments I wrote.

Just found a:

//So this works... hmmm...

-----------------------------------
wtd
Wed Dec 07, 2005 7:22 pm


-----------------------------------
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
Wed Dec 07, 2005 7:33 pm


-----------------------------------
JavaServer Faces + Japanese Error messages + Japanese Specification makes for one very confused Canadian code monkey.

-----------------------------------
wtd
Wed Dec 07, 2005 7:35 pm


-----------------------------------
I'd be very frightened if you weren't confused.

-----------------------------------
bugzpodder
Fri Dec 09, 2005 10:57 pm

Re: A very thorough guide to style
-----------------------------------
This was posted on Slashdot as a joke -- its titled 


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.
 :lol:  :lol: 


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;
