Testing and debugging
There's another thread in comp.lang.smalltalk on debugging and testing. There's a level of misunderstanding between Smalltalk developers and people who've never used a language like Smalltalk - you'll see that in comments like this:
Debuggers are great tools, the but the thing to ask whenever you want to use one is why it isn't easier to just write a test case. In some projects it is. In others, well, we all know when we are working in a project like that, but there are things that we can do to make it easier.
It's not that debuggers are bad, its just that they can desensitize us. It's like downing a beer and sleeping on the beach; we shouldn't be surprised if we wake up with a sunburn. We can start to think that our code is pretty good when in fact its really pretty lousy because we've ignored concrete evidence that it could be easier to understand and test.
Now, I know why people who mostly work in languages like C# and Java say this - their debuggers are forensic tools - the patient has died, and the best that you can do is figure out what killed him. Smalltalk developers have a different tool at their disposal - the Smalltalk debugger
The Smalltalk debugger is both a debugger and and code browser. With Smalltalk, the developer becomes a surgeon - the patient isn't dead, he's been sedated. We can look at what's wrong with him, and fix him up while we look at him - in the debugger. That's why most of these conversations end up with people talking past each other. In Smalltalk, we can write the test - and when it fails, we end up in the debugger - from where we can patch the code (or the test, depending on circumstances) up and move along.


Comments
The Eclipse Debugger
[Ryan Lowe] August 29, 2004 14:37:26.324
I'm seeing this more as I'm trying to learn a large Java project from the ground up. It has no testing -- I'm new there, and they haven't had a push to test. So I often find I'm in the debugger trying to figure out what the code is doing, stepping through.
It's nice to be able to be in the code in the Eclipse debugger and change something in a method while it's running in the VM. It doesn't always work, but when it does it's good. Especially when the program takes a minute or two to close and restart. It saves time.
It would be nice if I could do this all of the time! I'd never need to stop the app while I added to it.