Last night I started reading The Pragmatic Programmer by Andrew Hunt and David Thomas.
One practical tip that immediately jumped out at me as useful in my quest to be a better programmer: Don’t live with broken windows.
The theory goes like this: an abandoned building with a single broken window attracts additional broken windows, graffiti, litter, and a sense that no one cares about this building. However this can be avoided if the authorities repair the window straight away.
You can apply this theory to other walks of life, too, like keeping your kitchen clean. After you’ve spent hours cleaning your kitchen to make it spotless, you make an effort to keep it clean. But if your kitchen is piled high with dirty pans, leaving out an extra mug or dirty bowl isn’t going to feel like it makes any difference.
The software engineering implications of this theory are that if you take care to keep your code tidy, it will stay that way. If you know something is broken but never make time to fix it, other bugs and issues will creep into it, until it’s a mess that no one dares touch.
We have a website that is starting to get a bit buggy. It’s not broken, but it’s been a while since anyone has given it any love. Bits of its functionality are starting to get flaky.
Being the only programmer in my place of work, I seldom have time to think about this website — let alone sit down and maintain it.
But the number of related support calls have been gradually increasing — more windows are breaking — and I’m spending more and more time patching its bugs to keep people happy.
Know that I’m aware of the broken windows principle, I know exactly what to do: sit down with this website for a couple of days and find out what exactly is causing these issues.
Then I’ll rebuild the flaky bits, replace the proverbial cracked glass, and wash down a few walls while I’m at it.
Top comments (3)
I missed this when you posted it, @funkysi1701 but as a former community organizer, Broken Windows Theory has shaped so much of how I see the world. As an online community manager, this is the reason for spam prevention, moderation, etc, so of course this carries over to code!
We would love to hear more about your experiences carving out time to replace the glass and wash down the walls, while fielding additional requests and juggling competing demands as the sole dev at your org. Let us know how you get on, please?
I’m planning a bathroom renovation and trying to figure out the costs involved. I found VK Renovations, and they seem like a professional team, but I want to understand all the expenses before moving forward. Has anyone worked with them and can provide a detailed breakdown?
I’m especially interested in understanding bathroom renovation expenses from labor and materials to plumbing and tiling. Are there areas where costs tend to be higher than expected? How do you budget effectively to avoid surprises?
That “broken windows” analogy is so true, both for code and for real life. I had the same experience with my house once one window started sticking, I kept putting it off and before long a couple more were drafty.
Finally I called Maryland Windows and Doors company, because they are Maryland window repair experts and they handled everything quickly, which actually motivated me to fix a few other lingering issues around the house. It’s funny how taking care of one “broken window,” whether in code or in your home, gives you the momentum to keep everything else in shape.