4 ms·
So you want your live editing beeing persistent? What about testing? I think you should first write a test that fails before attempting to fix it...
by gregmuellegger 14y ago
So you want your live editing beeing persistent? What about testing?
I think you should first write a test that fails before attempting to fix it...
- vincie 14y agoTest your code in a Workspace before editing your classes. Depends on the complexity of the change you are making of course. If it is complex, clone the image and test on the clone.
- emp 14y agoWriting a test that fails is a subset of what you can do. Pharo (and other Smalltalks) support writing traditional test cases and running them in a test runner. However you can also: - write snippets in a workspace, as vincie mentioned. - write code against an API that doesn't exist, run it, have it fail, and then fill in the API and implementation. - write stubs that fail automatically, and then fill them out (similar to above). The difference is, when things fail: - you get to play with the live objects in a work space. - fill in missing implementation. - fix any errors. And then much of the time continue execution from the point of failure. No need to restart anything. I simply could not appreciate the variety of options available in a Smalltalk environment until I used it for some fun projects over a few months. Be warned, you might hate your so called modern environments once you get back to them. For Objective-C coders there is hope: http://injectionforxcode.com http://injectionforxcode.com