Peter Bolton is the author of Blowing the Bridge: A Software Story and has also been known to be a grumpy bastard on occasion.
Monthly Archives: October 2014
The Function Name Hall of Shame
Over the years, I’ve participated in numerous code reviews, and I’ve seen a few function names that were worthy of true shame. However, the Hall of Shame demands only the best (or the worst, depend on your point of view), and so, I have whittled it down to a few of the most worthy. Consequently, I nominate the following for the Hall of Shame:
- NOTE: Could this function be any more ambiguous?
private string GetTableData() - NOTE: Our new programmer just might be dyslexic or suffer from something worse
public int ManageJoinUsingDelete(…) - NOTE: Do we need to know every step involved in the name?
private int GetUpperRangeOffsetBySubtractingProductOfTwoSums() - NOTE: I hope that this ‘body’ refers to text and not a dead hooker
public void EndStreamingNoAttachIfBody(…) - NOTE: This function needs more ‘temp’
public int PopulateTempTemporaryTransfer(…) - NOTE: This seems so wrong on so many levels
public bool IsFalse() - NOTE: He’s not exactly creative, is he?
public void TransformData(…)
public void TransfromDataPlus(…)
public void TransformDataPlusExtra(…) - NOTE: They do say that string mathematics is a dying art
private string CalculateNextLessThanOrEqualNumber(string) - NOTE: ???
private string GenerateTempGetUpdateOrGetInsertWhereCriteria(int) - NOTE: I like it…straightforward, single in use, and stupidly simplistic
private string SurroundWithParantheses(string)
Peter Bolton is the author of Blowing the Bridge: A Software Story and has also been known to be a grumpy bastard on occasion.
The Sad Circumstances of Being a Developer
Peter Bolton is the author of Blowing the Bridge: A Software Story and has also been known to be a grumpy bastard on occasion.
Crime and Punishment (for Developers): First Edition
It’s my personal preference to incentivize fellow developers, in order to truly get the best out of them…but when funds are scarce or when personalities are too strong, draconian measures must be put in place. (Sometimes, it just makes sense to replace cash with pain as the currency to dole out.) However, to be fair, there should be some code of conduct, since it wouldn’t be just to not have a proper system installed. So, here are some proposed punishments that match their dirty deeds:
Crime: Using string concatenation to create SQL, instead of using prepared statements or other similar frameworks/data structures.
Punishment: Be forced to build a chair from moldy wood and rusted nails while blindfolded and then to work from that chair for a year.
Crime: Going on vacation to another part of the world for several weeks and forgetting to commit your code before leaving.
Punishment: Building security will occasionally “forget” that you are an employee, and assuming that you are a domestic terrorist, they will tackle you and blast you in the face with pepper spray.
Crime: Immediately shirking blame and rejecting the claim of a bug in your code, even without hearing the evidence. (Even worse, not apologizing for your behavior when your code is actually found to be the cause.)
Punishment (First Offense): Find the dirtiest computer mouse in the department and be forced to keep it in your mouth for an entire day.
Punishment (Second Offense): Find the dirtiest computer mouse in the department and be forced to hold it in your ass for an entire day.
Punishment (Third Offense): 2nd offense punishment, followed immediately by 1st offense punishment.
Crime: Knowing that a reliable library already exists with desired functionality and writing your own anyway, even though a deadline is approaching.
Punishment: For the next year of your life, you will be required to maintain legacy, never-reusable COBOL code from 1979. More importantly, you will be required to work (and sweat your ass off) inside the VMS machine that currently executes the program, and you will be required to wear the polyester suit of the original programmer while working.
Crime: Putting the majority of your program’s logic and flow inside a database stored procedure, instead of inside your actual application.
Punishment: For your next project, a wall will be placed between you and your computer, and you can only touch your keyboard and mouse via a pair of glory holes. Most of the time, you will only come into contact with your equipment, but occasionally, you’ll encounter “the equipment” of someone else…which may then require a handjob in order to push your next code changes to Github.
Peter Bolton is the author of Blowing the Bridge: A Software Story and has also been known to be a grumpy bastard on occasion.