"We are working to establish a network and a system of protection of children and also to try to report cases of abuse and exploitation and try to save these children, put them in transit centers, try to recontact the family, and put them back with the family or with the extend family when the parents are not there or are not suitable to take care of the children,".
VOA: standard.2009.04.24
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.
第一点,当我们写代码的时候,尤其是一些含有分支语句的代码的时候,当我为这些代码,设计测试用例的时候,我应该为每一个可能的程序路径,都设计一个特别的用例。
And we noticed the built in pressure to try to bring into alignment our judgments about particular cases and the principles we would endorse on reflection.
然后我们发现,要在特定案例之下,自圆其说我们的判断,校正我们一再确认的原则,难度越来越大。
We then have to get down to facts about cases, try to describe the instance, perhaps somebody who's in the terminal stages of some illness where they're in a great deal of pain.
然后我们要区分各种情况,尝试描述某个特定的例子,也许某人在某种疾病的晚期,他们在承受巨大的痛苦。
So, summarizing better, assert is something you put in to say to the user, make sure you're giving me input of this type, but I'm going to guarantee you the rest of the code works correctly. Exceptions and exception handlers are saying, here are the odd cases that I might see and here's what I'd like to do in those cases in order to try and be able to deal with them.
所以更好的总结下,断言就是你放在那里告诉用户,保证你输入的是这种类型的,但我能保证剩下的代码运行正确,异常和异常处理做的事,这里有些我能预期的异常情况,并且这里有些情况,我能尝试处理。
应用推荐