English sottotitoli

← Part 8

Ottieni il codice di inserimento
2 Lingue

Mostrare Revisione 3 creata 05/24/2016 da Udacity Robot.

  1. 'Kay. And then they know I catch any exception because we know
  2. that every time I, well, I'll just do it, okay?
  3. >> Do we mentioned that line 34 prints the wrong?
  4. >> Yeah. >> It prints that. [CROSSTALK] Prints next to the [INAUDIBLE]. >> Yeah.
  5. >> Yeah. >> Sorry. >> You need to make a note of that, though.
  6. >> Can we put? >> Who's checking the the recorder?
  7. >> [CROSSTALK] Crazy Bob.
  8. [INAUDIBLE] here?
  9. Major, major, our majors are what we had the not equal to sentinel.
  10. That needs to change.
  11. >> Right. >> We're not checking for a period or have the exception.
  12. >> We're printing every character on new line as an int.
  13. >> Okay, that's pretty good.
  14. >> There's questions about whether the loop even terminates in
  15. the network between the wrong variable.
  16. >> Okay. I shouldn't catch, can, are we going to, you know,
  17. catch beyond its own line or catch comes after, you know, on, on line 36 there.
  18. Should, should we, is there, do we want to talk about a standard for that?
  19. >> I personally like this style.
  20. I mean, the, I think this is the, the new style or whatever.
  21. I like this line.
  22. This where the, the opening curly brace is on the same line and
  23. then the close curly brace on [INAUDIBLE].
  24. >> Actually, Crazy Bob and I talked about that a lot and
  25. we thought that, that was a, a nice way to put the code.
  26. And again, we wanted to define the standards as different we can do
  27. it in [INAUDIBLE].
  28. >> Guess that mix-up coding were discussed between the two of you.
  29. >> Just [INAUDIBLE].
  30. >> That's interesting.
  31. Well, we named-
  32. >> We were talking about how ADA,
  33. you know, ADA doesn't even use these curly braces.
  34. I mean, you, we could begins and ends and
  35. then it's really clear exactly where these blocks are beginning and ending.
  36. We wouldn't having all these crazy Java problems that we've got.
  37. >> Which you know Crazy Bob.
  38. It's from pre-Civil War era.
  39. So.
  40. >> Yeah. >> We, you, you need, need to be careful when you listen to him.
  41. You know, one thing that's bothering me.
  42. I keep looking at this thing, is that here's a piece of code,
  43. you're claiming that you read it.
  44. But there's no header in this code that says, you know,
  45. this is a Doctor Bug's code, the revision of the code.
  46. Any of that kind of information, which is typical in,
  47. in software engineering, and we know who's it is, how it's revised.
  48. If other people been making new versions of it, we know who they are,
  49. what the dates of, of, of each revision, original development art, et cetera.
  50. None of that is in here.
  51. >> So that ten years from now the maintainers can call you up in the middle of
  52. the night and, and ask you what you were thinking?
  53. >> Could the number of bugs in this code is clear-
  54. [CROSSTALK]. >> Right, no Java down here.
  55. >> In this case it might be appropriate if you also put the sources
  56. of the different places you visited [INAUDIBLE] copy and pasted code.
  57. That might be.
  58. >> Okay, that was just a minor.
  59. I mean I really copy a coupled of things, not too much.
  60. >> [CROSSTALK] Oh. Okay.
  61. >> But that's sure.
  62. I mean I, I-
  63. >> Like the while statement that's incorrect.
  64. >> Mm-hm.
  65. Yeah. >> Yeah. >> Well, I think I told you before that the while statement is
  66. actually my mistake.
  67. [CROSSTALK].
  68. >> The point has been made, very good to talk about continuity.
  69. >> Okay.
  70. So, at this point yeah.
  71. That the cases.
  72. >> We're going back to line 36,
  73. I believe it's improper to catch just a generic conception.
  74. You're supposed to catch the most specific catch you're actually expecting.
  75. >> Generic catching,
  76. catching generic conceptions is just catching generic conceptions.
  77. That's just to cover your behind kind of thing.
  78. >> Yeah.
  79. >> [CROSSTALK] Actually trying to catch IO exceptions.
  80. I believe there should be IO exception to the rule.
  81. [COUGH]. >> Yeah I was just trying to be comprehensive, because you know,
  82. this way an exception that happens will be caught.
  83. >> Sure. >> We need an exit-able system without printing anything is
  84. also really bad.
  85. I mean, we should be writing to the logger.
  86. >> In the case of where the exception was raised.
  87. >> Yeah, in the case where the exception was raised.
  88. I'd call that, definitely, a major.
  89. Both of them.
  90. I don't know if my colleagues agree with that or not.
  91. >> So, we need to catch specific, and then have a generic catch that follows?
  92. Is that what we're saying?
  93. >> We just catch the ones we were actually expecting.
  94. >> What about the ones that we don't expect?
  95. We're not, we won't get any information about those will we?
  96. >> Well you know if we were using eta they have a catch all at the end that we
  97. could always.
  98. [CROSSTALK]. >> There. >> Well enough with this eta stuff.
  99. >> [LAUGH]. >> I think we are using Java and so we'll have to deal with that.
  100. Again I think we should make that also part of the quoting standards.