isLoop 2025 Program

Guided Exercises

Day 1: Introduction to Pharo and OOP

During this day, you will learn the survival kit to code in Pharo. You will learn the syntax and the main tools to code and publish code. After that day you will be able to code in Pharo. You will also learn the simple object model of Pharo, understand what are objects and classes, learn the difference between messages and methods, learn to create packages, classes and methods in System Browser.

1. Welcome

2. ProfStef Tutorial

Open the Playground and evaluate the following line: ProfStef go.

4. Objects and Classes

5. Exercise: Counter

[PDF] In this exercise you will learn how to create packages, classes, methods, instances, unit tests and more. This tutorial covers most of the important actions you will perform when developing in Pharo.

Recommended videos

Day 2: Inheritance, Method Lookup, and Dispatch

You will learn about inheritance and polymorphism - the key concepts in object-oriented programming. You will understand why sending a message is making a choice based on classes. You will also understand what is to send a message and how lookup works.

1. Exercise: Counter

Finish the exercise.

2. Kata: Rock-Paper-Scissors (if-else)

This exercise consists of implementing the rock paper scissor game. For this, you will need to have a class named RockPaperScissors. For playing the game, the user needs to use the class like this:

game := RockPaperScissors new.
result := game play: #paper against: #rock.
result "#paper"

3. Inheritance and Method Lookup

4. Kata: Rock-Paper-Scissors (double dispatch)

[PDF] In this exercise, you have to implement the Rock-Paper-Scissors game using a simple but powerful approach called double dispatch that consists of sending another message to the argument hence making two choices one after the other. This exercise will show you an important paradigmatic shift where you will go from asking questions (conditionals) to sending orders. It is a clear illustration of the "Don’t ask, Tell" design principle.

Recommended videos

Day 3: Messages and Advanced Topics

1. Exercise: Rock-Paper-Scissors

Finish the exercise.

2. Messages

3. Advanced Topics from Stéphane

Recommended videos

Day 4: Spec, Inspector Extensions & Deeper into Dispatch

1. Exercise: Country Flags

[PDF] In this tutorial, you will learn how to draw a country shape using Roassal (a visualization engine). In a second step, you will use an HTTP client to grab the flag of the country based on its unique international id. You will then define a small visual application using the Spec UI builder and it will display the country, its ID, and flag.

2. Understanding super

3. Implementation of True and False in Pharo

Exercise: Implement boolean objects true and false (you can call them "t" and "f" or "myTrue" and "myFalse" to make sure that they don't conflict with the existing boolean objects in the image) that understand the following messages: not, and:, or:, ifTrue:, ifFalse:. You are not allowed to use conditionals (if-else) in your implementation.

Solution: Essence of dispatch: Taking Pharo Booleans as Example

Day 5: Fun Stuff

1. How to Contribute to Pharo

2. Some Cool Projects