Tuesday, May 17, 2011

Par Fried Programming

This is a kind of code smell, or more precisely a coding smell.

Par frying is a technique used in cooking french fried potatoes, the goals being to increase the fat content and crispyness of the product.  In the context of the fast food industry partial cooking is useful because it reduces the time needed to prepare the product for sale at the retail end-point.

In the context of programming, a par frying is what happens when the coding for a given feature is left with small parts worked on but in an inconsistent and incomplete state, during a given coding session. I find that some technology stacks tend to encourage parcoding more than others.

I would guess that parcoding increases jointly proportional to the dispersion of responsibilities around the stack and the time spent performing tasks not directly implementing the application feature (such as debugging interfaces; working around flaws in the technology stack; testing routine features of the stack; and writing internal documentation).

Parcoding can also increase when you are tired, sick, or otherwise stressed.

Some degree of parcoding is normal... it is the vision we keep in our working memory that allows us to bridge the gap and finish with something that is more than half-baked. But technology stacks and applications are so poorly organized that they tend to overextend the working memory, giving rise to parcoding behavior patterns that will feed back on themselves.

There are greater factors responsible for turning your projects into Yourdon's Death Marches, but leaving things incomplete should only be done if you intend to abandon the code. When you par code, that's basically what you're doing: abandoning a half-baked train of thought.  
Post a Comment