From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <37088672ac32055400db1684d3dfae65@plan9.bell-labs.com> From: "Russ Cox" To: 9fans@cse.psu.edu Subject: Re: [9fans] code complexity MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Tue, 5 Feb 2002 11:34:51 -0500 Topicbox-Message-UUID: 4c9c6070-eaca-11e9-9e20-41e7f4b1d025 I don't really feel like most of those line counts are comparable, since it's not clear how much is there. If you want something else that is not really comparable, note that the TeX add-on package for Plan 9 is almost the same size as the "everything else" base package. As for why, there certainly exists a small class of programmers that actively believes writing complex programs is just macho. To them, I admit: I am not man enough to keep up with your layers upon layers of complexity. When I run into code they have written, I inevitably complain to whoever will listen until I get fed up enough to rewrite it. To some extent, Mel is in this class, although he understands programs as craft too. At the same time, I think most programmers just don't understand that programs are intended to be read by humans. They fiddle until it works and then don't see the point to doing it over again in a cleaner, simpler, more elegant manner. Especially if someone is being measured by some bogus productivity metric like like lines of code written, papers published, or problem sets handed in. Good programming is like good writing in any subject; it happens only by much revision and practice. The sad thing is that at least in my experience, introductory programming courses just don't get that across. (In fact, in my experience most writing courses state that but then do a poor job of backing it up.) I helped to teach an introductory computer science theory course for three years, and we had the same problems there. Students didn't see any point to distilling a correct yet awkward proof down to its essence; after all, it was correct, wasn't it? (I don't know if this was natural or they got it from taking intro to programming the year before.) Even so, we didn't give much opportunity to help them rewrite their proofs. We did hand out the best most elegant proofs we had on the solution sets, and I think that helped somewhat, but I'm still not sure how many internalized the message. End of rant. Russ