Code Smells

Code Smells / Bloaters / Long Method

Long Method code smell icon

Long Method

Long Methods are methods that span too many lines. When a method gets too long, perhaps it is responsible for more tasks than it should be.

def long_method(self):
    # Do first thing
    
    # Do second thing
    
    # Do third thing
    
    # Do fourth thing
Left chevron Right chevron

Books about code smells

Learn to write better smelling code.

Refactoring: Improving the Design of Existing Code book cover

Refactoring: Improving the Design of Existing Code

Code smells: A Predictor of Remarkable Quality Improvement book cover

Code smells: A Predictor of Remarkable Quality Improvement

Clean Code: A Handbook of Agile Software Craftsmanship book cover

Clean Code: A Handbook of Agile Software Craftsmanship

I receive a commission on sales made from the above affiliate links.