Deliver toUnited Arab Emirates
Clean Code in Python: Develop maintainable and efficient code, 2nd Edition

Description:

Tackle inefficiencies and errors the Pythonic way


Key Features:

  • Enhance your coding skills using the new features introduced in Python 3.9
  • Implement the refactoring techniques and SOLID principles in Python
  • Apply microservices to your legacy systems by implementing practical techniques


Book Description:

Experienced professionals in every field face several instances of disorganization, poor readability, and testability due to unstructured code.


With updated code and revised content aligned to the new features of Python 3.9, this second edition of Clean Code in Python will provide you with all the tools you need to overcome these obstacles and manage your projects successfully.


The book begins by describing the basic elements of writing clean code and how it plays a key role in Python programming. You will learn about writing efficient and readable code using the Python standard library and best practices for software design.


The book discusses object-oriented programming in Python and shows you how to use objects with descriptors and generators. It will also show you the design principles of software testing and how to resolve problems by implementing software design patterns in your code. In the concluding chapter, we break down a monolithic application into a microservices-based one starting from the code as the basis for a solid platform.


By the end of this clean code book, you will be proficient in applying industry-approved coding practices to design clean, sustainable, and readable real-world Python code.


What You Will Learn:

  • Set up a productive development environment by leveraging automatic tools
  • Leverage the magic methods in Python to write better code, abstracting complexity away and encapsulating details
  • Create advanced object-oriented designs using unique features of Python, such as descriptors
  • Eliminate duplicated code by creating powerful abstractions using software engineering principles of object-oriented design
  • Create Python-specific solutions using decorators and descriptors
  • Refactor code effectively with the help of unit tests
  • Build the foundations for solid architecture with a clean code base as its cornerstone


Who this Book is for:

This book is designed to benefit new as well as experienced programmers. It will appeal to team leads, software architects and senior software engineers who would like to write Pythonic code to save on costs and improve efficiency. The book assumes that you have a strong understanding of programming


Editorial Reviews

About 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.

Reviews:

5.0 out of 5 stars Clean code - the Pythonic way

B.B. · February 4, 2021

I’m a long time C#, .NET developer and have read and absorbed and taken to heart Uncle Bob’s Clean Code and Clean Architecture books. Recently I’ve started learning Python and, with any programming language I learn, I like to also learn the best way to use that language and how to develop clean code and clean architectures with it.This is why I love Mariano Anaya’s second edition of “Clean Code in Python” book. It immediately meets both of my requirements here. But is not only a great book for Python newbies, like me, but experienced Python devs will definitely find a lot of value from it.Mariano does a great job explaining the what and the why of each topic. He wants you to understand the pros and cons of each approach. He explains each side of the argument, showing various alternatives, to help you understand the best approach and avoid common mistakes.I loved this quote from Mariano, “Practicality beats purity.” He gives you solid, practical, real-world examples and shows when to deviate from pure patterns sometimes – to be practical. He has great, long-term design thinking with considerations for future changes in mind, making your software flexible and extensible – the Pythonic way.He starts with simple examples to help you understand the concepts then moves on to more advanced topics, including describing how Python works under the covers.A takeaway summary:• Emphasizes the Pythonic way to code.• Best practices and traits of software design , anti-patterns, debugging tips.• Has an entire chapter on the SOLID principles. Also touches on these principles throughout the book.• Explains the power of decorators and descriptors, an advanced Python feature, to improve your code.• Covers generators, iterators, coroutines, and asynchronous programming.• Importance of unit testing. Shows how to make code more unit testable and that it is just as important as production code.• Describes the importance of refactoring and shows the importance of unit tests to make this work effectively.• Common design patterns and how they contribute to clean code. Design patterns considerations for Python since there are many patterns already inherently embedded in Python.• Great chapter on clean architectureHighly recommended!A few of my favorite quotes:“The ideas explored in this chapter are fundamental pillars in the global context of the book because of their importance to our ultimate goal: to write better and more maintainable software.”“The reason why we pay so much attention to the code's flexibility is that we know requirements change and evolve over time, and eventually, as domain business rules change, our code will have to change as well to support these new requirements.”“As introduced at the beginning, the goal of this book was not to give you recipes or formulas that you can apply directly, but rather to develop your critical thinking. Idioms and syntax features come and go; they change over time. But ideas and core software concepts remain. With these tools and the examples provided, you should have a better understanding of what clean code means.”

