Okay let me get back to where I was.
Okay, so we declared the two variables, and then there's two print lines
the first one >> Excuse me did, did the recorder correct the comments?
To make, make note of the errors in the comments that,
that >> Slash asterisk should our new standard coding as well.
>> Yeah these easier being pointed out, that we should be,
it's said that they're characters but they were declared as integers.
>> For int next, it says next character is that it?
>> Yeah. >> Put a line through.
>> The implication is that you're confused about characters versus integers.
>> Mm-hm, even though the representation was also signed.
>> Okay so as I was saying there is two print statement,
the first one prints to the user, enter a sentence ending with a period, and
the second one says, follow each character buy a return.
>> We have a typo.
>> Yeah, I guess, buy should not really be buy, >> And
also probably, follow, should be capitalized, right?
I mean it's a separate sentence so
you're trying to [COUGH] write it as a sentence.
>> Or it should be all on one line, because you're,
you're breaking at interest and it's ending with a period oh, okay, I see.
>> But it also, it's interesting,
Interest in it is ending with a period doesn't have a delimiter at
the end where it's follow each character by a return does have a delimiter.
>> Should that be, have a colon there?
>> It seems like we're really getting stuck on minor details.
>> I think so too, let's move on, let's move on back to Dr.
Bug, please continue.
>> So a character is, misspelled.
>> It's charcter.
>> Just making, I think it's making for bad user experience, we don't, we don't,
you know >> Yeah, actually I think I was just copy and
paste in here from someone elses code, but that's fine.
Yeah, I think it's. [LAUGH] >> Is that what we do now?
Is we copy, copy from other people's [CROSSTALK].
>> Well, it's just this, you know?
This was [CROSSTALK].
>> Whose was it that we copied from?
>> It was part of a log, I mean, I think it was actually Crazy Bob's code, but
[LAUGH] I could be wrong.
>> It wasn't my code because it's not in native.
[LAUGH] >> Yeah. >> It was a native piece of code.
>> In fact, if we could just back go back and revisit, 13 and
14, you know, this initialization problem wouldn't even be
occurring because you can't have uninitialized data in aid.
So if we'd actually done what we said,
what I said originally, we wouldn't be having these problems.
>> You, you're absolutely right, I forgot about that.
Crazy Bob bring,
brings up some excellent points, about this lousy code we're looking at.
>> I have to say, actually, I'm pretty sure that in Java, when you
declare a lock of variable like this, it gets initialized automatically to zero.
But I might be wrong.
>> That's the instance variables that are initialized, and
the local variables are not initialized.
>> Okay, maybe I'm wrong then >> Even if there are automatically initialized,
good code behavior would be that you actually initialize them so
everybody doesn't have to remember whether it works or not.
>> Well, just, you know, I was used to developing data, so that's reality.
>> Yeah [LAUGH].
>> Okay, let us continue Dr. Bug.
좋습니다. 내가 어디에 있었는지로 돌아가 봅시다.
좋아요. 우리는 두 변수를 정의했습니다. 그리고 그 뒤에 두 개의 프린트 선이 존재했습니다.
첫 번째는, 실례합니다. 기록 장치가 코멘트를 옳게 정정했나요?
코멘트에서 오류를 언급하기 위해서,
슬래쉬 별표가 마찬가지로 새로운 기준 코딩이어야 하는가요?
네. 이들은 지적하기가 더 쉬운 것들입니다. 우리는 그렇게 해야 합니다.
여기서 그들이 문자이고 그러나 그들을 정수라고 말해야 한다고 말하고 있네요.
다음으로, 이건 다음 문자가 저것이라고 말하고 있나요?
네. 선을 드리웁시다.
이것의 의미는 우리가 문자와 정수에 대해서 혼란스러워 한다는 점입니다.
흠. 표시를 나타냈는데도 불구하고요.
좋습니다. 그러므로 나는 두 개의 인쇄문이 존재한다고 말하고 있었습니다.
첫 번째가 사용자에게 출력됩니다. 기간으로 끝나는 문장을 입력합니다.
두 번째것은 되돌아가기를 사서, 각 문자를 따라야 합니다.
오타가 있네요.
네. 제 생각에 buy가 정말로 buy가 되어서는 안됩니다. 그리고
또한 아마도, follow를 대문자로 써야 하죠. 그렇죠?
내 말은, 이것이 나뉘어진 문장이기 때문에
우리는 [기침] 문장으로 이것을 쓰려고 시도하고 있습니다.
아니면 이것은 한 선 위에 모두가 있어야 하는 것입니다. 왜냐하면
우리가 문장을 나누고 있습니다. 그리고 이것은 기간으로 끝나고 있습니다. 아 좋습니다. 알겠습니다.
그러나 이것은 또한, 이것은 흥미롭네요.
이 가운데에서 흥미로운 사실은 기간으로 끝나는 것의 마지막에 경계기호가 없다는 것입니다.
이 지점에서 이것은 되돌아가기를 써서 각 문자를 따르는 지점에 경계 문제가 없습니다.
거기에 콜론이 있어야 한다는 거죠?
우리가 중요하지 않은 세부 사항에서 우물쩡 거리고 있는 듯이 보이네요.
내 생각도 그렇습니다. 계속 해보죠. 닥터 버그로 돌아가 봅시다.
계속 해주세요.
그러므로 문자는 철자가 틀렸습니다.
이건 문자죠.
내 생각에 이건 단지 나쁜 사용자 경험을 만들고 있는 것 같습니다. 우리는
알다시피... 네, 실제로 내 생각에 내가 단지 복사를 하고 붙여넣고 있다고
생각합니다. 여기에서 어느 누군가가 코드를 한 것 같습니다. 그러나 저것은 괜찮습니다.
네. 제 생각에 이건 [웃음] 우리가 지금 하고 있는게 맞죠?
우리는 다른 사람으로부터 붙여넣기를 [잡음]
글쎄 이것은, 단지 이것입니다. 아시겠나요?
이것은 [잡음]
우리가 복사한건 누구의 것에서 한 건가요?
이것은 로그의 일부입니다. 내 말은, 내 생각에 이것으 실제로 크레이지 밥의 코드입니다. 그러나
[웃음] 내가 틀릴 수 있습니다.
이것은 내 코드가 아닌데 왜냐하면 이것이 고유의 코드가 아니기 때문입니다.
[웃음] 네. 이것은 고유한 코드입니다.
실제로, 만약 내가 뒤로 돌아가서 다시 방문할 수 있다면 13과
14는, 알다시피, 이 초기화 문제는 일어나지조차 않을 겁니다.
왜냐하면 도움말에서 초기화하지 않은 데이터를 가질 수 없기 때문입니다.
그러므로 만약 우리가 실제로 우리가 말한 것을 했다면,
내가 처음에 말한 사실은, 우리가 이들 문제를 가지지 않을 수도 있다는 사실입니다.
그 말은 완전히 옳습니다. 나는 저것에 대해서 잊었네요.
크레이지 밥은
우리가 보고 있는 형편없는 코드에서 어떤 훌륭한 지점을 가져다 줍니다
나는 실제로 말해야 겠습니다. 내가 자바에서 상당히 확신하고 있는 사실은
이런 변수의 집합을 선언할 때 이것이 자동적으로 초기화되어 0이 된다는 점입니다.
그러나 내가 틀릴 수도 있어요.
저것은 초기화 한 인스턴스 변수입니다. 그리고
지역 변수는 최기화되지 않습니다.
좋습니다. 아마 내가 틀린 것 같습니다. 저것들을 자동으로 초기화할 수 있다고 하더라도
좋은 코드 행동은 여러분이 실제로 그들을 초기화한다는 사실이 될 듯합니다.
그러므로 모든이가 이것이 작동하는지 여부를 기억해야 할 필요가 없습니다.
글쎄, 단지, 아시다시피, 나는 개발 데이터에 익숙했습니다. 그러므로 저것은 실제입니다.
네[웃음].
좋습니다. 닥터 버그를 계속해 볼까요?