Hello, On Tue, 26 Jun 2012, Anton Aylward wrote:
In the early 80s I was working for a UNIX developer and had the job of reviewing the SYSV packages from Bell's USG for such issue. USG had managed to take a lot of clean, well written code form the people who wrote V6 and V7 (take a look at John Lion's book - I showed it to a student learning C and her reaction was 'Why aren't we being taught with examples that are as easy to understand as that?') and make an incomprehensible mess of it.
Hm. I found the K&R 2nd Ed. quite understandable. And the Stroustrup. Of course, the harder stuff is, well, harder (pointers & dereferencing in C, i.e. what '*' does when in C, references/by value/templating in C++). As I'm not a programmer, I don't understand more arcane stuff, reading some pointer-to-function-with-complicated-prototype declaration (c.f. 'man dlopen', Example section: *(void **) (&cosine) = dlsym(handle, "cos"); ) that takes quite an effort to get. But e.g. 'getopts' was rather straightforward. Also, I've given up on understanding boost. Templates, typenames, typedefs, intertwined weirdly and deeply... *bwaaahhh* No thanks.
Thankfully much of the 'core code' (both kernel and apps) of Linux seems to be more comprehensible - at least to the people who work with it.
ACK. I find the kernel code quite readable, the stuff I don't get is either deeply nested functions/macros (which I'm theoretically just too lazy to follow), but more often it's some "bitbanging" hardware specific code where even the one who wrote that code can tell you only: "that's what works, that's what you have to do, or the HW will {"not do anything", "fail miserably doing what it's supposed to do", "just hang", "freeze your box entirely", "cause it to emit it's magic smoke"}... AHS, ASS, -dnh, open source, such as the linux kernel and e.g. mutt considerably less than other, don't get me started on libcamel (-> Evolution "PIM") though. And procmail's sources are formatted like s^W^W^Wunreadable, but, so far, procmail has always done what and how I wanted, just as documented. Oh, and I'm almost regularly grepping/reading around in /usr/src/linux, didn't have a headache to find my bearings there since at least 2.2.14 or so ;) -- I had a big argument with my wife. I didn't open the door for her. I just panicked and swam for the surface. -- Steve Davis [only roughly quoted as heard] -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org