exercism / pharo-smalltalk

Exercism exercises in Pharo.
https://exercism.org/tracks/pharo-smalltalk
MIT License
34 stars 28 forks source link

What was it like to learn Pharo? #395

Closed ErikSchierboom closed 4 years ago

ErikSchierboom commented 5 years ago

We’ve recently started a project to find the best way to design our tracks, in order to optimize the learning experience of students.

As a first step, we’ll be examining the ways in which languages are unique and the ways in which they are similar. For this, we’d really like to use the knowledge of everyone involved in the Exercism community (students, mentors, maintainers) to answer the following questions:

  1. How was your experience learning Pharo? What was helpful while learning Pharo? What did you struggle with? How did you tackle problems?
  2. In what ways did Pharo differ from other languages you knew at the time? What was hard to learn? What did you have to unlearn? What syntax did you have to remap? What concepts carried over nicely?

Could you spare 5 minutes to help us by answering these questions? It would greatly help us improve the experience students have learning Pharo :)

Note: this issue is not meant as a discussion, just as a place for people to post their own, personal experiences.

Want to keep your thoughts private but still help? Feel free to email me at erik@exercism.io

Thank you!

samWson commented 5 years ago

Hi @ErikSchierboom.

I'll give you a bit of context first. A few years ago I was studying software development part time. I had been learning programming with tutorials online and liked it enough to want to do it as a career. I was fully immersing myself in programming at the time by reading any blog, article, or tutorial I could find. There was (and still is) a great deal of programming literature on pure functional programming languages. This got me wondering is there a pure Object Oriented programming language? Of course there was and it is the original Object Oriented Programming language: Smalltalk. Getting into Smalltalk led me to Pharo which is a language that very much champions the ideals of Smalltalk for modern programming.

My experience learning Pharo was still in my very early days as a programmer. I was used to programming with a bit of Java and Ruby but at the time I was still heavily leaning on tutorials. I had very little help from other programmers available to me at this time and I still have yet to meet anyone in my country who has more experience with Smalltalk than me.

One of the most helpful things available to me while learning Pharo was the excellent selection of ebooks available on Pharo.org. They helped me get past any problems I might have had programming in an image based IDE instead of more conventional Java or Ruby text files. Pharo by Example chapter 6 The Pharo Object Model, in particular helped to make me a better Ruby programmer as Ruby is heavily based on the Smalltalk object model.

Another thing that helped was the Pharo IDE itself. It affords the greatest interactivity with the language and the class libraries I have ever seen in a programming language. This kind of interactivity greatly rewarded curiosity and tinkering and is one of the pleasures of programming in Pharo. It's what keeps me coming back even after experimenting with other languages.

Since I was learning by myself with no outside help (with Pharo) the interactivity of the IDE and the ebooks were the things that helped me the most when I got stuck. I didn't know the Pharo Discord existed until much later and the Pharo-Smalltalk language track didn't exist either.

Pharo differs a lot from the Java and Ruby I first knew. First you are programming in an image with live objects that you can interact with at any time instead of writing text files and compiling code. Second in Pharo everything is objects and messages. There is no syntax like if statements or for loops. All the traditional programming constructs are implemented as methods. This changed the way how I thought languages should be.

The Smalltalk syntax was probably one of the hardest things at first to overcome as it differs greatly from Ruby and Java. Another thing to learn was the semantics of message passing vs. calling methods.

Eventually I would return to Ruby after learning Pharo. I believe I became a better Ruby programmer as I just started to see the influence of Smalltalk in Ruby and things started to make sense. By learning Pharo and the history of Smalltalk early in my formative programming years it has really colored my opinions on what Object Oriented programming should be, and just how beneficial a dynamic and interactive programming language can be.

I see Ruby as being an Object Oriented language in the Smalltalk style. But languages like Java and C# might not be Object Oriented as I see it but rather Type Oriented. Inheritance and polymorphism are frequently stated as a feature of Object Oriented Programming but I don't believe this to be correct anymore. They were not a part of Alan Kay's original Object Oriented definition and I read that they were not features in the earliest versions of Smalltalk. Instead I see them as tools for code reuse. I also see the functional Actor based languages, such as Erlang and Elixir, as being more Object Oriented than Java, C#, or C++, as the Erlang strongly shares the original concepts of message passing and encapsulation even though there is no shared history between Smalltalk and Erlang.

It's fair to say that learning Pharo early in my programming career has had a huge influence on how I think of programming as a whole. As you can tell I have gone into great depth on the topic of Pharo and Smalltalk. I can talk forever on this so if you have more questions I'm more than happy to answer them.