Rules

Secret ingredients to quality software

Edit
Info

Do you refactor your code and keep methods short?

Created on 23 Apr 2018 | Last updated by Matt Goldman on 14 Dec 2020 08:44 PM (4 months ago)

Refactoring is all about making code easier to understand and cheaper to modify without changing its behavior.

As a rule of thumb, no method should be greater than 50 lines of code. Long-winded methods are the bane of any developer and should be avoided at all costs. Instead, a method of 50 lines or more should be broken down into smaller functions.

Adam CoganAdam Cogan

We open source. This page is on GitHub