PowerWire.eu

Independent IBM i, AIX and Linux news and tech tips for Europe and beyond

  • Home
  • News
  • Technical Articles
    • IBM i
    • AIX
    • Linux
    • VIOS
  • Subscribe
  • About Us
  • Contact Us
  • Advertise with PowerWire.eu

Programmers Comments

June 4, 2019 by Andy Youens

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.

Filed Under: IBM i, News

Comments

  1. Andrew Fisher says

    June 5, 2019 at 11:32 am

    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.

Free monthly newsletter signup

News

A screen a story – Not our problem anymore

Last week I ran into an issue, which did teach me something new about the command WRKPRB. After checking a … [Read More...]

Raspberry Pi and Machine Learning

In my last article, I demonstrated how I used Machine Learning on the Raspberry Pi to determine if a … [Read More...]

Shield Advanced Solutions – new Messaging and Monitoring solutions

September 2022 – Toronto As Shield Advanced Solutions celebrates the significant milestone, 25 years of … [Read More...]

More articles from this section

Quick Links

  • Advertise
  • Subscribe

Follow Us…

  • Email
  • LinkedIn
  • Twitter

Search This Website

Copyright © 2023 · Cue Communications · All Rights Reserved

Log in