如果状态信息由被调用者保存,那保存和恢复代码每函数一套;
If the status is saved by the called procedure, the save/restore code is generated once per procedure;
最近研究显示,平均起来,开发者在每一千代码中有100到150个错误。
Recent studies show that, on average, developers make 100 to 150 errors for every thousand lines of code.
如果应用程序的可见的,在代码执行中就可以单步调试每一行代码。
If the application is visible, you can step through each line of code as it runs.
So there's a return branch on every possible path through the code. And that's valuable, it's something you want to think about as your right your own.
所以代码中每条可能的路径,都会有一个返回值分支,这是非常有价值的,当你自己写程序的时候也应该考虑这件事。
First one, when I write a piece of code, especially code that has branches in it, when I design test cases for that piece of code, I should try and have a specific test case for each possible path through the code.
第一点,当我们写代码的时候,尤其是一些含有分支语句的代码的时候,当我为这些代码,设计测试用例的时候,我应该为每一个可能的程序路径,都设计一个特别的用例。
If it does, then execute each of the instructions in that block.
这块代码内的,每一个指令。
应用推荐