Hi, I may be asking an absolute noob question but I was unable to find any useful hints on google ... I often find myself writing methods that do not yet exist when implementing other methods, e.g. when I'm writing the implementation of methodA I'm calling out to methodB. What's the easiest way to create the new method? I know I can jump aroung through hoops with a separate browser but that feels cumbersome. I understand that the editor/runtime/whatever cannot know 100% of the time where to put the new method but at least for messages to self it should be smart enough to offer some kind of help. -dirk
What I often do is that I write a test and then I just execute the code. When it runs into the non-existent method, the debugger offers a button "create" method. Alternatively I do open a second browser (clicking on "scoped" in the current one or like that (or doubleclicking on a method to get the same method opened in a new browser) Peter On Fri, Oct 6, 2017 at 12:15 PM, Dirk Olmes <dirk@xanthippe.ping.de> wrote:
Hi,
I may be asking an absolute noob question but I was unable to find any useful hints on google ...
I often find myself writing methods that do not yet exist when implementing other methods, e.g. when I'm writing the implementation of methodA I'm calling out to methodB.
What's the easiest way to create the new method? I know I can jump aroung through hoops with a separate browser but that feels cumbersome.
I understand that the editor/runtime/whatever cannot know 100% of the time where to put the new method but at least for messages to self it should be smart enough to offer some kind of help.
-dirk
On Fri, Oct 6, 2017 at 6:15 PM, Dirk Olmes <dirk@xanthippe.ping.de> wrote:
Hi,
I may be asking an absolute noob question but I was unable to find any useful hints on google ...
I often find myself writing methods that do not yet exist when implementing other methods, e.g. when I'm writing the implementation of methodA I'm calling out to methodB.
What's the easiest way to create the new method? I know I can jump aroung through hoops with a separate browser but that feels cumbersome.
I understand that the editor/runtime/whatever cannot know 100% of the time where to put the new method but at least for messages to self it should be smart enough to offer some kind of help.
-dirk
A common Pharo workflow is known as "programming from within the debugger." Run your #methodA code as soon as possible, and when the debugger pops up because someObject hasn't yet implemented #methodB, the debugger helps you create #methodB in the right place. Some examples... * https://www.youtube.com/watch?v=ymITEeAOtEA * http://www.virtuouscode.com/2015/05/11/in-which-i-make-you-hate-ruby-in-7-mi... Give it a go and stick with it for a while, and you'll understand why Smalltalk invented Test Driven Development (and it may change they way you think about programming.) cheers -ben
Hi Dirk have a look at - one one coding the counter http://rmod-pharo-mooc.lille.inria.fr/MOOC/Videos/W1/C019-W1S-Videos-Redo-Co... (we should have the english versions now) C019-W1-Videos-Redo-CodingCounterInDebugger-FR-V2-HD_720p_4Mbs.m4v you can find the subtitles around the same folder. Stef On Fri, Oct 6, 2017 at 4:16 PM, Ben Coman <btc@openinworld.com> wrote:
On Fri, Oct 6, 2017 at 6:15 PM, Dirk Olmes <dirk@xanthippe.ping.de> wrote:
Hi,
I may be asking an absolute noob question but I was unable to find any useful hints on google ...
I often find myself writing methods that do not yet exist when implementing other methods, e.g. when I'm writing the implementation of methodA I'm calling out to methodB.
What's the easiest way to create the new method? I know I can jump aroung through hoops with a separate browser but that feels cumbersome.
I understand that the editor/runtime/whatever cannot know 100% of the time where to put the new method but at least for messages to self it should be smart enough to offer some kind of help.
-dirk
A common Pharo workflow is known as "programming from within the debugger." Run your #methodA code as soon as possible, and when the debugger pops up because someObject hasn't yet implemented #methodB, the debugger helps you create #methodB in the right place.
Some examples... * https://www.youtube.com/watch?v=ymITEeAOtEA * http://www.virtuouscode.com/2015/05/11/in-which-i-make-you-hate-ruby-in-7-mi...
Give it a go and stick with it for a while, and you'll understand why Smalltalk invented Test Driven Development (and it may change they way you think about programming.)
cheers -ben
participants (4)
-
Ben Coman -
Dirk Olmes -
Peter Uhnák -
Stephane Ducasse