Blog

Here's what's on the minds of our marketing and technology experts.

For more perspectives from Sundog, check out Sundog: The Podcast and our knowledge.

RSS Icon Subscribe to blog feed What's this?

Paul Bourdeaux
.(JavaScript must be enabled to view this email address)
Senior Software Engineer

Presents insights, trends and recommendations for using mobile technologies.

More posts by this author

Full Post

Code as if the next guy to maintain your code is a homicidal maniac who knows where you live.

One of my all time favorite quotes comes from Kathy Sierra and Bert Bates.  “Code as if the next guy to maintain your code is a homicidal maniac who knows where you live.” I have brought it up several times before, but every once in a while, while maintaining legacy code, you come across a gem that really hits home.  The following was sent to me by a former colleague:

19 try {
20 PersistenceManagerFactory persistenceManagerFactory =
JDOUtil.getPersistenceManagerFactory(new TestDatabaseInfo());
21 PersistenceManager pm = persistenceManagerFactory.getPersistenceManager();
22
23 FileSizeDpiCalculator.calculateFileSizeDpi(pm);
24 } catch (Throwable t) {
25 LogUtil.error(this, “I hate it when this happens: “, t);
26 System.exit(-1);
27 }

Really?  “I hate it when this happens?” THAT is the error code I am gong to see in the logs in the event of a thrown exception?  Don’t get me wrong, I see the humor in it.  Hey, I hate it when it happens too.  It was probably funny to see that little Easter Egg pop up in the logs when you were developing the code.  However, maybe you could try and make it a little less aggravating for those of us who come after you. ;)

The author of that code should be thankful that my colleague isn’t one of the before referenced homicidal maniacs…

Don't miss any posts! Subscribe to our blog feed or only posts by Paul Bourdeaux.

Short URL: http://sundoginteractive.com/e/3097

Comments

Be the first to comment!

Leave A Comment

Please help us stop spam by typing the word you see in the image below:

Contact Us

Fill out and send the form below to learn about our refreshing approach to measureable marketing, or call 1.888.9.sundog.

     
Follow us on:
Twitter
Facebook
Flickr
Google+