The following links may help navigating this page
WHO Disease Outbreak News

Piccolo Quiz - Little Chap · 2006-10-19

Nobody of my audience could solve the Piccolo Quiz - Bad Code I. This is awful. I have to drown my grief in the unwon piccoloechen now. I've been so proud of you, my dear audience, but now ... bottomless disappointment. Folks, it was so easy. But before solving the problem, we turn to the new task, which demands skills in other fields. Question: In what famous contribution to the set of great movies does the little chap below appear? The first who gives the right answer wins, guess what, a Rotkaeppchen Piccolo. This time answers to the comments please.

little chap

Now for solving the previous task: if(number+iterations == limit) was the problem. The function implies that number is smaller then limit when the parameters are passed but never checks if this is the case. So, calling doSomethingUpTo(0, 0) would make the function run infinitely, which is bad indeed. To solve the problem one should consider changing the if-statement to something like if(number+iterations < limit) with iterations = -1 as start value or, if passing number > limit is actually an error, throwing an exception.

  1. haken    Oct 21, 16:48    #
    Again, too difficult? Here’s another tip. Now it should be possible:
    another tip
  2. — eva    Oct 24, 13:15    #
    Um die Ehre der geneigten – hier allerdings nachgerade übellaunig beschimpften – Leserschaft zu retten: Es handelt sich um den Penicillin-Film schlechthin: “Der dritte Mann”. Neben dem reizenden little chap und Orsons Augenaufschlag ist unbedingt auch die Musik bemerkenswert.
  3. haken    Oct 24, 14:03    #
    Manchma muss man die zementsackhafte passivitaet des werten publikums mal so janz auf die Luthersche geisseln, aber wusst ick doch, dit dit noch jeht. Piccoloechen an Evchen. Langsam hast du doch sicher so’nen Pancho-Villa-esken patronengurt, mit lauter piccoloechen drin, um. Wa?!
  4. — eva    Oct 26, 13:00    #
    Ja, selbstredend verlasse ick det Haus nur noch mit nämlichem Gurt – noch nie wat von der furchteinflößenden “Piccolo-Amazone-des-Panketals” jehört?

Commenting is closed for this article.