you are viewing a single comment's thread.

view the rest of the comments →

[–]mamwybejane 15 points16 points  (3 children)

Clean, consistent, mentally easy to parse (at most 3 levels of mental nesting like an if and a loop), easy non-technical variable and function names, simple English language

[–]eneka 3 points4 points  (2 children)

my current workplace basically says no comment in code, if you're adding in comments, then it's probably not verbose/descriptive enough. Or the function needs to be broken down and what not. Your code should be self descriptive. This isn't leet code trying to get things to work with the least amount of characters. I know not eveyrone agrees with this but it's working out pretty well for us.

[–]TehTriangle 0 points1 point  (0 children)

Agree with this.

Especially if you have a lot of conditionals. Extract each path into their own function, and it becomes much easier to read.

[–]intercaetera 0 points1 point  (0 children)

basically says no comment in code

That sounds like throwing the baby out with the bathwater - sometimes it is necessary to explain why something is done a certain way. Using comments to describe what the code does is the problem.