Amiram Hayardeny's My China Experience

« Sweets and Crying... | Main | My Dad, Broken Windo... »

http://blogs.sun.com/ChinaExperience/date/20070529 Tuesday May 29, 2007

My Dad, Broken Windows Theory and Software Development

My father was born in Jerusalem, Israel in 1935. His native tongue, though, is French. Not only is he fluent in French, he was always flaunting the fact that he could easily recite poems, proverbs and plays, beginning to end, in French. He could recite the entire collection of the Fables of LaFontane. As you can imagine, my childhood was peppered with intriguing stories, with lessons at the end, in French. "Qui vole un oeuf vole un boeuf", my Dad used to say: "He, that steals an egg, will steal an ox".

"James Q. Wilson and George Kelling developed the `broken windows' thesis to explain the signaling function of neighborhood characteristics. This thesis suggests that the following sequence of events can be expected in deteriorating neighborhoods. Evidence of decay (accumulated trash, broken windows, deteriorated building exteriors) remains in the neighborhood for a reasonably long period of time. People who live and work in the area feel more vulnerable and begin to withdraw. They become less willing to intervene to maintain public order (for example, to attempt to break up groups of rowdy teens loitering on street corners) or to address physical signs of deterioration. Sensing this, teens and other possible offenders become bolder and intensify their harassment and vandalism. Residents become yet more fearful and withdraw further from community involvement and upkeep. This atmosphere then attracts offenders from outside the area, who sense that it has become a vulnerable and less risky site for crime."

The "broken window" theory suggests that neighborhood order strategies such as those listed below help to deter and reduce crime.

  • Quick replacement of broken windows
  • Prompt removal of abandoned vehicles
  • Fast clean up of illegally dumped items, litter and spilled garbage
  • Quick paint out of graffiti
  • Finding (or building) better places for teens to gather than street corners
  • Fresh paint on buildings
  • Clean sidewalks and street gutters

Source: http://www.cityofseattle.net/police/prevention/Tips/broken_window.htm

You might be thinking now: what in the world is the connection between proverbs, the Broken Windows Theory and software development. Indeed, the connection may not be straightforward. Lets see if the following scenario is possible. A large group of developers are responsible for the development of a significant commercial software product. They are all hard working, smart, innovative, diligent. But like all other software developers, they do, in fact, introduce bugs to the product. Not intentionally of course. The question is not whether the bugs are there, the question is how these bugs get treated. Do they get fixed, tested, integrated and delivered? Or do they quietly age in the system until a really important customer experiences them? Do they get treated with respect? or are they ignored?

Let me rewrite the paragraph describing the Broken Windows Theory, using some more familiar words from the software development world: ..."This thesis suggests that the following sequence of events can be expected in deteriorating software products. Evidence of decay (large defect backlogs, no documentation, no code reviews) remains in the system for a reasonably long period of time. Quality oriented engineers who work on the project feel more vulnerable and begin to withdraw. They become less willing to intervene to maintain software quality for example, to attempt to enforce code reviews, or to address signs of deterioration..."

The "Broken Software" theory suggests that good software engineering strategies such as those listed below help to deter and increase quality.

  • Quick fixing of seemingly "unimportant" bugs
  • Reduced defect backlog
  • Holding off new releases until the code is stable
  • Limiting new feature introduction
  • Enforce code reviews, documentation
  • Introduce creative ways of software testing
  • ...

"He, that steals an egg, will steal an ox", "Broken windows invite further deterioration", "Ignoring small bugs, invite bigger ones". When someone tells you to fix "seemingly unimportant bugs", insists on good documentation, holds back feature for the sake of better quality, remember the "Broken Windows" theory.

If you have ideas of how to increase software quality, please share them. You can use the link below to add a comment.

Comments:

I remember how you also applied the broken window theory to meetings - if they start on time then you set the expectation that all the team's deliverables should arrive on time. Very nice entry, I'm going to share it with my team.

Posted by melanie gao on May 29, 2007 at 09:19 AM CST #

You got it. Punctuality is one of those things. Being 5 minutes late does not seem a big deal. Yet having the commitment to show up on time reflects on other, bigger issues like timely delivery of projects.

Posted by Amiram Hayardeny on May 29, 2007 at 09:47 AM CST #

Ignores the reality of corporate politics - if senior exec promises CEO he will deliver business benefit based upon a software system delivered in 'x' months, then the target will be 'x' months and sacrifices (usually in quality) will be made to make that delivery. There are many things one can do to persuade management that alternative approaches are better, quality is good etc, but once an exec's reputation is on the line, you had better deliver, or speak lke you will deliver come hell or high water. It's where death march projects come from. Quality driven development is great, but ultimately all meanigful software is customer driven, and often office politics is the greatest influence on any project.

Posted by Dave Murphy on May 29, 2007 at 11:45 PM CST #

Good thoughts. Dave Thomas and Andy Hunt talk about Broken Windows theory in their excellent book, "The Pragmatic Programmer", but more with respect to refactoring than testing/qa - i.e. if code is sloppy already, people will be more likely to write more sloppy code. There seem to be many applications of the analogy, though, and testing is an interesting one. As a scientific theory, however, I believe that the Broken Windows has been handily disproved (or at least, has not been affirmatively proved). See the wiki. This may detract from the power of the metaphor, since if it isn't really a true theory for communities, could it be true for software? Not sure either way...

Posted by Ben Northrop on May 31, 2007 at 11:33 PM CST #

It's not the first time it's been analogized (see The Pragmatic Programmer, tip #4), but it's always worthwhile mentioning again. Good stuff Amiram!

Posted by Jose Fernandez on June 01, 2007 at 09:44 PM CST #

A strange coincidence. Just today I wrote a note with the same title, referring to the fact that at db4o we established practices that led us to zero high priority bugs http://tracker.db4o.com/secure/Dashboard.jspa. without having frantic "bug fest" (when the whole team stops development to fix huge backlog of bugs). I see the "No Broken Windows" state of affair as directly related to pride in our product and team and to respect to our customers and community. What links your seemingly unrelated examples is the fact that once you lose this pride and respect it is a slippery slope to indifference. To get to good quality we do not follow all your points, but we do practice "test first", i.e. writing tests before coding, pair-coding and automated release every few hours (that runs all the tests). Our open source community is quick to catch whatever bugs do happen, and then we fix them every week. So we may not follow all your points, but another set of points that puts QA at the center of every step of the software development process, to achieve the same goal.

Posted by Anat Gafni on June 12, 2007 at 03:46 PM CST #

Post a Comment:
  • HTML Syntax: NOT allowed

Valid HTML! Valid CSS!

This is a personal weblog, I do not speak for my employer.