development

When your tools suck...

October 17, 2007 20:09:43.360

I love this theory that not having a decent debugger is somehow a good thing - here's Giles Bowkett:

Asking why Ruby has weak debugger support is like asking why a dolphin doesn't have gills. Ruby has weak debugger support because Ruby programmers shouldn't be using a debugger. Ruby supports TDD and BDD better than any other language except possibly Smalltalk. Debugger support is for languages that you can't run tests against gracefully.

Yes, Smalltalk supports it better, in large measure because we have a debugger. For instance, have a look at this short (unnarrated) screencast. The summary: The Smalltalk debugger can support TDD:

Debugger Screencast

So no Giles, the absence of a debugger is not a feature - it's a fairly significant lack in your toolset.

Update: I love this. I left a short comment on Giles' blog, with a tinyurl link back here. His justification for deleting my comment:

when I said write politely or post in your own blog, I didn't mean that links to rude blogs were somehow not rude. I wish you people were more respectful with my time. There was a very reasonable counterargument, complete with excellent screencast, which I had to delete. Please understand, if your comments are rude, I will delete them, no matter how well-reasoned they are, no matter how polished their presentation, no matter how much I might respect you. I do not tolerate rudeness on my blog, and there are no exceptions. Please respect my time and your own. Posting comments I'm guaranteed to delete is wasteful.

Sounds a little odd, especially when we we get here:

For a quick summary, the commenter did a screencast of the Smalltalk debugger. The screencast showed the debugger in action. I admit, it looks cool. However, it still looks like a crutch to me. The screencast's argument was basically, look, here's the Smalltalk debugger, see how cool it is? Therefore it can't be a crutch. Of course it can. Haven't you ever met a beautiful woman who was mean to people, or a highly intelligent alcoholic? People make crutches out of their best features in real life all the time. Somehow it's impossible in computers? Of course not. Haven't you ever seen a useless but fun high-tech toy? A feature can be cool and still a crutch nonetheless.

Hmm. Yes, my post here is snarky. However, if Giles thinks I was just showing something cool, he missed the entire point of the post: the Smalltalk debugger supports TDD. Watch it again, Giles - I wrote a test, ran it. It failed. I debugged the test, had the debugger create the missing method for me - whereupon I wrote the code for the method in the debugger, and ran the test again. That's not a crutch: it's taking TDD to the next level.

Face it, Giles - you have the worst of this argument. Ruby ought to have a Smalltalk style debugger, and if it did, every Ruby developer would use it. The fact that Ruby doesn't have such a debugger is not a feature. Does this mean that Ruby sucks? No, of course not. I just think the argument that not having a debugger is a good thing is lame.

Update2: When you know you've lost, just close comments to make sure you get the last word. Oh, and make sure to swear (see his update stream for that) while you're at it - that shows 'em:

Although I am aware that the Smalltalk debugger works in the context of TDD, and was initially aware of that when I wrote the post, before any comments were made, because anyone with any knowledge of Smalltalk's history or the history of TDD knows that, it doesn't change my opinion that debuggers work backwards. Debuggers are based on the idea that the code base has enough places bugs could happen that the work of locating the bug is involved enough to justify machine assistance. This is not true of well-tested code. More importantly, the whole point of [T|B]DD is that you identify the bugs before you write the code. As tools which track down bugs in existing code, debuggers presume and encourage a workflow which is exactly backwards.

Umm, yeah - because we all write perfect code the first time, right out of the gate. Sure. And stop/restart is ever so much more productive than what I showed in the screencast, where you never leave the context of your code. Sure Giles - it's far more productive to do the test/run/break/test/run/break cycle than what I showed. You keep believing that - I'll be over here, being productive :)

Update 3: Oh, this just takes the cake - In the comments, Giles says:

Why on earth would I? How is supporting me rude? Why would I be offended by an offer of support?

So it's pretty simple, really - suck up to him, and it's open season. Disagree, and you get edited out. I've seen that behavior on political blogs, but sheesh.

Technorati Tags: , ,

Comments

[] October 17, 2007 21:30:23.042

 

As someone who slams VW a lot these days, I will give credit where credit is due -- I DO APPRECIATE the debugger.  I actually think you should just integrate the browser and the debugger.   I do large amounts of coding in debuggers. 

 BTW, James you had link to Roadmap that talked about a lot of stuff that I think you are going to abandon.   Or did I read that wrong?

 

Browser + Debugger

[Michael Lucas-Smith] October 17, 2007 22:13:30.468

I've toyed with integrating the browser and debugger before. It's quite tricky and I'm not 100% convinced the outcome'll be as nice as I had hoped. I'll keep tinkering with this sort of thing over time and may be I'll hit on the right concoction and create a tool out of it. But for now, I'd just like to see the debugger reuse the browsers code base a bit more. It's getting there.

