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:

  1. NOTE: Could this function be any more ambiguous?
    private string GetTableData()
  2. NOTE: Our new programmer just might be dyslexic or suffer from something worse
    public int ManageJoinUsingDelete(…)
  3. NOTE: Do we need to know every step involved in the name?
    private int GetUpperRangeOffsetBySubtractingProductOfTwoSums()
  4. NOTE: I hope that this ‘body’ refers to text and not a dead hooker
    public void EndStreamingNoAttachIfBody(…)
  5. NOTE: This function needs more ‘temp’
    public int PopulateTempTemporaryTransfer(…)
  6. NOTE: This seems so wrong on so many levels
    public bool IsFalse()
  7. NOTE: He’s not exactly creative, is he?
    public void TransformData(…)
    public void TransfromDataPlus(…)
    public void TransformDataPlusExtra(…)
  8. NOTE: They do say that string mathematics is a dying art
    private string CalculateNextLessThanOrEqualNumber(string)
  9. NOTE: ???
    private string GenerateTempGetUpdateOrGetInsertWhereCriteria(int)
  10. 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.

About these ads

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.

More Goals for HBO’s Silicon Valley



After already introducing a measurement standard for compression and giving us a mathematical treatise on mass stimulation, the show Silicon Valley can already be considered as productively prolific, in addition to being hilariously comedic. Obviously, the show is capable of giving us so much more, and we should challenge them to surpass their own past achievements. So, I think I speak for all of us when I say that we expect at least one of the following challenges to be met by the end of the second season:

  1. To create the general specifications for the firmware of a “companion” robot being built by Jian, that will possess both the AI needed to pass the Lovelace test and the kinematic equations needed to pass the Linda Lovelace test.
  2. To prototype the first online bartering system and bartering message protocol, which Erlich will build for use in his new (and legal) business project WeedNeed (where people will exchange old mobile phones for drone-delivered marijuana).
  3. To develop (and then open source) a script utility that will allow you to create a customized set of VRF tables and DNS entries, which Gilfoyle will then use to create and traceroute a poem about how much Dinesh is gay for his code.
  4. To invent an accepted scoring system for the static code analysis of Java (probably by Dinesh), in which a minimum score of 90 will get you one free turn with Jian’s new “companion” robot.
  5. To create a simple package for script kiddies that exploits CVE-2014-6271, which Gilfoyle uses to replace the home page for JQuery with a picture of monkeys masturbating.

  6. To roughly outline a new method for software development called The Starving Startup, in which different planning stages of the business are devised at different levels of hunger and isolation of the designers. (Jared had an epiphany for this idea during his latest sabbatical.)
  7. To create an accurate measurement standard for image recognition, that will benchmark Hooli’s new IR system as it attempts to censor the Mad Bomber (who photobombs popular restaurant cams with his penis in hot dog buns).

Peter Bolton is the author of Blowing the Bridge: A Software Story and has also been known to be a grumpy bastard on occasion.

Failed Software Stacks



Some software stacks, like LAMP, flourished…and others, well, they just didn’t make the grade.

FLUKE
Facebook, LUa, and KErberos

WASTE
Google Wave, ASP, Sparrow, Truecrypt, and Encarta

FAPPY
Flat files, APache, and PYthon

HYPESS
Hadoop, Yo, PErl, Swift, and a Segway

SCHEET
Scala, a CHange purse, Java EE, and Tomcat

FAIL
F#, Access, IIS, and Longhorn

NOBJOB
NOde.js, BLOBs, JQuery, and some Oracle Bloatware

GOALONG
GO, AnguLarJS, Offers, Nest API, and Google Maps

Peter Bolton is the author of Blowing the Bridge: A Software Story and has also been known to be a grumpy bastard on occasion.

If Web Development Met the DMV



Any U.S. citizen can describe the awful experiences which accompany the use of a DMV (or, in some relevant cases, a post office). The minutes or hours of waiting in a line, the callous cackle of laughter of a pensioned employee doing nothing in a back room, the complete apathy behind the counter, the ambient despair hanging in the air…these are the hallmarks of its routine service. However, I would still rather wait in the line of a DMV than pursue another elaborate web development project…for, at the very least, there is still a shroud of humanity left in the husk of a DMV, even if it’s barely clinging to the inside like the placental tissue of a pumpkin. I wonder, though, if we were to apply the tools and norms of web development to the DMV…it might look a little something like this:

  • Debugging: As you walk into the lobby of the DMV, you swing the door a bit too quickly, causing the hinge to be pulled out of the door’s frame. Some of the DMV employees give you paper clips and a stapler in order to repair it. In order to be a good sport, you give it a half-hearted try, and when that doesn’t work, the DMV staff understand the futility of it. Instead, they tell you to come back later; they have concluded that the whole DMV office needs to be closed indefinitely, since it will need to be rebuilt entirely.
  • Error-Handling: Later, when you approach the counter and ask for a change-of-location form, the clerk just stands there. The clerk could correct your mistake and inform you that it’s a change-of-address form, not a change-of-location form…but instead, the clerk just stands there and looks back at you.
  • Browser Compatibility: When you approach the counter about renewing your license, they inform you that the process involves interacting with several different people: a photographer, a clerk, and a test administrator. However, for each different person, you will need to change outfits, speak a different language, and rearrange the furniture in the room to his/her preference.
  • Lack of Online Help: While attempting to actually renew the license, you are defenestrated from the second floor by the test administrator (despite wearing a blue shirt, speaking Turkish, and pointing all the chairs to the southwest). When you ask other DMV attendees for their advice on how to resolve this problem, each one has a different answer, but none of them actually help you.
  • Using WordPress: Frustrated with your trips to the DMV, you finally give up and hire Toonces the Driving Cat. At first, everything works perfectly, as you only ask him to drive you to work and back home. However, when you ask him to take a different route one day, he quickly starts to become frustrated, and in a state of panic, he drives the both of you off a nearby cliff, where you both perish in a mass of twisted metal.

