Re: Developing frameworks and applications in tandem and managing dependencies

Alan Baljeu <alanbaljeu-/[email protected]> Thu, 2 Aug 2012 06:56:10 -0700 (PDT)
Newsgroups gmane.comp.windows.off-topic
Message-ID <[email protected]>
There's a book titled Beautiful Code featuring famous programmers who write essays explaining what they found to be beautiful writing.  One of them started with a short mathematical example and explained the limitations of that code.  He went through about 20 revisions of the code each time expanding and complicating it to deal with the shortcomings.  The end result is what he calls beautiful - a function from LAPACK or something like that.  Efficient, robust, correct, parallelizable, portable.  


It's not what I would call beautiful, but he has a point: correct code is not simple.  It necessarily deals with the trouble cases, and those necessarily muddy the clear algorithms they embody.

 
Alan Baljeu


From: John Elliot <[email protected]>

To: [email protected] 
Sent: Thursday, August 2, 2012 5:08:09 AM
Subject: Re: [OT] Developing frameworks and applications in tandem and managing dependencies
 

   > I'm with Joel on this one.  It seems to me errors should be handled explicitly where possible, and exceptions tend to make a lot of the handling implicit, as in something handles them, but much of the code pretends they don't exist - which can be dangerous.

I'm not sure how I feel about return values vs. exceptions. I think
they're both ugly and cumbersome.