You might have heard about the Theory of Broken Windows first formulated in an article by James Q. Wilson and George L. Kelling:
As far as I know, Andy Hunt and Dave Thomas
in The Pragmatic Programmer have been the first to transfer this principle into software development stating that you have to clean up your code often enough to prevent others who see that code from adding more broken stuff. So far so good (or bad, actually).
During the last weeks I have been witness to a slightly different expression of the same principle. I live in Heidelberg, Germany, a city rather well known for its mediaeval buildings, its tiny alleys and its being cleaner and more innocent than most German cities. Since the garbage collection service has been on strike for over a month now, Heidelberg's tidiness has somewhat suffered. You can see large piles of garbage everywhere, growing larger from day to day. Garbage attracts more garbage.
I cannot help realizing that by now many (if not most) people have given up completely on the idea of cleaning up after themselves. Instead they drop anything they want to get rid of anywhere at any time. Many people, but not all. Some, like myself, still prefer to take their used Kleenex home - just to put it into one of the twenty or so garbage bags waiting on our balcony for the strike to be settled. Thus, I conclude, there are two kinds of citizens: those who have somehow internalized the rules and follow them regardless of what their fellow citizens are currently up to. And those who just do whatever the majority does - with a strong inclination towards the least possible effort.
I have seen that in developers, too. Programmers who seem to do everything right: unit testing, code formatting, continuous integration etc. But only as long as I'm around. Obviously, they don't see much sense in following the practices. Or they just don't care. Or they know better than I do. Or they see the futility of all human endeavour. Or whatever. I just don't know why they are the way they are, and - what's even more frustrating - most of the time I - as a consultant - fail to have even the slightest long-term effect on these people. Maybe the (what I consider to be) good software development practices depend too much on certain personality traits (like eg. the willingness to take responsibility).