So we start opening Pharo…
I really don’t know hot to use this, so i think i this part seems to be like a version control of pharo

I will click on the stable version, green play button, then I close the welcome window, so it has to be a package section where i can start my project,
In the section i will click on tools -> System Browser option, and it will display the parts where i can add the New package (it doesn’t matter what you select), it should appear at the end

After an exhaustive research I found out that the class opened at the bottom and as the next image shows, and i have to accept it so that means that the changes in my class (file) are saved, or you just can use cmd + s for save it as any other text editor

In comparison to the tutorial I’m following the classes or even the methods don’t have to opened to create a new one, it just appear in there, for example if want to create the initialize method, just select the class and a new tab of Inst. side method should appear available

My initialized method end up looking like this:

After two hours of not understanding and errors I have decided to move to the other program, the deciding number one, so the creating package should look like this:

When create the class initialize it detects automatically as the default creator of my object so it just generates a random number that I’ll guess

Can run the line game := NumberGuessingGame new. but it doesn’t show, so if you inspect it you should see it, but every time you try it it will initialize it all over again

As far as I get is to implement the retrieving method that shows whether you are right or not about the guess, but every time you try to want to guess it you have to run line by line so it’s a bit stressing testing this way


In conclusion I found out that Smalltalk is a little bit tricky at the beginning because I’ve never seen an IDE so weird, so according to the research the commands used most of them are made to make it easy to interpret so it can not be difficult to know what the code is trying to do, so no language is like this. The documentation is pretty old therefore some elements were not there and I encountered many errors because of that, but at the end I found out to do it easy and simple, at least the easiest one.
References used:
- Guessing game:
- https://en.wikibooks.org/wiki/Smalltalk_the_fun_way/Number_Guessing_Game
- Some graphical game i could not do because of the pretty old version of the tutorial:
- http://pharo.gforge.inria.fr/PBE1/PBE1ch3.html#x18-220002
Leave a comment