Lecture 11: Testing and debugging
Instructors: Prof. Eric Grimson, Prof. John Guttag
View the complete course at: http://ocw.mit.edu/6-00F08
License: Creative Commons BY-NC-SA
More information at http://ocw.mit.edu/terms
More courses at http://ocw.mit.edu
@ikartik90
1) tmp = res
In version #1, temp is assigned to = res. res is a list. therefore, when tmp is changed res is also changed (the professor called it an creating an alias)
when a list is assigned, changes go both ways. a change to list 1 changes list 2, and a change to list 2 changes list 1.
2) tmp = res[:]
In version #2, the program creates a copy (i.e. clone) or the list res. now when tmp is changed, res is not changed.
ronmexico00 3 weeks ago
Isn't it funny that in 1947 they had so many people working on a solution for arctan().
I wonder why THAT could have been. This is the face I make when I'm totally puzzled...
Realitydenizen 1 month ago
Can anyone elaborate the cloning part? I didn't quite understand it. How does the cloning thing work?
I understand the rest. And a commendable lecture by the way, thanks to Mr. Guttag
ikartik90 2 months ago
Got here by typing "just typing randomness in the search bar" in the search bar. :D
jeremu5 2 months ago
Nosebleed! He deserves commendations. He's a great lecturer.
agapitoflores001 3 months ago
such professors give the moral to continue
mclaarson 4 months ago
SO that's why they call it a BUG! haha nice =D
LXBD 5 months ago
Debugging is a darn boring topic... and I think it feels quite a bit more boring when it already logical to one to be systematic. Still a good lecture. I bet many would need it.
arngorf 6 months ago
Awesome lectures, thanks MIT
jcliberatol 6 months ago
@mazterarius
You're complaining about free MIT lectures. Perhaps it's time to remind yourself that you are entitled to precisely dick.
Daim0th 7 months ago in playlist MIT 6.00 Intro to Computer Science & Programming, Fall 2008