Technical Debt Solutions

Schedule pressure often results in developers hacking to get the job done quickly. Unfortunately these hacks become the production code and do not get fixed. Over time this can make a legacy product difficult to work with. We call this Technical Debt. The best fix to this problem is to not resort to hacking. But tight schedules are a part of life. And bad code gets put into production. Once the damage is done, we need to regroup. Otherwise legacy systems will become impossible to maintain.

Here is a small process that can be used to address Technical Debt. Identify where you have the debt. Construct a business case to justify working this issue. Fix the debt. Rinse, lather, and repeat. The process sounds simple. But it might be hard to sell the business case. You should therefore try to choose the debt where you will get the biggest bang for your buck. It is also best to get team consensus before moving forward with a plan to remove the debt.

There should be a main point of contact for your technical debt reduction program. Here are some other tips to sell the idea. Produce tangible examples of how the debt affects the business. Make use of analogies to communicate the effects. It is easy to get into debt with software systems. Just like credit cards, it will take a big effort to get out of debt.

Development Estimates

There are many difficulties in estimating how long a software development project will take. You cannot compare estimate for small systems to those of large ones. The rate of development is not linear as the project size goes up. It just does not scale.

Another common fallacy in estimates is that developers spend the whole day coding. You will be lucky if they get to spend 50% of their time in development. Productivity also depends on the task complexity. Expect to get around a thousand lines of high level code a year per developer.

Here is another tragedy. Sometimes when a developer just tries to get their part done, it is to the detriment of the overall project. Want to hear more depressing news? The first system built is hardly ever a usable one. Next time I will continue with ideas about design and development.

The Power of Documentation

It is best if your user manuals are accurate. Choose this over exciting text. It is difficult to be exact. The spoken English language does not lend itself to written clarity. Know this. When there is some discrepancy between the system and the documentation, it is easy to fix the documentation.

If an implementer has a problem understanding the design, they should get on the phone and call up the architect. I know I get calls all the time on stuff I design. This is natural. It is better to do this than to guess and get it wrong. By then it will be too late or too costly to resolve.

A rare combination of skills is the technical guru who can also do project management. However if you can find one, it is best if they manage a small team of about 5 developers. This team will have great productivity and success.

Next time I will share a lot of pitfalls with scheduling estimates.

Model Driven Software Development

I read a book from 2003 on Model Driven software development. Let's first define what we mean by model. A model is an abstraction. It is cheaper than a real system. The problem is that models are not kept up to date with the code.

MDSD stands for Model Driven Software Development. It is also known as MDD. Right now models are just treated as documentation. However in MDD, models are at the same level as code.

A related topic is MDA, which stands for Model Driven Architecture. This is where you focus on UML to do design. UML produces nice looking documentation. Some problems that plague software development are productivity and risk management. MDSD intends to address these shortcomings.

Next time I will start with the hot topic of Domain Specific Languages (DSLs).

Airplane Experiment

Let us imagine an experiment. We transport some engineers from the 1890's to the present time. Then we give them a ride on a 747 airplane. After that they return to 1890. Having experienced flight in an airplane, they now know it is possible and want to build some planes in their own time.

This is problematic. The engineers recall the heavy metal bird from the future. So they conclude that weight is not a problem in propelling planes. They also fondly remember the plush seats inside the plane. The engineers design that into their primitive 1890 plane. Finally they recall that steel was used extensively in the 747. They take their own 19th century steel, and try to form an airplane. The result? Fail.

The whole exercise is to get you to understand how an observer of something that works does not necessarily gain the deep knowledge required to replicate the technology. The same probably holds true for Artificial Intelligence. You can study an intelligent being like man. However that does not mean you are any further in developing AI. In fact, you might be tripped up by your limited understanding and go down the wrong path. You got to take those baby steps like the Wright brothers. Otherwise you may never even get off the ground.

The Chinese Room

Here is an artificial intelligence riddle of sorts. There is an English bloke locked in a room. There is room enough under the door to the room to slide a single sheet of paper. The guy frequently finds papers shoved under the door.

The papers the guy in the room receives has strange markings on them. However he has a big book in the room. The book provides instructions on how to formulate responses to the papers that come into the room. The English gent follows these instructions to the tee. He composes similar sheets with weird markings in accordance to the Book of Knowledge in the room. He then slides these response papers back under the door out of the room.

On the outside, there are a bunch of Chinese scholars. They pose tough questions written in the Chinese language to the guy in the room. They write their questions on pieces of paper in Chinese. Each of them is amazed at the answers that come back out written in perfect Chinese. These scholars presume that a great Chinese scholar is on the other side of the door in the room. However this guy does not speak or read Chinese. He just follows the instructions from the big book.

Does the room speak Chinese? Or more specifically, does the system know as the room know Chinese? If it does, you probably could concoct a computer that thinks using a similar process. Once you know what is behind the code used to run the program, you will know that the computer can't think. However from the outside, it would be difficult for one to tell the difference. Such a computer program might be able to pass the Turing Test.

Computer Chess

You would think it an easy task to get a computer to play chess. That might be true. But it is not easy to get the computer to play chess very well. Perhaps chess is not just some mathematical equation to be solved.

True you could have the computer consider all kinds of future moves. The processing power helps with this task. However there are just too many computations to do this in real time.

The next best bet would be to get a computer to learn how to play chess well, almost like a human would do. Well IBM put its programmers to the task. The produced Deep Blue, which took on the world's human chess champion.

The programming behind the scenes with Deep Blue could occupy a whole book. Here are two tidbits. The computer program evaluates the situation of the chess board for every possible move. To speed things up, the program prunes off poor decisions from the tree of possible future moves. This helps it spend time "thinking" about the best moves.

Next time I will tell you a riddle about The Chinese Room.