# Why Short Methods Improve Code Readability and Testability

DevFeed: [Why Short Methods Improve Code Readability and Testability](<https://devfeed.tech/articles/short-methods-ftw-39031.md>)

Original publisher: [Read original article](<https://vladimirj.dev/short-methods-ftw/>)

Author: Vladimir Jovanović

Published: 2017-10-02T22:44:00Z

Content type: opinion

Language: en

Sources: [Vladimir Jovanović](<https://devfeed.tech/sources/vladimir-jovanovic.md>)

Topics: [functions](<https://devfeed.tech/topics/functions.md>), [Code](<https://devfeed.tech/topics/code.md>), [Refactoring](<https://devfeed.tech/topics/refactoring.md>), [context](<https://devfeed.tech/topics/context.md>), [test](<https://devfeed.tech/topics/test.md>)

Tags: [clean-code](<https://devfeed.tech/tags/clean-code.md>), [code](<https://devfeed.tech/tags/code.md>), [context](<https://devfeed.tech/tags/context.md>), [design-patterns](<https://devfeed.tech/tags/design-patterns.md>), [functions](<https://devfeed.tech/tags/functions.md>), [programming](<https://devfeed.tech/tags/programming.md>), [refactoring](<https://devfeed.tech/tags/refactoring.md>), [software-architecture](<https://devfeed.tech/tags/software-architecture.md>), [software-development](<https://devfeed.tech/tags/software-development.md>), [test](<https://devfeed.tech/tags/test.md>)

## AI overview

The author argues that methods should generally be short--often around 10 lines, with 25 lines as an upper limit--because they are easier to read, understand, test, and maintain. The article also explains how developers' implicit context can make long methods seem clearer to their authors than to future maintainers.

## Source excerpt

My boss came to me and said: "Every method that you write should be less than 25 lines long" and I laughed, I laughed hard, right in his face. I was such a plonker!