MIT《Introduction to Computer Science and Programming》: Testing and Debugging
来源:互联网 发布:淘宝卖小样的正品店 编辑:程序博客网 时间:2024/05/18 03:59
1. testing
unit test: each piece of program independently(functions, classes)
integration: overall program
test suite: 1) small enough: we can test in reasonable amount of time. 2) large enough: to give us some confidence that the program is right
2. debugging
A large part of being a good programmer is learning how to debug.
A transferable skill.
not random: be systematic searching through the list.
how to be systematic:
1) study the program text & ask how could it have produced this result.
以不懂这段代码的心态去读它。不是问为什么没有得到自己想得到的结果,而是为什么会得到自己没有想要得到的这个结果。
2) is it a part of family?
3) how to fix it:
study available data
找出哪些数据会产生这个结果,哪些不会。
design & run a repeatable experiment: know the expected results
using binary search to get the bug(print values)
给代码分区一半一半地找
可以同时输出变量的值在代码对的情况下应该的是什么 what it should be?
- MIT《Introduction to Computer Science and Programming》: Testing and Debugging
- 6.00 Introduction to Computer Science and Programming lec6: Debugging
- 看后总结(Introduction to Computer Science and Programming,MIT 600)
- 6.00 Introduction to Computer Science and Programming lec1
- 6.00 Introduction to Computer Science and Programming lec2
- 6.00 Introduction to Computer Science and Programming lec3 & lec4
- 6.00 Introduction to Computer Science and Programming Lec 9: Set
- 【学习笔记】Introduction to Computer Science and Programming
- 6.00 Introduction to Computer Science and Programming Lec 8: Efficiency and Order of Growth
- 6.00 Introduction to Computer Science and Programming Lec 9: Lecture 9: Memory and Search Methods
- 6.00 Introduction to Computer Science and Programming lec5: Objects in Python
- Computer Science and Programming: Books and Resources
- mit 6.00 introduction to computer science using Python video note
- Computer and Computer Science
- MIT Electrical Engineering and Computer Science 参考书整理
- http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/
- 【MIT 公开课】Computer Science and Programing Lession1
- 【MIT 公开课】Computer Science and Programing Lession2
- Relay:一种内核到用户空间的高效数据传输技术
- Android 入门 (五) android的模拟器定制
- iPhone开发工具篇-利用xcode profile和analyze进行性能优化
- 解决拖动无标题窗口时无法同时响应ButtonDown和ButtonUp消息的问题
- 辛星浅析WordPress中的get_option
- MIT《Introduction to Computer Science and Programming》: Testing and Debugging
- POJ 2296 Map Labeler(二分边长+2-sat判解)(经典题)
- Truck History
- java.util.Date、java.sql.Date、java.sql.Time、java.sql.Timestamp区别和联系
- MFC - EXCEL表格
- MemStore刷写线程—MemStoreFlusher源代码分析
- struts2上传图片后并显示图片
- 在本地部署Metro应用程序的方法
- 1.GitHub启程