5.0 out of 5 stars Particularly good for new programmers

c. · January 19, 2021

This is a useful book, especially as Python slowly becomes one of the dominant programming languages. Much of the information I have learned over the course of 15+ years of Python programming, so it's nice to see it in one place. And, to be honest, there were some back-end, low-level Python information that I didn't know.You'll find a lot of the information scattered around other books; there are some topics that I covered in my own books. But, again, for new Python programmers and those who spend most of their time using Python for data science, having a single source is good.The book starts with the fundamentals of good documentation and code formatting. Believe me, I've seen a lot of code that was obviously written by C/C++ programmers who were forced to write Python code for a one-off need, and it's not pretty.Chapter 2 talks about some of the "back-end" Python work. It's not totally low-level, e.g. how the underlying C code is used to make Python work, but does go into detail about some of the functionality of Python data structures.We then move into more information similar to Chapter 1: good code traits, SOLID principles, decorators, descriptors, testing, etc. While you can learn these over time if you hang out on programming forums, blogs, etc., the variety of opinions, especially from the anti-Python crowd, can make it hard to understand what is "Pythonic".Overall, this is a very valuable book for new Python programmers and those Python users who don't delve into general purpose programming. In addition, there is more detailed explanations for common Python "tools" that even long-time Python users might find useful, or at least interesting.

5.0 out of 5 stars A reference shelf staple for every Python practitioner

G.R. · January 21, 2021

Clean Code in Python - Second Edition has helped me begin to fill some of the gaps in my code education. My sincere thanks to Packt Publishing for giving me the opportunity to review it!PROS:- It's great for an inexperienced developer. The author clearly knows his stuff. I would be hard-pressed to name another Python book that goes into this level of detail.- This is an excellent technical reference for Python. I can envision a time when, thanks to this book, I won't have to visit StackOverflow half as much.CONS:This book is DENSE. It truly is a reference text wherein the author gets down to business and doesn't tiptoe around the point. Some authors are horrible about that and fill their work with unnecessary anecdotes or ridiculous metaphors. This author did none of that. To me however, the lack of anecdotes detracts somewhat from the readability.BOTTOM LINE:The best thing about this book is the real-world use cases highlighted by the author. I typically work alone when I code but could see how his development team-oriented approach would apply. It's a good reminder to make your code readable to other humans since, as he put it, the code is for us, not for the machine.In conclusion, I would definitely recommend this book to anyone looking to clean up their act: one-person or small development teams, rogue analysts, or hobbyists looking to take the plunge into production coding.

4.0 out of 5 stars Lots of interesting information -- but poorly worded and confusing in places

A.C. · May 18, 2021

I have a few years of Python under my belt, and I'm definitely learning new things from this book. However, in places, I found the writing to be confusing -- long, unnecessarily bloated sentences with ambiguous pronouns (lots of "it" where it's not always clear to me what "it" is referring to). The book would benefit greatly from rigorous editing. Overall seems worth the effort.

Meh

J.H.G. · November 7, 2023

Read better

Worth the money!

G.V. · May 30, 2023

Good print quality, good paper quality, and the contents are perfect for a mid to advanced python coders. Covers wide range of topics with examples.

Zu oberflächlich

O.N. · June 7, 2023

Das Buch ist zu oberflächlich geschrieben. Einfache Beispiele fehlen.

Must have book for each self-respecting Python Developer!

r. · March 8, 2022

As said in review title - really recommend this book.

Read this book to be better using python

J. · June 17, 2021

Well written with excellant examples. This book will help you be a better python developer. Not for a complete beginner

Clean Code in Python: Develop maintainable and efficient code, 2nd Edition

Product ID: U1800560214
Condition: New

4.6

AED19562

