Hacker News new | ask | show | jobs
by yodsanklai 2973 days ago
When you write "FOR(i,n)", instead of "for (int i = 0; i < n; i++)" you only write "i" once instead of 3, which makes it less likely to make mistakes.

That being said, I've found that competitive programmers sometimes write extremely ugly code. It's surprising to see how they are able to solve such complex problems, and yet can't (or don't value) write readable and structured code. Maybe they are so sharp that they don't feel the need to make their code more readable.

1 comments

Well, when your code has a lifetime of five hours max, readable doesn't matter, correct does.