Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Where Can I Find Beautiful Code?

Posted by michael on Wed Jan 24, 2001 09:45 PM
from the not-in-anything-I-write-that's-for-sure dept.
eGabriel writes "One of the benefits of free software that I haven't seen explored here is that of the opportunity to study elegant, masterful code. Besides the fact that we can all share and enjoy applications, and reuse their source code, we can also simply download the code and view it for pleasure, to learn from masters of the art. Certainly there are different criteria for determining what makes a piece of code excellent or beautiful, and I am not as interested in discussing that. If however, anyone has found a piece of free software that serves as an excellent example for study because of qualities they as programmers hold dear, I would love to read that code also and be educated thereby. Equally interesting would be code that really is bad, as long as it didn't turn into direct attacks upon the programmers involved (they can't all be gems!) Any code that shows elegant and masterful design would make for excellent reading; the language in which it is written isn't as much a concern. 'Literate' code is a bonus."
This discussion has been archived. No new comments can be posted.
Where Can I find Beautiful Code? | Log In/Create an Account | Top | 371 comments (Spill at 50!) | Index Only | Search Discussion
Display Options Threshold:
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
(1) | 2 | 3 | 4 | 5
  • FreeBSD et al. by Anonymous Coward (Score:1) Wednesday January 24 2001, @05:00PM
  • Re:The most beautiful piece of code... by Anonymous Coward (Score:1) Wednesday January 24 2001, @05:11PM
  • Windows98SE by Anonymous Coward (Score:1) Wednesday January 24 2001, @05:17PM
  • Knuth by Anonymous Coward (Score:1) Wednesday January 24 2001, @05:21PM
  • Re:OpenSource is Beautiful by Anonymous Coward (Score:1) Wednesday January 24 2001, @09:35PM
  • freeciv code by Anonymous Coward (Score:1) Thursday January 25 2001, @03:00AM
  • Re:A Search by Anonymous Coward (Score:1) Thursday January 25 2001, @03:57AM
  • Re:The Story Of Mel (or: Ugly Code) NOT by Anonymous Coward (Score:1) Thursday January 25 2001, @12:50PM
  • Where Can I Find Beautiful Code?... by Anonymous Coward (Score:2) Wednesday January 24 2001, @07:46PM
  • Re:OpenSource is Beautiful by Alan (Score:2) Wednesday January 24 2001, @05:20PM
  • Re:The best code has lots of comments. by mcoletti (Score:1) Thursday January 25 2001, @12:06PM
  • Just to augment your point by mcoletti (Score:1) Thursday January 25 2001, @12:16PM
  • coldsync is a good example of The Right Way (tm) by mcoletti (Score:1) Monday January 29 2001, @06:35PM
  • Re:Hungarian Notation by mcoletti (Score:1) Monday January 29 2001, @07:13PM
  • Look at *BSD /usr/src by Dom2 (Score:1) Thursday January 25 2001, @01:55AM
  • Smalltalk by Stu Charlton (Score:1) Friday January 26 2001, @05:40PM
  • Re:Try expressing this programming concept in C. by Stu Charlton (Score:1) Friday January 26 2001, @05:50PM
  • Re:The best code has lots of comments. by Xtifr (Score:1) Thursday January 25 2001, @06:42PM
  • Deja Vu (Score:4)

    by cradle (1442) on Wednesday January 24 2001, @05:12PM (#482991) Homepage Journal
    I remember when I asked [slashdot.org] a similar question a few years ago. It might be informative to take a gander at it. -David
  • Re:Y-Combinator...... by shdragon (Score:1) Thursday January 25 2001, @04:34AM
  • Re:Emacs Source Made Me Decide to Remain a Program by Evangelion (Score:1) Wednesday January 24 2001, @07:34PM
  • Pretty Perl Code by Coppit (Score:1) Thursday January 25 2001, @05:36AM
  • I nominate fvwm/fvwm2/fvwm95 by Wheely (Score:1) Wednesday January 24 2001, @11:14PM
  • Python by AMK (Score:2) Wednesday January 24 2001, @05:29PM
  • Re:The best code has lots of comments. by Squid (Score:2) Thursday January 25 2001, @05:59AM
  • Re:Emacs Source Made Me Decide to Remain a Program by Squid (Score:2) Thursday January 25 2001, @06:19AM
  • GNU libavl by blp (Score:1) Thursday January 25 2001, @04:23AM
  • Re:The Story Of Mel (or: Ugly Code) by noahm (Score:1) Wednesday January 24 2001, @05:40PM
  • Re:The Story Of Mel (or: Ugly Code) by noahm (Score:1) Wednesday January 24 2001, @07:38PM
  • Re:perhaps the most visible projects? by drix (Score:2) Wednesday January 24 2001, @05:21PM
  • Tex (Score:3)

    by drix (4602) on Wednesday January 24 2001, @05:18PM (#483003) Homepage
    Donald Knuth's Tex certainly qualifies. Not only was it written, from the ground up, by arguably the greatest computer scientist of our time, but it's so good that it's bug free. Literally, there are no bugs in it. Stop and think about what that means for a minute. Can you come up with any software program on the planet of equal size and complexity (several megs of source code - not huge, but still formidable) that can make that claim? I can't. Granted, I may be incorrect, but nevertheless I find that amazing. You can view the parts of Tex that Knuth actually wrote here [stanford.edu]. They're written in (I think) CWEB, which is some literate programming language he has a real hard-on for. That probably means it fscking rules all, but personally I don't have the time/patience to pick it up. If you're sufficiently motivated, though, I'd imagine the Tex sources would prove very enlightening.

    --
  • Re:Deja Vu by eGabriel (Score:1) Thursday January 25 2001, @12:28AM
  • Re:Read Gabriel's Book by eGabriel (Score:1) Thursday January 25 2001, @02:53AM
  • Re:not many by eGabriel (Score:1) Thursday January 25 2001, @02:57AM
  • Re:The most beautiful code I've seen this week... by eGabriel (Score:1) Thursday January 25 2001, @03:05AM
  • Re:Dijkstra by eGabriel (Score:1) Thursday January 25 2001, @03:12AM
  • Re:You really should widen your reading scope by eGabriel (Score:1) Thursday January 25 2001, @03:13AM
  • Re:A suggestion by eGabriel (Score:1) Thursday January 25 2001, @03:16AM
  • Re:Facts by eGabriel (Score:1) Thursday January 25 2001, @03:18AM
  • Re:What kind of question is that? by eGabriel (Score:1) Thursday January 25 2001, @03:26AM
  • Re:What kind of question is that? by eGabriel (Score:1) Thursday January 25 2001, @09:17AM
  • Re:Got to be Jive talkin ! by The Mayor (Score:2) Wednesday January 24 2001, @11:47PM
  • And, by extension, xdvi.... by Booker (Score:2) Wednesday January 24 2001, @07:36PM
  • Re:The best code has lots of comments. by Doctor Memory (Score:1) Thursday January 25 2001, @09:04AM
  • Some Beautiful (And Ugly) Assembly Code by Mr Z (Score:1) Wednesday January 24 2001, @09:29PM
  • A Search by jjr (Score:1) Wednesday January 24 2001, @04:54PM
  • Re:The most beautiful piece of code... by QZS4 (Score:2) Thursday January 25 2001, @11:44PM
  • Re:Sure, I Can by waldoj (Score:1) Wednesday January 24 2001, @06:55PM
  • Sure, I Can (Score:3)

    by waldoj (8229) <waldo AT jaquith DOT org> on Wednesday January 24 2001, @04:47PM (#483021) Homepage Journal
    NOOP

    God, I love Assembly.
  • Re:The best code has lots of comments. by Rob_D_Clark (Score:1) Wednesday January 24 2001, @09:13PM
  • not many by cabbey (Score:1) Wednesday January 24 2001, @06:54PM
  • What is beauty? by EJB (Score:1) Thursday January 25 2001, @01:54AM
  • Andrew Tannenbaum's original Minix by AReilly (Score:1) Wednesday January 24 2001, @07:48PM
  • Classic code by edhall (Score:2) Wednesday January 24 2001, @07:11PM
  • Re: Personal recommendation by dne (Score:1) Thursday January 25 2001, @01:26PM
  • Beautiful Software by chris_sawtell (Score:1) Wednesday January 24 2001, @05:11PM
  • by dallen (11400) on Wednesday January 24 2001, @06:23PM (#483029) Homepage Journal
    I've seen more elegant code on perlmonks.org [perlmonks.org] than anywhere else. I've learned a lot there. People submit their craft, and more advanced disciples of perl comment on it and occasionally turn it into beautiful code.

    --
    Q: What do you get when a Postmodernist joins the Mafia?

  • Re:Got to be Jive talkin ! by nebby (Score:2) Wednesday January 24 2001, @08:39PM
  • Re:The most beautiful piece of code... by domc (Score:1) Thursday January 25 2001, @05:03AM
  • Re:The best code has lots of comments. by Omnifarious (Score:1) Thursday January 25 2001, @05:20AM
  • Re:The best code has lots of comments. by Omnifarious (Score:1) Thursday January 25 2001, @05:24AM
  • It's right under your nose. by mrsam (Score:1) Wednesday January 24 2001, @06:19PM
  • Re:Emacs Source Made Me Decide to Remain a Program by joshv (Score:1) Wednesday January 24 2001, @06:17PM
  • Re:Emacs Source Made Me Decide to Remain a Program by joshv (Score:1) Saturday January 27 2001, @04:35AM
  • Re:NeoMail by LawnMowerMan (Score:1) Thursday January 25 2001, @05:29AM
  • NeoMail (Score:3)

    by LawnMowerMan (13750) on Wednesday January 24 2001, @04:52PM (#483038) Homepage
    Many have the belief that NeoMail (http://neomail.sourceforge.net) is a project written in Perl which is not only excellently coded and well commented, it is also very efficient.
  • Re:Not anymore, Dorothy . . . The Mainframes are D by Zico (Score:1) Wednesday January 24 2001, @09:23PM
  • Re:The best code has lots of comments. by crispy (Score:1) Thursday January 25 2001, @03:15PM
  • Well.. if it's minimalism you're after.. by mcc (Score:1) Thursday January 25 2001, @09:10AM
  • Re:Personal recommendation by sethg (Score:2) Thursday January 25 2001, @01:31PM
  • by Fizgig (16368) on Wednesday January 24 2001, @06:54PM (#483043)
    The best-commented code I have ever seen is Doug Lea's malloc, or dlmalloc [oswego.edu], the malloc used in glibc, among other places. I had no idea how a malloc would work, and I wanted to write one for my OS class, so we looked at the dlmalloc source code. MAN, that's some well-commented code! Not only does it explain what individual functions do, but it also explains each general part of the algorithm in excellent detail. And it's malloc; it better not have any bugs!
  • Re:And it's down to 3! by FunnyBunny (Score:1) Thursday January 25 2001, @08:52AM
  • Re:And it's down to 3! OT by FunnyBunny (Score:1) Thursday January 25 2001, @07:07PM
  • Re:And it's down... but wait! by FunnyBunny (Score:1) Friday January 26 2001, @04:41PM
  • by mattbee (17533) <matthew@bytemark.co.uk> on Wednesday January 24 2001, @11:47PM (#483047) Homepage

    People seem to be mentioning the obvious targets: Knuth, BSD etc. but I notice nobody has mentioned Dan Bernstein's [cr.yp.to] projects, notably qmail. This guy basically didn't trust the standard C library routines for security and wrote his own string handling, file processing etc. based on a few system calls. He also splits up his programs into separate binaries as much as possible and is very, very minimalist in other ways too. The code seems quite impenetrable at first, I'm not sure beautiful is the right word, but it's certainly an education.

    Also worth a read is Sam Latinga's C++ port of the classic Mac game Maelstrom [devolution.com]. The actual code of the game is surprisingly small and very well-written.

    Oh, and while I think about it, the InfoZip sources [info-zip.org] are a real surprise too-- I mean this code is one of the most portable pieces of code you'll ever see; they're a very good example of the sort of lengths you'll need to go to in order to achieve this kind of portability, and it's still elegant in my opinion.

  • I got your beautiful code... by Mr. Piccolo (Score:1) Wednesday January 24 2001, @05:08PM
  • Why just code... (Score:5)

    by platypus (18156) on Wednesday January 24 2001, @05:03PM (#483049) Homepage
    I'm far away from being a linux zealot, but an real good example (IMO, YMMV etc.) is reading linux-kernel.
    L.T. and the other kernel hackers sometimes get into very interesting discussions. Lately there was a discussion where L.T. called the HP-UX sendfile implementation obviously stupid (and BSD's too, yeah, roll on ;-)).
    One of the people who answered was ... well the implementor on HP-UX himself and a very interesting discussion began.
    So, leeching on mailing lists might help - and if you're not into low-level os programming I'm sure you'll find a open source project which covers areas interesting to you (unless you're doing ERP applications or such stuff).

    --
    "There is so much to be said in favor of modern journalism. By giving us the opinions of the uneducated it keeps us in touch with ignorance of the community."

    Oscar Wilde (1854-1900)

  • Content, Content, Content by LionMan (Score:1) Wednesday January 24 2001, @05:05PM
  • Dave Cutler by cpeterso (Score:2) Thursday January 25 2001, @12:21PM
  • Re:Personal recommendation by cpeterso (Score:2) Thursday January 25 2001, @01:09PM
  • Documentation is not just in the comments... by meldroc (Score:1) Friday January 26 2001, @06:04PM
  • Beautiful... sort of ! (beautiful obfuscated C) by Cedricm (Score:1) Thursday January 25 2001, @06:44AM
  • Re:Functional Programming by _Splat (Score:1) Wednesday January 24 2001, @06:10PM
  • Re:Functional Programming by _Splat (Score:1) Thursday January 25 2001, @02:46PM
  • Re:TeX by frantzdb (Score:2) Wednesday January 24 2001, @07:45PM
  • Re:The best code has lots of comments. by hugg (Score:2) Wednesday January 24 2001, @07:21PM
  • One Great Programmer by sohp (Score:1) Thursday January 25 2001, @04:53AM
  • by Dr. Tom (23206) <tomh@nih.gov> on Wednesday January 24 2001, @05:55PM (#483060) Homepage
    When I download something, the first thing I look for is comments. No matter how clever or elegant the code is, nothing 10,000 lines long can ever be so self-evident that you don't need comments.

    Especially if the algorithm is particularly clever, it can be relying on some subtlety that will be entirely missed without a good long comment. Modifying such code is dangerous.

    One of the reasons people like Knuth's approach so much is that he puts the comments first, conceptually. The code is essentially embedded in a great long comment that describes everything that's happening. The code is just there to distill the essence of the algorithm into a form a stupid machine can understand. If the machines were a bit smarter, they would be able to run the program by reading the comments and executing them!

    Code with no comments is not a sign that the author understands his code so well that he doesn't need them. It is a sign that the programmer is lazy, sloppy, and doesn't care whether or not his code is maintainable. I just can't emphasize this point enough: for Open Source projects commenting is even more important than code. A large faceless company can get away with releasing products built on hundreds of thousands of lines of uncommented code, because they have external documentation, and can afford to spend thousands of dollars training new programmers. But if you want other people to even look at your code, you have to help them understand it. People making patches to code they don't fully grok are just going to make a mess.

    Good commenting style is as difficult to develop as good coding practices (the two really go hand in hand). Mental discipline (did you ever say to yourself "I'll go back and comment it later"? Did you?), clear exposition of an algorithm (no, the code is not a clear exposition -- remember code is CODE, it's meant for a stupid machine, not an intelligent human), maintainability, etc. Comments should be written in complete sentences wherever possible. Don't comment like this:

    /*

    * this comment
    * is pretty
    * but hard to format again
    * when you change it
    */
    Rather, write them like this:
    /* This comment is a paragraph. Any text editor can reformat this comment after you change it. */

    Not everybody uses the same tools you do. Comments should be as easy to change as possible. If they aren't, people won't do it, and the comments can get out of synch with the code, which is even worse than no comment at all.

    Languages without block quotes are very irritating in this respect.

    So don't look for beautiful CODE, look for well written prose comments. THAT program will be more stable, easier to use, more functional, and a joy to work on.

  • Find something interesting by noims (Score:1) Thursday January 25 2001, @03:36AM
  • JAVA: look at Lucene but NOT Turbine by skelf (Score:1) Thursday January 25 2001, @05:51AM
  • Re:The best code has lots of comments. by chris.bitmead (Score:1) Wednesday January 24 2001, @10:02PM
  • The C Library by chris.bitmead (Score:1) Wednesday January 24 2001, @10:12PM
  • Re:Screw commenting!! by ConceptJunkie (Score:2) Thursday January 25 2001, @06:06AM
  • Quake!!! by DaEvOsH (Score:1) Wednesday January 24 2001, @07:11PM
  • Re:Hello World Seven Ways by SeanAhern (Score:1) Wednesday January 24 2001, @09:13PM
  • Re:The most beautiful piece of code... by maw (Score:1) Wednesday January 24 2001, @06:31PM
  • Re:The most beautiful piece of code... by maw (Score:1) Friday January 26 2001, @06:50PM
  • Dijkstra by az (Score:1) Wednesday January 24 2001, @11:17PM
  • by J.J. (27067) on Wednesday January 24 2001, @05:50PM (#483071)
    The problem with reading source code is that it's a lot like art. Not art the idea, but art the thing. (Writing good code is an art (the idea) but that's not the point)

    Art is enitrely subjective. And the definition of good code is subjective. You realize this, and state that you're not interested in what defines excellent code. But we do agree that to find excellent (to you) code, you're going to have to dig through a lot of good (to others) code before you find that gem. Which leads to the next problem...

    Art takes study to fully understand. And again, excellent code takes study to fully understand. Some will say that the ability to understand code quickly is an element of excellence, but this goes back to the first point, that art is subjective. Perhaps someone else places versatile and consistent APIs across a tool set above readability. Programmers are always making trade-offs between the relative incline of the learning curve and the power of the interface. (windows vs. unix, for example)

    You can continue the analogy for a while, but these two combine to make a situation where you're going to have a tough time finding good code. You'll get tons of submissions of what excellent code is, but to make that distinction yourself, you're going to have to study each case in-depth.

    Good luck.

    J.J.
  • Re:Tex by CAPSLOCK2000 (Score:1) Wednesday January 24 2001, @08:56PM
  • This is not off-topic. Lousy moderation. by BeanThere (Score:2) Thursday January 25 2001, @12:38PM
  • Re:id software: doom, quake by BeanThere (Score:2) Thursday January 25 2001, @12:45PM
  • Re:34 Line Web Server by nchip (Score:1) Wednesday January 24 2001, @11:43PM
  • www.altivore.com (Score:3)

    by RobertGraham (28990) on Wednesday January 24 2001, @06:42PM (#483076) Homepage
    I wrote a piece of code in just a weekend that emulates the functionality of Carnivore. Because it was a rush job, I wouldn't call it particularly artful, but one of the "artful" things is that it compiles on Linux, Solaris/SPARC, and Windows (yes, Windows) with identical functionality but no platform-specific #ifdefs.

    The reason I think this is artful is that people tend to write code that runs only in their own platform. The fast majority of Linux code I see will not compile/run on a Solaris/SPARC system. Likewise, the Solaris/SPARC code rarely runs on Linux. Throwing Windows into the mix makes things even tougher.

    For example, one of the chief problems is that the old *(int*)p problem. If you are lucky, you simply get a byte-swapped value; if 'p' is unaligned, your program will actually crash (it's a RISC thing).

    When deal with external data structures (network protocols, binary files), most programmers think it is "elegant" to map structures on top of pointers. In reality, it is one of the most evil/ugly things you can do to code. One of the prettier pieces of code I've seen recently actually had a comment /*struct are for weenies*/ (meaning the structure-mapping process, not internal data structures). Dealing with such data one byte at a time sure look ugly to the uninitiated, but it really is the prettiest way.

    In any case, one of the reasons I'm posting this is because I don't post much open source, and therefore don't know much about what other people find ugly. I would be interested in hearing your comments about the source on www.altivore.com. Please send e-mail to altivore-comments@robertgraham.com.

  • Re:The Story Of Mel by Mock (Score:1) Thursday January 25 2001, @01:17PM
  • Re:Functional Programming by msaavedra (Score:1) Wednesday January 24 2001, @06:50PM
  • Try Smalltalk by ericlondaits (Score:1) Thursday January 25 2001, @03:24AM
  • WUStL's ACE library (and TAO ORB) by jmegq (Score:1) Wednesday January 24 2001, @07:02PM
  • Re: Building ACE + TAO by jmegq (Score:1) Thursday January 25 2001, @06:47PM
  • Re:34 Line Web Server by Salamander (Score:2) Thursday January 25 2001, @05:35AM
  • Re:Personal recommendation by Salamander (Score:2) Thursday January 25 2001, @05:37AM
  • Re:34 Line Web Server by Salamander (Score:2) Thursday January 25 2001, @12:15PM
  • Re:Personal recommendation by Salamander (Score:2) Thursday January 25 2001, @03:00PM
  • Re:34 Line Web Server by Salamander (Score:2) Thursday January 25 2001, @03:09PM
  • Re:Personal recommendation by Salamander (Score:2) Monday January 29 2001, @04:34AM
  • Re:TCL or AOLServer by velouria (Score:1) Wednesday January 24 2001, @11:33PM
  • The TCL / TK code by tullmann (Score:1) Wednesday January 24 2001, @08:54PM
  • Gtk+ by ajs (Score:2) Thursday January 25 2001, @05:36AM
  • LISP by Rylian (Score:1) Wednesday January 24 2001, @06:50PM
  • Re:The Story Of Mel by Synoptic (Score:1) Wednesday January 24 2001, @06:01PM
  • OpenBSD by kinger (Score:1) Wednesday January 24 2001, @06:01PM
  • here is one by linuxlover (Score:1) Wednesday January 24 2001, @08:25PM
  • Re:Beautiful Code Links by linuxlover (Score:1) Wednesday January 24 2001, @08:31PM
  • Re:OpenSource is Beautiful by p3d0 (Score:1) Wednesday January 24 2001, @06:20PM
  • Re:OpenSource is Beautiful by p3d0 (Score:1) Saturday January 27 2001, @08:01AM
  • Re:TeX (Score:4)

    by SecretAsianMan (45389) on Wednesday January 24 2001, @10:27PM (#483098) Homepage
    as the years wore on and the few remaining bugs were fixed ... the bribe went up

    The bribe started out at one cent (for the first bug) and doubles for every new bug, I believe. Now THAT's some trust in your work!

    --
    SecretAsianMan (54.5% Slashdot pure)
  • Re:TeX by WillAdams (Score:1) Thursday January 25 2001, @05:56AM
  • Want nice code? by alehmann (Score:1) Wednesday January 24 2001, @05:16PM
  • Re:34 Line Web Server by commbat (Score:1) Wednesday January 24 2001, @11:44PM
  • Quake and NT by Drubber (Score:1) Wednesday January 24 2001, @09:54PM
  • Re:Emacs Source Made Me Decide to Remain a Program by Drubber (Score:1) Thursday January 25 2001, @03:49PM
  • Re:Emacs Source Made Me Decide to Remain a Program by Drubber (Score:2) Wednesday January 24 2001, @09:29PM
  • Re:NeoMail by Bedemus (Score:1) Thursday January 25 2001, @03:17PM
  • Clean Code? Beautiful code? by etrnl (Score:1) Thursday January 25 2001, @07:23PM
  • TeX (Score:5)

    by cyrusp (65739) on Wednesday January 24 2001, @04:58PM (#483107)
    Jargon file says it best:

    TeX has also been a noteworthy example of free, shared, but high-quality software. Knuth offers a monetary awards to anyone who found and reported bugs dating from before the 1989 code freeze; as the years wore on and the few remaining bugs were fixed (and new ones even harder to find), the bribe went up. Though well-written, TeX is so large (and so full of cutting edge technique) that it is said to have unearthed at least one bug in every Pascal system it has been compiled with.
  • Python by moshez (Score:1) Wednesday January 24 2001, @11:08PM
  • The Story Of Mel (Score:5)

    by Eight Star (67539) on Wednesday January 24 2001, @05:05PM (#483109)
    For all of those who haven't read it, or want to again, this is a good story [pbm.com] about cool code, and a cool coder.
    This [google.com] is the Google search I found it with.
    The real Eight Star misses Technocrat.
  • Comments PLUS Code = GOOD by UnknownSoldier (Score:1) Thursday January 25 2001, @06:08AM
  • Re:The Haskell Prelude by nellardo (Score:2) Thursday January 25 2001, @09:16AM
  • by amnesty (69314) on Wednesday January 24 2001, @05:00PM (#483112) Homepage

    This really got my geeky juices excited when I saw this. One piece of source code that could compile/run unchanged into 7 different languages. Listed in the source they are: ANSI COBOL, ISO Pascal, ANSI Fortran, ANSI C (lint free), Shell script (GNU Bash, Ksh, sh), PostScript, and 8086 machine language. No matter which you use, the magical words "Hello World" will appear!

    Click here [latech.edu] for the link.

  • Compilers depriving us of beauty? by tarsi210 (Score:1) Wednesday January 24 2001, @07:23PM
  • Y-Combinator...... (Score:3)

    by ndfa (71139) on Wednesday January 24 2001, @05:16PM (#483114)
    This is in my mind some really really sexy code.
    I guess you can call is OSS, you see it in almost every Programming Language book that uses scheme or something like scheme/lisp.... to see what it does check out Y-Combinator Derivation [uark.edu]. So the basic idea is to be able to have a recursive func. that does not have a name.....

    (define Y
    (lambda (m)
    ((lambda (f) (m (lambda (a) ((f f) a))))
    (lambda (f) (m (lambda (a) ((f f) a)))))))


  • Re:perhaps the most visible projects? by captredballs (Score:1) Wednesday January 24 2001, @05:48PM
  • Screw commenting!! by dimator (Score:2) Wednesday January 24 2001, @08:27PM
  • Re:The best code has lots of comments. by wuice (Score:1) Thursday January 25 2001, @01:53AM
  • The most beautiful piece of code... by mduell (Score:1) Wednesday January 24 2001, @04:58PM
  • Re:The most beautiful piece of code... by mduell (Score:2) Wednesday January 24 2001, @05:02PM
  • Re:The best code has lots of comments ... NOT! by Dix (Score:1) Thursday January 25 2001, @05:55AM
  • And all I can think of... by walnut (Score:2) Thursday January 25 2001, @06:11AM
  • Re:34 Line Web Server by Baldrson (Score:2) Thursday January 25 2001, @12:54AM
  • Re:34 Line Web Server by Baldrson (Score:2) Thursday January 25 2001, @10:38AM
  • Re:34 Line Web Server by Baldrson (Score:2) Thursday January 25 2001, @02:07PM
  • Re:34 Line Web Server by Baldrson (Score:2) Wednesday January 31 2001, @12:05AM
  • 34 Line Web Server (Score:3)

    by Baldrson (78598) on Wednesday January 24 2001, @10:39PM (#483126) Homepage Journal

    Check out the 34 line web server [geocities.com] written by Rick Klement [mailto], the best Perl programmer I've ever known, who says of it:

    I wrote this after seeing a small HTTP server that took ~650 lines of C. I thought it would be an interesting challenge to try for a ten-to-one reduction. Not only did I exceed that, but the ~650 line server did not do POST type CGI's, which mine will.

    This server (which I name 'ws') has been quite useful. I use it for CGI testing, it's much simpler launching 'ws' with all parameters given on the command line than modifying an Apache [apache.org] conf file and firing the new Apache server up.

    'ws' takes four arguments on the command line,
    ws port_number doc_tree_base cgi_tree_base cgi_location
    but they all have defaults. I usually fire it up with
    ws 80 . .
    and then fetch plain docs from machine/somedoc.html and CGI's from machine/cgi-bin/somecgi.pl

  • Re:The most beautiful piece of code... by nycsubway (Score:1) Wednesday January 24 2001, @05:43PM
  • Re:The most beautiful piece of code... by orangesquid (Score:2) Thursday January 25 2001, @12:51AM
  • Re:The best code has lots of comments. by leo.p (Score:1) Wednesday January 24 2001, @10:57PM
  • Re:The best code has lots of comments. by FireWhenRady (Score:1) Thursday January 25 2001, @06:02PM
  • Why Should I Obey the Commands of the Ignorant? by goingware (Score:2) Thursday January 25 2001, @07:26PM
  • by goingware (85213) on Wednesday January 24 2001, @06:11PM (#483132) Homepage
    I was in and out of my University physics studies a number of times, and having a generally bad time, because of a serious illness [geometricvisions.com], and at some point decided I should get out and get a programming job because I figured I'd be better at that than school.

    I didn't really know how to program, I knew a little FORTRAN, C and Basic from doing data analysis during summer jobs, and I didn't really like it all that much. I used to really have to struggle to spend several weeks writing a 500 line program, and I'm sure I'd be embarrassed if I had to look at the source code to those programs today.

    I figured I'd program for a while because it paid the rent (I was making $20k a year doing Sun administration and writing image processing software), but when I figured out what I really wanted to do for a living I'd quit programming and get a real job.

    That was in 1988. Then some consultant visited and installed GNU Emacs [gnu.org] on our machines (two Sun 3/160's, one diskless, both with terminals and no workstation monitor, but with frame grabber cards and NTSC color monitors). He explained about the GNU manifesto [gnu.org].

    I thought it was pretty cool but didn't see it affecting me personally in a big way. I was mostly annoyed that I had to wait up while the consultant installed the software on what was supposed to be my day off while a ladyfriend was visiting from away.

    Then my friend Jeff Keller, who went to MIT for a while and vaguely knew Richard Stallman, spent an evening with me singing the praises of Emacs. What I really wanted was VI with macros you could program to include conditional branches, and he said it had all though and much much more.

    So I learned to actually use Emacs, and soon learned that it was quite extensible, but it wasn't made too clear how to extend it. The online manual was useful mainly to people who already knew what they were doing.

    So I read the source code. One thing I was interested in doing was writing C functions that were callable from Emacs lisp as lisp functions. There are many such functions built into Emacs (usually for performance) and you can add your own. There's this big DEFUN macro that even makes the C API look like Lisp.

    I learned that and a lot more. I learned what an eloquent statement of software architecture Emacs is.

    I learned that there really was something worth my while doing in the way of software.

    I wanted to write a program like that someday. Not another big editor, but a program that would someday strike other young programmers the way Emacs struck me.

    During the course of reading the source code, one day I stayed at my terminal 24 hours straight, arising only to get coffee and use the restroom, not even eating. I only realized how much time had passed when I started to fall asleep.

    That was when I started to take programming seriously. I began to put serious effort into studying programming, and studying it deeply.

    For example I would read Knuth's The Art of Computer Programming [fatbrain.com] on the bus on the way to work and I would stay up all night after work learning to program better on my Macintosh at home.

    For many years I selected all of my jobs based mainly on what I could learn from them.

    I've become a very skilled programmer. You can see this from my consulting business website [goingware.com], my resume [goingware.com] (on my resume the place where I first encountered Emacs is the Programmer job at Verde Technologies) and my programming tips pages [goingware.com].

    So in a very direct and profound way I owe it all to Richard Stallman [stallman.org] and Emacs.

    I still haven't written my great program yet. I don't even know what it will be. One project I've worked on peripherally is the ZooLib [sourceforge.net] cross-platform application framework and a project I've just started up but not gotten too far with yet is the Linux Quality Database [sunsite.dk].

    I did finally get my B.A. in Physics, from UC Santa Cruz [ucsc.edu], but only after being out of school working at a programmer for a number of years.


    Michael D. Crawford
    GoingWare Inc

  • Source Code by Enoch (Score:1) Thursday January 25 2001, @03:44AM
  • Lua by _egg (Score:1) Wednesday January 24 2001, @08:21PM
  • 99 Bottles of Beer, 227 Languages by MattGWU (Score:1) Thursday January 25 2001, @08:23AM
  • Re:Tex by Amokscience (Score:1) Thursday January 25 2001, @06:19AM
  • Kernel by captaineo (Score:1) Wednesday January 24 2001, @07:40PM
  • well.... by holzp (Score:1) Wednesday January 24 2001, @07:16PM
  • Re:Some beautiful code... by holzp (Score:1) Thursday January 25 2001, @04:25AM
  • Re:Some beautiful code... by holzp (Score:1) Wednesday January 31 2001, @06:46PM
  • Got to be Jive talkin ! by GreggBert (Score:2) Wednesday January 24 2001, @05:15PM
  • Not anymore, Dorothy . . . The Mainframes are Dead by Discoflamingo13 (Score:1) Wednesday January 24 2001, @08:37PM
  • Re:The best code has lots of comments. by KilobyteKnight (Score:1) Thursday January 25 2001, @04:14AM
  • Re:Python by err666 (Score:1) Wednesday January 24 2001, @06:16PM
  • Re:The most beautiful piece of code... by naasking (Score:1) Thursday January 25 2001, @12:36PM
  • Oh come on!! by naasking (Score:1) Thursday January 25 2001, @12:41PM
  • Re:The most beautiful piece of code... by naasking (Score:1) Friday January 26 2001, @04:54AM
  • Ruby code by Wolfier (Score:1) Wednesday January 24 2001, @06:05PM
  • Re:The best code has lots of comments. by alvi (Score:1) Thursday January 25 2001, @10:51AM
  • Re:The best code has lots of comments. by alvi (Score:1) Thursday January 25 2001, @05:48PM
  • Re:The best code has lots of comments. by alvi (Score:2) Wednesday January 24 2001, @07:59PM
  • TEX by protek (Score:1) Wednesday January 24 2001, @05:45PM
  • Randal Schwartz's Web Techniques columns by crucini (Score:1) Wednesday January 24 2001, @08:06PM
  • Beautiful Code by pauldy (Score:2) Wednesday January 24 2001, @05:29PM
  • Re:Emacs Source Made Me Decide to Remain a Program by Broadcatch (Score:1) Thursday January 25 2001, @12:37AM
  • Re:The most beautiful code I've seen this week... by Error27 (Score:1) Friday January 26 2001, @11:49AM
  • can be found right here. [muppetlabs.com]

    It's cool because it's really small.

    In fact I think it's the smallest program possible with an ELF binary. About an eight of the size of the excecutable created if you use some kind of fancy-schamcy assembler. And a 50th the size of the same program created by gcc.

    darn cool if you ask me.

  • How about Humorous code by bihoy (Score:1) Thursday January 25 2001, @03:42AM
  • Re:The most beautiful piece of code... by thelaw (Score:1) Wednesday January 24 2001, @05:54PM
  • Re:The most beautiful piece of code... by Girf (Score:1) Wednesday January 24 2001, @05:26PM
  • TeX Reward Information by Captain Chad (Score:1) Thursday January 25 2001, @02:37AM
  • Re:www.altivore.com by Karellen (Score:1) Sunday January 28 2001, @05:21AM
  • Fettuccini classes by bockman (Score:1) Wednesday January 24 2001, @11:50PM
  • Re:Funny, but that's fettuccinE by bockman (Score:1) Thursday January 25 2001, @01:35AM
  • Do you work for Microsoft? by chancycat (Score:1) Wednesday January 24 2001, @06:13PM
  • Re:Do you work for Microsoft? by chancycat (Score:2) Wednesday February 07 2001, @07:32AM
  • Re:The most beautiful piece of code... by RoninM (Score:1) Wednesday January 24 2001, @05:09PM
  • Functional Programming by RoninM (Score:1) Wednesday January 24 2001, @05:21PM
  • Re:Functional Programming by RoninM (Score:1) Wednesday January 24 2001, @06:04PM
  • Re:Functional Programming by RoninM (Score:1) Wednesday January 24 2001, @07:35PM
  • Re:The most beautiful piece of code... by RoninM (Score:1) Thursday January 25 2001, @12:19PM
  • Re:What kind of question is that? by RoninM (Score:2) Wednesday January 24 2001, @05:06PM
  • Re:What kind of question is that? by ulmanms (Score:1) Wednesday January 24 2001, @05:04PM
  • TCL or AOLServer by DanIncognito (Score:1) Wednesday January 24 2001, @05:59PM
  • Re:OpenBSD style(9) by dugsong (Score:1) Thursday January 25 2001, @06:46AM
  • Re:The most beautiful piece of code... by commanderfoxtrot (Score:1) Thursday January 25 2001, @03:18AM
  • Re:The most beautiful code I've seen this week... by hixie (Score:1) Friday January 26 2001, @06:05AM
  • Re:The best code has lots of comments. by mckyj57 (Score:1) Wednesday January 24 2001, @10:13PM
  • Re:perhaps the most visible projects? by boarderboy (Score:1) Wednesday January 24 2001, @08:38PM
  • Schwartzian Transform by cheese_boy (Score:1) Wednesday January 24 2001, @05:01PM
  • Re:Sure, I Can by DrSkwid (Score:1) Thursday January 25 2001, @10:52PM
  • Re:The best code has lots of comments. by ebbe11 (Score:1) Thursday January 25 2001, @03:01AM
  • Re:And it's down to 3! OT by mr3038 (Score:2) Thursday January 25 2001, @11:45AM
  • Re:Slashdot isn't for you by mr_gerbik (Score:1) Wednesday January 24 2001, @06:06PM
  • Re:Beautiful Code Links by mr_gerbik (Score:1) Wednesday January 24 2001, @06:12PM
  • Beautiful Code Links by mr_gerbik (Score:2) Wednesday January 24 2001, @05:27PM
  • by Triscuit (122259) on Wednesday January 24 2001, @04:55PM (#483187)
    I think the question can really only be answered to applying it to a particular task.

    There are almost always good solutions to a certain task that can be considered good.

    Next thing that must be done is to define "Good Code". I'm sure everyone has their own opinion as to what good code is;

    Readable, Well Commented, Efficient Algorithm, Proper Naming Conventions, Follows Appropriate Documented methods, etc...etc...

    I'm sure there are hundreds others!

    Perhaps a question like "What defines good code" would still be only slightly more beneficial to those reading the posts.
  • Re:Tex by pallex (Score:1) Thursday January 25 2001, @01:49AM
  • Re:Sure, I Can by pallex (Score:1) Thursday January 25 2001, @02:51AM
  • Re:Sure, I Can by pallex (Score:1) Thursday January 25 2001, @06:10AM
  • Re:Sure, I Can by pallex (Score:2) Thursday January 25 2001, @12:13AM
  • perhaps the most visible projects? by small_dick (Score:2) Wednesday January 24 2001, @05:09PM
  • It's sorta Zen, unfortunately by Gorobei (Score:1) Wednesday January 24 2001, @05:34PM
  • Colossal Cave by PotatoMan (Score:1) Thursday January 25 2001, @06:47AM
  • Re:The most beautiful piece of code... by Deflatamouse! (Score:1) Wednesday January 24 2001, @06:30PM
  • IJG, ZLIB, BZIP2 (Score:3)

    by istartedi (132515) on Wednesday January 24 2001, @06:34PM (#483196) Journal

    Not so much the code itself, but the APIs are easy to use, they're highly portable, and very free. I wish I could say libpng, but it took a little bit too long to figure out how to make it do what I wanted. Maybe that was just me though. There was some trial and error involved. Let's hear it not only for "beautiful code" but the entire package being well designed and easy to use.

  • Re:NeoMail by rgmoore (Score:2) Wednesday January 24 2001, @05:16PM
  • Re:The Story Of Mel (or: Ugly Code) by Mark Imbriaco (Score:1) Wednesday January 24 2001, @09:39PM
  • Re:The most beautiful piece of code... by joto (Score:2) Wednesday January 24 2001, @07:26PM
  • The Haskell Prelude by joto (Score:2) Wednesday January 24 2001, @07:36PM
  • Re:Content, Content, Content by joto (Score:2) Wednesday January 24 2001, @10:22PM
  • Re:The most beautiful piece of code... by joto (Score:2) Thursday January 25 2001, @01:42PM
  • Re:The most beautiful piece of code... by joto (Score:2) Thursday January 25 2001, @02:01PM
  • Smalltalk by tony clifton (Score:1) Thursday January 25 2001, @08:28AM
  • Another bit of beautiful code -- for the lispers by tony clifton (Score:1) Thursday January 25 2001, @08:38AM
  • Funny, but that's fettuccinE by kazzuya (Score:1) Thursday January 25 2001, @12:09AM
  • Garlic bread by kazzuya (Score:1) Saturday January 27 2001, @10:29AM
  • The best code has comments only when needed by a!b!c! (Score:1) Thursday January 25 2001, @08:52AM
  • Re:The most beautiful piece of code... by Tassach (Score:1) Thursday January 25 2001, @07:21PM
  • Re:The Story Of Mel by Sara Chan (Score:1) Thursday January 25 2001, @04:51AM
  • Squeak! by bzhou (Score:1) Wednesday January 24 2001, @06:34PM
  • One Word - Quake by desideria (Score:2) Wednesday January 24 2001, @05:59PM
  • Re:Not anymore, Dorothy . . . The Mainframes are D by hardburn (Score:1) Thursday January 25 2001, @04:07AM
  • Re:The best code has lots of comments. by hardburn (Score:1) Thursday January 25 2001, @04:23AM
  • Wei Dai's Crypto++ 4.1 by aminorex (Score:1) Wednesday January 24 2001, @07:47PM
  • Indenting with /.HTML by mrBlond (Score:1) Saturday January 27 2001, @03:40AM
  • PGPSDK by elegant7x (Score:2) Wednesday January 24 2001, @10:47PM
  • Re:Functional Programming - SUCKS! by kalifa (Score:2) Thursday January 25 2001, @05:35AM
  • Re:Functional Programming - SUCKS! by kalifa (Score:2) Thursday January 25 2001, @04:43PM
  • Try this.. by Arjuna Theban (Score:1) Wednesday January 24 2001, @09:28PM
  • Re:The most beautiful piece of code... by StarDrifter (Score:2) Wednesday January 24 2001, @06:07PM
  • Re:Sure, I Can by f5426 (Score:2) Thursday January 25 2001, @02:42AM
  • The Duff device by f5426 (Score:2) Thursday January 25 2001, @02:54AM
  • Re:Sure, I Can (Score:3)

    by f5426 (144654) on Thursday January 25 2001, @03:30AM (#483224)
    > I`d have used a case statement, instead of the if..else if business!

    Actaully, I first wrote it with an added if (n<0) { /* Error handling case */ } that cannot be dealt nicely in a switch. Then I removed the error test, because I felt it was pedantic to post it that way (more precisely, in real world, I would expect an "assert( n>=0 )" before the if/else)

    Btw, I generally avoid the switches because it is sometimes difficult to add new entries (it is not difficult, but it is error prone in the case where you need 'n<0', 'n==0', 'n==1' and 'n>=2', because you have to turn the whole switch into an if-else. I learnt the hard way to minimize changes to working code). Also, switches fails on non-integral types, so you need to master two idioms (one for the integral types, one for the floating point or function call decision tree, etc, etc)

    The less idioms I use, the less bugs I make, so I now only use switches when the tested value is an enumeration (because it never needs to be changed into an if/else), and where the default case is error handling or not used (so if I extend the enumeration I'll get either a warning or a run-time error, not a software that silently do something unexpected).

    It is a question of style, and you may feel better with a switch in that case.

    Cheers,

    --fred
  • Beauty.. by gnireenigne (Score:1) Wednesday January 24 2001, @05:05PM
  • Re:perhaps the most visible projects? by Quintus (Score:1) Thursday January 25 2001, @12:07PM
  • Re:Not anymore, Dorothy . . . The Mainframes are D by cyber-vandal (Score:2) Thursday January 25 2001, @12:42AM
  • Re:Deja Vu by cyber-vandal (Score:2) Thursday January 25 2001, @01:32AM
  • Re:id software: doom, quake by shog9 (Score:1) Thursday January 25 2001, @03:29PM
  • There is lots of different aisles... by Glowing Fish (Score:2) Wednesday January 24 2001, @10:25PM
  • Avoid GNU indent package by Trebinor (Score:1) Thursday January 25 2001, @02:39AM
  • Re:C++ exceptions replacements (nothing like it) by jdennett (Score:1) Wednesday January 24 2001, @07:00PM
  • Here is an essay on this topic.... by cconnell (Score:2) Thursday January 25 2001, @09:15AM
  • Re:TeX by Blackheart2 (Score:1) Thursday January 25 2001, @04:18AM
  • Re:Why just code... by shippo (Score:2) Thursday January 25 2001, @06:34AM
  • Tcl/Tk by ronys (Score:1) Wednesday January 24 2001, @08:53PM
  • 99 Bottles of Beer on the Wall by Dave114 (Score:1) Wednesday January 24 2001, @08:14PM
  • A Site Devoted Good Code by trikyguy (Score:1) Saturday January 27 2001, @06:19AM
  • Re:The most beautiful piece of code... by Abreu (Score:1) Thursday January 25 2001, @04:23PM
  • Re:TeX by VSarkiss (Score:1) Thursday January 25 2001, @05:46AM
  • Re:The most beautiful piece of code... by lpontiac (Score:2) Wednesday January 24 2001, @08:25PM
  • Beauty, Solutions by FooBarson (Score:1) Thursday January 25 2001, @05:29AM
  • Some beautiful code... by TomRitchford (Score:1) Wednesday January 24 2001, @05:01PM
  • Re:Some beautiful code... by TomRitchford (Score:1) Thursday January 25 2001, @10:52AM
  • Re:Some beautiful code... by TomRitchford (Score:1) Thursday January 25 2001, @10:56AM
  • Re:TeX by TMA1 (Score:1) Wednesday January 24 2001, @07:27PM
  • Re:Beautiful Code Links by Kernel Kurtz (Score:1) Thursday January 25 2001, @01:51AM
  • Perl Obfuscation by SlipJig (Score:1) Wednesday January 24 2001, @05:51PM
  • The good, the bad and the ugly by scosta (Score:1) Wednesday January 24 2001, @11:09PM
  • Re:Wrong approach by Gumshoe (Score:1) Thursday January 25 2001, @01:45AM
  • Hello Polyglots by ideology (Score:2) Wednesday January 24 2001, @05:33PM
  • Re:CircleMud by eudas (Score:1) Wednesday January 24 2001, @09:46PM
  • Re:The most beautiful piece of code... by Bungie (Score:1) Wednesday January 24 2001, @06:09PM
  • Re:Personal recommendation by codepawn (Score:1) Sunday January 28 2001, @07:43PM
  • Beauty - a matter of perspective by codepawn (Score:1) Sunday January 28 2001, @07:54PM
  • by garett_spencley (193892) on Wednesday January 24 2001, @05:29PM (#483256) Homepage
    How about:

    msg:
    .string "Hello, world!\n"

    .globl main

    main:
    pushl %ebp
    movl %esp,%ebp
    subl $8,%esp
    addl $-4,%esp
    pushl $14
    pushl $msg
    pushl $1
    call write
    addl $16,%esp
    xorl %eax,%eax
    jmp return

    return:
    movl %ebp,%esp
    popl %ebp
    ret

    ????

    I know it's not indented... I tried... Darn html.. Oh well...

    --
    Garett

  • Read Gabriel's Book by sv0f (Score:1) Wednesday January 24 2001, @06:39PM
  • by sv0f (197289) on Wednesday January 24 2001, @06:29PM (#483258)
    Beautiful code is a subject worth contemplating, not speeding by with the standard crap answers above. Here are two quite-different places to find beautiful code:

    (1) The "Programming Pearls" books by Bentley.
    (2) "On Lisp" by Paul Graham

    Also, Here are some quotes of relevance:

    The [benefit] which rhyme has over blank verse...is, that it bounds and circumscribes the fancy. For imagination in a poet is a faculty so wild and lawless, that, like an high-ranging spaniel, it must have clogs tied to it, lest it outrun the judgment. -- John Dryden

    The central task of a natural science is to make the wonderful commonplace: to show that complexity, correctly viewed, is only a mask for simplicity; to find pattern hidden in apparent chaos. - Herb Simon

    The mathematician's patterns, like the painter's or poet's, must be beautiful; the ideas, like the colours or the words, must fit together in a harmonious way. Beauty is the first test; there is no permanent place in the world for ugly mathematics...It may be very hard to define mathematical beauty, but that is just as true of beauty of any kind -- we may not know quite what we mean by a beautiful poem, but that does not prevent is from recognizing one when we read it. -- G. H. Hardy

    Joseph LaGrange..."believed that a mathematician has not thoroughly understood his own work till he has made it so clear that he can go out and explain it effectively to the first man he meets on the street." -- E. T. Bell

    When judging a physical theory, I ask myself wether I would have made the Universe in that way had I been God. -- Einstein

    Beauty is the proper conforminty of the parts to one another and to the whole. - Hesienberg

    There is no excellent beauty that hath not some strangeness in the proportion! - Francis Bacon

    Simplex sigillum veri - The simple is the seal of the true. And Pulchritudo splendor veritatis - Beauty is the splendour of truth. - S. Chandrasekhar

    The Scientist does not study nature because it is useful to do so. He studies it because he takes pleasure in it; and he takes pleasure in it because it is beautiful. If nature were not beautiful, it would not be worth knowing and life would not be worth living... I mean the intimate beauty which comes from the harmonious order of its parts. -- Poincare

    My work always tried to unite the true with the beautiful; but when I had to choose one or another, I usually chose the beautiful. -- Hermann Weyl

    Beauty is truth, truth beauty - that is all Ye know on earth, And all ye need to know. -- Keats

    There are some great men of science whose charm consists in having said the first word on a subject, in having introduced some new idea which has proved fruitful; there are others whose charm consists perhaps in having said the last word on a subject, and who have reduced the subject to logical consistency and clearness. -- J. J. Thomson

    Do you know we're sitting on 4 million pounds of fuel, one nuclear weapon, and a thing that has 270,000 moving parts built by the lowest bidder? Makes you feel good, doesn't it? -- Steve Buscemi ("Rockhound") in "Armageddon."
  • try HERE... by Sheik Yerboutii (Score:1) Thursday January 25 2001, @09:23AM
  • Sun's Java Classes by invi (Score:1) Thursday January 25 2001, @02:48AM
  • beautiful code is only a legend by mark_lybarger (Score:1) Thursday January 25 2001, @04:12AM
  • UNIX 6th Edition by zerovoid (Score:2) Wednesday January 24 2001, @08:30PM
  • Re:FreeBSD et al. by arnald (Score:1) Thursday January 25 2001, @12:59AM
  • Sorry... by arnald (Score:1) Thursday January 25 2001, @01:10AM
  • My thoughts by arnald (Score:1) Thursday January 25 2001, @01:16AM
  • Re:Emacs Source Made Me Decide to Remain a Program by JWhitlock (Score:1) Thursday January 25 2001, @08:53AM
  • pine by egmont (Score:1) Thursday January 25 2001, @12:22AM
  • Beautiful Code? by hjayres (Score:1) Thursday January 25 2001, @01:47AM
  • Re:NeoMail by happystink (Score:2) Thursday January 25 2001, @02:54PM
  • Re:NeoMail (Score:3)

    by happystink (204158) on Wednesday January 24 2001, @05:15PM (#483270)
    wow, they must have really cleaned it up from a few months ago then, cause back then it had a security flaw so super-basic that it showed that they didn't really understand a single thing about web security, and I decided at that point to never use it, who knows what else they were forgetting. (the flaw was that if someone clicked a link on an incoming message, and the url of that message got passed to your referrer log, you could go to that url and you'd be intheir mail, with full access to their mailbox. The worst example of session-tracking I have ever seen).

    sig:

  • Re:PGPSDK by IngramJames (Score:1) Thursday January 25 2001, @01:42AM
  • Who is Mel? (Score:3)

    by TheVet (205479) on Wednesday January 24 2001, @06:27PM (#483272) Homepage
    From the Jargon Files: Mel's full name is Mel Kaye. He is refered to in the LGP-30 manual as "Mel Kaye of Royal McBee who did the bulk of the programming [...] of the ACT 1 system".
  • Re:Sure, I Can by Godwin O'Hitler (Score:1) Thursday January 25 2001, @02:34AM
  • This is how to do it: by Godwin O'Hitler (Score:1) Thursday January 25 2001, @02:59AM
  • Re:Schwartzian Transform by Godwin O'Hitler (Score:1) Thursday January 25 2001, @03:13AM
  • Elegant Code != Good Code by naden (Score:1) Thursday January 25 2001, @12:47AM
  • Re:OpenSource is Beautiful by atrowe (Score:1) Wednesday January 24 2001, @05:29PM
  • Re:The most beautiful piece of code... by agentZ (Score:1) Thursday January 25 2001, @03:29AM
  • Quake Source Code by nnnneedles (Score:1) Thursday January 25 2001, @12:23AM
  • You really should widen your reading scope by Reedi (Score:1) Thursday January 25 2001, @12:34AM
  • ...in a language some don't even know is OO... by borgboy (Score:1) Wednesday January 24 2001, @06:37PM
  • Commented code by infiniti99 (Score:1) Thursday January 25 2001, @06:39AM
  • Re:The best code has lots of comments. by MidnightLog (Score:1) Thursday January 25 2001, @05:14AM
  • Re:Functional Programming by blamario (Score:1) Wednesday January 24 2001, @05:39PM
  • Wrong approach (Score:3)

    by blamario (227479) on Wednesday January 24 2001, @05:14PM (#483285)
    Gosh, this is really a hard question as you can see from the apparent lack of enthusiastic answers. If only you asked where can you find BAD, AWFUL code I can guarantee there would be a lot more links. I mean, there are movements devoted to producing as bad code as possible. Take a look at Obfuscated C Code Contest [ioccc.org]. You can learn from negative examples as well, and they are much easier to find.
  • I don't know about the 3.1 source but... by sheetsda (Score:1) Wednesday January 24 2001, @06:04PM
  • Really, really old "c" by xFoz (Score:1) Wednesday January 24 2001, @05:22PM
  • Haven't you heard of CodeGuru? by ishrat (Score:1) Thursday January 25 2001, @04:41AM
  • Re:I got your beautiful code... by Da Masta (Score:1) Wednesday January 24 2001, @06:37PM
  • Re:The Story Of Mel by HoldmyCauls (Score:1) Wednesday January 24 2001, @05:27PM
  • Song Code by tattered_tux (Score:1) Wednesday January 24 2001, @05:03PM
  • Re:The most beautiful piece of code... by neotek(maas) (Score:1) Wednesday January 24 2001, @11:44PM
  • Beautiful code for dummies by wackysootroom (Score:1) Thursday January 25 2001, @04:59AM
  • CircleMud (Score:3)

    by slugo (243955) <reichmanNO@SPAMtwcny.rr.com> on Wednesday January 24 2001, @05:11PM (#483294)
    http://www.circlemud.org I had fun intalling this on freebsd and getting it to run. You can open the code and make mods to the mud and enjoy playing your mods. Apply the patches from the ftp site. Others can come in and enjoy your mods. I learned alot about C programming from modifying this software and had fun playing with the mods I created. For instance, mod the software to have Puff roam around town instead of hanging out in Limbo. RO mud did this. Is it still around?
  • Re:It's sorta Zen, unfortunately by codetalker (Score:1) Wednesday January 24 2001, @05:53PM
  • Doesn't anyone remember the 'scene' by codetalker (Score:1) Wednesday January 24 2001, @06:03PM
  • GETTING OFF ON GOOD CODE by wigger (Score:1) Wednesday January 24 2001, @07:01PM
  • And it's down to 3! by g_bit (Score:1) Thursday January 25 2001, @04:16AM
  • Re:Sure, I Can by FigBugDeux (Score:1) Wednesday January 24 2001, @09:24PM
  • Re:Sure, I Can by FigBugDeux (Score:1) Thursday January 25 2001, @03:34PM
  • by eulevik (258261) on Wednesday January 24 2001, @05:11PM (#483301)
    The source code to id software's doom and quake is the nicest real-world code that I have seen. Knuth's TeX, especially in book form, is also worthwhile.
  • Re:What kind of question is that? by Faulty Dreamer (Score:1) Thursday January 25 2001, @05:18AM
  • Re:What kind of question is that? by Faulty Dreamer (Score:1) Thursday January 25 2001, @09:48AM
  • Re:Functional Programming - SUCKS! by IanA (Score:1) Thursday January 25 2001, @01:01PM
  • Re:Squeak! by Bobjects (Score:1) Thursday January 25 2001, @03:15PM
  • Goodbye? by kilgore_47 (Score:1) Wednesday January 24 2001, @04:56PM
  • I'm inclined to disagree. Code can be an art form, and if you dont agree you probably arn't a programmer. I wish I could write code decent enough to post under the 'beautiful' subject here, and I would tend to respect those who can...
  • Re:The best code has lots of comments. by Ghostface Postah (Score:1) Wednesday January 24 2001, @11:13PM
  • Re:Squeak! by Ghostface Postah (Score:1) Wednesday January 24 2001, @11:28PM
  • Re:The best code has lots of comments. by Ghostface Postah (Score:1) Saturday January 27 2001, @06:25AM
  • What if famous literary figures wrote code? by shift8key (Score:1) Thursday January 25 2001, @02:07PM
  • Re:Classic code by Gremlin77 (Score:1) Thursday January 25 2001, @01:23AM
  • Study at the foot of the master... by 3333t00l (Score:1) Wednesday January 24 2001, @05:02PM
  • Re:OpenSource is Beautiful by Aunt Mable (Score:1) Wednesday January 24 2001, @11:33PM
  • Re:Beautiful Code Links by Chai_Bot (Score:1) Wednesday January 24 2001, @06:28PM
  • the 5k contest entries by Glog (Score:1) Thursday January 25 2001, @11:51AM
  • Re:The most beautiful code I've seen this week... by blair1q (Score:1) Thursday January 25 2001, @09:34AM
  • Re:The best code has lots of comments. by The NT Christ (Score:1) Thursday January 25 2001, @10:48AM
  • Re:Emacs Source Made Me Decide to Remain a Program by The NT Christ (Score:1) Thursday January 25 2001, @11:00AM
  • Re:C++ self-documenting? by The NT Christ (Score:1) Thursday January 25 2001, @12:48PM
  • ascii pr0n by Kiss the Ass (Score:1) Wednesday January 24 2001, @08:35PM
  • Hungarian Notation by Kiss the Ass (Score:1) Wednesday January 24 2001, @09:20PM
  • I like his question much better by Kiss the Ass (Score:1) Wednesday January 24 2001, @09:37PM
  • Re:Hungarian Notation by Kiss the Ass (Score:1) Monday January 29 2001, @07:26PM
  • Fetchmail by anarcat (Score:1) Thursday January 25 2001, @08:29AM
  • It's in the book by MSBob (Score:1) Thursday January 25 2001, @03:53AM
  • Re:Wrong approach by Crspe (Score:1) Thursday January 25 2001, @02:23AM
  • a work of brilliance... by Kewjoe (Score:1) Wednesday January 24 2001, @05:48PM
  • Re:FP! by CmdrButtPlug (Score:1) Wednesday January 24 2001, @06:29PM
  • Re:The most beautiful piece of code... by CmdrButtPlug (Score:1) Wednesday January 24 2001, @06:42PM
  • Re:Some beautiful code... by pimphandofgod (Score:1) Wednesday January 24 2001, @05:41PM
  • ?? by kLoNe343 (Score:1) Wednesday January 24 2001, @05:15PM
  • Beauty: Ingenuity or appearance? by carbon 68k (Score:1) Wednesday January 24 2001, @06:54PM
  • My favorite code snippet... by MegaManSE (Score:1) Wednesday January 24 2001, @06:39PM
  • pretty code! by greenforest (Score:1) Wednesday January 24 2001, @07:40PM
  • Re:Want nice code? by frob2600 (Score:1) Wednesday January 24 2001, @07:46PM
  • Using Apache Code for Education by kefirsound (Score:1) Wednesday January 24 2001, @11:30PM
  • A suggestion by Tramb (Score:1) Wednesday January 24 2001, @11:55PM
  • Re:Windows98SE by Ice-d++ (Score:1) Thursday January 25 2001, @01:25AM
  • IP Filter by bbeausej (Score:1) Thursday January 25 2001, @03:31AM
  • Software Engineering by shic (Score:1) Thursday January 25 2001, @03:53AM
  • A fine example is Jaffer's SCM by Margo_Channing (Score:1) Thursday January 25 2001, @04:56AM
  • I think Dia is a great example by larocca (Score:1) Thursday January 25 2001, @06:23AM
(1) | 2 | 3 | 4 | 5