A comprehensive, beginner-friendly introduction to programming using modern open-source Smalltalk environments
This book is your gateway into the world of programming through one of the most elegant, powerful, and often overlooked programming languages: Smalltalk. Whether you've never written a line of code in your life or you're curious about what makes Smalltalk special, this book will take you on a journey from complete beginner to confident programmer.
Most programming books assume you already know how to think like a programmer, or they rush through fundamentals to get to "the good stuff." This book takes a different approach:
- We assume zero programming knowledge - If you can use a computer, you can learn from this book
- We take our time - Concepts are explained thoroughly with lots of examples
- We keep it fun - Programming should be enjoyable, and we'll make sure it is
- We build systematically - Each chapter builds on what came before
- We use real tools - You'll work with Pharo, Squeak, and Glamorous Toolkit - modern, professional Smalltalk environments
Smalltalk isn't just another programming language - it's a fundamentally different way of thinking about programming:
- Everything is an object - And we mean everything. Even
true,false, and3are objects you can talk to - Live programming - You can modify your programs while they're running and see changes instantly
- Image-based development - Your entire programming environment is saved as a "snapshot" you can share
- Elegant simplicity - The entire language syntax fits on a postcard, yet it's incredibly powerful
- Rich development tools - Debuggers, inspectors, and browsers that let you explore your running program
Smalltalk gave birth to many concepts you may have heard of: object-oriented programming, the Model-View-Controller pattern, test-driven development, and even the graphical user interface (GUI) itself. Learning Smalltalk means learning from the source.
- Absolute beginners who have never programmed before
- Experienced programmers curious about Smalltalk's unique approach
- Educators looking for an excellent teaching language
- Anyone who wants to understand object-oriented programming at its purest
This book is structured in ten parts, taking you from your very first steps to building real applications:
- Part I: Welcome to Programming - What programming is and getting started with Smalltalk
- Part II: Thinking in Objects - Understanding the fundamental building blocks
- Part III: Making Decisions and Repeating Actions - Control flow and iteration
- Part IV: Creating Your Own Objects - Classes, methods, and inheritance
- Part V: The Image, Changes, and Sources - Understanding Smalltalk's unique persistence model
- Part VI: Tools of the Trade - Mastering the development environment
- Part VII: Intermediate Concepts - Polymorphism, exceptions, testing, and organization
- Part VIII: Exploring the Smalltalk Variations - Pharo, Squeak, Glamorous Toolkit, and more
- Part IX: Building Real Things - Three complete projects to solidify your skills
- Part X: Next Steps - Where to go from here
Each chapter includes:
- Clear explanations of concepts
- Plenty of code examples you can type and run
- "Try This!" sections to encourage experimentation
- Exercises to practice what you've learned
Reading tip: It's best to read this book sequentially, especially if you're new to programming. Each chapter builds on previous ones. If you're an experienced programmer, you might skim the early chapters, but don't skip Part V (the Image, Changes, and Sources) - that's where Smalltalk really differs from what you know!
To follow along with this book, you'll need:
- A computer running Windows, macOS, or Linux
- One or more Smalltalk environments - We'll cover Pharo, Squeak, and Glamorous Toolkit (all free and open-source)
- Curiosity and patience - Programming is a skill that develops with practice
- About 20-30 minutes per chapter - Though some chapters may take longer
Don't worry about installing anything just yet - Chapter 2 will walk you through everything step-by-step.
Here's what you'll accomplish by working through this book:
- Understand fundamental programming concepts that apply to any language
- Write classes and methods in Smalltalk
- Master the unique image-based development workflow
- Use professional development tools like browsers, inspectors, and debuggers
- Build complete applications from scratch
- Test your code like a professional
- Join a welcoming community of Smalltalkers
Throughout this book, we'll use several conventions:
Code snippets look like this- Important concepts are bolded
- Emphasis is italicized
- Longer code examples appear in their own blocks
- Tips and warnings are called out in special sections
Programming is one of the most creative, powerful, and rewarding skills you can learn. With Smalltalk, you'll learn it in an environment that was designed from the ground up for exploration, experimentation, and joy.
Let's start your journey!
See TABLE_OF_CONTENTS.md for the complete chapter listing.
This book is open-source and available at: https://github.com/cloudstreet-dev/Learn-Programming-with-Smalltalk
Found an issue? Have a suggestion? Please open an issue or submit a pull request!
This work is licensed under the MIT License. See the LICENSE file for details.
Now, turn to Chapter 1 and let's begin!