*BSD News Article 33826


Return to BSD News archive

Xref: sserve comp.os.386bsd.misc:3019 comp.os.linux.misc:21052
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msuinfo!agate!library.ucla.edu!europa.eng.gtefsd.com!news.uoregon.edu!vixen.cso.uiuc.edu!uxa.cso.uiuc.edu!rkb55989
From: rkb55989@uxa.cso.uiuc.edu (Rafal Boni)
Newsgroups: comp.os.386bsd.misc,comp.os.linux.misc
Subject: Re: source of TCP/IP (was I hope this wont ignite a major flame ...)
Date: 4 Aug 1994 12:56:43 GMT
Organization: University of Illinois at Urbana
Lines: 57
Message-ID: <31qoib$jva@vixen.cso.uiuc.edu>
References: <31od8d$15l@fw.novatel.ca> <31pc9l$ctp@oscar.agcs.com>
NNTP-Posting-Host: uxa.cso.uiuc.edu

robertsw@agcs.com (Wallace Roberts) writes:

>hpeyerl@sidney.novatel.ca (Herb Peyerl) writes:

>	[ ...snip happens... ]

>>I've tried reading Linux networking code. At least some of the device 
>>drivers and each of the ones I looked at gave me a brain hemorrage...
>>
>>This is an example of some of the Linux device-drivers I've seen:
>>
>>        short error = rx_status & 0x3C00;
>>        outw(inw(ioaddr + 0x0A) | 0x00C0, ioaddr + 0x0A);
>>
>>As far as I can tell; Linux Ethernet device-drivers were written in
>>Write-Only-C.  There are no comments in the surrounding code that in any
>>way indicates exactly what "0x3c00", "0x0a", "0x00c0" actually mean. To
>>people without docs (usually these are the people who are trying to fix
>>the code) the above is completely meaningless.

>if you're writing (or fixing) a device driver, you are expected to have
>the h/w manuals handy.  comments are unnecessary if you have the device
>manual & understand the h/w.  this is the expected level of competence
>for a programmer writing or fixing a device driver.

>"if you can't run with the big dogs, stay on the porch..."

	Geez... And people wonder why code maintenance is such a f**ing
	headache.  If people simply gave 3 seconds thought to the other
	folks looking at their code, and forgot their "I can write code
	that no-one can read" egos, life would be much better.

	IMHO, the only place code like the above belongs is the obfuscated
	C contests, not in a publicly distributed code that will be potentially
	read my 1,000's of people.  Claiming that someone is not a competent
	programmer/hacker/etc. because they prefer code that is clear is
	a very lame ego-building tactic...
	
>>Thank you; I'll stick to working on code that I can actually read.

>you're welcome.  now run along and play...

	Whoa! Outaa control ego on the field... Better watch out.

>gears,
>ye wilde ryder
>--
>robertsw@agcs.com | 86 cr250 "dirt devil"    83 v65 magna "animal"
>"E Pluribus Unix" | 79 it250 "mr. reliable"  84 650 nighthawk ">> for sale <<"
>"Criminals (especially tyrants) prefer unarmed victims."
>"Ignorance can be cured; stupidity, on the other hand, is hereditary."

/--------------------------------------------------------------------------\
|"There are only two people you lie to in your   |              Rafal Boni |
| life... You girlfriend and the police"         |         r-boni@uiuc.edu |
|              - Jack Nicholson                  | My opinions, not UIUC's |
\--------------------------------------------------------------------------/