Refactor, Optimize, and Test: Crafting Cleaner Python Code
- Track:
- ~ None of these topics
- Type:
- Talk
- Level:
- intermediate
- Duration:
- 30 minutes
Abstract
In software development, messy, outdated, or inefficient code is inevitable. We have to deal daily with old code that has not been touched for years, refactoring allows us to keep the code maintainable and easy to extend without altering its functionality, and it plays a crucial role in enhancing maintainability, readability, and performance.
This session explores the how, when, and why of code refactoring with code smell examples, coupled with practical insights on performance profiling techniques, tools and how it affects Refactoring. Also exploring how testing is very crucial when it comes to Refactoring.
Whether you're dealing with legacy code or looking to enhance your development workflows, this talk equips you with the tools and techniques to write cleaner, more efficient Python code.
This session is inspired by Martin Fowler's seminal works on refactoring and Python-specific insights shared at EuroPython 2024.