14 Comments

Good advice. I've seen most of these, but had not seen the tip on "Use Is/Has/Should/Can Prefixes" with booleans. I'm experienced enough now to do that automatically, but it is good to see it spelled out regardless. It is certainly of benefit to learners.

Expand full comment

Great article: simple to understand and apply the recommendations next

Expand full comment

A simple but yet very effective tip. Great article, friend!

Expand full comment

Thanks my friend!

Expand full comment

Returning early is one of my favorite tricks to reduce complexity!

Good compilation, Daniel.

Expand full comment

Thanks my firend!

Expand full comment

I'll echo what Vinny has already said - great job!

Expand full comment

Great content! :) and I’m checking the TDD course at the moment 😜

Expand full comment

Great Article!

Expand full comment

thank you bro for this article, clear and concise

Expand full comment

thank you

Expand full comment

thank you for this great article, clear and concise.

Expand full comment

Some great tips my friend!

Expand full comment

Re Reduce Nesting with Early Return

Reducing if-then-else nesting is a good thing. The refactored code checks each parameter, in its own bit of code.

Structured Programming has single entry and single exit to code section, so one return statement at end.

If you want to place some debugging code/breakpoint before the return, there is only one place.

The other naming tips are useful to avoid the dreaded double negative

Expand full comment