97 Things Every Programmer Should Know

(Chris Devlin) #1

Collective Wisdom from the Experts 49


Redefine internal interfaces, restructure modules, refactor copy–pasted code,
and simplify your design by reducing dependencies. You can significantly
reduce code complexity by eliminating corner cases, which often result from
improperly coupled features. Slowly transition the old structure into the new
one, testing along the way. Trying to accomplish a large refactor in “one big
shebang” will cause enough problems to make you consider abandoning the
whole effort midway through.


Be the surgeon who isn’t afraid to cut out the sick parts to make room for heal-
ing. The attitude is contagious and will inspire others to start working on those
cleanup projects they’ve been putting off. Keep a “hygiene” list of tasks that the
team feels are worthwhile for the general good of the project. Convince man-
agement that even though these tasks may not produce visible results, they
will reduce expenses and expedite future releases. Never stop caring about the
general “health” of the code.

Free download pdf