About this book

Practices of the Python Pro introduces several concepts that software developers in almost any language can use to improve their work. This would be a great book to read after learning the fundamentals of the Python language.

Who should read this book

Practices of the Python Pro is for anyone in the early stages of their programming journey. In fact, people outside the software industry altogether who use software to supplement their work can find value in this book. The concepts contained in these pages will help readers build software that’s more maintainable, which in turn makes their software easier to collaborate on.

In the sciences, reproducibility and provenance are important aspects of the research process. As more research comes to rely on software, code that people can understand, update, and improve is a major consideration. But college curricula are still catching up to this intersection of software with other disciplines. For those with limited experience in formal software development, this book provides a set of principles for producing shareable, reusable software.

If you’re seasoned in object-oriented programming and domain-driven design, you may find this book too introductory for your benefit. On the other hand, if you’re relatively new to Python, software, or software design, give this book a try. There’s something in here for you.

How this book is organized: A roadmap

Practices of the Python Pro consists of 11 chapters in 4 parts. Parts 1 and 2 provide discussion along with short examples and an occasional exercise. Part 3 builds on what you’ve learned in earlier chapters and contains a variety of exercises. Part 4 provides strategies for learning more, along with recommendations about what to try after reading this book.

Part 1, “Why it all matters,” sets the stage for Python’s rise to fame and why software design is valuable.

  • Chapter 1 covers some recent history of Python and why I enjoy developing Python programs. It goes on to explain software design, why it’s important, and how it manifests in your day-to-day work.

Part 2, “Foundations of design,” covers the high-level concepts that underpin software design and development.

  • Chapter 2 covers separation of concerns, a fundamental activity that provides a basis for several others in the book.
  • Chapter 3 explains abstraction and encapsulation, showing you how hiding information and providing simpler interfaces to more complex logic helps you keep a handle on your code.
  • Chapter 4 prompts you to think about performance, covering different data structures, approaches, and tools to help you build speedy programs.
  • Chapter 5 teaches you about testing your software, using a variety of approaches, from unit testing to end-to-end testing.

Part 3, “Nailing down large systems,” walks you through building a real application using the principles you’ve learned.

  • Chapter 6 introduces the application you’ll build in the book and provides exercises for creating a program’s foundation.
  • Chapter 7 covers the concepts of extensibility and flexibility and includes exercises that add extensibility to the application.
  • Chapter 8 helps you understand class inheritance, providing recommendations about where and when it should be used. It continues on with exercises that examine inheritance in the application you’re building.
  • Chapter 9 steps back a bit, introducing tools and an approach for keeping code from growing too large as you go along.
  • Chapter 10 explains loose coupling, providing some final exercises to reduce the coupling in the application you’re building.

Part 4, “What’s next?” gives you some recommendations for how and what to learn next.

  • Chapter 11 shows you how I map out new learning material and gives you a few areas of study to try if you’re interested in going deeper into software development. I recommend reading Practices of the Python Pro from cover to cover, though you may choose to skip chapters in parts 1 and 2 if you’re familiar with the material. Part 3 is best read in order so you can go through the exercises in a linear fashion. There’s an appendix that will help you install Python, should you need it:
  • The appendix covers which version of Python you should install, along with the most common approaches folks use to install it on their systems.

About the code

You can get the full source code for the book’s examples and exercises in the book’s repository on GitHub (https://github.com/daneah/practices-of-the-python-pro). Alternatively, you can visit the book’s homepage (www.manning.com/books/practices-of-the-python-pro) and click Source Code to download the code.

This book contains many examples of source code, both in numbered listings and in line with normal text. In both cases, source code is formatted in a fixed-width font like this to separate it from ordinary text.

In many cases, the original source code has been reformatted; we’ve added line breaks and reworked indentation to accommodate the available page space in the book. In rare cases, even this was not enough, and listings include line-continuation markers (å). Additionally, comments in the source code have often been removed from the listings when the code is described in the text. Code annotations accompany many of the listings, highlighting important concepts.

For each chapter, the code is organized into Python modules that are referenced in the text. In general, you’re expected to write your own version of the code and use the provided source only to check your work. In part 3, the projects in each chapter build on the code from previous chapters, but each chapter provides a full working copy of the source.

All code in this book is written in Python 3, and more specifically is intended to work with Python 3.7+. Most of the code could be made to work on earlier versions without much fuss, but consider installing a relatively new version of Python for use with this book.

liveBook discussion forum

Purchase of Practices of the Python Pro includes free access to a private web forum run by Manning Publications where you can make comments about the book, ask technical questions, and receive help from the author and from other users. To access the forum, go to https://livebook.manning.com/#!/book/practices-of-the-python-pro/discussion. You can also learn more about Manning’s forums and the rules of conduct at https://livebook.manning.com/#!/discussion.

Manning’s commitment to our readers is to provide a venue where a meaningful dialogue between individual readers and between readers and the author can take place. It is not a commitment to any specific amount of participation on the part of the author, whose contribution to the forum remains voluntary (and unpaid). We suggest you try asking the author some challenging questions lest his interest stray! The forum and the archives of previous discussions will be accessible from the publisher’s website as long as the book is in print.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.59.173.242