[PRL] Joel on Software - Making Wrong Code Look Wrong

Felix S Klock pnkfelix at ccs.neu.edu
Wed May 11 20:17:37 EDT 2005


On May 11, 2005, at 7:53 PM, Matthias Felleisen wrote:
> 5. I won't even touch exceptions. I haven't heard of Raymond Chen, but 
> the fact that he supports Joel's rant on exceptions immediately 
> disqualifies him as "the best programmer in the world". Exceptions are 
> necessary, useful, and good.

It get worse.  Raymond Chen not only supports Joel's rant on 
exceptions, he also clearly states that he thinks its better policy to 
use error-code return value checking rather than exception.  (Not that 
exceptions are bad, just that he thinks he can program more effectively 
using error codes).

http://blogs.msdn.com/oldnewthing/archive/2005/01/14/352949.aspx

I only put the link above as support for my characterization of his 
statements; I don't find the content there useful at all, and am not 
recommending it for popular consumption by PRL.

Having made that disclaimer, here's a taste of what the dereferencing 
the link holds in store for you:
> Here's some imaginary error-code-based code. See if you can classify 
> it as "bad" or "not-bad":
> [[ pnkfelix snip ]]
> This code is obviously bad. No error codes are checked. This is the 
> sort of code you might write when in a hurry, meaning to come back to 
> and improve later. And it's easy to spot that this code needs to be 
> improved big time before it's ready for prime time.
> Here's another version:
> [[ pnkfelix snip snip ]]
> This code is still wrong, but it clearly looks like it's trying to be 
> right. It is what I call "not-bad".

Its that last line that gets me.  So what is the point of the "not-bad" 
category?  Beats me.

-Felix

----
"i mean, it's not like you'd be useful as a team member
but sometimes you're a fun guy - and you could be in charge
of ordering pizza etc.."  -roderick re: felix and 6.111




More information about the PRL mailing list