If you were reading a book in your warm bed on a cold winter's day,you might say you were snug as a bug in a rug.
VOA: special.2010.12.26
So you say well, rather than rushing off and fixing this one bug, let me pull back and ask, bug is this a systematic mistake that I've made throughout the program?
因此我们应该回头想想,这是不是我在整个程序中都,在犯的一个系统性错误,而不是匆匆忙忙的去修复这一个,如果确实是系统性错误的话?
And you'll see at the bottom, bug it says the first actual case of a bug being found.
然后程序就正常工作了,因此这就是第一个被发现的。
If you were reading a book in your warm bed on a cold winter's day, you might say you were snug as a bug in a rug.
VOA: special.2009.06.28
It solves a slight bug if we don't use it at all, but more on that in the future when you talk about files and creating files.
它解决了一点缺陷,如果我不用它,但是更多的是在以后当你们讨论,文件和创建文件时。
If so,you might say he put a bug in your ear.
VOA: special.2009.06.28
bug This is an easy bug to come up with. But imagine, if you don't do the test, you're going to get answers that don't make any sense.
这是一个容易发现的,但是想象下,如果你没做测试的话,你会得到没有意义的答案,实际上。
All right. What do you do when you've found the bug and you need to fix it?
好了,当你发现错误并修改它们的时候,你该怎么做?记住一个古老的法则?
The problem is, things that you catch here are bug actually the least worrisome bugs.
问题是,这儿你捕捉到的问题是,隐患最小的。
bug And maybe by understanding why it worked on a and not on b, you'll get a lot of insight that you won't if you just focus on the bug.
发现很多东西,而你只关注,本身的话就发现不了这么多东西,如果知道你的程序至少还对。
Just a few small points. First of all, keep in mind that the bug is probably not where you think it is. Because if a bug were there, you'd have already found it.
第一,记住错误可能不是,发生在你认为的地方,因为如果那儿有一个错误,你可能已经找到了它。
So you try and find a smaller input that bug will produce the problem.
你应该尝试着用规模小一点的输入,去重现这个。
bug You put it there. i.e. you made a mistake.
一个错误这种方式来制造了这个。
bug If you find a bug, it probably means there bug are more of them. So you ought to be bug a little bit careful. The story I've heard told is you're at somebody's house for dinner, and you're sitting at the dining room table, then you hear a .
对不对?你得修复这个,如果你发现了一个,可能就意味着还有更多的,因此你应该小心点,我听说的一个故事,是当你在别人家吃饭的时候,你坐在餐桌上呢,然后听到了邦的一声响。
bug You're gonna run into innumerable bugs most likely, by bugs we mean mistakes, - behaviors that you didn't quite intend and yet they seem to be-- and yet your program seems to be misbehaving in some sense.
你可能会制造数不清的,对了,我们称bug为错误或,你完全没有预料到的行为,但是它们的确存在-,这样看来,你的作品在某种意义上可以说是行为不端。
it turns out, that this will be a bug, and I want you to think about why it's wrong for me to put this check here.
结果表明我们这儿有一个漏洞,我希望你们去想一想为什么,我把这个check放在这儿就出现漏洞了。
How to fix it. When I think about debugging, I think about it in terms of what you learned in high school as the scientific method.
怎么来修复bug,当我谈论到调试的时候,我认为你们应该依照在高中,在科学方法学中学过的。
Now, should you be proud when you find a bug?
好,那么当你发现一个bug的时候?
应用推荐