Im_too_old_for_this_shit's blog

By Im_too_old_for_this_shit, history, 9 years ago, In English

I wonder whether there are good ways to become a bugless coder. Do I need to build some style. I am mostly interested if the top teams of ICPC train their coding by some specific ways (except participating in contests). Good books (or links) teaching the principles of good coding are welcome.

»
9 years ago, # |
  Vote: I like it +14 Vote: I do not like it

If you encounter a bug ask yourself a question "Is there an automated way of preventing such bugs in future?" For example adding flags locally could help you discover things which are probably not as they were meant to be (like not returning anything from function with int type) or out of memory reads (which are typically not discovered during execution on small testcases). Worth reading: http://mirror.codeforces.com/blog/entry/15547 Of course there are other methods of automated bug prevention not connected to flags.