Thanks for letting me know....

[Anonymous VisualAge Smalltalker] October 17, 2007 23:06:08.336

about the lack of good debugger in Ruby.  If Giles Burkett never used Smalltalk then I would go so far as to say that his opinion is worthless because it seems that he never even tried Smalltalk. So what does he know?  I guess that what he removed your comment under the pretense of removing "rude" comments when he realized that his argument is falling apart......

 I guess I'm cranky because I had to put up with awful debugger support in .NET after years of programming in Smalltalk!  Just to see a dumb blog about the "virtue" of having poor or no debugger support prompted me to write this comment...

Smalltalk debuggers are nice

[David Mitchell] October 18, 2007 0:06:07.859

I know Giles has tried out Squeak a few times but I doubt he would claim to be comfortable in Smalltalk (and certainly not the debugger).

What is interesting is he just gave a talk on how to "Kick Ass In IRB."

http://gilesbowkett.blogspot.com/2007/10/use-vi-or-any-text-editor-from-within.html 

He's using IRB as a poor man's Smalltalk debugger "you can write your code in IRB" 

I do TDD in Smalltalk and one of the things I love is being able to hop into the debugger for the failed test and step through the code (without rerunning the test in debug mode).

(Bummer Giles went on a comment cleaning binge. Notice he hadn't removed the posts with swear words that were full of support:

 http://gilesbowkett.blogspot.com/2007/10/im-bad-im-nationwide-job-security-vs.html

)

code in live context

[Troy Brumley] October 18, 2007 7:24:40.809

One thing I really miss is the ability to write code in live context. In Smalltalk, I can write and actually test my code in the context of a failing test with full access to run time state. I don't have to keep a notepad handy in Smalltalk, I just inspect, write code, and test it interactively. In .NET, and I presume in Java, the debugger lets me see state, but I can't really write and test my code.

Perhaps the following analogy will help get my point across:

In Smalltalk, the debugger is a surgeon's tool, the programmer/surgeon can work on a living patient and fix the patient in realtime.

In other environments, the debugger is a medical examiner's tool. The patient is dead or dying, and the debugger is just a way of opening the code body to figure out what went wrong. No fixing is possible.

I fully support your view

[Friedrich] October 18, 2007 7:58:17.633

I even go further the, lack of a decent debugger holds back the use of Haskell. Howerver the situation with a ruby debugger is not that bad. If you have a look at ArachnoRuby I guess you would be quite satisfied. 

 

Another areay where a debugger is missing is in GNUStep. Objective S is such a fine language but using gdb command line debugging as "state-of-the-art" is really pur. Howerver it seems GNUStep is used less and less. It's really a pitty such a nice language an so less users....

 

Happy smallTalking ;-)

Friedrich 

Awesome Smalltalk Debugger

[Anonymous VisualAge Smalltalker] October 18, 2007 8:44:18.801

