97 Things Every Programmer Should Know

(Chris Devlin) #1

Collective Wisdom from the Experts 123


If your team either has a code-mangling build or stores all the target settings
with the code, that suggests that no one has thought through the design care-
fully enough to separate those features that are core to the application and
those that are platform-specific. Or it could be worse: the team knows what to
do but can’t prioritize the effort to make the change.


Of course, there are exceptions: you might be building for targets that have
significantly different resource constraints, but that doesn’t apply to the major-
ity of us who are writing “database to screen and back again” applications.
Alternatively, you might be living with some legacy mess that’s too hard to fix
right now. In such cases, you have to move incrementally—but start as soon
as possible.


And one more thing: keep the environment information versioned, too. There’s
nothing worse than breaking an environment configuration and not being
able to figure out what changed. The environmental information should be
versioned separately from the code, since they’ll change at different rates and
for different reasons. Some teams use distributed version control systems for
this (such as bazaar and git), since they make it easier to push changes made
in production environments—as inevitably happens—back to the repository.

Free download pdf