When is software done?

The company I'm working for at the moment is suffering from a bad case of "everyone's a software engineer".  The reasons why this is such a bad idea are all over the net, so rather than sit quietly, content with my enlightened understanding, I'll hopefully try and convince you of a theory of mine that links the maintainability of source code to the "engineering" metaphor - and why I really dislike the "Software Engineer" job title.

So why aren't all developers software engineers and why does it matter?  Simple.  The engineering metaphor that was used in the 80's (and even 90's) to describe the activities performed by those who construct software is partially to blame for the spectacular failure of many projects and most importantly for the reams of unmaintainable code produced on a daily basis. 

How can I make this outrageous claim?  Think about how a team of engineers constructs a building.  In brief, they're provided with the plans, they carefully plan the construction then they build it.  Once the walls are up, the doors go in and the paint dries it's done.  They get it right first go, because they've built similar structures before.

"Software Engineers" if the role name is truly descriptive, would work in a similar way wouldn't they?  A bit of design and planning up front, then some coding and when it works...it's finished.  This is where it all starts to go wrong.  The concept of "finished" in engineering is very different to what "finished" software should look like, and I think that many developers miss the point and take the metaphor too literally.

The act of designing and constructing software should be more like composing a song, or writing a book.  You start with a rough idea of what the program is going to look like.  After a couple of drafts and a little experimentation (including, of course the associated unit tests) a structure starts to emerge.  You add the remaining features to the structure and all the tests pass.  Excellent!  Now we move onto the next task...don't we?  NO!  NO! NO! NO!  We've only just completed the draft!

What's left to do?  The tests pass...isn't that enough?  Not usually.  The key to writing maintainable code that is as easy to read as your favourite book is that last missing step in the process.  The step that construction engineers can't usually perform - a complete restructuring of the internals of the program.  You can't (usually) take a building that's just been finished and say "now lets's just move all the rooms around to the left, move the elevator shaft over to the right"....e.t.c).  But with software, that last step is where the professional developers just get started.

Once the program is working and we've got a comprehensive set of tests, we can start to refactor the structure of the program into an optimal state.  Rename variables that might have changed meaning on the journey from draft to complete, reduce dependencies on non-essential classes, move methods into classes that better reflect the intent, relocate responsibilities to better reflect the domain, break up large classes into smaller classes with specific responsibilities....the list goes on and on. 

You're not complete until someone else can read the source code top-to-bottom (almost) and understand it's purpose immediately, without digging around for answers.  Is your code like this?  Try getting a peer to read the code for that last bit of functionality you added to the application, did they understand it first go?

So after that little rant, what job title would I have bestowed on our boldest and brightest software developers?  How about Software Designer? Software Author? Software Artist?  The analogy could all go horribly wrong too....but perhaps the emphasis on creativity would encourage us to keep working until our code is clean, balanced and beautiful in addition to being green. 


Posted 11-10-2008 3:51 AM by Ben Scott

Comments

Gordon wrote re: When is software done?
on 11-12-2008 1:48 PM

The IEEE's formal position on this is as follows:

"The title, Engineer, and its derivatives should be reserved for those individuals whose education and experience qualify them to practice in a manner that protects public safety. Strict use of the title serves the interest of both the IEEE-USA and the public by providing a recognized designation by which those qualified to practice engineering may be identified. The education and experience needed for the title, Engineer, is evidenced by

> Graduation with an Engineering degree from an ABET/EAC accredited program of engineering (or equivalent*), coupled with sufficient experience in the field in which the term, Engineer, is used; and/or

> Licensure by any jurisdiction as a Professional Engineer.

> A degree from a foreign institution (or the total education when a person holds a graduate degree in engineering but no accredited B.S. in engineering) can be evaluated through a service offered by ABET."

Ben Scott wrote re: When is software done?
on 11-12-2008 3:01 PM

Even if you were to meet the IEEE's requirements and had a software engineering degree that was ABET/EAC accredited, my (poorly made) point is that if your approach to writing code is based upon engineering priniples, then you'd have a number of attempts at writing a particular application, throwing away each attempt as you progressed (models e.t.c).  

In software, you don't really know how best to represent the solution to the problem until you're "functionality complete".  Once you've reached functional completeness, you should be throwing away the model and starting again now you understand the problem in its entirety, focusing on the optimal design.  Since we deal with non-concrete objects we have the advantage of refactoring rather than throwing away - but that hardly ever happens in my experience because "functional completeness" is perceived as being "done".  

It's like a prototype car.  A first attempt based on previous experience.  It works - but it's not released into production because it hasn't been "refined" and is not "production ready".  The "software engineer" metaphor is selectively interpreted by "hackers" as - I'm done when it works; without any attention to the multiple attempts performed previously to achieve true completeness.

Am I ranting?  Probably.  Maybe the link between the "engineer" job title and crap code isn't there.  I just wish that people didn't stop once their tests worked.

Add a Comment

(required)  
(optional)
(required)  
Remember Me?
Copyright © 2005-2007 Schmurgon Pty Ltd
Powered by Community Server (Non-Commercial Edition), by Telligent Systems