Exercism - creating fresh image with previously submitted exercises

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Exercism - creating fresh image with previously submitted exercises

DavidBajger
Hi Tim & Pharo Exercism contributors! I had a chance to come back to my exercism challenges and tried to create new image for continuing on solutions. I've tried to load manually previously submitted/completed exercises into fresh image (with Exercism loaded) and found few issues. Here is my list:
Batch loading
1) It would be great to have menu item to "Batch load already submitted exercises", so I should create issue on Github for this enhancement, right?

Renamed exercises
2) I faced few challenges when loading my already posted exercises and one of them was renamed package and class. My old solution was in different package and class was named differently too, so I had to rename class with solution to new name, so the tests would be green again. I had to move class to new package as well. Examples are: ResistorColorDuo(new class name) <-> ResistorColors (old) MatchingBrackets(new class name) <-> BracketPush(old) Is there a way, to have some migration mechanism as part of loading the exercise into image, which would rename class (and package) automatically and resubmit solution again?

Loading subclasses with missing references to superclass
3) Some of my solutions are using more classes and sub-classes, for some reason loading such exercise failed, because it tried to load subclass first without having superclass loaded. So workaround for this was to create superclass as stub manually and load exercise again. I had to move classes to correct package, but somehow I struggle to understand what is really right package name (screenshots below). RomanNumeral missing class Frame missing superclass

Exercises in independent packages
4) Old way of organizing Exercism exercises was using package extension of package Exercism, which I found a bit more well-arranged than using package for each exercise. Is there a reason for having each exercise in standalone package? I guess there is a good reason for that.


Thanks for your insights!
David
David Bajger


Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
David Bajger
Reply | Threaded
Open this post in threaded view
|

Re: Exercism - creating fresh image with previously submitted exercises

Tim Mackinnon
I’ve replied to David in discord - but in case anyone else comes looking - the upgrade path for the first versions of exercism is documented in the instruction for Pharo in the exercism track. This should resolve most problems listed below.

The move to a package per exercise was driven by discussion with the board here about Pharo direction and concepts - and we were guided to move to using more packages in order to cleanly support extension methods in exercises (something that comes up in a number of exercises, and was a common feature request). It also allows us to more easily supply lint rules per exercise and a number of other smaller features.

Unfortunately it does make it more painful to load old exercises into a fresh image (they are always visible online in your account). A feature request to gather old submissions and load them is a good one - it’s not so hard, and maybe someone can offer to do that for us (progress has been limited due to new job constraints at the moment).

We are always on the lookout for more mentors to help us feedback on  user submissions, and there are also more exercises to convert (we’ve done about half so far)

Tim

Sent from my iPhone

On 30 Aug 2019, at 10:09, DavidBajger <[hidden email]> wrote:

Hi Tim & Pharo Exercism contributors! I had a chance to come back to my exercism challenges and tried to create new image for continuing on solutions. I've tried to load manually previously submitted/completed exercises into fresh image (with Exercism loaded) and found few issues. Here is my list:
Batch loading
1) It would be great to have menu item to "Batch load already submitted exercises", so I should create issue on Github for this enhancement, right?

Renamed exercises
2) I faced few challenges when loading my already posted exercises and one of them was renamed package and class. My old solution was in different package and class was named differently too, so I had to rename class with solution to new name, so the tests would be green again. I had to move class to new package as well. Examples are: ResistorColorDuo(new class name) <-> ResistorColors (old) MatchingBrackets(new class name) <-> BracketPush(old) Is there a way, to have some migration mechanism as part of loading the exercise into image, which would rename class (and package) automatically and resubmit solution again?

Loading subclasses with missing references to superclass
3) Some of my solutions are using more classes and sub-classes, for some reason loading such exercise failed, because it tried to load subclass first without having superclass loaded. So workaround for this was to create superclass as stub manually and load exercise again. I had to move classes to correct package, but somehow I struggle to understand what is really right package name (screenshots below). RomanNumeral missing class Frame missing superclass

Exercises in independent packages
4) Old way of organizing Exercism exercises was using package extension of package Exercism, which I found a bit more well-arranged than using package for each exercise. Is there a reason for having each exercise in standalone package? I guess there is a good reason for that.


Thanks for your insights!
David
David Bajger


Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.