荔园在线

荔园之美,在春之萌芽,在夏之绽放,在秋之收获,在冬之沉淀

[回到开始] [上一篇][下一篇]


发信人: BlueBoy (蓝孩), 信区: Program
标  题: How To Steal Code
发信站: BBS 荔园晨风站 (Fri Mar 24 12:36:47 2000), 转信

How To Steal Code
or
Inventing The Wheel Only Once
Henry Spencer
Zoology Computer Systems
25 Harbord St.
University of Toronto
Toronto, Ont. M5S1A1 Canada
{allegra,ihnp4,decvax,utai}!utzoo!henry
ABSTRACT
Much is said about 憫standing on other people抯 shoulders, not their toes拻,
but in
fact the wheel is re-invented every day in the Unix/C community. Worse, often
it is re-invented
badly, with bumps, corners, and cracks. There are ways of avoiding this: some
of them bad, some of them good, most of them under-appreciated and under-used.
Introduction
憫Everyone knows拻 that that the UNIX/C? community and its programmers are the
very paragons of re-use
of software. In some ways this is true. Brian Kernighan [1] and others have
waxed eloquent about how
outstanding UNIX is as an environment for software re-use. Pipes, the shell,
and the design of programs as
慺ilters? do much to encourage programmers to build on others? work rather than
starting from scratch.
Major applications can be, and often are, written without a line of C. Of
course, there are always people
who insist on doing everything themselves, often citing 慹fficiency? as the
compelling reason why they
can抰 possibly build on the work of others (see [2] for some commentary on this)
. But surely these are the
lamentable exceptions, rather than the rule?
Well, in a word, no.
At the level of shell programming, yes, software re-use is widespread in the
UNIX/C community. Not quite
as widespread or as effactly an unmixed blessing, even from
the programmers? viewpoint! Time spent re-inventing facilities that are already
available is time that is not
available to improve user interfaces, or to make the program run faster, or to
chase down the proverbial
Last Bug. Or, to get really picky, to make the code readable and clear so that
our successors can under-stand
it.
Even more seriously, re-invented wheels are often square. Every time that a
line of code is re-typed is a
new chance for bugs to be introduced. There will always be the temptation to
take shortcuts based on how
the code will be used梥hortcuts that may turn around and bite the programmer
when the program is
hhhhhhhhhhhhhhhhhh
? UNIX is a trademark of Bell Laboratories.

--
※ 来源:·BBS 荔园晨风站 bbs.szu.edu.cn·[FROM: 192.168.0.90]


[回到开始] [上一篇][下一篇]

荔园在线首页 友情链接:深圳大学 深大招生 荔园晨风BBS S-Term软件 网络书店