YouTube

Got a YouTube account?

New: enable viewer-created translations and captions on your YouTube channel!

English subtitles

← 01-10 What We Learn Solution

01-10 What We Learn Solution

Get Embed Code
1 Language

Showing Revision 2 created 07/16/2014 by Udacity Robot.

  1. Okay, so if we passed this test case, then obviously, yes, we've learned at least that much.
  2. It isn't completely useless.
  3. Does our code pass any test case where we replaced 7 with a different integer?
  4. Well, maybe not--if you replace 7 with a gigantic integer--
  5. something you can't even store on your computer it's so big--
  6. then you're probably not going to get the same behavior
  7. out of these test cases with something simple like 7.
  8. We can't necessarily say this. I would say that as well.
  9. Now, our code passes many test cases where we replaced 7 with a different integer. This is true.
  10. If we were to replace 7 with say 20 and replaced it down here as well,
  11. then yes--this should behave essentially the same.
  12. And it should behave essentially the same for many, many integers.
  13. Certainly not integers that have very large stored space requirements,
  14. or maybe it doesn't store integers past a certain static typing.
  15. For example, if you're storing a type in your queue that is only able to store very small integers,
  16. let's say, shorts which are typically much smaller, then yes, this won't work.
  17. So the question is--what exactly do we learn,
  18. and how do we make test cases that represent large a number of other potential test cases
  19. so we don't have to write a whole lot of very small simple test cases?