7. Testing, Debugging, Exceptions, and Assertions

preview_player
Показать описание
MIT 6.0001 Introduction to Computer Science and Programming in Python, Fall 2016
Instructor: Dr. Ana Bell

In this lecture, Dr. Bell discusses testing, debugging, and exceptions and assertion statements in Python.

License: Creative Commons BY-NC-SA
Рекомендации по теме
Комментарии
Автор

*My takeaways:*
1. Defensive programming: testing/validation and debugging 4:20
2. Three classes of test: unit testing, regression testing and integration testing 6:25
3. Testing approaches: natural boundaries for numbers, random testing, black box testing and glass box testing 7:45
4. Black box testing is based on specification, an example 9:05
5. Glass box testing tries to test every single path of the code 10:20
6. Using the print statement to debug 15:17
7. General debugging steps 17:20
8. How to debug logic errors 18:42, try rubber ducky debugging
9. Do and Don't 20:00
10. Exceptions 21:40
11. Assertions 37:45

leixun
Автор

She's really easy to learn from. Thank you for teaching and positing this online without charge

denisecarillo
Автор

Dr. Anna Bell is a great instructor, Thank you MIT OCW for making this high quality content online absolutely for free.

dhruv_aditya
Автор

Amazing how she gets better as the lectures go on

rooneymara
Автор

although i am not a native or the best in english, i can hear every word and understand her
i want to thank you a lot Dr. Ana

mohammadsamir
Автор

"Decide it's high protein and declare it a feature".
That's hilarious. ahahah

Saganist
Автор

pre labeling
​​0:01:02 We aim for high quality - an analogy with soup 0:02:00​
0:03:46 Programming so far
0:06:48 Classes of test
0:08:02 Testing approaches
0:10:00 Glass box testing ​0:11:02 ​0:11:48 ​0:14:00​ 0:16:00
0:17:26 Debugging steps 0:19:33
0:20:05 Don't and Do
​0:22:16 Other types of exception 0:24:08 ​
0:25:41 Handling specific exception
0:27:09​ Other exception
0:28:15 What to do with exception
0:31:15 ​Example : Raising an exception 0:32:00 0:33:52 ​
0:35:31 ​Option 1
0:37:01​ Option 2
0:38:38 Example
0:40:48 Where to use assertion

flvsedl
Автор

Dr.Hanna, you are awesome instructor and you made learning fun. Thank you very much!!!!

davidorsa
Автор

Watched so many videos but only Dr Ana Bell's one stuck! Thank you!

TheMinaProject
Автор

At 26:42 she says that she couldn't think of an error that would be raised besides these two. I thought of one: if a/b is too large, Python won't be able to represent it as a float and would raise an OverflowError

jesuelmarques
Автор

Where was this video when I started learning programming, would've saved me a lot of time

DistortedV
Автор

this lecture was a godsend, feeling a lot more eager and motivated to learn programming, especially when there are tools at your disposal when shit hits the fan !!

IACOIACOIACO
Автор

Love this session, fund very easy and clear and fun. Thank you so much for sharing..

PradeepKumar-gqej
Автор

26:35 for the last case, it will raise an Exception on interrupts like KeyboardInterrupt when you press CTRL+C. Programmers should be careful having broad except cases. If you had an infinite loop that caught all exceptions it would be hard to kill the program.

Lexaire
Автор

perhaps the most valuable lecture in this series

jiakai
Автор

Your voice and words are very clear good for concentration

bla
Автор

26:43 one more exception can be KeyboardInterrupt

alexandrugheorghe
Автор

this proffesor is really great i wish i could study for her

oussematoussli
Автор

You are the best👏🏻👏🏻❤️ thanks Professor Anna

jojojojo
Автор

Does anyone know in which video she talks about the Rubber Ducky?

aviliocarcamo