Adding methods in the Debugger
ducasse at iam.unibe.ch
Thu Feb 13 08:17:22 UTC 2003
markus made that for VW and for Squeak too.
When you have a DNU you can press a button and you define a method with
self halt in it. Neat!
I want that.
On Thursday, February 13, 2003, at 03:52 AM, Andrew P. Black wrote:
> At OOPSLA I took part in an XP-like design effort as part of
> This was fun because not all of the participants were familiar with
> Squeak, so those of us who were paired with those who were not, and
> got to demonstrate some of the mouse's power.
> What we did was start by writing tests. This amounted to designing
> the interface that clients could use. Of course, the tests would
> immediately generate an error, because the messages that they sent
> were not understood -- obviously, because the corresponding methods
> had not yet been written. We would then write the missing method,
> re-run the test, and get a new error. Eventually, all of the methods
> were in place, and the test would fail. Then we continued debugging,
> until it passed.
> Programming in this absolutely test-driven manner was a new experience
> for me, and it worked very well. Normally, I try to keep track of
> what methods need to be written in my head or on a 3x5 card; with this
> methodology, I didn't have to. It was always clear what to do next,
> and one got a real sense of making progress.
> Afterwards, in discussing this experience with someone, I learned that
> the process could be made even better. The trick is to enhance the
> debugger so that when a MNU occurs, it is possible to define the
> missing method right there, in the debugger, and resume. I imagine
> that this makes the whole process smoother; after all, the debugger
> knows exactly what method needs to be defined, and can offer a
> hierarchy of possible classes where it could be located.
> My question is: has someone done this for Squeak? For other
Prof. Dr. Stéphane DUCASSE (ducasse at iam.unibe.ch)
"if you knew today was your last day on earth, what would you do
different? ... especially if, by doing something different, today
might not be your last day on earth" Calvin&Hobbes
More information about the Squeak-dev