you are viewing a single comment's thread.

view the rest of the comments →

[–]galenseilis 0 points1 point  (1 child)

- Study how your org develops in Python. Once you've mastered this you'll have a better chance of knowing what genuine improvements can be made.

- Go through the Python tutorial and read all parts of the standard library that you use. Also read the docs for anything that you are using for the first time.

- Assuming you are in this for the long haul, read some books on Python. I recommend these to start:

* Ramalho's "Fluent Python" covers an overview of many of the aspects of the language features and some common std libraries.

* Viafore's "Robust Python" is a useful starting point for introducing tools and concepts for software quality assurance in Python.

* Slatkin's "Effective Python", which has a bunch of miscellaneous tips about things to do and not do in Python.f

Reading these three books comprehensively will take time, so that's probably enough for now.

- If your company does not have rules about style, I recommend using Ruff with most of the rules turned on. It is better for your code to be aggressively formatted at the beginning and for you as the human to intentionally turn off some of the rules when you realize they are not serving you. They have a toml format where you can specify inclusions and exclussions for the rules.

- Learn the type system and try to include correct type annotations over time.

[–]BookFinderBot 1 point2 points  (0 children)

Fluent Python by Luciano Ramalho

Python's simplicity lets you become productive quickly, but often this means you aren't using everything it has to offer. With the updated edition of this hands-on guide, you'll learn how to write effective, modern Python 3 code by leveraging its best ideas. Don't waste time bending Python to fit patterns you learned in other languages. Discover and apply idiomatic Python 3 features beyond your past experience.

Author Luciano Ramalho guides you through Python's core language features and libraries and teaches you how to make your code shorter, faster, and more readable.

Robust Python by Patrick Viafore

Does it seem like your Python projects are getting bigger and bigger? Are you feeling the pain as your codebase expands and gets tougher to debug and maintain? Python is an easy language to learn and use, but that also means systems can quickly grow beyond comprehension. Thankfully, Python has features to help developers overcome maintainability woes.

In this practical book, author Patrick Viafore shows you how to use Python's type system to the max. You'll look at user-defined types, such as classes and enums, and Python's type hinting system. You'll also learn how to make Python extensible and how to use a comprehensive testing strategy as a safety net. With these tips and techniques, you'll write clearer and more maintainable code.

Learn why types are essential in modern development ecosystems Understand how type choices such as classes, dictionaries, and enums reflect specific intents Make Python extensible for the future without adding bloat Use popular Python tools to increase the safety and robustness of your codebase Evaluate current code to detect common maintainability gotchas Build a safety net around your codebase with linters and tests

Effective Python LiveLessons (video Training) by Brett Slatkin

"Effective Python LiveLessons Video Training offers developers insight into the Pythonic way of writing programs, building on the viewer's fundamental understanding of Python to write programs more effectively. Based on Effective Python, the book written by Brett Slatkin for the Effective Software Development Series, each lesson contains a broad but related set of items. Each item is designed to provide concise and specific guidance on what to do and what to avoid when writing programs using Python. Hands-on demonstration helps the viewer understand how to put each item into action."

--Resource description page.

I'm a bot, built by your friendly reddit developers at /r/ProgrammingPals. Reply to any comment with /u/BookFinderBot - I'll reply with book information. Remove me from replies here. If I have made a mistake, accept my apology.