几种不同的错误 “语言错” 口很容易被语言处理软件发现,甚至自动纠正。 “语义错” 口合格的程序员很少会犯这类错误。 解题逻辑错误 )“粗心”造成的错误。 常见(相对来说) “真正的”逻辑错误。 不常见,但这个是真的“伤脑筋”!
几种不同的错误 “语言错” 很容易被语言处理软件发现,甚至自动纠正。 “语义错” 合格的程序员很少会犯这类错误。 解题逻辑错误 “粗心”造成的错误。 常见(相对来说) “真正的”逻辑错误。 不常见,但这个是真的“伤脑筋”!
问题4: “Computers Do Not Err!' 你如何理解这句话?
Test and debugging A designer might try out an algorithm on several typical and atypical inputs and not find the error. In fact,a programmer will normally test a program on numerous inputs,sometimes called test sets,and will gradually rid it of its language errors and most of its logical errors. Most algorithmic problems have infinite sets of legal inputs,and hence infinitely many candidate test sets,each of which has the potential of exposing a new error
Test and debugging A designer might try out an algorithm on several typical and atypical inputs and not find the error. In fact, a programmer will normally test a program on numerous inputs, sometimes called test sets, and will gradually rid it of its language errors and most of its logical errors. Most algorithmic problems have infinite sets of legal inputs, and hence infinitely many candidate test sets, each of which has the potential of exposing a new error
|Debugging的局限性 Logical errors,someone once said,are like mermaids.The mere fact that you haven't seen one doesn't mean they don't exist. As someone once put it,testing and debugging cannot be used to demonstrate the absence of errors in software,only their presence. “someone”believed to be Dijkstra: Program testing can be used to show the presence of bugs,but never to show their absence! Also,Dijkstra believed to say: Programming is one of the most difficult branches of applied mathematics; the poorer mathematicians had the better remain pure mathematicians
Debugging 的局限性 “someone” believed to be Dijkstra: Program testing can be used to show the presence of bugs, but never to show their absence! Also, Dijkstra believed to say: Programming is one of the most difficult branches of applied mathematics; the poorer mathematicians had the better remain pure mathematicians
关于debugging的思考 ■为什么我们可以: The process of repeatedly executing an algorithm,or running a program,with the intention of finding and eliminating errors is called debugging?
关于debugging的思考 为什么我们可以: The process of repeatedly executing an algorithm, or running a program, with the intention of finding and eliminating errors is called debugging?