Full description not available
B**T
Clean code - the Pythonic way
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.”
A**Z
Fantastic! Learned so much!
I learned a lot from this book. It'll be an invaluable reference going forward as well. Highly recommended.
C**E
Particularly good for new programmers
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.
A**R
Lots of interesting information -- but poorly worded and confusing in places
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.
G**L
A reference shelf staple for every Python practitioner
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.
Trustpilot
Hace 3 semanas
Hace 1 mes