Geek out! Coder humor....

bmoeller

Pre-takeoff checklist
Joined
Sep 16, 2015
Messages
122
Location
Collegeville, Pa
Display Name

Display name:
RedHeadBarron
Saw these awhile back on Stack overflow. If you've done any coding, you may enjoy these....


Code:
// 
// Dear maintainer:
// 
// Once you are done trying to 'optimize' this routine,
// and have realized what a terrible mistake that was,
// please increment the following counter as a warning
// to the next guy:
// 
// total_hours_wasted_here = 42
//


Code:
Exception up = new Exception("Something is really wrong.");
throw up;  //ha ha

Code:
stop(); // Hammertime!

Code:
// I dedicate all this code, all my work, to my wife, Darlene, who will 
// have to support me and our three children and the dog once it gets 
// released into the public.

Code:
// somedev1 -  6/7/02 Adding temporary tracking of Login screen
// somedev2 -  5/22/07 Temporary my ass

Code:
//This code sucks, you know it and I know it.  
//Move on and call me an idiot later.

Code:
try {

}
catch (SQLException ex) {
    // Basically, without saying too much, you're screwed. Royally and totally.
}
catch(Exception ex)
{
    //If you thought you were screwed before, boy have I news for you!!!
}

Code:
//MailBody builders for two outgoing messages
StringBuilder hanz = new StringBuilder();
StringBuilder franz = new StringBuilder();


Finally....Posted on my office wall.
I-dont-always-test-my-code.jpg
 
I worked on a very large and complex C/C++ system several years ago. It had late binding implemented in C and made tremendously frequent use of the heap. It had been maintained for many years by a revolving staff of sometimes talented, sometimes castoff programmers. When I got on the program, we had terrible stability issues frequently caused by pointer issues related to the heap. So I implemented a full set of heap routines which kept track of all allocated and unallocated memory, protected each end of the blocks and could verify the heap's integrity on command. I started with allocate_chunk, release_chunk and reallocate_chunk. The routine which got called if there was a problem was: blow_chunks.

John
 
I love the throw up exception...

A long, long time ago I was re-coding an application from Access to SQL. It should have been completely rewritten, but there was no time for it. It was coded by my "boss"/owner of the company at the time.

I put in some of the most hilarious comments on how horrible his coding was and how he should find a new profession. Long story short... He called me about 20 times in one day, 3 years after I left the company. I almost peed my pants every time the phone would ring.
 
The throw up exception is fun, the stop(); comment is priceless.
Great coding humor for the end of the week. Keep posting more!!
(and since I am getting off work right now, I'll read it once I am done flying the wife and myself to our favorite vacation island resort)

Now go fly!! (cuz I will be in an hour :) )
 
Code:
//This code sucks, you know it and I know it.  
//Move on and call me an idiot later.

So, I'm sitting at my desk and a guy comes by with a printout of a chunk of code and asks me to look at it - after a couple minutes I decide that it was a total mess and ask "Who was the idiot who wrote this?" He answered "You did, that's why I'm asking you about it."


Code:
try {

}
catch (SQLException ex) {
    // Basically, without saying too much, you're screwed. Royally and totally.
}
catch(Exception ex)
{
    //If you thought you were screwed before, boy have I news for you!!!
}
Yea.

Writing a big routine using Fortran 77 and SQL... Had all the possible exceptions covered one way or the other - so the unconditional else just printed out to call me because there was no way to get to this bit of code. No way whatsoever.

I got a call a couple times a year. All I could say was "try it again and see what happens...". And, it always worked the next time.
 
We found a great bug in Avaya's crap yesterday confirmed by other reports of it on Google...

Once in a great while their event callbacks will just randomly shove this into any variable in their event API...

"!$NOTASSIGNED"

Been reported to them as a bug for years, apparently they can't find it. Affects all products that use their telephony event API.

We just wrote a handler to log any lines that have that string into a debug log and throw the whole line away. We'll see how that turns out over the long haul.
 
I love the throw up exception...
I put in some of the most hilarious comments on how horrible his coding was and how he should find a new profession. Long story short... He called me about 20 times in one day, 3 years after I left the company. I almost peed my pants every time the phone would ring.

LOL! I do that now for my team. Makes me laugh when I get a comment from them months later
 
So, I'm sitting at my desk and a guy comes by with a printout of a chunk of code and asks me to look at it - after a couple minutes I decide that it was a total mess and ask "Who was the idiot who wrote this?" He answered "You did, that's why I'm asking you about it."

Whew! I'm glad I'm not the only one who had those types of experiences. Looking at code, wanting the strangle the coder, only to realize I did it. LOL. Then again, on occasion I get the opposite. What a fine piece of code this is, who wrote it? Me? What the ?!
 
I just thought of this:

When did "programming" become "coding"?

--

Anyway, I remember two particular projects. Both were pretty substantial, both had been written many years before I came along, and both had only one comment each.

1) /* Harry's wife had a baby */

2) float x; /* hypotenuse */

Good times.
 
SYSIN DD * do da, do da ...

C code. C code run. Run, code, run! (please?)

All the really good stuff requires one to understand the code environment or the staff associated with the project. But one we have here to check for customer license violations is the following class (which is copyrighted). It was created when we found some people are ... well... precious.

public class BCThereAreThieves
{
static BCThereAreThieves one****Head; /// yes, the **** were edited by POA..
....
 
The worst I found was this gem of a comment in 2010. This one I got assigned to me Jan 4, 2010 because Bob had just quit.

Code:
// Ok, this doesn't really work for Y2K, but it will be 10 years before anyone
// finds it and I'll be long gone.  I know it's going to break when the single 
// digit rolls around again.  Sorry, but better you than me - Bob

Unrelated, this was my favorite

Code:
// Hardcoding this because we don't have time to go through the 
// whole database table change thing right now.  Besides, it will always
// be 10.  If it isn't, sorry.
// Warning, Warning, Danger Will Robinson
 
Last edited:
Diagram is missing the hoardes of people who look prettier than those in the diagram who can't get through a day without salesforce.com or worse, Siebel.
 
Awww, thanks for reminding me to check back in on http://www.thedailywtf.com/

:) you gotta love the classics like const int ten = 13; // I don't know why but this seems to work.


 
Back
Top