Skip to main content

Code quality - in defence of developers

Ok I think it's time to step in for developers.   In http://www.theregister.co.uk/2012/12/21/financial_software_disasters/,  Dave Mandi amuses us and points out that much code quality is low.   And he - largely - beats up on the quality of developers for it.   I have some sympathy for some of his arguments : in my experience, most developers have programming-language knowledge, but few know how to write applications using that language.   I know many who have Development certifications but I would not "trust" to develop re-usable software components - too often, they just aren't interested enough in software design to go from programmers who can drive languages and APIs to developers who can implement software of real and lasting value.   But, in my experience, many good developers don't write bad software out of ignorance : they do it because, as the author (later) acknowledges:

"In the real world, tight budgets, shortsighted managers, and unreasonable expectations from non-techies almost always conspire to make developers do things too quickly. "

Yes, that's probably the nub of it - the point when good code goes bad...when the project demands quality compromises from the design/analysis and implementation parts of the project, which mean that you just end up with stuff that is initially executable but (usually) hard to maintain, fragile, and downright nasty to work with.  Nobody wants this as an outcome : but what is the reason this mostly might happen?   Because the project team has over-ridden the primary rule : the customer gets to vary schedule, scope, price and resources to do a "thing", but the project team protects the implementation quality within those other variable parameters.  It simply is not in the customer's interests to allow quality of implementation to be under their control.    Here's an example of how this might work in a discussion:

Customer : how long will the system take to develop?Project Manager : according to my estimates, three months for an initial release with the primary use cases you have identifiedCustomer : that's too long.  What can you take out?Project Manager :  well, I see that each use case has a 20% loading for use cases.  How about we drop those out?  That'll get you into test on time.Customer : Fantastic!

Bad smell there?   Feeling uneasy?   Right...what happened there was, when you read...

Project Manager :  Well, I see that each use case has a 20% loading for unit testing.  How about we drop those out?  That'll get you into test on time.

The meaning actually was:

Project Manager :  Well, I see that each use case has a 20% loading for unit testing.  I can ask the development team to write perfect code first time, with no need to verify results or worry about future changes.  How about that?  That'll get you into test on time.

That is an example of why project managers should not expose critical aspects of quality in development codebases to customers.  No one (not me, not YOU) can write software that is perfect first time, given the poverty of requirements and analysis/design that is undertaken.  And no code base should emerge into the light of day that is not supported by unit and coverage tests which support our beliefs about the abstract world we have created in our software.  So project managers : train your customers to vary schedule, scope and cost, and leave the quality to the development teams.

But what, I hear you cry, about the fact that (anecdoteally) developers won't release anything till it is perfect?   I am not sure any developer wants to write code that never sees the light of day or a slice of processor time!     My mantra for developers is : the best is the enemy of the good, but make sure the good is, from a quality as well as functional perspective, complete.  

Comments

Popular posts from this blog

Keep people on the wagon to make social software stick

Aside from the buzz and enthusiasm of social software deployments, there's sometimes a back-story.  I've been wondering about how well organsations deploying social software plan catch to on-boarded users before they fall back to old habits. Here's the scenario that I am thinking of. When we deploy business change technologies, we tend to measure on-boarding as a one-off activity (we measure stuff like that partly because it's easy to measure, which is a bit of an anti-pattern in itself).  So, once a user has been trained, posted, edited a profile, added people to a network, we cross them off a list.  However, this fails to recognise what, from my experience, is the strong influence of learned-behaviour of the non-social user, and how these users' inertia can reset interactions to levels of lower social value. The reasons we fall back to old ways and habits are many: The derived social value of an interaction obeys the "Convoy" principle The answer

Ironman UK 2012 - Friday evening and Saturday

During Friday afternoon I laid out all my kit in the hotel room, and bagged. Sad to say I even rehearsed the changes, just to make sure I had the right stuff in the right bags. Then I bagged up Red and Blue bags and put them to one site. Friday night was pretty grim – a tip to others : if you are planning to stay in the Holiday Inn, book very early and demand a room on the third / fourth floor or higher, because otherwise you'll lose even more sleep from the wedding parties (they can run two at a time) which occur, noisily, on the ground floor till 1 am. I managed a few dozes till the partying stopped around 1 am and then Saturday was set-up day : a first look at the lake, and T1 and T2. But first I went down to check out the Ironkids event in the town centre  This was basically a run event for 6 yro and up kids who had a blast running around the last km of the run route and under the Ironman Finish banner. Fun to see them and hear the parents and friends cheer

Brighton Marathon 2013...a blast

I was lucky enough to be able to run the Brighton Marathon today : I did this in memory of my father-in-law (full story here ).   I;ve not run a marathon since London in (I think) 1992 : the ADT era, when the finish was on Lambeth Bridge, not the Mall, and we all ran in plus-fours.  Joking about the last bit.  I ran about 3:30 on that day in 1992, at the age of 29, and with a lot more single-sport dedication to running.  Now I am 50, I was thinking it would be interesting to see how I could run a single event marathon. Brighton is a young (4 runnings) but big race : 9000 competitors.  The route starts from Preston Park, does a shimmy or two around the town centre, then sends you first east, then west along the sea front. Finish is just past the pier. Conditions were good : the overnight rain cleared up, there as  a bit of light white cloud to keep the sun away, and some breeze but not a wind.   I had a few 20 mile/3 hour runs in my recent training past, but two weeks ago picked up