Capturing Debug

20 October, 2007

Debug

Giles Bowkett sparked a bit of controversy. There have been some interesting responses from James and Avi. I figured I would just stay out of it, and I did a pretty good job resisting. Until now.

Giles is right. Tools do not make good programmers. Coding in a debugger has the tendency to create lava code. Some of the worst code I’ve ever seen was the result of one more patch on a mountain of crap. The code just grows and grows until what ever was originally intended is completely lost and nothing is understandable.

That said, if you try to take away my Smalltalk debugger I will break your arm. Why? Because tools do not make good programmers. Even the Smalltalk debugger which is way more then your ordinary debugger will not help you. It will not cause you to write better code but it won’t hurt either. Anyone that has used and understands the Smalltalk debugger knows that it is a very powerful tool to realize your design.

If your design sucks then Giles is right a debugger is not going to help and will probably make things worse. If on the other hand you are a good programmer a debugger as capable as the Smalltalk debugger is extremely liberating.

I can understand why some people do not appreciate the power of the Smalltalk debugger. Most people think of debuggers as a way to watch a value or set a break point. They do not understand that Smalltalk is different and miss the point. As a live system that doesn’t need to be recompiled, a system that is running while you program, the Smalltalk debugger gives the developer unprecedented access to the heart of the language.

We have access to everything that is Smalltalk in that debugger. We can change running programs and step right into the code we just typed. We can view the whole running stack and full context. We can change data in objects, create new objects, do anything that can be done in Smalltalk right from the debugger!

Ever wanted to step through a loop? You need to see how the system handles the 57th item. You could add code to break at that point. You could write tests that isolate that data and run it separately. You could use aspects to keep from having to change the code but you are really working hard to do something pretty simple. The worst possible solution is hitting step until you get there! Since everything is live and dynamic in Smalltalk I just change the index to 56 and step from there! See it’s pretty simple in Smalltalk!

Yes tests are good and there is no substitution for good design. That doesn’t change with a powerful debugger. Powerful tools can enable bad programmers to program badly, but that doesn’t counter the argument that good programmers benefit from complete access to a dynamic running system.

Ok so break your arm is a bit strong, but I hope you understand that the debugger is our window into the heart of Smalltalk, maybe we should name it something else because it does way more then capturing debug.

- Ron Teitelbaum * President / Principal Software Engineer * US Medical Record Specialists

2 Responses to “Capturing Debug”


  1. Please don’t break my arm.

    I wasn’t even thinking of Smalltalk. As far as I can tell, from what I’ve heard, the Smalltalk debugger is a debugger the same way emacs is a text editor. Smalltalkers walk around calling Superman “Joe” and freak out when outsiders can’t tell from his name that Joe can fly.


  2. Giles,

    Just to be clear I never said I didn’t like you! I agree with you that terminology is a problem. I believe the main issue is that if Ruby had a debugger like Smalltalk’s superman debugger then it would be very useful for Rubyites. This fact does contradict your original point, but I agree, not in the way that you might have intended it.

    Overall it’s very difficult for Smalltalkers to look at Ruby and not make comparisons to Smalltalk. A major deficiency in our eyes is the lack of a supersonic debugging Joe for Ruby, or whatever we should call it. It’s easy to get stuck talking at cross purposes. I suspect you are correct the flame war is over, but I doubt I even added a spark!

    -Ron


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 47 other followers

%d bloggers like this: