← Back to context

Comment by phist_mcgee

4 years ago

You should almost _always_ focus on code readability and simplicity over inventiveness and cleverness.

Very few people I have encountered have complained about code being 'too simple' or 'too readable', but the opposite happens on a near daily/weekly basis.

Write comments, use a for loop, avoid global state, keep your nesting limited to 2-3 levels, be kind to your junior devs.

What does "use a for loop" mean here? Aren't for loops infamously difficult for new programmers to understand?

  • I think I successfully avoided writing for loops in application code for the last 3 years. I don’t miss them.