If a tool or codebase is unpleasant to work with, productivity will drop. The problem is not that programmers are lazy or undisciplined, but that we all have a mental "gag reflex" and overcoming it takes energy. On a good day, the required energy is simply subtracted from that which would otherwise be applied to productive work; on a bad day it exceeds the energy available and absolutely nothing gets done. Making programmers work on awful code is like requiring them to run an obstacle course every hour. -- Jeff Darcy