- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
It's always a hardware issue...
Admin
Gotta love those college profs, educating the next generation of WTF'ers. I remember that at least one of my Comp Sci profs took great pride in the fact that he had no industry experience; he felt that being a life-long academic kept him "undiluted" by industry practices...
Admin
Must have been an Oompa Loompa.
Admin
Posts have been pretty good lately. They sound more creative. I'm not even going to bother with something witty, it would just be superflous.
CAPTCHA aliquam.
Admin
This must be an advanced class since they're simulating 10-sided dice.
Admin
The professor is a dungeon master.
Admin
Please. I roll twenties.
Admin
Unfortunately I can sympathise all too readily. Some of the so-called professors at my university were so dense, the mind boggles how they got there in the first place (especially the one with all the letters after his name..?)
I specifically remember one, whom despite having (supposedly) a PhD in Software Engineering, would not answer any programming related questions because that was "not his area". We also sat awkardly in silence for 10 minutes as he tried to turn off mute on his WinXP machine in order to show us a presentation.
Admin
Here's a picture of said short circuit:
[image]Admin
To be honest, I think the professor was actually screwing with him for sleeping in class every day. Anyone who was awake heard his explanation that the +0 was just a placeholder for the offset you want in your random number. Then that dumbass wakes up mid-class and asks a retarded question so the prof gave him a retarded joke answer.
Then when it came to the lab, the professor mocked him even further. I know if I was in that class, I'd have been laughing so hard.
Admin
Reminds me of the Data Structures & Algorithms prof I had who put the following on the board:
public static void main() { doStuff(); }
public static void doStuff() { /* insert main() here */ }
Why was this done? "As a general principle, I like to keep the main function short and simple"
Admin
When I got taught Java, for the first 10 weeks we didn't have any practical lessons. Exams were done on paper without the use of a computer. Yes, that meant writing source code on paper, though most questions were multiple choice type questions. And the programs you were asked to write weren't very long, and pretty easy.
And the teacher pronounced the names of certain functions weirdly. Sleep for instance was pronounced as "Slape" (as that's how you pronounce sleep in Dutch), and a thread became threed (though I'm not sure why he did that, probably because in some cases ea is pronounced as ee in English (like eat), and he stuck to it)
It may sounds as an exaggeration, but I assure you it's not.
Admin
I think you're right. I don't know if the names have been changed to protect the not-so-innocent or not, but I had a professor Talbot in Comp-Sci, and he was actually real slci. Annoying, but smart.
Captcha: esse -- Esse you gonna eat your taco?
Admin
Are WTF's drying up is all code in the world becoming better.
I think we all know there are teachers in colleges and universities that don't have a clue. Those who can't do teach after all.
Admin
Admin
I could understand "rand.nextInt() % 10 + 1", to give an integer from 1 to 10 since they're simulating dice.
Admin
Hear hear. Been there, done that. Even in university there are still professors who simply can't pronounce English words correctly. That's not that bad, except when they teach Statistics and Research Methods...
Admin
This is why experience = 10x(degree)
Admin
All of my programming-class exams were on paper. The homework assignments showed you could write code that compiled and ran. The tests showed you understood the fundamental principles and weren't cheating on the homework.
Admin
Admin
Suprised no one has mentioned it should have been rand.nextInt(10) instead of rand.nextInt() % 10, as the latter has a slight bias towards lower numbers.
Admin
Isnt that actually a 9 sided die? Well I guess 10 if you count the 0, but I've never seen a blank side of a die.
NINJA VANISH!!
Admin
OK kids, remember to always add "" to every String.
Captcha: nibh - a nibble header
Admin
Admin
This is a random comment +0.
Admin
You have never seen a Ten sided die before have you?
[image]Admin
I wasn't aware that elephants were legendary for their alertness.
Admin
But this one goes to 11!
Admin
Edit: What everybody else said. I'm just going to add that real twenty sided dice are numbered from 0 to 9 twice and come with a crayon so you can colour half the digits.
Now get off of my lawn.
Admin
Admin
It doesn't explain the "short-circuit" comment, but it could be that the prof was doing something out of habit. The +0 thing is occasionally used to cast something to an int. I also dimly recall doing something similar to tell the compiler to STFU about a warning.
Admin
Some of those pronunciations are in fact how English pronounced those things before the Great Vowel Shift of around 1500.
Admin
I'm not sure what dice you're using, but most 6-sided dice I've seen DO have a side with a "0" on it.
Admin
That's like someone that practices foul shots but never played a game of basketball and somehow thinks that he/she is a foul shot master. It's different i nteh game with adrenaline and a crowd and others depending on you though.
Admin
I've seen that issue before. Here's my workaround:
Admin
Is the word "Master" really appropriate to describe this professor...?
Captcha: quis - ok class it's time for a pop quis on the value of 0...
Admin
I thought the Dutch pronunciations were a tribute to Java's origin on a Dutch colony.
Admin
That code is not even correct in Java because nextInt() can return negative numbers.
Just trying this: import java.util.Random;
public class Test { public static void main(String[] args) { Random r = new Random(); for (int i = 0; i < 10; i++) { int roll = r.nextInt() % 10; System.out.println(roll); } } }
Outputs: 0 -7 -9 8 -9 -4 8 0 5 -2
Admin
Actually, that's how I convert numbers to strings since this is a compile error:
double d = 1.1; String x = 1.1; // compile error String x = "" + 1.1; // works
yes, with the Double class I could do this differently but the way I do it, it works fine.
Admin
Chuck Norris always rolls a natural 20-- on a d4.
Admin
If it was a duck-typed language you might get away with that. In Java, an int is an int is an int.
Admin
Well, you can slape the threed in Amsterdam; it's just 10 extra kronors.
Admin
Frist+0
Captcha: quibus -- Greyhound's new no-talking policy.
Admin
When you find a modulus of a negative number the result is always positive (as it is the remainder after an integer division).
So '% 10' limits the results to something between 0 and 9.
import java.util.Random;
public class Test { public static void main(String[] args) { Random r = new Random(); for (int i = 0; i < 10; i++) { int roll = r.nextInt() % 10; System.out.println(roll); } } }
Outputs: 0 -7 -9 8 -9 -4 8 0 5 -2
Admin
Except when he rolls a 4 on a d20 - but even then, it criticals.
Admin
SLLLOOOOOOWWW
Admin
Not to be confused with the Great Bowel Shift that happens after a visit to Taco Bell.
Admin
Admin
yeah, do the same in VB when Strict is On, easier to write:
Dim crapLanguage as String = someInt & ""
than
Dim crapLanguage as String = someInt.ToString()
Admin
That's right, those who can do, those who can't teach, and those who can do neither, criticize.