induwara.lk
Opinionpythonlearning-resourcessoftware-design

Thinking in Python is free — and 43% of it is patterns

Bruce Eckel's Thinking in Python is free to read online: 47 chapters, 20 of them on design patterns. Here's why that ratio matters more than the price tag.

Induwara Ashinsana5 min read

Thinking in Python, Bruce Eckel's free-to-read book, showed up on Hacker News this week, and the interesting thing about it is not that it costs nothing. It's the shape of the table of contents.

The book is at thinkinginpython.com, subtitled "Insights, Idioms and Patterns." It has 47 chapters. Only 10 of them teach you the language. I think that ratio is the actual lesson, and it's the one most self-taught developers here get backwards.


🔍 The chapter count is the argument

Here's how the 47 chapters split across the book's five parts:

Part Topic Chapters Share
I Foundations 10 (ch. 1–10) 21%
II Techniques 9 (ch. 11–19) 19%
III Patterns 20 (ch. 20–39) 43%
IV Functional Programming 4 (ch. 40–43) 9%
V Effects 4 (ch. 44–47) 9%

Part I is what a normal Python course sells you as the whole product: Tour, Containers, Control Flow, Functions, Modules and Packages, Classes, Static Typing, Class Attributes, Cleanup. Ten chapters. Then the book spends the remaining 37 on what to do with them.

Key takeaway: Syntax is 21% of the book because syntax is 21% of the job. The part that decides whether your code survives six months of changes is the other 79%, and almost nothing in the free tutorial ecosystem covers it.

That gap is worse now, not better. An AI assistant will hand you a working function on request. It will not tell you that your OrderProcessor class should have been three functions and a dataclass. Reviewing that decision is a judgement skill, and judgement is what Part III is 20 chapters of.


🧩 Patterns in Python are not patterns in Java

Eckel is the author behind the Thinking in Java series, which makes the pattern-heavy structure here worth a second look rather than an eye-roll. The chapter list is not a straight port of the classic catalogue. It opens with "Rethinking Objects" and "The Pattern Concept" before naming a single pattern, and it includes entries you won't find in a 1994 design patterns book: Data Transfer Objects, Function Objects, State Machines, Multiple Dispatching, Pattern Refactoring, Simulation.

That ordering matters, because most Java patterns shrink dramatically in Python:

# Java Singleton: private constructor, static getInstance(),
# double-checked locking, a whole class.
# Python: a module is already a singleton.

# settings.py
config = {"api_key": None, "region": "ap-south-1"}

# anywhere else in the program
from settings import config

Same guarantee, four lines, no ceremony. A Factory often collapses into a plain function. A Strategy is usually just passing a function as an argument. If you learned patterns from Java material and applied them literally to Python, you built scaffolding around a language that didn't need it. A pattern book written for Python is a different thing from a pattern book translated into Python.


⚖️ Read the licence before you plan a Sinhala translation

The site says the book is "Freely readable online" with "No reproduction without permission," under CC BY-NC-ND 4.0. Those letters do real work, and I've watched people here get this wrong:

You want to CC BY-NC-ND says
Read the whole thing, free, no signup ✅ Yes
Share the link in a university group ✅ Yes
Translate a chapter into Sinhala or Tamil ❌ No — ND blocks derivative works
Use it as course material in a paid bootcamp ❌ No — NC blocks commercial use
Print handouts of a chapter for a class ❌ Ask first
Repost chapters on your own blog ❌ No

NC and ND are the two most restrictive Creative Commons terms. "Free to read" and "free to reuse" are entirely different permissions, and only the first one applies here.

If you want to build local-language teaching material, the honest route is to email the author and ask, not to assume Creative Commons means public domain. The book examples and exercise solutions are in a separate GitHub repository at github.com/BruceEckel/ThinkingInPython, which is where the runnable code lives.


🛠️ How I'd actually get through 47 chapters

Nobody finishes a 47-chapter book by reading it front to back on a laptop after work. Here's the order I'd use, given that Parts II and III are the reason to be here:

  1. Skim Part I in a week. If you already write Python, you're checking for gaps, not learning. Pay real attention to only three chapters: Static Typing, Class Attributes, and Cleanup. Those three are where self-taught Python quietly goes wrong.
  2. Do Part II properly. Testing, Decorators, Context Managers, Comprehensions, Concurrency is a straight list of what separates a script writer from an engineer. Nine chapters, one per week is fine.
  3. Type every example. Not copy-paste. Keep a scratch tab open — our online Python compiler runs in the browser with no install, which matters if you're on a shared machine, a phone, or a campus lab where you can't install anything.
  4. Read Part III against your own code. Open a pattern chapter, then open a file you wrote six months ago. If you can't name where the pattern would or wouldn't apply, you haven't understood it yet.
  5. Treat Parts IV and V as optional for now. Eight chapters on functional programming and effect management is genuinely advanced material. It'll still be there next year.

That's roughly six months at a sustainable pace. Which is fine, because there's no expiring subscription pushing you.


💡 What this means for you

The cost of learning to program well in Sri Lanka has never really been tuition. It's been access to material that teaches design rather than syntax, and time to work through it. The syntax problem was solved years ago by free tutorials. The design problem wasn't, and free material at this depth is uncommon.

Three concrete things to take from this:

  • Bookmark it, don't binge it. 47 chapters read once is worth less than nine chapters worked through with your own code.
  • Check the licence before you build on it. CC BY-NC-ND means read and link, nothing more. That constraint is on you, not on the author.
  • Spend your learning hours on Parts II and III. The market is not short of people who know Python syntax. It is short of people who can be handed a messy codebase and make it smaller.

If you're a student here choosing between another paid video course and six months with this book plus an editor, take the book. The bottleneck was never the material.

#python#learning-resources#software-design
IA

Induwara Ashinsana

Information Systems student at UCSC and Executive Director at Ryzera Technologies. Writes about software, AI, and what it means for builders in Sri Lanka.

About the author →

Keep reading