Hello again, world! As a teenage programmer and wannabe hacker in the late 1990s, I would pore over the latest issues of 2600: The Hacker Quarterly. One day, I finally summoned the courage to attend the magazine’s monthly meetup in my city and was in awe of how knowledgeable everyone else seemed. (Later, I’d realize that many of them had more confidence than actual knowledge.) I spent the entire meeting nodding along to what others were saying, trying to keep up with their conversations. I left that meetup determined to spend every waking hour studying computing, programming, and network security so I could join the discussions at the next month’s meetup.
At the next meetup, I continued to just nod and feel dumb compared to everyone else. So again I resolved to study and become “smart enough” to keep up. Month after month, I would increase my knowledge but always felt behind. I began to realize the enormity of the computing field and worried I would never know enough.
I knew more about programming than my high school friends but certainly not enough to get a job as a software developer. In the 1990s, Google, YouTube, and Wikipedia didn’t exist. But even if those resources were available, I wouldn’t have known how to use them; I wouldn’t have been sure what to study next. Instead, I learned how to write Hello, world! programs in different programming languages but still felt I wasn’t making real progress. I didn’t know how to move beyond the basics.
There’s so much more to software development than loops and functions. But once you’ve completed a beginner course or read an introductory programming book, your search for more guidance leads to yet another Hello, world! tutorial. Programmers often call this period the desert of despair: the time you spend wandering aimlessly through different learning materials, feeling like you’re not improving. You become too advanced for beginner materials but too inexperienced to tackle more complex topics.
Those in this desert experience a strong sense of impostor syndrome. You don’t feel like a “real” programmer or know how to craft code the way “real” programmers do. I wrote this book to address this audience. If you’ve learned the basics of Python, this book should help you become a more capable software developer and lose this sense of despair.
This book targets those who have completed a basic Python tutorial and want to know more. The tutorial you learned from could have been my previous book, Automate the Boring Stuff with Python (No Starch Press, 2019), a book such as Python Crash Course (No Starch Press, 2019) by Eric Matthes, or an online course.
These tutorials might have hooked you on programming, but you still need more skills. If you feel like you’re not yet at the professional programmer level but don’t know how to get to that level, this is the book for you.
Or perhaps you were introduced to programming via another language besides Python and you want to jump right in to Python and its ecosystem of tools without retreading the same Hello, world! basics. If so, you don’t need to read hundreds of pages that explain basic syntax; instead, skimming the “Learn Python in Y Minutes” article at https://learnxinyminutes.com/docs/python/ or Eric Matthes’s “Python Crash Course—Cheat Sheet” page at https://ehmatthes.github.io/pcc/cheatsheets/README.html will suffice before you tackle this book.
This book covers more than just deeper-level Python syntax. It also discusses using the command line and the command line tools that professional developers use, such as code formatters, linters, and version control. I explain what makes code readable and how you can write clean code. I’ve featured a few programming projects, so you can see these principles applied in actual software. Although this isn’t a computer science textbook, I also explain Big O algorithm analysis and object-oriented design.
No single book can transform a person into a professional software developer, but I’ve written this book to further your knowledge toward that end. I introduce several topics that you might only otherwise discover, piecemeal, through hard-earned experience. After completing this book, your footing will be on a firmer foundation so you’ll be better equipped to take on new challenges.
Although I recommend you read the chapters in this book in order, feel free to skip to whichever chapters capture your interest:
Part I: Getting Started
PATH
environment variable.Part II: Best Practices, Tools, and Techniques
*
and **
argument syntax, the trade-offs between large and small functions, and functional programming techniques, such as lambda functions.timeit
and cProfile
modules. In addition, it covers Big O algorithm analysis and how it lets you predict the way your code’s performance slows down as the amount of data it has to process grows.Part III: Object-Oriented Python
The journey from novice to capable programmer can often feel like attempting to drink from a fire hose. With so many resources to choose from, you might worry that you’re wasting time on suboptimal programming guides.
After you finish reading this book (or even while you’re reading this book), I recommend following up by reading these additional introductory materials:
But the technical aspects of Python are only one of its strengths. The programming language has attracted a diverse community responsible for creating a friendly, accessible body of documentation and support that no other programming ecosystem has matched. The annual PyCon conference, along with the many regional PyCons, hosts a wide variety of talks for all experience levels. The PyCon organizers make these talks available online for free at https://pyvideo.org/. The Tags page lets you easily find talks on topics that correspond to your interests.
To take a deeper dive into the advanced features of Python’s syntax and standard library, I recommend reading the following titles:
Good luck on your programming journey. Let’s get started!