company—I ended up staying a programmer, but was told that future pay
increases were pretty much out of the
question if I was unwilling to move
into management.
There is also a belief that older programmers “lose the edge” and don’t
cut it anymore. That belief is mistaken in my opinion; older programmers
may not burn as much midnight oil as
younger ones, but that’s not because
they are old, but because they get the
job done without having to stay up
past midnight.
This loss of older programmers
is unfortunate, particularly when it
comes to API design. While good API
design can be learned, there is no substitute for experience. Many good APIs
were created by programmers who had
to suffer under a bad one and then decided to redo the job, but properly this
time. It takes time and a healthy dose of
“once burned, twice shy” to gather the
expertise that is necessary to do better.
Unfortunately, the industry trend is to
promote precisely its most experienced
people away from programming, just
when they could put their accumulated
expertise to good use.
Another trend is for companies to
promote their best programmers to
designer or system architect. Typically,
these programmers are farmed out to
various projects as consultants, with
the aim of ensuring that the project
takes off on the right track and avoids
mistakes it might make without the
wisdom of the consultants. The intent
of this practice is laudable, but the
outcome is usually sobering: because
the consultants are so valuable, having
given their advice, they are moved to
the next project long before implementation is finished, let alone testing and
delivery. By the time the consultants
have moved on, any problems with
their earlier sage advice are no longer
their problems, but the problems of a
project they have long since left behind.
In other words, the consultants never
get to live through the consequences of
their own design decisions, which is a
perfect way to breed them into incompetence. The way to keep designers
sharp and honest is to make them eat
their own dog food. Any process that
deprives designers of that feedback is
ultimately doomed to failure.
External Controls. Years ago, I was
working on a large development project that, for contractual reasons, was
forced into an operating-system upgrade during a critical phase shortly
before a delivery deadline. After the
upgrade, the previously working system started behaving strangely and
occasionally produced random and
inexplicable failures. The process
of tracking down the problem took
nearly two days, during which a large
team of programmers was mostly twiddling its thumbs. Ultimately, the cause
turned out to be a change in the behavior of awk’s index() function. Once
we identified the problem, the fix was
trivial—we simply installed the previous version of awk. The point is that a
minor change in the semantics of a minor part of an API had cost the project
thousands of dollars, and the change
was the result of a side effect of a programmer fixing an unrelated bug.
This anecdote hints at a problem
we will increasingly have to face in
the future. With the ever-growing importance of computing, there are APIs
whose correct functioning is important almost beyond description. For
example, consider the importance of
APIs such as the Unix system call interface, the C library, Win32, or OpenSSL.
Any change in interface or semantics
of these APIs incurs an enormous economic cost and can introduce vulnerabilities. It is irresponsible to allow a
single company (let alone a single developer) to make changes to such critical APIs without external controls.
As an analogy, a building contractor
cannot simply try out a new concrete
mixture to see how well it performs. To
use a new concrete mixture, a lengthy
testing and approval process must be
followed, and failure to follow that
process incurs criminal penalties. At
least for mission-critical APIs, a similar process is necessary, as a matter of
self-defense: if a substantial fraction
of the world’s economy depends on
the safety and correct functioning of
certain APIs, it stands to reason that
any changes to these APIs should be
carefully monitored.
Whether such controls should take
the form of legislation and criminal
penalties is debatable. Legislation
would likely introduce an entirely new
set of problems, such as stifling innovation and making software more
expensive. (The ongoing legal battle
between Microsoft and the European
Union is a case in point.) I see a real
danger of just such a scenario occurring. Up to now, we have been lucky,
and the damage caused by malware
such as worms has been relatively
minor. We won’t be lucky forever: the
first worm to exploit an API flaw to
wipe out more than 10% of the world’s
PCs would cause economic and human damage on such a scale that legislators would be kicked into action. If
that were to happen, we would likely
swap one set of problems for another
one that is worse.
What are the alternatives to legislation? The open source community has
shown the way for many years: open
peer review of APIs and implementations has proven an extremely effective way to ferret out design flaws, inefficiencies, and security holes. This
process avoids the problems associated with legislation, catches many
flaws before an API is widely used, and
makes it more likely that, when a zero-day defect is discovered, it is fixed and
a patch distributed promptly.
In the future, we will likely see a
combination of both tighter legislative
controls and more open peer review.
Finding the right balance between the
two is crucial to the future of computing and our economy. API design truly
matters—but we had better realize
it before events run away with things
and remove any choice.
Related articles
on queue.acm.org
The Rise and Fall of CORBA
Michi Henning
http://queue.acm.org/detail.cfm?id=1142044
APIs with an Appetite
(Kode Vicious column)
http://queue.acm.org/detail.cfm?id=1229903
From COM to Common
Greg Olsen
http://queue.acm.org/detail.cfm?id=1142043
Michi Henning ( michi@zeroc.com) is chief scientist
of zeroC, where he’s working on the design and
implementation of Ice—zeroC’s next-generation
middleware. He previously worked on Corba as a
member of the object Management group’s architecture
board and as an orb implementer, consultant, and
trainer. With steve Vinoski, he wrote Advanced CORBA
Programming with C++, addison-Wesley, 1999.
© 2009 aCM 0001-0782/09/0500 $5.00