Informing the IBM Community

Programmers Comments

0
(0)

This is a light hearted article this month while I prepare for my Node.js on IBM i workshop at the UK International i Power conference 2019.

Over the 40 odd years I have been programming, I’ve come across some fantastic comments in source code.  They certainly make code maintenance a lot more enjoyable.

These are my favourites; I hope you enjoy!

// TODO : Add a comment// If this code works, it was written by Paul. If not, I don’t know who wrote it
// Catching errors is for communists
// I am not sure if we need this, but too scared to delete
long john; // silver
// somedev1 –  6/7/02 Adding temporary tracking of Login screen
// somedev2 –  5/22/07 Temporary my ass
// Autogenerated, do not edit. All changes will be undone.
// 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
double penetration; // ouch
// Used to work around Richard being a ******* idiot
// When I wrote this, only God and I understood what I was doing – Now, God only knows
// I dedicate all this code, all my work, to my wife, Darlene, who will have to support me & our three children & the dog once it gets released into the public
// drunk, fix later
return 1; // returns 1
// Replaces with spaces the braces in cases where braces in places cause stasis
$str = str_replace(array(“\{“,”\}”),” “,$str);
Catch (Exception e) {
//who cares?
}
// Always returns true
public boolean isAvailable() {
return false;
}
# code below replaces code above – any problems?
# yeah, it doesn’t work!

 

And one to finish with, not really a source comment, but good anyway!

# Linux Sex

$ date ; unzip ; strip ; touch ; grep ; finger ; mount ; fsck ; more ; yes ; umount ; sleep

Conclusion

I’m sure you could all add some fantastic comments you’ve seen in code over the years.  How about sharing them with us all – use the comments box below, we would love to hear them!

As I mentioned earlier, I’m looking forward to the next round of the i-UG user group meetings this year in the UK, the International i Power 2019 conference on the 11th & 12th June 2019.  Hopefully we can meet up at the main event of the year at our local football stadium in Milton Keynes.  Full details can be found on the iUG site here

Andy Youens is an IBM i consultant/instructor at Milton Keynes, UK-based FormaServe Systems with over 39 years IBM midrange experience.

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.


Comments

One response to “Programmers Comments”

  1. Spotted in an RPG program today:

    0905.00 * EEK – hard coding! This is only Temporary. 950322

    Yes – the date for the line is 22nd March 1995.