Personality differences and programming style


This is a tale of two programmers:  Careful and Speedy.  Perhaps they will make a great team working together – if they don’t kill each other first.

 Speedy has an amazing, fluid, fertile mind.  With a minimum amount of direction, Speedy can spew out pages of code and functionality and screens showing some really innovative ideas.  But there is a downside.  The code is fragile and buggy.  It works fine in some very specific test cases, but it does not expand to cover the general situation, i.e., test cases that are similar, but not the same.

On the other side of the scale, Careful is slow and, well, careful.  Careful really think things through.  When Careful writes code, it is solid, it works, it scales, it is maintainable.  The downside?  Careful can get terribly bogged down in trying to find the “right” way to do something.  Careful also gets bogged down in thinking about all the errors and exception cases. 

A nice compromise would perhaps be to quickly produce the code that covers 95% of situations, and plan to add the exception handling for the other 5% of situations later.  In our “time to market” world, quickly getting a solution out there that kind of works can be better than taking a long time to come out with the perfect solution – only to discover that the world has move on in the meantime.  You wouldn’t want to fly in an airplane or install a heart pacemaker with software constructed this way, but for many commercial products, the “initial 95%” rule can be good enough.

The “initial 95%” rule states that your initial implementation of the solution can be good enough if it succesfully covers 95% of the test cases.  Once you have an initial solution, you can evaluate it and decide if it is worth putting in the effort to get the additional 4.999% quality that you need – which will take an equal amount of time as the first 95% of the solution took to implement!

Our friend Speedy thinks that if the code runs once and it works, then it is done.  So what if it fails on the next test – it worked once, didn’t it?  Careful, on the other hand, considers it a miserable, abject failure if the code ever fails, no matter how rarely or under what stringent conditions.  In fact, Careful considers it a failure if the program works perfectly, but it is difficult or non-intuitive to use. 

Speedy’s code displays every feature imaginable.  This includes features that are very cool, but not very useful.  Careful thinks very hard about usability, simplicity, and intuitive operation – this may not always be achieved, but it is always the goal.

Speedy codes C# in a C++ style.  Stylistically, Speedy uses C++ coding conventions – for example variable_name rather than variableName for a local variable.  The controls on the GUI are added programatically in the code, rather than drawn with the Toolbox and autocoded.  Careful has been working in VB for the last several years and gravitated towards drawing everything with the toolbox and making extensive use of the flow and split panels.

For the moment, we might say that Speedy is the more productive programmer.  Speedy writes code and it does something.  Boom – done.  Careful’s programming output is just a trickle of what it should be right now.  Still learning the .Net framework, Careful spends a lot of time researching different functions and approaches, rather than diving right in and coding.  Careful’s goal is to have enough critical mass in understanding C#/.Net be both productive and high-quality while coding. 

To describe Careful’s view of Speedy, Jane Austen says it pretty well in Persuasion:

Anne always contemplated them as some of the happiest creatures
of her acquaintance; but still, saved as we all are, by some
comfortable feeling of superiority from wishing for the possibility
of exchange, she would not have given up her own more elegant
and cultivated mind for all their enjoyments; and envied them nothing
but that seemingly perfect good understanding and agreement together,
that good-humoured mutual affection, of which she had known
so little herself with either of her sisters.

(Thank you for the searchable reference.)


Post a Comment

Required fields are marked *

%d bloggers like this: