English subtitles

← Part 4

Get Embed Code
1 Language


Showing Revision 3 created 05/25/2016 by Udacity Robot.

  1. >> Okay, so after this there's a next gets the first character in
  2. the string using the read method.
  3. Also in this case, suitably followed by a semicolon.
  4. I hope that makes you happy.
  5. >> Oh, I'm very happy with that.
  6. >> That's great. And and
  7. then we print line in which we print this character that we just read.
  8. >> Okay, so, for, for 19 should we?
  9. This extra white space around next.
  10. This kind of goes back to, to line ten where we have some extra white
  11. space between the two brackets for, for the string.
  12. Is there a, what do you want to do there?
  13. We, we always want to have pad space around the functions, or
  14. the arguments into the function?
  15. >> Yeah, I guess that's something the editor data, that's not much fine with,
  16. you know, doing it with all the spaces.
  17. >> It's not consistent. [CROSSTALK]. >> Again,
  18. we need to have a standard of some kind.
  19. >> I think so. >> It's obvious you don't have any kind of coding standards.
  20. >> Yes. [CROSSTALK]. >> Most of this is copied code.
  21. [CROSSTALK].
  22. >> Yeah, it was copy and paste.
  23. So, so a hodgepodge of, of different styles.
  24. >> So, this old one is kind of no, no empty spaces around those variables.
  25. >> And the no copying of code from, from random forums online.
  26. That might be a good idea.
  27. >> Is that okay Dr. Bug from now onwards?
  28. >> Isn't that, doesn't that mean we're going to have to
  29. re-code stuff that we might save energy by copying?
  30. >> Well maybe if as long we're copying internal code that has the,
  31. the standard, the standard applies.
  32. Maybe we need to write something that's a standard checker for
  33. our internal use on it.
  34. >> [INAUDIBLE] Dr. Bug? >> Okay, so
  35. after this we enter into a while loop with the given condition.
  36. And the, at that point once we get into the while
  37. looper we check if the next character that we read is a blank.
  38. >> Actually, we have a problem here, we should be stopping when the next
  39. doesn't equal the sentinel, otherwise we're just stopping maybe immediately.
  40. Do we ever enter this loop?
  41. >> Unless the first character is the [INAUDIBLE].
  42. >> Our count, our count will be zero.
  43. We're not going to count the blanks if we,
  44. because we want to stopiat a period, correct?
  45. We're going to read the number of blanks in a sentence and stop.
  46. At least that's how I'm reading it.
  47. >> Oh, oh yeah sorry about that one.
  48. Yeah I was coding in a hurry.
  49. I'm sorry and it's yeah, you, you're right.
  50. This should be the, the while next is not a sentinel.
  51. And I, yeah and I have to apologize,
  52. because I kind of came through that when I was going through.
  53. I should have looked at that more carefully while doing the reading.
  54. >> Or maybe you just copied somebody's while loop and
  55. didn't even bother to check what it was about.
  56. >> Well, in this case I think it's actually my fault so, sorry about that.
  57. >> Oh. >> Cannot blame everything.
  58. >> We're so happy you apologized.
  59. >> Cannot blame everything on Bob.
  60. >> If we could just for
  61. a second revisit every other thing we've talked about previously.
  62. I just so, I'm supposed to be recording the severity, so
  63. I assume all the severity of everything up til just now is minor.
  64. Is everybody good?
  65. And this is our first really major severity.
  66. >> That sounds reasonable.
  67. >> Defect. >> Mm-hm.
  68. >> What are our severity levels?
  69. >> Well, according to our little log here, we only have major and minors.
  70. >> Okay. >> [LAUGH] >> So then, yeah, I would agree with that.
  71. I, some, some of the things that were tried to put in between but
  72. we don't have an in between, so I think you've got it right.
  73. It's the best we can do with what we've got.