错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Debugging

  • John F. Dooley,
  • Vera A. Kazakova

摘要

Congratulations! You’ve finished writing your code so now it’s time to get it working. No matter how good of a programmer you are, mistakes will happen: logical mistakes, typos, forgotten edge cases, off-by-one errors, your keyboard failing to register a keystroke, your cat making some edits while you weren’t looking... Mistakes are a natural part of the code’s lifecycle. After writing code for many years, we have gotten to the point where most of the time our programs under 50 lines don’t have any obvious errors and often even compile on the first try, behaving approximately as expected. We think that’s a pretty solid place to aim for.