Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranรฎ)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
All right, it's time to debug exercise number eight.
Let's do it.
So apparently we should be getting a right diagonal of OWS to imply that owns but instead if you run
the code.
We get a left diagonal of axis.
So all we have to do is say X wins and we're done.
I'm just kidding.
I was supposed to win and there's something wrong with the code now going out a few break points.
Launched the debugger and let's compare.
So when I'm here, it's going to place an O at zero and two, which is fine, that's consistent.
As well as an exact two and two, that's also consistent.
Next run I equals one.
It's going to place an O at one one, which is perfect.
But then an ex is also going to go to one one replacing the oh.
Hmm.
OK, what if I just put this first, what would that do?
Relaunched the debugger.
It starts at two and two, that's fine.
Always a zero and two, OK, good.
Now maxes out one and one, which gets promptly replaced by oh.
The next goes to zero and zero.
Oh, goes to zero and two.
And we get the expected output.
Well, that was easy in this case, I didn't have to think or analyze the person's logic by using breakpoints.
It was really easy to visualize what their bug was.
And then by simply moving two lines of code around, it made all the difference.
If you can't tell by now, I'm a very strong believer in using breakpoints to visualize the runtime
line by line.
OK, onto the next exercise.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.