Skip to content

Updated AV2310 for local functions#155

Closed
bkoelman wants to merge 1 commit into
dennisdoomen:masterfrom
bkoelman:local-av2310
Closed

Updated AV2310 for local functions#155
bkoelman wants to merge 1 commit into
dennisdoomen:masterfrom
bkoelman:local-av2310

Conversation

@bkoelman
Copy link
Copy Markdown
Contributor

@bkoelman bkoelman commented May 7, 2018

No description provided.

@bkoelman bkoelman mentioned this pull request May 7, 2018
16 tasks

### <a name="av2310"></a> Avoid inline comments (AV2310) ![](/assets/images/2.png)
If you feel the need to explain a block of code using a comment, consider replacing that block with a method with a clear name.
If you feel the need to explain a block of code using a comment, consider replacing that block with a method or local function with a clear name.
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about this one. If the code becomes that much unreadable, a local function will not really help focusing on the current body. In that case, I would prefer to have a separate method or to properly encapsulate a concept that is now represented by primitive types. See also https://www.continuousimprover.com/2015/10/9-simple-practices-for-writing-better.html

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. Let's discard this PR then.

@bkoelman bkoelman closed this May 10, 2018
@bkoelman bkoelman deleted the local-av2310 branch May 10, 2018 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants