IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New rofl you HAVE the read the whole thing
(my sides are splitting...)

Encapsulate The Trivial

Create entire classes or methods to encapsulate trivialities that could never possibly change, but which then require complex invocation, and careful unravelling to discover that the code does almost nothing. Here is a classic example:
\nclass Truth \n{ \n boolean isTrue ( boolean assertion ) \n{ \n if ( assertion != false ) return assertion; \n else return assertion; \n } \n} \n\n ... \n \n Truth trutherizer = new Truth() ; \n if ( trutherizer.isTrue ( s.equals( t ) ) ) doIt = true; \n else doIt = false; \n \n \n // hint: all the above accomplishes is: \n doIt = s.equals( t ); \n


OMG! When the customer input his name, the trutherizer threw an unhandled exception!
-drl
New Ack! Flashback.
Way back in college, I got 1 point taken off a programming assignment in CS 101 (the language was Pascal). Why 1 off? Because (and I don't remember Pascal's syntax exactly so this may not be precisely correct) I had written this:

while not eof(hFile)

My professor told me that I should have written a function called MoreData() that would return true if not end of file and false otherwise. If I had 'truly modular code' I would have then written

while MoreData(hFile)

I swear that is a true story.
bcnu,
Mikem

Java, Junk. Both start with a "J", both have four letters. Coincidence? I think not.
     The Obfuscated C Style Guide - (deSitter) - (3)
         rofl you HAVE the read the whole thing - (deSitter) - (1)
             Ack! Flashback. - (mmoffitt)
         LOL - (Arkadiy)

Ain't science wunnaful?
57 ms