Price includes VAT & Import Duties
Type: Paperback
Availability: In Stock

Quantity:

|

Order today to get by 7-14 business days

Delivery fee of AED 20. Free for orders above AED 200.

Returns & Warranty policies

Imported From: United States

At BOLO, we work hard to ensure the products you receive are new, genuine, and sourced from reputable suppliers.

BOLO is not an authorized or official retailer for most brands, nor are we affiliated with manufacturers unless specifically stated on a product page. Instead, we source verified sellers, authorized distributors or directly from the manufacturer.

Each product undergoes thorough inspection and verification at our consolidation and fulfilment centers to ensure it meets our strict authenticity and quality standards before being shipped and delivered to you.

If you ever have concerns regarding the authenticity of a product purchased from us, please contact Bolo Support. We will review your inquiry promptly and, if necessary, provide documentation verifying authenticity or offer a suitable resolution.

Your trust is our top priority, and we are committed to maintaining transparency and integrity in every transaction.

All product information, images, descriptions, and reviews originate from the manufacturer or from trusted sellers overseas. BOLO is not affiliated with, endorsed by, or an authorized retailer for most brands listed on our website unless stated otherwise.

While we strive to display accurate information, variations in packaging, labeling, instructions, or formulation may occasionally occur due to regional differences or supplier updates. For detailed or manufacturer-specific information, please contact the brand directly or reach out to BOLO Support for assistance.

Unless otherwise stated, all prices displayed on the product page include applicable taxes and import duties.

BOLO operates in accordance with the laws and regulations of United Arab Emirates. Any items found to be restricted or prohibited for sale within the UAE will be cancelled prior to shipment. We take proactive measures to ensure that only products permitted for sale in United Arab Emirates are listed on our website.

All items are shipped by air, and any products classified as “Dangerous Goods (DG)” under IATA regulations will be removed from the order and cancelled.

All orders are processed manually, and we make every effort to process them promptly once confirmed. Products cancelled due to the above reasons will be permanently removed from listings across the website.

Similar suggestions by Bolo

More from this brand

Similar items from “Software Development”

Clean Code in Python: Develop maintainable and efficient code, 2nd Edition

Product ID: U1800560214
Condition: New

4.6

Clean Code in Python: Develop maintainable and efficient code, 2nd Edition-0
Type: Paperback

AED19562

Price includes VAT & Import Duties
Availability: In Stock

Quantity:

|

Order today to get by 7-14 business days

Delivery fee of AED 20. Free for orders above AED 200.

Returns & Warranty policies

Imported From: United States

At BOLO, we work hard to ensure the products you receive are new, genuine, and sourced from reputable suppliers.

BOLO is not an authorized or official retailer for most brands, nor are we affiliated with manufacturers unless specifically stated on a product page. Instead, we source verified sellers, authorized distributors or directly from the manufacturer.

Each product undergoes thorough inspection and verification at our consolidation and fulfilment centers to ensure it meets our strict authenticity and quality standards before being shipped and delivered to you.

If you ever have concerns regarding the authenticity of a product purchased from us, please contact Bolo Support. We will review your inquiry promptly and, if necessary, provide documentation verifying authenticity or offer a suitable resolution.

Your trust is our top priority, and we are committed to maintaining transparency and integrity in every transaction.

All product information, images, descriptions, and reviews originate from the manufacturer or from trusted sellers overseas. BOLO is not affiliated with, endorsed by, or an authorized retailer for most brands listed on our website unless stated otherwise.

While we strive to display accurate information, variations in packaging, labeling, instructions, or formulation may occasionally occur due to regional differences or supplier updates. For detailed or manufacturer-specific information, please contact the brand directly or reach out to BOLO Support for assistance.

Unless otherwise stated, all prices displayed on the product page include applicable taxes and import duties.

BOLO operates in accordance with the laws and regulations of United Arab Emirates. Any items found to be restricted or prohibited for sale within the UAE will be cancelled prior to shipment. We take proactive measures to ensure that only products permitted for sale in United Arab Emirates are listed on our website.

