Home > Uncategorized > Bend It ‘Til It Breaks

Bend It ‘Til It Breaks

November 16th, 2009

Want to know how strong a piece of steel is? Bend it ’til it breaks. Want to know how usable a programming system is? Make a few deliberate mistakes and see how comprehensible the error messages are. It’s not the only approach, but it’s the one Zef Hemel took with Ruby on Rails. In his original post, he took a critical look at how helpful Rails is when a developer mistypes something. A lot of people misunderstood what he was doing, which prompted a follow-up post; since then, he has tried the same approach with JBoss Seam and Scala Lift. I think this is pretty cool — so cool, in fact, that I’m wondering if there’s a thesis topic in there somewhere…

Uncategorized

  1. November 16th, 2009 at 10:16 | #1

    Hey, for me it’s actually part of my Ph.D. thesis research, so I guess there is. Let me know if you end up doing something with it :)

  2. DanF
    November 16th, 2009 at 12:01 | #2

    Makes sense. Even on the systems level if you look at LLVM/Clang one of the arguments for using it is that it gives you better error messages than gcc. Same for the archer branch of gdb (omg, I can understand the template c++ errors!)

  3. November 16th, 2009 at 13:21 | #3

    This is the sort of effort where it’s hard to know whether the problem is lack of user experience or just bad tools.

    C++ tools used to be really really bad at this. Even after years of use, you’d still be staring at the error message (which took screenfuls) for ages [or rather, you'd give up and just look at the actual line of code]. Similarly, latex still baffles me after years of usage.

    Other tools are hard at first, but you get to a point where if someone asks “What does ‘parse error, expected ET got EX’” you can just reply ‘oh, you’re missing a semi-colon’ and be right. Tools like that are actually quite nice to work with.

  4. Sam Penrose
    November 17th, 2009 at 13:26 | #4

    Here’s an idea: friendlier tracebacks:
    —————————-
    >>> y = 0
    >>> 6/y
    Traceback (most recent call last):
    File “”, line 1, in
    ZeroDivisionError: integer division or modulo by zero
    —————————-
    Why doesn’t the interpreter have a mode to say ‘In the last line, the statement “6/y” failed with a ZeroDivisionError, because the current value of “y” is 0. It was assigned 0 in the 2nd-to-last line.’

Comments are closed.