Paragraph of Code

A paragraph is a section of code within a longer function or method that belongs together, does something specific, and might make sense to extract and name as a method. Giving the section of code a name and explicitly stating the arguments, dependencies and return value would almost certainly be easier to read and reason about than an unnamed section of code.

You can spot code paragraphs without reading the code in any detail, they have one or more of these visual characteristics:

Sources

Back to All Code Smells