Python for Youngsters

Gregory Terzian
Python for Youngsters
2 min readMar 23, 2023

(And Anyone Else Who Wants to Learn Programming)

“Programs must be written for people to read, and only incidentally for machines to execute.”― Structure and Interpretation of Computer Programs, 1996.

Foreword: Programming in the Age of Artificial Intelligence

Programmers today do either one of two things: writing code for computers, or writing code for humans.

Code written for computers — written to run fast — is hard for humans to understand: fixing bugs or adding features is hard, and often requires a painful and uncertain process called refactoring. On the other hand, code written for humans — written to be clear — is easy for humans to change: making changes to fix bugs, add new features, or to address performance bottle necks is not only made easier, but also enjoyable.

In practice, only a minority of code needs to run fast; for a given application, the computer spends on average 90% of its time running only 10% of the code, and which part of the code will be included in that 10% is impossible to know in advance. But many programmers today still write code with the needs of computers in mind. The reasons are cultural: many studied computer science, a curriculum filled with lessons from the challenges encountered in the 50's — computer were slow back then. Others like to solve puzzles: the puzzle of writing performant code appears to them as a familiar challenge.

Artificial intelligence is about to tilt the scale in favor of humans writing code for humans: machines are becoming the champions of writing code for themselves. The human role in software engineering will be reduced to writing logic for other humans to understand; rewriting code to run faster will be automatic — artificial intelligence at the service of a new kind of software engineer.

This book is for the next generation of software engineers: people of all ages without prior experience. Its goal is to teach the essence of programming: writing logic that is clear, idiomatic, and simple — for humans to understand. Python, as of writing the most popular programming language, is the tool chosen to support this undertaking. But the lessons of this book go beyond any particular language; resilient, they will remain relevant for the languages that conquer the world in the age of artificial intelligence.

--

--

Gregory Terzian
Python for Youngsters

I write in .js, .py, .rs, .tla, and English. Always for people to read