Close Modal

Beyond the Basic Stuff with Python

Best Practices for Writing Clean Code

Look inside
Paperback
$39.99 US
7.06"W x 9.24"H x 0.91"D   (17.9 x 23.5 x 2.3 cm) | 26 oz (748 g) | 21 per carton
On sale Dec 16, 2020 | 384 Pages | 9781593279660
Sales rights: World
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
    "A great new book . . . Sweigart focuses on three major subjects: common difficulties in getting started (seeking help, setting up a work environment); best practices, tools, and techniques; and using object-oriented Python. The second section is the largest in the book . . . but each section can be read on its own. The book is all the more useful for collecting together between one pair of covers material that you would typically dig up from multiple resources."
    —Serdar Yegulalp, InfoWorld

    "My early Python programs work but could be improved massively with what Al writes about . . . a small goldmine of knowledge that beginners, intermediates and probably even advanced programmers will benefit from."
    —GeekTechStuff
    Al Sweigart is a professional software developer who teaches programming to kids and adults. Sweigart has written several bestselling programming books for beginners, including Automate the Boring Stuff with Python, Invent Your Own Computer Games with Python, Coding with Minecraft, and Cracking Codes with Python (all from No Starch Press).
    Available for sale exclusive:
    •     Afghanistan
    •     Aland Islands
    •     Albania
    •     Algeria
    •     Andorra
    •     Angola
    •     Anguilla
    •     Antarctica
    •     Antigua/Barbuda
    •     Argentina
    •     Armenia
    •     Aruba
    •     Australia
    •     Austria
    •     Azerbaijan
    •     Bahamas
    •     Bahrain
    •     Bangladesh
    •     Barbados
    •     Belarus
    •     Belgium
    •     Belize
    •     Benin
    •     Bermuda
    •     Bhutan
    •     Bolivia
    •     Bonaire, Saba
    •     Bosnia Herzeg.
    •     Botswana
    •     Bouvet Island
    •     Brazil
    •     Brit.Ind.Oc.Ter
    •     Brit.Virgin Is.
    •     Brunei
    •     Bulgaria
    •     Burkina Faso
    •     Burundi
    •     Cambodia
    •     Cameroon
    •     Canada
    •     Cape Verde
    •     Cayman Islands
    •     Centr.Afr.Rep.
    •     Chad
    •     Chile
    •     China
    •     Christmas Islnd
    •     Cocos Islands
    •     Colombia
    •     Comoro Is.
    •     Congo
    •     Cook Islands
    •     Costa Rica
    •     Croatia
    •     Cuba
    •     Curacao
    •     Cyprus
    •     Czech Republic
    •     Dem. Rep. Congo
    •     Denmark
    •     Djibouti
    •     Dominica
    •     Dominican Rep.
    •     Ecuador
    •     Egypt
    •     El Salvador
    •     Equatorial Gui.
    •     Eritrea
    •     Estonia
    •     Ethiopia
    •     Falkland Islnds
    •     Faroe Islands
    •     Fiji
    •     Finland
    •     France
    •     Fren.Polynesia
    •     French Guinea
    •     Gabon
    •     Gambia
    •     Georgia
    •     Germany
    •     Ghana
    •     Gibraltar
    •     Greece
    •     Greenland
    •     Grenada
    •     Guadeloupe
    •     Guam
    •     Guatemala
    •     Guernsey
    •     Guinea Republic
    •     Guinea-Bissau
    •     Guyana
    •     Haiti
    •     Heard/McDon.Isl
    •     Honduras
    •     Hong Kong
    •     Hungary
    •     Iceland
    •     India
    •     Indonesia
    •     Iran
    •     Iraq
    •     Ireland
    •     Isle of Man
    •     Israel
    •     Italy
    •     Ivory Coast
    •     Jamaica
    •     Japan
    •     Jersey
    •     Jordan
    •     Kazakhstan
    •     Kenya
    •     Kiribati
    •     Kuwait
    •     Kyrgyzstan
    •     Laos
    •     Latvia
    •     Lebanon
    •     Lesotho
    •     Liberia
    •     Libya
    •     Liechtenstein
    •     Lithuania
    •     Luxembourg
    •     Macau
    •     Macedonia
    •     Madagascar
    •     Malawi
    •     Malaysia
    •     Maldives
    •     Mali
    •     Malta
    •     Marshall island
    •     Martinique
    •     Mauritania
    •     Mauritius
    •     Mayotte
    •     Mexico
    •     Micronesia
    •     Minor Outl.Ins.
    •     Moldavia
    •     Monaco
    •     Mongolia
    •     Montenegro
    •     Montserrat
    •     Morocco
    •     Mozambique
    •     Myanmar
    •     Namibia
    •     Nauru
    •     Nepal
    •     Netherlands
    •     New Caledonia
    •     New Zealand
    •     Nicaragua
    •     Niger
    •     Nigeria
    •     Niue
    •     Norfolk Island
    •     North Korea
    •     North Mariana
    •     Norway
    •     Oman
    •     Pakistan
    •     Palau
    •     Palestinian Ter
    •     Panama
    •     PapuaNewGuinea
    •     Paraguay
    •     Peru
    •     Philippines
    •     Pitcairn Islnds
    •     Poland
    •     Portugal
    •     Puerto Rico
    •     Qatar
    •     Reunion Island
    •     Romania
    •     Russian Fed.
    •     Rwanda
    •     S. Sandwich Ins
    •     Saint Martin
    •     Samoa,American
    •     San Marino
    •     SaoTome Princip
    •     Saudi Arabia
    •     Senegal
    •     Serbia
    •     Seychelles
    •     Sierra Leone
    •     Singapore
    •     Sint Maarten
    •     Slovakia
    •     Slovenia
    •     Solomon Islands
    •     Somalia
    •     South Africa
    •     South Korea
    •     South Sudan
    •     Spain
    •     Sri Lanka
    •     St Barthelemy
    •     St. Helena
    •     St. Lucia
    •     St. Vincent
    •     St.Chr.,Nevis
    •     St.Pier,Miquel.
    •     Sth Terr. Franc
    •     Sudan
    •     Suriname
    •     Svalbard
    •     Swaziland
    •     Sweden
    •     Switzerland
    •     Syria
    •     Tadschikistan
    •     Taiwan
    •     Tanzania
    •     Thailand
    •     Timor-Leste
    •     Togo
    •     Tokelau Islands
    •     Tonga
    •     Trinidad,Tobago
    •     Tunisia
    •     Turkey
    •     Turkmenistan
    •     Turks&Caicos Is
    •     Tuvalu
    •     US Virgin Is.
    •     USA
    •     Uganda
    •     Ukraine
    •     Unit.Arab Emir.
    •     United Kingdom
    •     Uruguay
    •     Uzbekistan
    •     Vanuatu
    •     Vatican City
    •     Venezuela
    •     Vietnam
    •     Wallis,Futuna
    •     West Saharan
    •     Western Samoa
    •     Yemen
    •     Zambia
    •     Zimbabwe

    Introduction

    Part I: Getting Started

    1.     Dealing with Errors and Asking for Help
    2.     Environmental Setup
    3.     Formatting with the Black Module
     
    Part II: Best Practices, Tools, and Techniques
    4.     Choosing Useful Names
    5.     Finding Code Smells
    6.     Writing Pythonic Code
    7.     Programming Jargon
    8.     Common Python Gotchas
    9.     Esoteric Python Oddities
    10.   Crafting Effective Functions
    11.   Comments and Type Hints
    12.   Version Control with Git
    13.   Profiling Code
     
    Part III: Practice Problems
    14.   Tower of Hanoi
    15.   Connect Four
     
    Part IV: Readable Object-Oriented Programming
    16.   Classes and Objects
    17.   Inheritance
    18.   Pythonic Object-Oriented Programming
     
    Index

    About

    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

    Praise

    "A great new book . . . Sweigart focuses on three major subjects: common difficulties in getting started (seeking help, setting up a work environment); best practices, tools, and techniques; and using object-oriented Python. The second section is the largest in the book . . . but each section can be read on its own. The book is all the more useful for collecting together between one pair of covers material that you would typically dig up from multiple resources."
    —Serdar Yegulalp, InfoWorld

    "My early Python programs work but could be improved massively with what Al writes about . . . a small goldmine of knowledge that beginners, intermediates and probably even advanced programmers will benefit from."
    —GeekTechStuff

    Author

    Al Sweigart is a professional software developer who teaches programming to kids and adults. Sweigart has written several bestselling programming books for beginners, including Automate the Boring Stuff with Python, Invent Your Own Computer Games with Python, Coding with Minecraft, and Cracking Codes with Python (all from No Starch Press).

    Rights

    Available for sale exclusive:
    •     Afghanistan
    •     Aland Islands
    •     Albania
    •     Algeria
    •     Andorra
    •     Angola
    •     Anguilla
    •     Antarctica
    •     Antigua/Barbuda
    •     Argentina
    •     Armenia
    •     Aruba
    •     Australia
    •     Austria
    •     Azerbaijan
    •     Bahamas
    •     Bahrain
    •     Bangladesh
    •     Barbados
    •     Belarus
    •     Belgium
    •     Belize
    •     Benin
    •     Bermuda
    •     Bhutan
    •     Bolivia
    •     Bonaire, Saba
    •     Bosnia Herzeg.
    •     Botswana
    •     Bouvet Island
    •     Brazil
    •     Brit.Ind.Oc.Ter
    •     Brit.Virgin Is.
    •     Brunei
    •     Bulgaria
    •     Burkina Faso
    •     Burundi
    •     Cambodia
    •     Cameroon
    •     Canada
    •     Cape Verde
    •     Cayman Islands
    •     Centr.Afr.Rep.
    •     Chad
    •     Chile
    •     China
    •     Christmas Islnd
    •     Cocos Islands
    •     Colombia
    •     Comoro Is.
    •     Congo
    •     Cook Islands
    •     Costa Rica
    •     Croatia
    •     Cuba
    •     Curacao
    •     Cyprus
    •     Czech Republic
    •     Dem. Rep. Congo
    •     Denmark
    •     Djibouti
    •     Dominica
    •     Dominican Rep.
    •     Ecuador
    •     Egypt
    •     El Salvador
    •     Equatorial Gui.
    •     Eritrea
    •     Estonia
    •     Ethiopia
    •     Falkland Islnds
    •     Faroe Islands
    •     Fiji
    •     Finland
    •     France
    •     Fren.Polynesia
    •     French Guinea
    •     Gabon
    •     Gambia
    •     Georgia
    •     Germany
    •     Ghana
    •     Gibraltar
    •     Greece
    •     Greenland
    •     Grenada
    •     Guadeloupe
    •     Guam
    •     Guatemala
    •     Guernsey
    •     Guinea Republic
    •     Guinea-Bissau
    •     Guyana
    •     Haiti
    •     Heard/McDon.Isl
    •     Honduras
    •     Hong Kong
    •     Hungary
    •     Iceland
    •     India
    •     Indonesia
    •     Iran
    •     Iraq
    •     Ireland
    •     Isle of Man
    •     Israel
    •     Italy
    •     Ivory Coast
    •     Jamaica
    •     Japan
    •     Jersey
    •     Jordan
    •     Kazakhstan
    •     Kenya
    •     Kiribati
    •     Kuwait
    •     Kyrgyzstan
    •     Laos
    •     Latvia
    •     Lebanon
    •     Lesotho
    •     Liberia
    •     Libya
    •     Liechtenstein
    •     Lithuania
    •     Luxembourg
    •     Macau
    •     Macedonia
    •     Madagascar
    •     Malawi
    •     Malaysia
    •     Maldives
    •     Mali
    •     Malta
    •     Marshall island
    •     Martinique
    •     Mauritania
    •     Mauritius
    •     Mayotte
    •     Mexico
    •     Micronesia
    •     Minor Outl.Ins.
    •     Moldavia
    •     Monaco
    •     Mongolia
    •     Montenegro
    •     Montserrat
    •     Morocco
    •     Mozambique
    •     Myanmar
    •     Namibia
    •     Nauru
    •     Nepal
    •     Netherlands
    •     New Caledonia
    •     New Zealand
    •     Nicaragua
    •     Niger
    •     Nigeria
    •     Niue
    •     Norfolk Island
    •     North Korea
    •     North Mariana
    •     Norway
    •     Oman
    •     Pakistan
    •     Palau
    •     Palestinian Ter
    •     Panama
    •     PapuaNewGuinea
    •     Paraguay
    •     Peru
    •     Philippines
    •     Pitcairn Islnds
    •     Poland
    •     Portugal
    •     Puerto Rico
    •     Qatar
    •     Reunion Island
    •     Romania
    •     Russian Fed.
    •     Rwanda
    •     S. Sandwich Ins
    •     Saint Martin
    •     Samoa,American
    •     San Marino
    •     SaoTome Princip
    •     Saudi Arabia
    •     Senegal
    •     Serbia
    •     Seychelles
    •     Sierra Leone
    •     Singapore
    •     Sint Maarten
    •     Slovakia
    •     Slovenia
    •     Solomon Islands
    •     Somalia
    •     South Africa
    •     South Korea
    •     South Sudan
    •     Spain
    •     Sri Lanka
    •     St Barthelemy
    •     St. Helena
    •     St. Lucia
    •     St. Vincent
    •     St.Chr.,Nevis
    •     St.Pier,Miquel.
    •     Sth Terr. Franc
    •     Sudan
    •     Suriname
    •     Svalbard
    •     Swaziland
    •     Sweden
    •     Switzerland
    •     Syria
    •     Tadschikistan
    •     Taiwan
    •     Tanzania
    •     Thailand
    •     Timor-Leste
    •     Togo
    •     Tokelau Islands
    •     Tonga
    •     Trinidad,Tobago
    •     Tunisia
    •     Turkey
    •     Turkmenistan
    •     Turks&Caicos Is
    •     Tuvalu
    •     US Virgin Is.
    •     USA
    •     Uganda
    •     Ukraine
    •     Unit.Arab Emir.
    •     United Kingdom
    •     Uruguay
    •     Uzbekistan
    •     Vanuatu
    •     Vatican City
    •     Venezuela
    •     Vietnam
    •     Wallis,Futuna
    •     West Saharan
    •     Western Samoa
    •     Yemen
    •     Zambia
    •     Zimbabwe

    Table of Contents

    Introduction

    Part I: Getting Started

    1.     Dealing with Errors and Asking for Help
    2.     Environmental Setup
    3.     Formatting with the Black Module
     
    Part II: Best Practices, Tools, and Techniques
    4.     Choosing Useful Names
    5.     Finding Code Smells
    6.     Writing Pythonic Code
    7.     Programming Jargon
    8.     Common Python Gotchas
    9.     Esoteric Python Oddities
    10.   Crafting Effective Functions
    11.   Comments and Type Hints
    12.   Version Control with Git
    13.   Profiling Code
     
    Part III: Practice Problems
    14.   Tower of Hanoi
    15.   Connect Four
     
    Part IV: Readable Object-Oriented Programming
    16.   Classes and Objects
    17.   Inheritance
    18.   Pythonic Object-Oriented Programming
     
    Index