Jibran turned in some questionable programming code when he was a student in college. Then again, who didn't? It's a student's sacred right to drive instructors to drink. There are no WTFs in student code; everyone has to learn sometime.

Unfortunately, Dr. Talbot's 100-level Java class focused more on providing barriers to learning. Talbot's voice had a nasal drone that would make bagpipes cringe but was so monotonous it could put an elephant under. Nor did he have any ability to organize a classroom session; he delivered material in a haphazard ramble that only covered half of the the outline. Jibran generally dozed through the session, and if he was lucky, woke up before it ended and caught the day's assignment.

During the requisite dice-roller discussion, Dr. Talbot managed to shake Jibran out of his stupor. Up on the projector glowed this example of how to generate a random number:

Random rand = new Random();
int n = rand.nextInt() % 10 + 0;

"Why is there a 'plus zero' at the end of that?" Jibran asked.

"That's just how Java requires you to do it," Talbot explained, as if this were obvious to anyone with his level of experience. "You need that zero so that the computer actually understands that you want a random number."

During the lab session, Jibran wrote the same program, sans the plus zero. He called Dr. Talbot over to look at it. "Look, it compiles and runs. You don't need the plus zero."

Dr. Talbot looked at the code, with a puzzled expression. "That's amazing," he said, surprised. Jibran smiled, satisfied that his instructor was going to admit his mistake. "There must be a short circuit inside the computer that's causing the Java compiler to accept your version of my random number code!"

[Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!