Tuesday, February 27, 2007

The Importance of Conceptual Integrity

Recently, I had the opportunity to re-read one of my favorite books on software engineering and design, The Mythical Man-Month. There are so many interesting nuggets of wisdom in that book, but the one that resonated with me this time around with the idea of "Conceptual Integrity". This is the idea that successful software projects are the result of the vision of one person, one mind. In that way, the design of the software reflects a consistency with all of the features fitting together a logical fashion.

The opposite of a design with "Conceptual Integrity" is a piece of software that is designed "by committee". In this situation, you have competing visions battling to insert features into the design. When this happens, it is inevitable that compromise and miscommunicaton will take place. It is difficult for all the members of the committee to agree on the same vision, so everyone will have their own ideas as to what the design should look like. What you end up with is a piece of bloatware that is confusing to use and often full of bugs. A lot of mass market software suffers from this malady. I'm sure we can all think of pieces of software that are burdened with tons of little features that are confusing to use because they don't seem to fit together.

I see this happen all the time at my Fortune 500 company. Often you have different groups going off and designing programs and systems without consideration with how they fit into the overall strategy of the company. One example of this is something as simple as the design of a logging system. Every group as its own vision as to what should be logged, where it should be logged, and how it should be logged. Therefore, everyone ends up building their own logging component that reflects that vision. Obviously this is a problem because now you have applications with log files in different places, in different formats, and with different user interfaces. Aside from the duplication of labor issue, it becomes hard to support systems that have applications with different logging "visions".

The solution was to try to build a common logging component. Of course, the common component reflected a totally different vision that was often incompatible with everyone else's vision. As a result, nobody wanted to use it!

The underlying problem is that there is nobody who is the overall technical architect with the authority to set the vision for the entire company. That person would have been able to say, "this is what the logging component vision should be, and my vision is that everybody should use it." Thus, the systems at my company would have some semblance of Conceptual Integrity.

Obviously the role of that one overall architect becomes very crucial, and you don't want to give that power to just anybody. That is why it is important for companies to identify promising software designers, cultivate them, and keep them happy. Their performance can make of break a company's software product so it is an investment that is worthwhile. The alternative is to continue to design by committee and keep designing software that makes no sense!

Saturday, February 17, 2007

In Defense of Programmers Everywhere

Recently, someone I work with sent me a link to a news article entitled _Programmers to Blame for Hard-To-Use Software_. The article has several quotes David Platt, who is author of a book _Why Software Sucks... and What You Can Do About It_. His basic premise is that programmers think "differently" than the rest of the population, and the faults in modern consumer software are caused by these differences. Reading the article, my knee-jerk reaction was to think that this guy was an idiot. After all, I am a programmer and he is pointing the finger of blame squarely in my direction. However, after some consideration, he does raise a few good points; however, I still think he is an idiot.

