How Real Men Code: In 5 Easy Steps
Tags:
By Carl Poland (guest contributor) -- CEO, Compubiztech Solutions, LLC, and Professor of Computer Science
The other day, I stumbled on a post by some "blogger" named Kathy Sierra. Her post advised that code "...cannot be merely functional, it must be beautiful, as well. " This idea is not only stupid, but dangerous, and even stupid, as I'll show. Code is supposed to be ugly. If it weren't ugly, than it wouldn't be code! People who claim otherwise merely reveal their inexperience.
Some whippersnapper programmers, (those I've noticed, I'll merely number 1,2,3,4,5,6,7,8,9,10,11 [i really hate these guys...]) think their "metrosexual" code makes them smart. I'll get to them later: these smarty-farties are naive, idealist amateurs. I should know.
I've been programming enterprise grade applications since 1971, and haven't learned a new thing in 30 years. There is no "silver bullet", as I've always said[see editors note #1].
Now, I consider my code my personal property, so you're not allowed to see it. However, I can tell you that its the work of an expert, and I want to share a few of my tricks. As a computer science professor [see editor's note #2, #3], I realize that the youth could benefit from my experience.
Lesson 1: Good code is Manly Code
1. KEEP IT SIMPLE STUPID -- I'm not impressed by APIs, they only confuse matters. Long ago, I've learned that every situation is unique, and therefore, no code is ever reusable. Attempting to allow other code to interact with your code is just going to lead to trouble. I rest my case.
2. USABILITY IS SKIN DEEP, AND NOT WORTH EFFORT -- You're going to have to write a 100 page manual for your application anyway. Amateur systems like MacOSX provide "usability" documentation on how to make an unpractical mess of an application. Real man use the command line; if your users can't use the command line, than you have the perfect opportunity to offer them training courses.
3. GOOD CODE IS UNDERSTANDABLE BY EVERYONE -- If a new programmer doesn't understand what you are doing, then you are doing it wrong. Like a team, your code should be as strong as your weakest programmers. When I was leading Compubiztech solutions, this was my guiding principle[see editors note 4].
4. STYLE GUIDELINES AND DOCUMENTATION ARE FOR AMATEURS. If you'd followed rule number 3, than you would never be in this mess, would you?
5. STEER CLEAR OF SMART "ROCKSTAR" PROGRAMMERS -- I totally agree with these guys who argue smart programmers are bad for business, why you don't want to hire rockstar programmers. I met a few of these types after deciding to leave Compubiztech Solutions. Not only did they mess up the entire project, but I got fired when I attempted to fix it! They called my code "rudementery", I call it pratical.
About the author:
Carl Poland has been programming since the late sixties. In 1979 he started Compubiztech Solutions, LLC. A firm which built custom record keeping software for the shipping, medical, and dental industries. After the "MS-DOS bust" of the late 80's he left Compubiztech, as sole proprietor, to teach Computer science at Brownsville Junior Community College. His catchphrase is "keep it simple stupid"!
Editors Notes
1. Carl says Fred Brooks stole the idea from him.
2. Carl is a substitute teacher who occasionally teaches the CS class, much to the dismay of both students and professors.
3. The professor has requested that he not be allowed to substitute for his class again.
4. Carl was the only permenent employee in the 13 year history of the company. 10 contractors have worked for him however, but they always quit before the job was done.