Peter Bolton is the author of Blowing the Bridge: A Software Story and has also been known to be a grumpy bastard on occasion.

10 Software Hurdles for Google’s Self-Driving Cars



1.) All software for the cars must be developed with only Angular JS and Dart, using an IDE on an Android tablet.

2.) Since the self-driving software needs a plethora of data about a local area in order to drive properly around there, the neural network of each SD (i.e., self-driving) car will need to learn by driving over nearly every mile of the roads in its customer’s region before being used. As long as you’re comfortable with waiting several months after purchase and starting with 100,000 miles on the odometer, then the car is yours.

3.) In order to eat their own dog food, Google is looking to replace its entire Google StreetMap van fleet with the SD model. However, the car has yet to properly handle certain tasks of a Google Van, like taking embarrassing pictures of public urination/nudity and recording “random” samples of nearby WiFi traffic.

4.) Unfortunately, the SD patriarch Kit has reached a certain age where it’s harder to rise to the occasion, and in order for him to reproduce with the female self-driving cars, he will need to remedy his “dysfunction” with certain patches to his operating system.

5.) The OCR system will need to properly identify and react to any signs held by roadside people, like policemen warning of danger ahead or high school cheerleaders who are holding a charity car wash.

6.) Weather has been a persistent problem with the navigation system, especially with the presence of precipitation (including rain and snow). In order to address the problem, the SD model will need to recognize this perilous situation, and the current desired implementation will switch the vehicle into Transformer mode, where it will turn into a 5-story robot and commence walking down the highway.

7.) Unfortunately, the SD model is still a pervert, and it has a nasty habit of recording your sessions with your girlfriend in the back seat. Just skip the roadhead until it’s fixed.

8.) Currently, the OCR system has difficulty with the identification of pedestrians and bicyclists running on the roads, especially in that it records only 5 experience points when it runs a cyclist off the road. Cyclists are clearly worth at least 10 XP.

9.) Even though the system does not yet currently handle unexpected traffic lights properly, it will attempt to react to these lights in the best way possible, namely to follow the Starman Creed and run through every yellow light.

10.) For any legal infraction incurred during its driving, the software of the SD model is supposed to be able to automatically contest the ticket online. As this functionality is still pending, it will be programmed in the meantime to bust into traffic court Kool-Aid Man style and argue with the judge on your behalf.

Peter Bolton is the author of Blowing the Bridge: A Software Story and has also been known to be a grumpy bastard on occasion.

Steve Ballmer’s Syllabus for Next Semester



STRATEGIC MANAGEMENT FOR BUSINESS: COURSE SYLLABUS
Fall 2014
Instructor: Steve Ballmer

Classroom: Stanford, Room 666
Office: My 300-room mansion on the top of a mountain
Office Hours: I’ll be available to students when the Microsoft App Store is a success
Contact Info: Kiss my bald head

Description: This course will provide business students with the knowledge and skills to plot the course of an enterprise, especially in how to navigate a product’s journey from inception to complete and utter disaster.

Organization: This is an unconventional course, in that there are actually no complete lectures. Instead, utilizing something called the Longhorn method, Professor Ballmer will start each lecture passionately, suddenly stop and postpone it indefinitely, and then return to it weeks later when everybody is past caring about it.

Course Objectives:
1.) To teach students on how a business can develop its own product line by copying from others, borrowing only the worst ideas and leaving the good ones behind.
2.) To introduce students on the best practices for ignoring technological trends (i.e., the emergence of the Internet) and scrambling to keep up with them when vastly behind the times.
3.) To acquaint students with the notion of being complacent when a business has reached a certain level of success and to prepare students on how to properly underestimate one’s competitors.

Grading Plan: Much like the historical practices of Microsoft, Professor Ballmer’s class will enforce the use of stack ranking. As a result, despite all actual grades, a guaranteed 10 percent will fail, and another 70 percent* will need to plead with Professor Ballmer for a passing grade at the end of the course.

* More than likely, the “adequate” 70% will become students at other universities and become more productive in those environments.

Required Supplies (one of each):
Surface RT
Surface Pro 1
Surface Pro 2
Surface Pro 3

Course Topics:
How to Reduce Costs by Reducing Market Share
Keep It Stupid, Simple: You Have to Spend Money to Lose Money
Pull a 360: How to Make Your Business Go in Circles and Never Really Go Anywhere
The Key to Marketing Is Confusing Commercials
Everybody Loves a Bully: Lose Respect in Your Industry by Being Hostile to Collaboration
Developers, Developers, Developers
Go Clippers

Classroom Rules of Conduct: Students are encouraged to be belligerent and assertive when participating in discussions. Any sign of weakness will not be tolerated, and those offenders will be sent to the corner of the classroom and forced to wear the Kin Beanie as punishment.

Suggestions for Success:
Professor Ballmer says “When it comes to making big decisions, just do everything in the opposite way that I did…oh, and remember to make friends with people on your dorm floor.”

Peter Bolton is the author of Blowing the Bridge: A Software Story and has also been known to be a grumpy bastard on occasion.