Perhaps Giles Burkett could give Squeak (using Damien's developer image) another try since there is a "Squeak By Example" book available now but I won't hold my breath.......

blatant self-promotion

[Bernard Devlin] October 18, 2007 12:56:44.309

Well, speaking as a non-blogger, Giles' inconsistent behaviour re: blog comments is a sure sign that he is one of those bloggers who uses his blog primarily as a tool for self-promotion.  If he isn't prepared to recognize when he's made a mistake, I for one certainly won't bother with his blog - the value of anything he has to say is automatically degraded by his determination to write history as he sees fit.  Unfortunately, since the creator of Ruby on Rails is opinionated to the point of bigotry, it's no surprise that his toady followers will think that bigotry will speed their own self-promotion.  It's the standard cry among Rails folks that if something can't be done in Ruby, then that thing is not necessary.

man

[she] October 18, 2007 13:54:52.965

Actually I must admit, i didnt read everything

 

I felt it was not good that ANYONE deletes comments.

Why have comments in the first place if you do NOT want to discuss something?
Sure it attracts flames, but be a man, take it, respond to it.

 

I think you BOTH are kinda handling this in a sub-optimal manner.

 

Why dont you guys take a break and THEN come back again with FACTS and

without those deleting comments stuff?

 

I am not at all willing to read anything when the people involved DONT

have any respect for each other! 

Re: When your tools suck...

[ James Robertson] October 18, 2007 15:21:26.728

Comment by James Robertson

I will delete spam, and I will edit profanity into "cartoon swearing", but I don't delete comments.

[] October 18, 2007 15:41:21.082

Wow--go read some more comments on his blog.  He seems pretty ignorant about anything other than superficial knowledge of the latest fads.

Re: rails toads

[Enthu Meomai] October 18, 2007 19:49:18.528

@Bernard Devlin:

Please, let's not generalize broad swaths of people based on the actions of an overly vocal few.

Most of us are perfectly reasonable people.

Thank you.

Finding out why it failed

[Mark Miller] October 18, 2007 20:13:45.970

I'm a regular reader of Giles's blog. I checked up on this post you refer to, and he does seem to acknowledge the argument James is making (but made by someone else).

I've long known about Ruby's lack of tool support and found it daunting. To me this makes Ruby fun to play around with, but I wonder about doing anything serious in it. I read his post on this, and thought it made some sense. I also took a "live and let live attitude" towards it, but your post made me think about it some more. Yes, people can use a debugger as an excuse for writing messy code, but that doesn't mean a development system shouldn't have one. TDD will tell you about code that doesn't work properly, but it'll tell you little about WHY it doesn't work. If you're working with a small amount of code, then the reason is probably obvious when the test fails. You can just look at the offending code, bonk yourself on the head, and go, "Shoot! I should've known better!" Maybe that's Giles's experience. If you're dealing with something complex, however, having a debugger to help you look at execution state is great, because it saves you from "printf debugging".

Disappointed in Giles

[David Mitchell] October 18, 2007 21:22:02.458

Longtime reader of Giles and James both. I just unsubscribed from Giles after he deleted your follow up comment (which was quite lucid and not in the slightest bit rude. What a shame.

He's lost a great deal of credibility

[Hentai] October 19, 2007 1:10:23.540

I used to read Giles's blog when he was discussing Ruby on Rails and Seaside. I thought he was quite a sharp and talented programmer, so I was rather surprised to see him go off the deep end like this. His points about using Unit Tests as a form of specification are right on, of course. If he had simply stopped after saying that over-reliance on the debugger is bad practice, and that the best way to avoid bugs is to think more carefully about the program's design and contracts before writing the code, rather than after writing the code first and whipping out the debugger, I doubt that he'd be drawing such a heated reaction.

His absolutist views regarding the debugger hardly applies to Smalltalk. The Smalltalk debugger is not just a debugger in the sdb, gdb, or xdb sense; it is also a development tool. Its ability to inspect and modify objects at any time (because the object is always resident in the image) lends itself very naturally towards "Coding in the debugger".

One other point that Giles overlooked is that programming is not always about ensuring correctness of an algorithm. There's also a spirit of exploration and creativity, and any tool that enhances that freedom to try out new things is a worthy and valuable tool---such as the Smalltalk debugging and development tool.

Just Use Good Manners

[Giles Bowkett] October 19, 2007 2:03:13.075

I guess that what he removed your comment under the pretense of removing "rude" comments when he realized that his argument is falling apart......

Not even. When I removed James' comment due to its rudeness, I posted a summary, an apology for any obscuring of his actual point in my own summary, an acknowledgement that I may not have understood the point, and a request that he post it rephrased.

He instead posted a comment which argued with me about deleting the original comment, even while acknowledging this blog post was (to use his term) "snarky."

I bent over backwards to get a postable version from him, and he wasn't interested.

I deleted his post because I felt it was rude. He acknowledged it was "snarky." We might be using different words, but it's pretty safe to say we're talking about the same thing.

If you want to comment on my blog, use good manners. If you don't want to use good manners, don't expect to see your comment on there. I'm sorry if this bothers you, but I'm not under any obligation to tolerate bad manners, and I'm not doing it.

The comments on this post are full of name-calling. You guys didn't even spell my name right. Come on. I only have so much time. If a comment is like "anyone who programs Rails must be a toady follower of DHH," what self-respecting person would waste their time taking that seriously? Absurdly broad generalities and rude language don't help anybody. It isn't hard to just write your opinion without swearing at me or using a condescending tone. That's the ONLY requirement for posting in my blog, and it's been that way for a while now.

If that's a huge problem for you, I think the problem is yours.

[Giles Bowkett] October 19, 2007 2:18:28.750

I know Giles has tried out Squeak a few times but I doubt he would claim to be comfortable in Smalltalk (and certainly not the debugger).

This is absolutely the case. I can get around in it, and I think Seaside is awesome, and I enjoy Squeak more than Ruby in some ways, but I am not an expert in it.

What is interesting is he just gave a talk on how to "Kick Ass In IRB." http://gilesbowkett.blogspot.com/2007/10/use-vi-or-any-text-editor-from-within.html He's using IRB as a poor man's Smalltalk debugger "you can write your code in IRB"

I disagree. I think I'm just using IRB as an interactive playground and giving it a vi buffer. If anything the result is closer to a Ruby-enabled emacs than it is to Smalltalk.

(Bummer Giles went on a comment cleaning binge. Notice he hadn't removed the posts with swear words that were full of support:

Why on earth would I? How is supporting me rude? Who would be offended by an offer of support?

If you support me in the comments, and you swear at somebody else for disagreeing with me, I delete that. I have for months, maybe a full year. But if you're just swearing but not in a way which is against anyone, that's not rude, that's just informal. I even remove comments which are disrespectful to other posters without swears. It's not about swears. Policing the comments for bad language would be appropriate for a kindergarten blog, not a programming blog. I police the comments for rude, aggressive attitudes because I firmly and absolutely believe that programmers need to get over themselves and listen to each other more. Look at this holy war we have because I dared to say that debuggers seem useless to me. Suddenly everybody's trying to burn the heretic.

It's just an opinion. Lighten up already. If you speak to me about it with decent manners, you can change my mind. That's all you have to do.

It's not good that I have to explain this.

[Giles Bowkett] October 19, 2007 2:26:51.809

His absolutist views regarding the debugger hardly applies to Smalltalk. The Smalltalk debugger is not just a debugger in the sdb, gdb, or xdb sense; it is also a development tool. Its ability to inspect and modify objects at any time (because the object is always resident in the image) lends itself very naturally towards "Coding in the debugger".

You could be absolutely right. I know that coding in Seaside via the Web is a very fun exerience. I love being able to get to things that way.

However:

One other point that Giles overlooked is that programming is not always about ensuring correctness of an algorithm. There's also a spirit of exploration and creativity

Test-driven development has absolutely nothing to do with ensuring correctness of algorithms either - this is an inexpressibly inaccurate impression - and it also enables a huge sense of exploration and creativity.

People have definitely over-reacted to this post. Today I posted a real poor-man's debugger in Ruby (in two lines of Unix). I can see a debugger being useful. But I like that you have to work to use a debugger in Ruby. However useful it may be in Smalltalk, I firmly believe it is counter-productive in Ruby.

Also, just because you enjoy it doesn't mean it's good for you.

pro-debugger

[King Tut] October 19, 2007 5:13:29.914

A debugger is mighty useful when you're working on code that you did not write.  While you have the option of rewriting the code that you did not write, this is foolish to do with every encounter and the size of the code may prohibit this leaving you trying to "printf debug".  While having unit tests and such help prevent errors, it by no means remove the possibility of errors occurring in the odd edge case that the original coder did not imagine.  And that's where a debugger can help.  Making it difficult to use a debugger or outright not having one would only irritate rather than aid. The language should help you wherever possible regardless of how you prefer to code, since it still devolves into personal preference. While programmer A may not like to use a debugger, the language should be able to accommodate programmer B as well, not because the technique is superior but because there is a demand. A debugger is something that is important to have for any large application otherwise you'll only be stuck with "pet projects".  It won't hurt you, it can only help you when you're working on a deadline.

[] October 19, 2007 10:31:35.533

"People have definitely over-reacted to this post."

 No--people just call bullshit when they see it, and that's what your post was.  Seriously, re-read your post--it's full of naive nonsense trying to be passed off as wisdom--much like many of your posts.  Your response to people calling bullshit is the over-reaction.  Notice how James allows you to come over here and comment--quit a contrast, no? 

[Giles Bowkett] October 19, 2007 11:53:52.212

I think my comments are different in tone as well.

Re: When your tools suck...

[ James Robertson] October 19, 2007 12:22:13.462

Comment by James Robertson

Your tone wouldn't matter, Giles. I'll edit curse words into "comic book" format (this is a corporate server), but I won't delete them.

re: tdd

[Daniel Tang] October 19, 2007 14:13:40.388

Hi Giles, can you please expand on this point:

Test-driven development has absolutely nothing to do with ensuring correctness of algorithms

Your blog post states this:

Tests are absolutely not for checking to see if things went wrong. They are for articulating what code should do, and proving that code does it.

I guess I see the two statements as contradictory (and the second one is wrong, if you want to be pedantic--tests don't prove anything, they just give a [hopefully] high probability that something is correct), but perhaps I'm making a misinterpretation.

To Daniel Tang

[Giles Bowkett] October 19, 2007 15:50:45.592

Responding to this, above:

the second one is wrong, if you want to be pedantic--tests don't prove anything, they just give a hopefully high probability that something is correct

I disagree. A test proves that a certain piece of code does indeed do a specific thing. The test literally gives you "this code will produce this result" and then you run it and either it does or does not produce that result.

Regarding the allegedly contradictory statements, ensuring the correctness of an algorithm is way too abstract, ambitious, and academic for testing. You're not doing that. You're just making sure tiny pieces of code work. You won't even know what the algorithm is until it emerges from the process of testing and coding.

Giles Bowkett

[] October 19, 2007 18:47:25.221

"Regarding the allegedly contradictory statements, ensuring the correctness of an algorithm is way too abstract, ambitious, and academic for testing. You're not doing that. You're just making sure tiny pieces of code work. You won't even know what the algorithm is until it emerges from the process of testing and coding."

No wonder people feel like no one ever learns anything in this industry.