Fog Creek Software
Discussion Board

Say it ain't so Joel

Joel's recent comments about Exceptions have generated a lot of heat.  Why did he make them?

1. He doesn't understand the advantages of exceptions?  Not credible, Joel is too smart not to understand the advantages (and disadvantages) of exceptions. 

2. He doesn't recognise that his example of CopyFiles/UpdateRegistry, where laborious, error-prone manual rollback is needed, is atypical?  Not credible either.

3. He's spent too long working on an ASP version of FogBugz using VBScript, which only supports On Error Resume Next?  Again, not credible.

4. He did it to generate more links to his site, for commercial reasons?  Possible, but I don't believe it.

The only credible reason is that it's one of those provocative statements Joel says he makes during an interview to see how a candidate reacts.  Joel is recruiting - probably looking for someone who really understands exception handling to do the ASP.NET version of FogBugz.

I'm your man, Joel!

Thursday, October 16, 2003

Maybe it was all a setup so he could write a nice lead-in to the first review for his book club. "Design requires tradeoffs...."

Thursday, October 16, 2003

I don't see anything particularly surprising about Joel's outlook. Every programmer has something or other really odd that they like doing. Prefering error codes to exceptions is Joel's.

Mr Jack
Thursday, October 16, 2003

One of the things I have come to appreciate as a programmer is just how differently everyone thinks about programming.  To outsiders, it might seem like a pretty mechanical, logical, pursuit.  But just among my small team at work, there are so many different personalities, technically-speaking.

And this is good, since it takes all kinds to build a complete product.  Rare is the person who does it all equally well.  Quirks like this just demonstrate how hard programming is and how everyone has their way of wrapping their brain around it.

Thursday, October 16, 2003

Hey - on the JoS site, Joel demonstrated his ability at project planning, writing specs, management, hiring, etc.

More management skills, than coder skills.

He never said "I am the greatest coder ever", but he demonstrated lots of management skills - which are EXTREMELY valuable.

So - let's give the man a break!

Thursday, October 16, 2003

Not very long ago Joel's preferred method, using method returns to indicate error, was industry standard.

The whole Windows API reflects this method.  In the Win32 programming the Boolean return even has 3 states, with one to indicate errors (Troolean, perhaps [1]):

Joel is from this environment.  He has worked with this style for years, and has become very good at using it.  He developed from intern to leader in the field using this style.

Refactoring puts a lot of emphasis on Code Smells [2].  The name of it tells use that we are dealing with something intuitive rather than something logical.  An experienced programmer knows when code is going bad, his code note can smell the decay and it can become unbearable.

For experienced C programmers, code that looks like this:


Stinks like rotten eggs.  He looks at it and says where's the error handler.  Whats going to happen in this case, or that case.

Sure, exceptions allow you to handle all those exceptions in a cleaner manner, but that doesn't matter.  The code nose was trained elsewhere and will never learn to tolerate that stench.

Many fine arguments can be made for exceptions, and I buy every one.  I love exceptions, because to me the above code smells like a vally of roses.

Are these arguments persuasive enough that Joel should ignore the smell and change over to using exceptions?

Certainly not, because the real benefits of Exceptions are minor.  Would Citydesk or Fogbugz have been significantly better products if exceptions had been used?  No. 

Would they have been developed quicker using exceptions?  No.

In fact they would have been developed more slowly, because the benefits of using exceptions doesn't even come close to the benefits of a well trained code nose refined over the years.


Ged Byrne
Thursday, October 16, 2003

> Why did he make them?

1. Because he's incredibly devious and Machiavellian. His cunning plan generated a huge amount of traffic for FogCreek, and hey there's no such thing as bad publicity. He'll hire lots more top 10% engineers (the various exception discussions serving as a kind of litmus test), and sling lots more copies of CityDesk and FogBugZ on to every desk and desktop.

2. He screwed up

Thursday, October 16, 2003

How about:  He genuinely believes that exceptions are generally not worth using, but sees that everybody loves them, and is provoking debate to see if somebody can come up with a convincing argument.

Foolish Jordan
Thursday, October 16, 2003

> How about

... recognizing sarcasm when you read it?

Thursday, October 16, 2003

> How about:
Irony? :-)

Leonardo Herrera
Thursday, October 16, 2003

How about reading this:

Johnny Bravo
Thursday, October 16, 2003

"He'll hire lots more top 10% engineers"

I thought it was 1%?

Jim Rankin
Thursday, October 16, 2003

I really do wonder if the exception thing, whether you like it or not, is related in any way to either age or previous experience?

Maybe it's to do with how you came to where we are today. I can't see many hard-core C guys being particularly enamoured of exceptions - but I could be wrong.

Gotta say I don't like exceptions. Recently had some guy tell me that it doesn't matter how expensive it is to throw an exception, because you're screwed anyway (not true and not his exact words).

Thursday, October 16, 2003

That's an interesting article, Johnny Bravo, but boy does that guy have an odd writing style.

I just read a newspaper article from the late 19th century, and it had the same boring, tedious feel!

Thursday, October 16, 2003

Oh, man, and that guy talks about hiring 1% top talent.

Even manual rollback like install/registry update is easily done in the presence of exceptions. Just use 'resource acquisition is initialization' idiom or some kind of 'command' pattern with undo mechanism (undo will be initiated by some object's destructor in the event of an exception).

Let's face it, Joel is a VB programmer, he doesnt get the exceptions, nor he is very knowledgable in C++. Some people cannot understand pointers, Joel went a little futher.

I really like his management, industry insight articles though. That are the topics where Joel shines.

Thursday, October 16, 2003

Passater is correct.

Oh - and for the Win32 example - you do realise it is a C API? Exceptions are not available.

Thursday, October 16, 2003

> 1. Because he's incredibly devious and
> Machiavellian. His cunning plan
> generated a huge amount of traffic for
> FogCreek, and hey there's no such
> thing as bad publicity.

Yes, he generated a lot of traffic for Fog Creek, and probably sold a lot of software.

BUT - he didn't obtain that traffic for free - he gave something very valuable in exchange - that is, he gave us a lot of interesting and worth reading information.

Thursday, October 16, 2003

"Oh - and for the Win32 example - you do realise it is a C API? Exceptions are not available."

Actually they are. MS calls it "structured exception handling", and it's supported by MSC compiler extensions (__try, __except, __finally, __leave) and various C functions (GetExceptionCode, GetExceptionInformation et al.)

Chris Nahr
Friday, October 17, 2003

"and it's supported by MSC **compiler extensions**"


Friday, October 17, 2003

*  Recent Topics

*  Fog Creek Home