[Asterisk-Dev] Re: FW: asterisk/doc CODING-GUIDELINES,1.4,1.5

Tom Ivar Helbekkmo tih at eunetnorge.no
Wed Jan 19 07:56:16 MST 2005


Edwin Groothuis <edwin at mavetju.org> writes:

> Any C programmer who checks with strlen() if the length of a string
> is greater than zero should be forced to read the K&R book again
> to understand how the C programming language actually works.

I wasn't going to say anything, but...  The point is *not* "how the C
programming language actually works".  The point is how readable your
source code is.  Write code that people can read and comprehend, and
don't try to be smart until you can prove that the code you're trying
to bum cycles off is a bad enough bottleneck that it's worth making it
hard for people to understand -- and thus easy to inadvertently create
bugs when modifying.  Premature optimization is a waste of time --
yours and the future reader's (who might well be yourself).

-tih
-- 
Tom Ivar Helbekkmo, Senior System Administrator, EUnet Norway Hosting
www.eunet.no  T +47-22092958 M +47-93013940 F +47-22092901 FWD 484145



More information about the asterisk-dev mailing list