Slides for my talk at PyData London 2023
"Code Smells in Data Science: What can we do about them?"
[Update:] Unfortunately, the recording from the conference is still not available, but I presented the same talk at the MLOps Community’s Bristol meetup: [link]
The title of my talk:
Code Smells in Data Science: What can we do about them?
I’ve been asked for the slides by multiple people. See them at the end of the post. I will share the recording as well when they are available.
Join the “Code Quality for Data Science” community. Invite link at: https://cq4ds.com/
I started with this awesome picture of a peregrine falcon and a B2 bomber and the classic aviation quote:
“If it looks good, it flies good.”
Quick summary:
Why do we care?
Programming is communication
Communication needs a language
We read more than we write
What do we mean by “Code Smell”?
Tech Debt vs Code Rot
_Might_ cause problem
What is refactoring?
Changing the code without changing its behaviour
Martin Fowler: Refactoring: Improving the Design of Existing Code
Quick plug to my talk last year:
Readability issues:
Dead and unreachable code
Comments explaining code
Excess variables
Improper variable scoping
Too many levels: if statements
Too many levels: for loops
Multiple returns
Code Smells
Bloaters: Long parameter list, Data clumps, Primitive obsession
Couplers: Feature envy, Empty class, Middle man, Message chain, Speculative Generality
Boolean parameters
Establishing a culture
Code review
Total cost of ownership
Developer happiness: Autonomy - Mastery - Relatedness
Slides can be downloaded from here:
Join the “Code Quality for Data Science” community. Invite link at: https://cq4ds.com/