• (cs)

    It's always a hardware issue...

  • (cs)

    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...

  • Alargule (unregistered)

    Must have been an Oompa Loompa.

  • Chris (unregistered)

    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.

  • OldJavaGuy (unregistered)

    This must be an advanced class since they're simulating 10-sided dice.

  • wtf (unregistered) in reply to OldJavaGuy
    OldJavaGuy:
    This must be an advanced class since they're simulating 10-sided dice.

    The professor is a dungeon master.

  • Tycho (unregistered) in reply to OldJavaGuy
    OldJavaGuy:
    This must be an advanced class since they're simulating 10-sided dice.

    Please. I roll twenties.

  • HopelessIntern (unregistered)

    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.

  • (cs)

    Here's a picture of said short circuit:

    [image]
  • Case (unregistered) in reply to HopelessIntern

    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.

  • (cs)

    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"

  • (cs)

    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.

  • highphilosopher (unregistered) in reply to Case
    Case:
    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.

    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?

  • Pete (unregistered)

    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.

  • robo (unregistered) in reply to madjo
    madjo:
    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)
    My computing 4 prof and his thick accent had me wondering for quite a while what the heck a "java washing machine" was...
  • Spoe (unregistered)

    I could understand "rand.nextInt() % 10 + 1", to give an integer from 1 to 10 since they're simulating dice.

  • (cs) in reply to madjo
    madjo:
    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.

    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...

  • Troy (unregistered)

    This is why experience = 10x(degree)

  • krupa (unregistered) in reply to madjo
    madjo:
    When I got taught Java, .... Exams were done on paper without the use of a computer. Yes, that meant writing source code on paper...

    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.

  • anon (unregistered) in reply to Case
    Case:
    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.
    The *10 is for the offset. The +0 is to be able to adjust the precision.
  • Wyatt (unregistered)

    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.

  • I have no clue (unregistered) in reply to Tycho

    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!!

  • Knux2 (unregistered)

    OK kids, remember to always add "" to every String.

    Captcha: nibh - a nibble header

  • Prof. (unregistered)
  • Prof. (unregistered)

    This is a random comment +0.

  • Zachary (unregistered) in reply to I have no clue
    I have no clue:
    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!!

    You have never seen a Ten sided die before have you?

    [image]
  • Anon (unregistered)
    but was so monotonous it could put an elephant under.

    I wasn't aware that elephants were legendary for their alertness.

  • Anon (unregistered) in reply to Zachary
    Zachary:
    I have no clue:
    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!!

    You have never seen a Ten sided die before have you?

    [image]

    But this one goes to 11!

  • (cs) in reply to I have no clue
    I have no clue:
    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.

    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.

  • ajtacka (unregistered) in reply to madjo
    madjo:
    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.

    That sounds like one of my high school English teachers. Yes, English teacher. She was Spanish (or Italian. I forget, it was a long time ago). We spent half of most classes trying to figure out what she was actually saying.

  • Anonymouse (unregistered)

    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.

  • (cs)

    Some of those pronunciations are in fact how English pronounced those things before the Great Vowel Shift of around 1500.

  • Mister Zimbu (unregistered) in reply to I have no clue
    I have no clue:
    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!!

    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.

  • Cliff notes anyone (unregistered) in reply to Jayman
    Jayman:
    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...

    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.

  • SR (unregistered) in reply to frits
    frits:
    Here's a picture of said short circuit: [image]

    I've seen that issue before. Here's my workaround:

    Random rand = new Random();
    int n = rand.nextInt() % 10; // note: short circuit means no "+0"
    return 5;
  • JayT (unregistered)

    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...

  • wtf (unregistered) in reply to dtobias

    I thought the Dutch pronunciations were a tribute to Java's origin on a Dutch colony.

  • c4ctusal (unregistered)

    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

  • Cliff notes anyone (unregistered) in reply to Knux2
    Knux2:
    OK kids, remember to always add "" to every String.

    Captcha: nibh - a nibble header

    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.

  • (cs)

    Chuck Norris always rolls a natural 20-- on a d4.

  • SR (unregistered) in reply to Anonymouse
    Anonymouse:
    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.

    If it was a duck-typed language you might get away with that. In Java, an int is an int is an int.

  • Procedural (unregistered) in reply to madjo
    madjo:
    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.

    Well, you can slape the threed in Amsterdam; it's just 10 extra kronors.

  • The Real, Non-Random Steve (unregistered)

    Frist+0

    Captcha: quibus -- Greyhound's new no-talking policy.

  • GEE (unregistered) in reply to c4ctusal

    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

  • The Real, Non-Random Steve (unregistered) in reply to operagost
    operagost:
    Chuck Norris always rolls a natural 20-- on a d4.

    Except when he rolls a 4 on a d20 - but even then, it criticals.

  • Anonymous Hero (unregistered) in reply to Cliff notes anyone
    Knux2:
    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.

    SLLLOOOOOOWWW

  • Anonymous (unregistered) in reply to dtobias
    dtobias:
    Some of those pronunciations are in fact how English pronounced those things before the Great Vowel Shift of around 1500.

    Not to be confused with the Great Bowel Shift that happens after a visit to Taco Bell.

  • Anonymous (unregistered) in reply to ipeet
    ipeet:
    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"

    I don't want to support useless code and obviously it serves no purpose to spin the "stuff" off into a separate "doStuff()" method but I have to admit that I'm guilty of doing this myself - for exactly the reason given by your professor. I like the entry point of an application to be concise and readable; after all, it's the first bit of code that the next poor slob has to hit when he ends up maintaining your program. I just hate seeing big slabs of code in the main() method so even if it has a relatively simple job to do, I generally put that code in a separate function.

  • VBMaster_VBFaster (unregistered) in reply to Cliff notes anyone
    Cliff notes anyone:
    Knux2:
    OK kids, remember to always add "" to every String.

    Captcha: nibh - a nibble header

    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.

    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()

  • IT Girl (unregistered) in reply to Pete
    Pete:
    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.

    That's right, those who can do, those who can't teach, and those who can do neither, criticize.

Leave a comment on “Surpassing the Master”

Log In or post as a guest

Replying to comment #:

« Return to Article