9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Richard Uhtenwoldt <ru@river.org>
To: 9fans@cse.psu.edu
Subject: [9fans] code complexity
Date: Tue,  5 Feb 2002 06:24:17 -0800	[thread overview]
Message-ID: <200202051424.GAA18255@ohio.river.org> (raw)

Most of the people on this list value "elegance" in source code.  To
them, a solution that requires 1000 lines of code is almost always
better than one that requires 10,000 lines as long as both solutions
solve the same set of problems.  Let us use the phrase "code complexity"
or "software complexity" to refer to the mental effort needed to
understand a piece of code.  Number of lines of source code, excluding
comments, is the easiest measure for estimating code complexity.

Whereas the people on this list tend to view code complexity as a cost
to be minimized/pessimized, many people --including probably most
programmers-- do not.  They may object to "code bloat" as a waste of
memory or cpu cycles or diskspace, but that is a different thing than
objecting to large source code sizes because they makes the code
unnecessarily difficult to understand, maintain and modify.  Some people
actually welcome code complexity, eg, some managers and economists even
today measures programmer "productivity" in lines of source code
produced.

Few on this list are going to disagree with the statement that the
popular desktop and server platforms are significantly more complex than
necessary.  but some numbers might be fun.

The Debian distribution of Linux contained 55,000,000 lines of code as
of 18 months ago.  (Includes all software including very specialized
stuff, eg, specialized for plane pilots, doctors, etc.)  Probably double
that now.

http://people.debian.org/~jgb/debian-counting/

the Mozilla web browser over 2,000,000 lines.  gcc 984,000.  I did not
inquire whether that included the g++ code to compile C++.

http://www.dwheeler.com/sloc/redhat71-v1/summary

The idea that complexity is a cost to be minimized is not new.  Dijkstra
devoted his Turing Award lecture to it in 1972 ("The Humble
Programmer").  And yet, it is still decidedly a minority view, even
among programmers.  Why?


             reply	other threads:[~2002-02-05 14:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-05 14:24 Richard Uhtenwoldt [this message]
2002-02-05 14:47 ` Matt H
2002-02-05 16:34 Russ Cox
2002-02-05 16:39 ` Boyd Roberts
2002-02-05 16:42   ` Ronald G Minnich
2002-02-05 17:20     ` david presotto
2002-02-05 23:06       ` Steve Kilbane
2002-02-05 20:24 ` philw
2002-02-06  1:01   ` ozan s yigit
2002-02-05 22:28 ` Dan Cross
2002-02-05 16:41 Russ Cox
2002-02-06  0:10 [9fans] XP (was: code complexity) geoff
2002-02-06  0:29 ` [9fans] code complexity George Michaelson
2002-02-06 10:47   ` Boyd Roberts
2002-02-06 20:49     ` Andrew Simmons

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200202051424.GAA18255@ohio.river.org \
    --to=ru@river.org \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).