Version 1.0

Vortrag: Washing away code smells

Yelp burst positive rgb

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 develop you code nose through identifying Python code smells. 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
Useless code
Coupled code
Inappropriate naming

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
Good practices in Python
Good use of data structures
The art of naming
DRY principle

Refactoring also makes testing easier. I will discuss how to write unit tests that cover all use cases. Finally I will talk about integration testing strategies that ensure that you and people who want to modify your API in the future are not breaking upstream code.

Info

Tag: 05.05.2018
Anfang: 10:00
Dauer: 00:30
Raum: F0.01
Track: PyDays
Sprache: en

Links:

Dateien

Feedback

Uns interessiert deine Meinung! Wie fandest du diese Veranstaltung?

Concurrent Events