more questions about efficient C code

Ozan Yigit oz at yetti.UUCP
Thu Jul 18 00:43:11 AEST 1985


In article <11554 at brl-tgr.ARPA> gwyn at BRL.ARPA (VLD/VMB) writes:
>I have to disagree with your view that "programming is a tool for all
>and not a science for a few".  Most of the problems I have encountered
>with software have been the direct result of it being produced by
>amateurs who were apparently both unaware of the science and
>unfamiliar with the proper usage of the tools.
>
	Umph!!! I have been involved in decus for a long time, and
	have gone through *all* tapes since 1978. These tapes
	contain stuff from Universities (where the Computer Science
	is tought) to many commercial organizations. I could safely
	say that there is *no* one-to-one correspondance between 
	so-called professionals and the awareness of the science of
	programming. You could say that I have encountered more
	trash written (in macro, fortran, basic, C, pascal) by 
	professionals (?) than otherwise. As someone said eons ago:

	An educated fool is often more foolish than 
	an uneducated one.

>C is meant for experienced, professional programmers..

	Is that right ?? It seems the highschool students (Who perhaps
	started out with basic) write just as good C code as
	"professionals", as Lincoln-Sudbury stuff in one of the usenix
	tapes prove. By the way, what does "professional" mean ??
	Someone making a living thru programming ??? I suppose
	"experienced" means someone who has programmed in fortran, basic,
	cobol and apl ??? (Perhaps this does not count - experienced
	means someone who has programmed in C and C alone, the god-given
	tool of higher learning, professionality and superhackerdom !!)

>[it] makes no sense to argue that all code should be readable by those
>unfamiliar with the language; would you prohibit the use of classes
>in C++, data structures and pointers in C, etc. simply because people
>whose experience is limited to a BASIC primer don't understand them?
>
	The idea is to make the program as *clear* as possible, or
	to put it in Einstein's words: "As simple as possible, but
	not simpler". As the obfuscated C contest proves, one can
	write C code that looks like Apl, almost unreadable, yet
	it works. Than you spend about three times as much time
	as it took to write it, to untangle it, perhaps without
	success. What "seems" efficient may not be so, and thus,
	unreadability is a high price to pay for it:

	"Premature optimization is root of all evil" [Kernighan
	and Plauger, The elements of Programming Style, 1978]

	[fill in other classic quotations from Knuth, Jon Bentley
	etc. here]

-- 
Oz	[all wizardesque side effects are totaly unintentional,
	unless stated otherwise..]

	Usenet: [decvax | allegra | linus | ihnp4] !utzoo!yetti!oz
	Bitnet: oz@ [yuleo | yuyetti]
-------------
Support GNU. Consider the 3-muskateers' motto:
	ONE FOR ALL - ALL FOR ONE



More information about the Comp.lang.c mailing list