I made a lot of mistakes in my first 6-12 months as a developer in the industry and learnt a lot of new habits the hard way. This one in my opinion is by far the most important! I found I had a good level of competence learning new technologies and h...

Markdown supported · ⌘↵ to post
As the post was written for people starting into the industry this is an example of clean code. You could argue this is cleaner:
private bool test(int x, int y)
{
if (x == y) return true;
return false;
}
But this not as readable for someone who may have 0 experience in the industry and self taught. Separation of methods, naming and unnecessary code was mostly the point around this, being the SOLID principles as a developer.
If you prefer I can update this with more advanced understanding to keeping methods clean.
Art Stępkowski
Are you sure that:
if (newLevelOfHappiness == maxHappiness) { return true; } else { return false; }is an example of clean code?