Beyond the Basic Stuff with Python: Best Practices for Writing Clean Code

Authors: Sweigart, Al
Publisher: No Starch Press
BISAC/Subject: COM051360, COM051000
ISBN: 9781593279677, Related ISBNs: 1593279663, 1593279671, 9781593279660, 9781593279677
Classification: Non-Fiction
Number of pages: 384,
Audience: General/trade
Synopsis: BRIDGE THE GAP BETWEEN NOVICE AND PROFESSIONAL

You've completed a basic Python programming tutorial or finished Al Sweigart's bestseller, Automate the Boring Stuff with Python. What's the next step toward becoming a capable, confident software developer?

Welcome to Beyond the Basic Stuff with Python. More than a mere collection of advanced syntax and masterful tips for writing clean code, you'll learn how to advance your Python programming skills by using the command line and other professional tools like code formatters, type checkers, linters, and version control. Sweigart takes you through best practices for setting up your development environment, naming variables, and improving readability, then tackles documentation, organization and performance measurement, as well as object-oriented design and the Big-O algorithm analysis commonly used in coding interviews. The skills you learn will boost your ability to program--not just in Python but in any language.

You'll learn:
    Coding style, and how to use Python's Black auto-formatting tool for cleaner code
    Common sources of bugs, and how to detect them with static analyzers
    How to structure the files in your code projects with the Cookiecutter template tool
    Functional programming techniques like lambda and higher-order functions
    How to profile the speed of your code with Python's built-in timeit and cProfile modules
    The computer science behind Big-O algorithm analysis
    How to make your comments and docstrings informative, and how often to write them
    How to create classes in object-oriented programming, and why they're used to organize code

Toward the end of the book you'll read a detailed source-code breakdown of two classic command-line games, the Tower of Hanoi (a logic puzzle) and Four-in-a-Row (a two-player tile-dropping game), and a breakdown of how their code follows the book's best practices. You'll test your skills by implementing the program yourself.

Of course, no single book can make you a professional software developer. But Beyond the Basic Stuff with Python will get you further down that path and make you a better programmer, as you learn to write readable code that's easy to debug and perfectly Pythonic

Requirements: Covers Python 3.6 and higher
Sign up for our literacy platform for reading at home

LightSail includes up to 6,000 high interest, Lexile aligned book titles with every student subscription. Other titles are available for individual purchase.

Watch the power of

Lightsail in action

×

SUPPORT GROWING READERS

Immediately Engage Students
Immediately Engage Students
Simple intuitive design has classrooms reading within minutes.
Exponentially Grow Reading Time
Exponentially Grow Reading Time
Students love the LightSail experience and naturally spend more time reading.
Accelerate Literacy Development
Accelerate Literacy Development
Students reading 25 minutes a day on LightSail are seeing 2+ years of Lexile growth in a single year.

LightSail Education is a comprehensive Lexile and standards-aligned, literacy platform and digital e-book library. Including multimodal learning functionality and featuring books from leading publishers, LightSail holistically assesses and nurtures each student on their reading and writing-to-learn journey, throughout elementary, middle, and high school.

*LightSail offers a 2,000 or a 6,000 title bundle with its student subscriptions. Other titles are available for individual purchase.