Coder Social home page Coder Social logo

ersinaksar / clean-code-in-python Goto Github PK

View Code? Open in Web Editor NEW

This project forked from packtpublishing/clean-code-in-python

1.0 0.0 0.0 98 KB

Clean Code in Python, published by Packt

License: MIT License

Makefile 1.71% Python 97.80% Shell 0.33% Dockerfile 0.16%

clean-code-in-python's Introduction

Clean Code in Python

Clean Code in Python

This is the code repository for Clean Code in Python, published by Packt.

Refactor your legacy code base

What is this book about?

Python is currently used in many different areas such as software construction, systems administration, and data processing. In all of these areas, experienced professionals can find examples of inefficiency, problems, and other perils, as a result of bad code. After reading this book, readers will understand these problems, and more importantly, how to correct them.

This book covers the following exciting features: Set up tools to effectively work in a development environment Explore how the magic methods of Python can help us write better code Examine the traits of Python to create advanced object-oriented design Understand removal of duplicated code using decorators and descriptors Effectively refactor code with the help of unit tests Learn to implement the SOLID principles in Python

If you feel this book is for you, get your copy today!

https://www.packtpub.com/

Instructions and Navigations

Setup

Create a virtual environment, and once activated run:

make setup

This will install the common dependencies. Besides this, each chapter might have additional ones, for which another make setup will have to be run inside that particular directory.

Each chapter has its corresponding directory given by its number.

Inside each chapter directory, tests can be run by:

make test

This requires the make application installed (in Unix environments). In environments without access to the make command, the same code can be tested by running the commands on the Makefile:

python -m doctest *.py
python -m unittest *.py

All of the code is organized into folders. For example, Chapter02.

The code will look like the following:

class Point:
    def __init__(self, lat, long):
        self.lat = lat
        self.long = long

Errata

  • In Chapter 2, page 41: Add the following import in the code: from datetime import date

Following is what you need for this book: This book will appeal to team leads, software architects and senior software engineers who would like to work on their legacy systems to save cost and improve efficiency. A strong understanding of Programming is assumed.

With the following software and hardware list you can run all code files present in the book (Chapter 1-10).

Software and Hardware List

Chapter Software required Hardware required
1, 2, 3, 4, 5, 6, 7, 8, 9, 10 Python 3.7 System with 4GB RAM
10 Docker System with 4GB RAM

Related products

Get to Know the Author

Mariano Anaya is a software engineer who spends most of his time creating software with Python and mentoring fellow programmers. Mariano's main areas of interests besides Python are software architecture, functional programming, distributed systems, and speaking at conferences.

He was a speaker at Euro Python 2016 and 2017. To know more about him, you can refer to his GitHub account with the username rmariano.

His speakerdeck username is rmariano.

Suggestions and Feedback

Click here if you have any feedback or suggestions.

clean-code-in-python's People

Contributors

dependabot[bot] avatar gaurav-packt avatar manikandankurup-packt avatar mfaafm avatar murtazatinwala avatar packt-itservice avatar rmariano avatar shoshan avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.