|
|||
|
================================================== =====
The following would be totally off-topic except that Lisp is particularly well-suited for writing beautiful code, and I know some of you have written some very fine stuff yourself. ================================================== ===== Attention Programmers: You have read and written vast volumes of code in your years behind the keyboard. Most of that code was lackluster at best. Sure, most of it managed to function well enough to keep the bits moving. Sure, some of it fits into a well-crafted architecture. But, face it. Very little of it was code that you'd show someone on a first date. Yet, that desert of unexceptionalness had an oasis or two. You have seen some gorgeous code. You have seen some code that was the Platonic ideal of itself. I thirst for this code. I want to see the greatest code that you've ever seen. Share it with me. Actually, my interest goes beyond seeing the code myself. I believe that seeing, reading, and understanding perfect code is instructive. I believe young programmers will benefit from reading the best code we have to offer. My goal is to write a book, or at least a series of blog articles, which presents and discusses the finest code I can find. Sadly, the goal of publishing book or articles means I may have to turn away some true gems. But, I want to know if you have seen any specimens which: * manifestly beautiful, * self-contained (at least to the extent where the purpose and conventions of any external functionality is obvious from the call itself), * potentially publishable (as in, permissive enough licensing or obvious enough authorship through which to obtain such permission), and yet is still * under four hundred lines (including comments and vertical whitespace); Point me to them. Email them to me. Tattoo them on my thigh if that's the only way to convey them. Neither the programming language nor the raison d'etre matter at all. It can be a snippet of COBOL that tracks the number of paper towels you've used this year so long as reading the code makes you weep with joy. Thank you, Patrick <pat@nklein.com> |
|
|
||||
|
||||
|
|
|
|||
|
Patrick Stein <pat@csh.rit.edu> wrote:
+--------------- | But, I want to know if you have seen any specimens which: | * manifestly beautiful, .... | * under four hundred lines (including comments and vertical | whitespace); +--------------- Unless you're restricting your search to toy examples only, those two constraints are likely to be self-contradictory. At the very least, it will deprive your search of many truly magnificent instances of beautiful code. IMHO. YMMV. -Rob ----- Rob Warnock <rpw3@rpw3.org> 627 26th Avenue <URL:http://rpw3.org/> San Mateo, CA 94403 (650)572-2607 |
|
|||
|
Patrick Stein <pat@csh.rit.edu> writes:
> But, I want to know if you have seen any specimens > which: > * manifestly beautiful, Sorry to be a grammar troll, but I think you mean "manifest beautifully." I'm sure your editor will catch that of course. Good luck with your search. |
|
|||
|
On 2008-11-11 10:12:40 -0500, J Kenneth King <james@agentultra.com> said:
> Sorry to be a grammar troll, but I think you mean "manifest > beautifully." your parent just left out the verb "are." "Manifestly," is a legitimate adverb meaning "obviously," or "evidently." <http://wordnet.princeton.edu/perl/webwn?s=manifestly> Your parent meant to write: "if you have seen any specimens which *are*: * manifestly beautiful, * self-contained..." IOW, the list that follows consists of predicate adjectival phrases. Things can *be* "manifestly beautiful," just as they can *be* "self-contained," "potentially publishable," etc. |
|
|||
|
On Nov 11, 12:54 pm, Patrick Stein <p...@csh.rit.edu> wrote:
> My goal is to write a book, or at least a series of blog > articles, which presents and discusses the finest code I can > find. Sadly, the goal of publishing book or articles means I may > have to turn away some true gems. Have you seen this book called Beautiful Code that O'Rielly published last year? Beautiful Code -- Leading Programmers Explain How They Think Eds. Andy Oram, Greg Wilson 2007 O'Reilly ISBN 0596510047 I think that is an example of what you have in mind. In fact the first chapter by Brian Kernighan on a regexp matcher that he wrote with Rob Pike for their book. The matcher is just 30 lines of C code! Girish. -- Girish Kulkarni - Allahabad, India - http://girish.50webs.com |
|
|||
|
On Nov 11, 9:12*am, J Kenneth King <ja...@agentultra.com> wrote:
> Patrick Stein <p...@csh.rit.edu> writes: > > * *But, I want to know if you have seen any specimens > > which: > > * * ** manifestly beautiful, > > Sorry to be a grammar troll, but I think you mean "manifest > beautifully." > > I'm sure your editor will catch that of course. > > Good luck with your search. I meant what I wrote, but your phrasing may be an implied constraint. |
|
|||
|
On Nov 13, 12:10*am, Girish Kulkarni <gee...@gmail.com> wrote:
> On Nov 11, 12:54 pm, Patrick Stein <p...@csh.rit.edu> wrote: > > > My goal is to write a book, or at least a series of blog > > articles, which presents and discusses the finest code I can > > find. Sadly, the goal of publishing book or articles means I may > > have to turn away some true gems. > > Have you seen this book called Beautiful Code that O'Rielly published > last year? > > * *Beautiful Code -- Leading Programmers Explain How They Think > * *Eds. Andy Oram, Greg Wilson > * *2007 O'Reilly > * *ISBN0596510047 > > I think that is an example of what you have in mind. In fact the first > chapter by Brian Kernighan on a regexp matcher that he wrote with Rob > Pike for their book. The matcher is just 30 lines of C code! No, I hadn't seen that. I will have to track it down. Thanks for the pointer. |
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Re: EXCEL libname engine update existing sheet. | Joe Whitehurst | Newsgroup comp.soft-sys.sas | 1 | 04-02-2009 02:25 AM |
| Re: how to get list of datasets "created" between SAS code? | Ya Huang | Newsgroup comp.soft-sys.sas | 0 | 06-13-2008 04:27 AM |
| Re: a quicker way to create macro variables | data _null_; | Newsgroup comp.soft-sys.sas | 0 | 06-06-2007 04:34 PM |
| Re: XLAs with DDE to Excel | Workman, Rob | Newsgroup comp.soft-sys.sas | 0 | 08-31-2006 01:20 PM |
| Re: Read/Write Microsoft Word document | William W. Viergever | Newsgroup comp.soft-sys.sas | 0 | 05-31-2006 08:46 PM |