分享 Debug 流程

yfractal · April 27, 2014 · 2530 hits

以下英文,全部引用自,ELLS 的第四章,第四节。是关于如何能高效的 debug 的,对于我来言,按照这个流程可以更快的解决问题。希望对大家有用!

Errors might happen because you mistyped something, because of a change in your environment or configuration, or any number of other reasons. Although we take steps in this book to minimize the pain, such as using Test-Driven Development (Chapter 6) to avoid many problems and providing a VM image with a consistent environment, errors will occur. You can react most productively by remembering the acronym RASP: Read, Ask, Search, Post.

Read for the error message

Ask a coworker

If you are programming in pairs, two brains are better than one. If you’re in an“open seating”configuration, or have instant messaging enabled, put the message out there. 有的时候,我们不是不知道如何解决,而是不知道问题是什么。 觉得在开发中,很重要的是 DRY,别人走错的路,没必要再走一遍。DRY 现在十分盛行,比如 facebook,可以一键初始化自己的开发服务器(在<<打造 facebook>>的 4.7)。再比如,使用这本书的公开课程,我记得就提供了搭建环境的脚本,emacs 的一些配置都直接解决好了。 很多时候,别人一句话,你可能需要很长时间去达到相同的效果。

Post a question on one of those sites if all else fails.

No Reply at the moment.
You need to Sign in before reply, if you don't have an account, please Sign up first.