All items are shipped by air, and any products classified as “Dangerous Goods (DG)” under IATA regulations will be removed from the order and cancelled.

All orders are processed manually, and we make every effort to process them promptly once confirmed. Products cancelled due to the above reasons will be permanently removed from listings across the website.

Description:

Tackle inefficiencies and errors the Pythonic way


Key Features:

  • Enhance your coding skills using the new features introduced in Python 3.9
  • Implement the refactoring techniques and SOLID principles in Python
  • Apply microservices to your legacy systems by implementing practical techniques


Book Description:

Experienced professionals in every field face several instances of disorganization, poor readability, and testability due to unstructured code.


With updated code and revised content aligned to the new features of Python 3.9, this second edition of Clean Code in Python will provide you with all the tools you need to overcome these obstacles and manage your projects successfully.


The book begins by describing the basic elements of writing clean code and how it plays a key role in Python programming. You will learn about writing efficient and readable code using the Python standard library and best practices for software design.


The book discusses object-oriented programming in Python and shows you how to use objects with descriptors and generators. It will also show you the design principles of software testing and how to resolve problems by implementing software design patterns in your code. In the concluding chapter, we break down a monolithic application into a microservices-based one starting from the code as the basis for a solid platform.


By the end of this clean code book, you will be proficient in applying industry-approved coding practices to design clean, sustainable, and readable real-world Python code.


What You Will Learn:

  • Set up a productive development environment by leveraging automatic tools
  • Leverage the magic methods in Python to write better code, abstracting complexity away and encapsulating details
  • Create advanced object-oriented designs using unique features of Python, such as descriptors
  • Eliminate duplicated code by creating powerful abstractions using software engineering principles of object-oriented design
  • Create Python-specific solutions using decorators and descriptors
  • Refactor code effectively with the help of unit tests
  • Build the foundations for solid architecture with a clean code base as its cornerstone


Who this Book is for:

This book is designed to benefit new as well as experienced programmers. It will appeal to team leads, software architects and senior software engineers who would like to write Pythonic code to save on costs and improve efficiency. The book assumes that you have a strong understanding of programming


Editorial Reviews

About 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.

Reviews:

5.0 out of 5 stars Clean code - the Pythonic way

B.B. · February 4, 2021

I’m a long time C#, .NET developer and have read and absorbed and taken to heart Uncle Bob’s Clean Code and Clean Architecture books. Recently I’ve started learning Python and, with any programming language I learn, I like to also learn the best way to use that language and how to develop clean code and clean architectures with it.This is why I love Mariano Anaya’s second edition of “Clean Code in Python” book. It immediately meets both of my requirements here. But is not only a great book for Python newbies, like me, but experienced Python devs will definitely find a lot of value from it.Mariano does a great job explaining the what and the why of each topic. He wants you to understand the pros and cons of each approach. He explains each side of the argument, showing various alternatives, to help you understand the best approach and avoid common mistakes.I loved this quote from Mariano, “Practicality beats purity.” He gives you solid, practical, real-world examples and shows when to deviate from pure patterns sometimes – to be practical. He has great, long-term design thinking with considerations for future changes in mind, making your software flexible and extensible – the Pythonic way.He starts with simple examples to help you understand the concepts then moves on to more advanced topics, including describing how Python works under the covers.A takeaway summary:• Emphasizes the Pythonic way to code.• Best practices and traits of software design , anti-patterns, debugging tips.• Has an entire chapter on the SOLID principles. Also touches on these principles throughout the book.• Explains the power of decorators and descriptors, an advanced Python feature, to improve your code.• Covers generators, iterators, coroutines, and asynchronous programming.• Importance of unit testing. Shows how to make code more unit testable and that it is just as important as production code.• Describes the importance of refactoring and shows the importance of unit tests to make this work effectively.• Common design patterns and how they contribute to clean code. Design patterns considerations for Python since there are many patterns already inherently embedded in Python.• Great chapter on clean architectureHighly recommended!A few of my favorite quotes:“The ideas explored in this chapter are fundamental pillars in the global context of the book because of their importance to our ultimate goal: to write better and more maintainable software.”“The reason why we pay so much attention to the code's flexibility is that we know requirements change and evolve over time, and eventually, as domain business rules change, our code will have to change as well to support these new requirements.”“As introduced at the beginning, the goal of this book was not to give you recipes or formulas that you can apply directly, but rather to develop your critical thinking. Idioms and syntax features come and go; they change over time. But ideas and core software concepts remain. With these tools and the examples provided, you should have a better understanding of what clean code means.”

