May 10 2012

Software as a Pegboard Set

Software is not like traditional engineering disciplines. Unlike a bridge whose requirements are essentially set in stone, software requirements consistently change and evolve with the needs of the business. The requirements, of say civil engineering, are more firm and concrete than that of software engineering because the artifacts that are being constructed are usually large physical objects like a road or bridge. In the other hand, software is malleable and it often refactored easier than business constraints, that is why product managers often prefer to wedge a round peg (software) into a square hole (requirements) as business constraints evolve. But unlike a kid’s shape sorter or pegboard set, the peg and the hole are consistently changing and not always into the same shape.

Shape Sorter Toy

Shape Sorter Toy


Oct 1 2011

Team We

Even when I have been the sole developer in a class, interface, module, library, or feature I try to always report progress as “We.” For defects and issues it’s always easy to point out the fault and personalize the problem when it was caused by someone else. Avoid naming names or singling out an individual. Saying “Your broke this” doesn’t make you look better or solve the issue. Restate it as “This was broken by this change list you committed on this date while trying to resolve this other issue.” Don’t personalize blame or fault, and provide as much information as you can gather to better solve the issue. Don’t stop when you find something is broken, or when you find who broke it, find out why it was broken in the first place, and if at all possible suggest viable solutions.

A few days ago, a engineer called me over for some help. He immediately started making using accusatory language as if I had committed some crime. “There is a bug and you wrote this so you did it and you didn’t do it well because there is a bug.” He was pointing to 20 lines of code that I had written over a year ago in a much larger feature whose requirements had changed over time and because of his tone and desperation in his voice I could tell he was lost just dropped the anchor of blame wherever he could. I tried to get focus to the task at hand an not my code and asked a series of questions, what does the system do now? What should the system do? Does this always happen? What is unique when there is an error? Using this approach we found the issue in 10 minutes without staring down the code or focusing who wrote what method.


Sep 30 2011

Avoid overloading Meaning to Existing Database Column

I’ve always found that when defining a database table it is always best to create a integer primary key, even if a unique key such as social security number, ISBN, or some other business value. Recently I had to go through the unpleasant process of updating a database table and associated scripts, resources, and code that had used a business attribute as the primary key but because of business requirements it was no longer unique and had grown to have different meanings. Because your business requirements will change, don’t use business attributes as primary keys for you database design. In addition, don’t overload attributes to more than one meaning. For example, the database that I was working with had a database column called Sequence that functioned as the primary key, the line number, and a workflow execution order to process the data. It is a source of confusion and bugs to overload one attribute to so many different meanings.