Intermediate to Advanced resources
Intermediate
- Official Python docs — Python docs are a treasure trove of information
- Practical Python Programming — covers foundational aspects of Python programming with an emphasis on script writing, data manipulation, and program organization
- Beyond the Basic Stuff with Python — Best Practices, Tools, and Techniques, OOP, Practice Projects
- Pydon'ts — Write elegant Python code, make the best use of the core Python features
- Python Distilled — this pragmatic guide provides a concise narrative related to fundamental programming topics such as data abstraction, control flow, program structure, functions, objects, and modules
- Pythonic Programming — Tips for Becoming an Idiomatic Python Programmer
- Python in a Nutshell — use modern Python idiomatically, structure Python projects, how to debug
- Python Cookbook — complete recipes for more than a dozen topics, covering the core Python language as well as tasks common to a wide variety of application domains
- wtfpython — Exploring and understanding Python through surprising snippets
- Pybites Python Tips Book — small, practical pieces of Python code that will boost your knowledge of the language
Python talks
- pyvideo — list of videos from PyCon and other Python related events
- py-must-watch and Top 10 Must-Watch PyCon Talks — recommended talks
Testing
Another crucial aspect in the programming journey is knowing how to write tests. In bigger projects, usually there are separate engineers (often in much larger number than code developers) to test the code. Even in those cases, writing a few sanity test cases yourself can help you develop faster knowing that the changes aren't breaking basic functionality.
There's no single consensus on test methodologies. There is Unit testing, Integration testing, Test-driven development and so on. Often, a combination of these is used. These days, machine learning is also being considered to reduce the testing time, see Testing Firefox more efficiently with machine learning for example.
When I start a project, I usually try to write the programs incrementally. Say I need to iterate over files from a directory. I will make sure that portion is working (usually with print
statements), then add another feature — say file reading and test that and so on. This reduces the burden of testing a large program at once at the end. And depending upon the nature of the program, I'll add a few sanity tests at the end. For example, for my command_help project, I copy pasted a few test runs of the program with different options and arguments into a separate file and wrote a program to perform these tests programmatically whenever the source code is modified.
For non-trivial projects, you'll usually end up needing frameworks like built-in module unittest
or third-party modules like pytest
. Here's some learning resources.
- Getting started with testing in Python
- Python testing style guide
- calmcode — videos on testing, code style, args kwargs, data science, etc
- TDD in Python with pytest
- Obey the Testing Goat — TDD for the Web, with Python, Selenium, Django, JavaScript and pals
- Modern Test-Driven Development in Python — TDD guide, has a real world application example
Algorithms and data structures
- Problem solving with algorithms and data structures — interactive course
- Classic Computer Science Problems in Python — deepens your knowledge of problem solving techniques from the realm of computer science by challenging you with time-tested scenarios, exercises, and algorithms
- GitHub: Awesome algorithms — curated list of resources to learn and/or practice algorithms
- redblobgames — interactive visual explanations of math and algorithms, using motivating examples from computer games
Design patterns
- GitHub: Collection of design patterns and idioms
- Python design patterns
- inspired from Design Patterns: Elements of Reusable Object-Oriented Software — also known as Gang of Four book
- Clean Architectures in Python — software design methodology
- Architecture Patterns with Python — Enabling TDD, DDD, and Event-Driven Microservices
Advanced
- Fluent Python — takes you through Python's core language features and libraries, and shows you how to make your code shorter, faster, and more readable at the same time
- Serious Python — deployment, scalability, testing, and more
- Practices of the Python Pro — learn to design professional-level, clean, easily maintainable software at scale, includes examples for software development best practices
- Intuitive Python — productive development for projects that last
- Youtube: Corey Schafer — various topics for beginners to advanced users
- Advanced Python Mastery — exercise-driven course on Advanced Python Programming that was battle-tested several hundred times on the corporate-training circuit for more than a decade