Digital Media Blogs >

Pragmatic Programmers: Don't Live with Broken Windows


Related link: http://www.artima.com/intv/fixit.html

Artima.com has published an interview in which Pragmatic Programmers Andy Hunt and Dave Thomas talk about software craftsmanship and the importance of fixing the small problems in your code, the "broken windows," so they don't grow into large problems.


Here's an excerpt:

Dave Thomas: It comes down to showing that you care. Take for example some code that is kind of shared among the team, but primarily is mine. There's some code in there that is obviously bad, but it doesn't look like I care about it. I'm just leaving it bad. Anybody else coming into that module might say, "Well, Dave doesn't care about it. It's his module. Why should I care about it?" In fact, if you come into my module and do something else that's bad, you can say, "Well, Dave doesn't care. Why should I care?" That kind of decay happens to modules as well as apartment buildings.

On the other hand, suppose I notice an edge condition that doesn't work in my code. I know it's a bug, but the bug is not critical to the application today and I don't have time to fix it. I could at least put a comment in there. Or, even better, I could put assertion in there, so that if the edge condition ever hits, something's going to happen that shows I'm on top of it. By doing that, first of all I make it easier to identify the problem. But I also show other people that I care about that enough that they will fix problems too when they encounter them.

Andy Hunt: If you walk into a project that's in shambles -- with bugs all over, a build that doesn't quite work -- you're not going to have incentive to do your best work. But, if you go onto a project where everything is pristine, do you want to be the first one to make a bug?





AddThis Social Bookmark Button




Read More Entries by Bill Venners.

Topics of Interest

Related Books

Archives


 
 


Or, visit our complete archive.  

Stay Connected