We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Washing away code smells

Formal Metadata

Title
Washing away code smells
Title of Series
Number of Parts
132
Author
License
CC Attribution - NonCommercial - ShareAlike 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
Does your code smell? Have a weird fragrance? It turns out code smells are a real thing and an amazing conceptualization of suboptimal design. This talk helps you identify code smells in Python. It also shows you how to wash them away by the technique of refactoring. You will learn the art of writing Pythonic, clean and maintainable code. Code smells refer to the symptoms of problematic code design. Identifying different types of code smells is the first step to successful refactoring. I will talk through some classic examples: Unnecessary long and complex code Using mutable data structures Uncommunicative naming Coupled code Knowing what to refactor, I will share a few learnings that lead to good quality code: The boy scout rule: always leave the code cleaner than you found it Pythonic data structures: Enum, Namedtuple The art of naming DRY and the separation of concerns principle I will also share tips on using refactoring at your company, which includes convincing your product manager, looking out for code smells during code reviews, and employing automatic tools.