My main objection is that he seems to imply that programmers are solely responsible for the content of modern consumer software. That, of course, is a total farce. As someone who has worked in the software industry, I can tell you that a software package is the result of the collaboration of many different groups of people: user reps (who try and figure out what the public will pay for and who sign off on the final product to make sure it meets the needs of the public), business analysts (who translate the marketing "wants" into a list of requirements for consumption by the techies), programmers (who turn the requirements given to them into an actual piece of software), testers (who verify that the software doesn't have any "bugs"), and managers (who have oversight over the product and makes sure that everyone does their job).

Gone are the days when a lone programmer could write a major piece of software and exert total creative control over the end result. Today's modern programmer only holds so much sway over the final result. This is actually a good thing in the sense that programmers DO have a different aesthetic than the average person. That is why you have user reps who are supposed to be in tune with users, and that is why you have business analysts who can translate "user-speak" into "techno-speak". If anything, those are the ones whom you should be blaming, since it is their job to be in touch with the user.

Some of the other specific points he makes are utterly crazy. He complains about the "do you really want to delete?" message box as being a bad feature. He makes the analogy that your car doesn't ask you whether or not you really want to start your engine when you turn the key. That is an ignorant analogy. Deleting a file is a destructive step that can be irreversible (or at least require some work to recover). It makes sense for the computer to make an operation like this require multiple clicks. Starting a car, on the other hand, is not something that will destroy or harm the car (at least I would hope not). On the other hand, if turning your ignition key caused your tires to deflate, I would hope that there would be some confirmation before this destructive action is taken.

He also makes the assertion that programmers prefer control as indicated by the fact that they tend to prefer manual transmissions. I certainly have no performed a statistical study on this subject, but my own observation among my co-workers suggests that programmers are no more likely to drive sticks than anyone else. The only co-worker that I know who drives a stick is not a programmer but one of the aforementioned "business analysts", so I am not sure what that means.

He also blames extraneous features like "moveable toolbars" for crashes and security breaches. While it may be true that feature-creep in general is bad because it adds complication, I think he is being somewhat flippant to suggest that toolbars cause crashes and breaches. I have never heard of toolbars causing security holes in an application! This type of grandstanding harms what would otherwise be an actual point.

Finally, he has some rant about how the Starbucks website allows you to search for a Starbucks within 5, 10, or 15 miles. He claims that most people just want to know where the closest Starbucks is to their location. I happen to agree with this point. However, it doesn't really rise to the level of annoyance in my mind. In fact, until he brought it up, I never really thought much about it. Most sites, including the Starbucks store locator site will default to the smallest radius, and then the results will sort by distance, so for most cases, this is good enough for me. Of course, I live in a major metro area. I suppose if I lived in the "boonies", I might be annoyed by having to change the radius to 50 miles every time, but honestly, this isn't a big deal to me.

He does bring up some good points though. Bad error messages, flash web sites... These are the bane of my existence as well. However, these points are overshadowed his seeming preconceived notions about programmers and the software industry in general. While he claims to be a computer science consultant (or something like that), his words seem to make me feel like he does not know what he is talking about. My impression is that he is just trying to sell books through his grandstanding rather than actually trying to engage in an actual dialogue to improve the state of the industry.

Monday, February 5, 2007

Why I Like _Starship Troopers_...

In my formative years, I read a lot of Science Fiction. This is partly due to the fact that I grew up what could be called a "Golden Age" of Science Fiction movies and TV, from the late 70's and through the 80's. Star Wars brought about a whole slew of Science Fiction, both good and bad. However, I loved it all. When I couldn't get enough on the big screen and the little screen, I turned to the written word. One interesting thing was that I seemed to be drawn to the "masters" of Sci Fi: Bradbury, Clarke, Asimov, Herbert. However, the one book that I loved more than any other during my teen years was Starship Troopers, by Robert Heinlein.

I must have read that book at least a hundred times! I remember one summer where I would take that book out of the library almost continuously. After a month of reading it, I'd return it to the library and then go back the next day to take it out again! At first, I was drawn in by its portrait of the military of the future: the men, the training, the weapons (I LOVED those powered jumpsuits!), and especially the battles on futuristic worlds. At that time in my life, I was fascinated with the military, as many young men are before they encounter Born on the Fourth of July, so this book seemed like the ultimate bible of future warfare.

However, after a couple of readings, I started to gain some more insight into the philosophical and political aspects of the book. While I still do not agree with all of these ideas, Heinlein does give you a lot to think about, if you are open to the experience:

The most controversal idea is that only people who have participated in "Federal Service" (i.e. the military) should be allowed to vote. Heinlein's idea is that only people who have "proven" that they are willing to put the welfare of society above their own should be entrusted with the right to vote. This idea seems controversal to us since we have been raised in a society which values democracy and "the will of the people". Any governmental structure which would disenfranchise a majority of its population unless they put their lives on the line seems anti-thetical to this notion. However, his idea does have some merits, even if you don't totally agree. Currently, the percentage of people who exercise their right to vote is quite low, and those who do vote often do so without much thought ("Oh, Clinton is soooo dreamy, so I will vote for him!"). The idea that people should have to prove their worthiness to vote doesn't seem so bad, all things considered. I don't know if "joining the army" is a suitable proof, but it is an idea that shouldn't be thrown out via a knee jerk reaction.

Another controversial idea is that corporal punishment should be expanded in order to deter crime. In the book, even the most minor infractions are punished by having to endure the whip. The rationale is that the pain and embarrassment of this sort of thing leaves a lasting impression on both the punished and those who witness the punishment. Thus, it acts as a powerful deterrent. In a way, it sort of reminds me a little bit of Rudy Guliani's crackdown on minor, "quality of life" crimes. While his crackdown was met with resistance and anger, you can't argue with the results. Is Heinlein simply taking this concept to the next level? From an emotional standpoint, my initial reaction is to strongly opposed this expansion of corporal punishment. After all, I find spanking and the like quite distasteful. However, from a logical standpoint, there is some common sense to this approach. Certainly, if people were whipped for speeding and other traffic offenses, our highways would be much safer! Although I am not sold on Heinlein's idea, his vision certainly gives one food for thought.

One final idea that permeates this book is the role of violence in society and nature. Heinlein's idea is that war and violence are a natural part of the universe that we live in. After all, nature is ruled by "survival of the fittest", where species need to adapt to their environment or die in favor of a stronger species. In the _Starship Troopers_ universe, the human race has encountered a variety of other life forms, some of which are bent on our destruction. If we decide to just throw away our weapons and live peacefully, we would be wiped out and become a tiny footnote in the history of the universe. If we want to survive, we have to wage war, because that is the "law of the jungle". This idea is also an interesting one, although I strongly disagree with it. In nature, it isn't always the strongest who survives. Species adapt to the presense of more aggressive species in a variety of ways that don't involve violence. Why can't this principle be applied to relations between so-called "intelligent" species? This principle certainly applies when the other species is ourselves!

This is just a taste of some of the thought-provoking ideas that brought me back to _Starship Troopers_ again and again. While I may not agree with all of Heinlein's ideas, he does have a way of forcing you to question the beliefs which you may take for granted. In the end, you might still hold those beliefs, but at least you have taken the time to consider another point of view. And isn't that what good literature (both Sci-Fi and non Sci-fi) is supposed to do?