5.0 out of 5 stars Particularly good for new programmers

c. · January 19, 2021

This is a useful book, especially as Python slowly becomes one of the dominant programming languages. Much of the information I have learned over the course of 15+ years of Python programming, so it's nice to see it in one place. And, to be honest, there were some back-end, low-level Python information that I didn't know.You'll find a lot of the information scattered around other books; there are some topics that I covered in my own books. But, again, for new Python programmers and those who spend most of their time using Python for data science, having a single source is good.The book starts with the fundamentals of good documentation and code formatting. Believe me, I've seen a lot of code that was obviously written by C/C++ programmers who were forced to write Python code for a one-off need, and it's not pretty.Chapter 2 talks about some of the "back-end" Python work. It's not totally low-level, e.g. how the underlying C code is used to make Python work, but does go into detail about some of the functionality of Python data structures.We then move into more information similar to Chapter 1: good code traits, SOLID principles, decorators, descriptors, testing, etc. While you can learn these over time if you hang out on programming forums, blogs, etc., the variety of opinions, especially from the anti-Python crowd, can make it hard to understand what is "Pythonic".Overall, this is a very valuable book for new Python programmers and those Python users who don't delve into general purpose programming. In addition, there is more detailed explanations for common Python "tools" that even long-time Python users might find useful, or at least interesting.

5.0 out of 5 stars A reference shelf staple for every Python practitioner

G.R. · January 21, 2021

Clean Code in Python - Second Edition has helped me begin to fill some of the gaps in my code education. My sincere thanks to Packt Publishing for giving me the opportunity to review it!PROS:- It's great for an inexperienced developer. The author clearly knows his stuff. I would be hard-pressed to name another Python book that goes into this level of detail.- This is an excellent technical reference for Python. I can envision a time when, thanks to this book, I won't have to visit StackOverflow half as much.CONS:This book is DENSE. It truly is a reference text wherein the author gets down to business and doesn't tiptoe around the point. Some authors are horrible about that and fill their work with unnecessary anecdotes or ridiculous metaphors. This author did none of that. To me however, the lack of anecdotes detracts somewhat from the readability.BOTTOM LINE:The best thing about this book is the real-world use cases highlighted by the author. I typically work alone when I code but could see how his development team-oriented approach would apply. It's a good reminder to make your code readable to other humans since, as he put it, the code is for us, not for the machine.In conclusion, I would definitely recommend this book to anyone looking to clean up their act: one-person or small development teams, rogue analysts, or hobbyists looking to take the plunge into production coding.

4.0 out of 5 stars Lots of interesting information -- but poorly worded and confusing in places

A.C. · May 18, 2021

I have a few years of Python under my belt, and I'm definitely learning new things from this book. However, in places, I found the writing to be confusing -- long, unnecessarily bloated sentences with ambiguous pronouns (lots of "it" where it's not always clear to me what "it" is referring to). The book would benefit greatly from rigorous editing. Overall seems worth the effort.

Meh

J.H.G. · November 7, 2023

Read better

Worth the money!

G.V. · May 30, 2023

Good print quality, good paper quality, and the contents are perfect for a mid to advanced python coders. Covers wide range of topics with examples.

Zu oberflächlich

O.N. · June 7, 2023

Das Buch ist zu oberflächlich geschrieben. Einfache Beispiele fehlen.

Must have book for each self-respecting Python Developer!

r. · March 8, 2022

As said in review title - really recommend this book.

Read this book to be better using python

J. · June 17, 2021

Well written with excellant examples. This book will help you be a better python developer. Not for a complete beginner

Similar suggestions by Bolo

More from this brand

Similar items from “Software Development”