• PotatoEngineer (unregistered) in reply to lrucker
    lrucker:
    davedavenotdavemaybedave:

    Whatever X and not-X are, something cannot, by definition, be both at the same time.

    With an attitude like you're never going to find Marvin on the Heart of Gold.

    Nobody with even a particle of common sense can find Marvin. Is this really the standard you want to hold up?

  • Adam (unregistered) in reply to A pedant

    Sleep doesn't have a save. At least prior to the crappy kids editions.

  • ijk (unregistered) in reply to TheRider

    Obviously the "j" key was broken.

  • Emil Vikström (unregistered) in reply to Matt Westwood
    Matt Westwood:
    Procedural:

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

    Only if you're going to pay in Sweden, and then the plural is "kronor", singular "krone". In Amsterdam it's Euros, although up till ten or so years ago it was guilders (Dutch: "gulden").

    Actually, "krone" is Danish or Norwegian. In Sweden the singular is "krona".

  • Leeor D. (unregistered)

    It's amazing how many clueless people are in a position to teach others these days.

  • seep (unregistered) in reply to cod3_complete

    Somebody earlier made the comment that they hoped the professor was from a "community" college.

    I teach in a community college and the college hires only instructors with successful industry experience. Students don't suffer under academics who haven't succeeded in a real job.

    Associate degree graduates also have the advantage of having taken more program classes (i.e. programming classes for a programming degree, networking classes for a networking degree...) than a student graduating from a 4-year college with the same degree.

    Don't knock the 2-year colleges. They are a well-kept secret of quality instruction, especially in the technical fields.

    Of course, there are bad instructors in all colleges. But on average, I believe the 2-year faculty are better.

  • seep (unregistered) in reply to seep

    Edit to my comment above: At least in Wisconsin.

    My captcha for this post: wisi

  • Mr.'; Drop Database -- (unregistered) in reply to Dan
    Dan:
    Mr.'; Drop Database --:
    Adding 0.0, on the other hand, is a convenient way to convert an int to a double.
    Moron.

    Remind me never to work near anything you have written.

    Not to worry; you won't be maintaining my code any time soon. That would require you to have a job that doesn't involve operating a deep fryer.

  • (cs)

    Those professors love it when they ask you for a string length function if you give them:

    l(char*O){return*O?1+l(++O):0;}

    Especially if they ask you to write it on a whiteboard... so that people who have never programmed before can see and learn from it.

    I think that was the last time I was asked to demonstrate anything for that class ;)

  • Ray (unregistered) in reply to GEE

    Dividing by modulus is dividing by positive number. Negative divided by positive is negative.

  • Ray (unregistered) in reply to MSCW
    MSCW:
    Some Guy:

    21 / 5 = 4R1. Simple. Dividing 5 goes into 21 4 times, leaving 1 leftover unit. Reversing this, we get 5 * 4 + 1 = 21.

    Now, let's add the not-quite-so-frist grade concept of negative numbers into the fray.

    -21 / 5 = X. We already know that we'll get -4, but what remains? The remainder is -1. Dividing a negative number by a positive one cannot result in a positive remainder. Why? Reverse the equation. 5 * -4 + X = -21. X becomes -1. So -21 / 5 = -4R-1. QED.

    Obviously you making a false assumption (just making -4 out of 4). You should grow further than frist grade. Even google laughts on you: http://www.google.com/#q=-21+%25+5

    Oh, c'mon... Java operator % is not a modulus, it's a remainder. Remainders are always positive.

  • no-genius (unregistered) in reply to Some Guy

    [quote user="Some Guy] No. Just, no. Performing modulus division on a negative number always results in a negative number.

    Let's go back to "frist" grade for a moment here, and do some "remainder division".

    21 / 5 = 4R1. Simple. Dividing 5 goes into 21 4 times, leaving 1 leftover unit. Reversing this, we get 5 * 4 + 1 = 21.

    Now, let's add the not-quite-so-frist grade concept of negative numbers into the fray.

    -21 / 5 = X. We already know that we'll get -4, but what remains? The remainder is -1. Dividing a negative number by a positive one cannot result in a positive remainder. Why? Reverse the equation. 5 * -4 + X = -21. X becomes -1. So -21 / 5 = -4R-1. QED.[/quote] Yes, but -1 mod 5 = 4 mod 5.

  • olieboer (unregistered) in reply to madjo

    hehe. were you in school in Leeuwarden?

  • cappeca (unregistered) in reply to cklam
    cklam:
    RIT_Warrior:
    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 had a professor who would do things like that. If someone was asleep and woke up in the middle of class, he would finish his sentence and say something to the effect of "and that's the answer to the super-secret exam question", or something to that effect.

    If someone slept till the end of class, he'd tell everyone to very quietly go out to the hallway, then he would turn off the lights and close the door(he taught night classes). He said he liked to imagine the student waking up at midnight and wondering how the hell they got into a dark classroom with no one around at such an hour.

    Then the student rises and tries to leave. Whilst doing so he falls over some item of furniture, injures himself and is found dead on the morning (of the next working day). The Professor gets charged with criminal endangerment or some such nonsense as faces civil action from the student's family.

    I call BS. Tenured Profs are experts in CYOA.

    Come on. If some human beings can't be left alone with furniture, why the hell are we even investing in them with education? Teacher was right to mock him, someone should tell the teacher and the class about this website, so that even more hilarity would ensue.

  • Whiskey, Eh? (unregistered)

    Once I fell asleep in class, unfortunately while sitting in the first row where it was visible to everyone including the prof. Even more unfortunately, I fell asleep with my mouth hanging open. I was awakened to the sound of pieces of chalk flying by my face as the prof tried to land one in the wide-open target.

    The same prof (who was teaching some kind of computers course) made a mistake in class which I tried to correct. He made some jerk comment which caused the whole class to laugh at me. Undaunted, I went home, found proof that I was right, and emailed it to him. The next day he actually apologized to me in front of the class.

    We actually got along quite well after that, and 14 years later when I look back, I still remember him as one of my favorite profs. He was the one who wrote a letter of recommendation for me which landed me a summer job in the faculty for a few years.

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

    Signaling Link Code Interface?

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

    Signaling Link Code Interface?

  • wisi (unregistered) in reply to Dan
    Dan:
    Randomth?
    Yours seems more like linearth.
  • SwedishChef (unregistered) in reply to Matt Westwood
    Matt Westwood:
    Procedural:
    madjo:

    Only if you're going to pay in Sweden, and then the plural is "kronor", singular "krone".

    "Krona", if you please.

  • jerk_programmer (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.

    Yep, i think that's what happened.

    My teachers used to love to joke like this, i was sort of 'in' with teachers so when teachers sit together and chat about various stuff they were telling of various jokes like this. I'm pretty sure that teacher would get extremely amused to see it posted as WTF. Somehow, teachers are most amused by dunning kruger effect.

  • Mike W (unregistered)

    I once had a very similar experience with one of my professors, who, surprisingly enough, held a PhD in Computer Science from USC. She had given us an assignment to write a C console app to simulate the "dining philosopher" problem. She instructed us that the program needed to accept two string parameters from the command line. Don't ask me what the parameters were supposed to be, I've long since forgotten. Anyway, after lecture, I went into the lab, sat down, and started writing my program:

    #include <stdio.h>

    int main (int argc, char **argv) {

    All of a sudden I was interrupted by my professor's voice, right in my ear:

    Professor: "What are you doing???" Me: Doing my programming assignment. Professor: For what class? Me: For your class. Professor: Then why do you have int argc and char **argv? Me: Well, you said we needed to write it in C, and that it needed to accept parameters from the command line. Professor: Yeah, but that's not how you do it. Me: Yes it is. Professor: <taken aback> No it's not! I told you that it needs to accept two string parameters. Me: I know, but I haven't gotten to that part yet. Professor: You did it wrong. That's not how you do command line parameters in C. Me: Yes it is. Professor: <getting angry now> No it's not! Me: <exasperated> Okay. How do you do it? Professor: <leaning in to type> Like this:

    int main (char *param1, char *param2)

    Let's just say that conversation didn't end on a positive note. She eventually gave up in a big "harrumph!" and walked away, content in her knowledge that my program was doomed to fail. Until some of the other students who had never written in C before began to ask her how to do it. At first she just regurgitated the same example she had typed on my computer, but when it became clear that that was indeed NOT how to accept command-line params in C, she eventually just pointed to me and said "Ask him." Not exactly a big moment of glory and triumph for me, mind you, since I hadn't volunteered to be a T.A. for the day, and I wasn't happy about being singled out, and then having to show half the class, one by one, how to use argc and argv.

  • Jozef Izso (unregistered)

    This reminds me our instructor in practical lessons who was admitting that SQL syntax errors returned by the remote SQL server are caused by wrong "values" in capacitors inside the computer and student was forced to turn off his computer and keep it switched off for more then 30 seconds just to be sure that all capacitors will be fully discharged. Surprisingly this mystical procedure had no effect on the syntax error :)

  • Some Jerk (unregistered) in reply to highphilosopher
    highphilosopher:
    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?

    I dunno... I have seen a lot of programmers fresh out of college repeating what they see in books... and there is the old saying that those who cannot do ... teach. I suspect that the teacher read : ( rnd * Range ) + offset and lacked the capacity for independent thinking to realize that offset was a requirement only if your minimum number was greater than 0. That very form of thinking seems to possess 90% of the CS majors that I have met.

    Captcha: incassum - u said *ss :)

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

    PARDON... meant ... if your starting number was NOT 0. perhaps I too must go to college :)

    Capta: validus ... Hale Validus, emperor of Rome!

    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?

    I dunno... I have seen a lot of programmers fresh out of college repeating what they see in books... and there is the old saying that those who cannot do ... teach. I suspect that the teacher read : ( rnd * Range ) + offset and lacked the capacity for independent thinking to realize that offset was a requirement only if your minimum number was greater than 0. That very form of thinking seems to possess 90% of the CS majors that I have met.

    Captcha: incassum - u said *ss :)

  • oksupra.com (unregistered)

    Supra shoes are so popular all over the world. Whatever you take on Supra being in the Supra Skytop Shoes market. Now Supra Strapped Shoes also very popular attention. It is nice that they actually took the time to make Supra Skate Shoes that work well. Supra shoes is a brand that has been inspired, designed and marketed by passionate individuals. We have brought to you the fullest selection of Supra footwear at cheapest price.

  • Cherns (unregistered)

    Actually, a couple of comments:

    When I was programming in early Oracle in the '80s, it was common--and recommended in some cases--to write SQL queries that included phrases like

    WHERE NAME = "JOE" + ""
    or
    WHERE AGE = 32 + 0
    The story was that the Oracle query processor wasn't very optimizing, and, if a column were indexed and the table had not very many rows (say, fewer than a thousand), it would sometimes take a lot longer to do an indexed search rather than a brute-force one. Adding null-like parts was a way to force the query processor to use a calculated rather than "raw" search term, and thus not use the index. Just one of the many reasons I grew to hate Oracle.


    About the mod "controversy":

    I had had a lot of mainframe experience, but I was very excited to start using my new Turbo Pascal 1.0 for CP/M 2.2 (only $49!!). I happened to use a mod calculation with some negative numbers, and the results weren't quite what I expected. So I started trying out the mod functions on the various machines, big and small, and languages, available to me, and got a very wide variety of answers. I posted these on the then Compuserve Turbo Pascal forum, and got a few responses, including someone who pointed out that Ada, "attempting to be all things to all people" actually had two functions, mod and rem. http://codewiki.wikispaces.com/mod+and+rem explains it this way:

    * If dividend and divisor have the same sign mod and rem produce the same answer. * Mod is dominated by the divisor. Think of the mod operation as ensuring that the remainder will be in the range 0 to just shy of the divisor. For example, a number mod 10 will always result in a remainder in the range 0 to 9 and a number mod -10 will leave a remainder in the range 0 to -9. * Rem is dominated by the dividend. Think of the rem operation as taking as many bites out of the dividend as possible but unless dividing exactly it will always leave some of the original dividend untouched so the remainder will always be 0 or have the sign of the dividend.
    Something for everyone!
  • eric bloedow (unregistered) in reply to madjo

    reminds me of when a teacher's aide in my high school pronounced "pseudocode" "piss-way-doe"...

Leave a comment on “Surpassing the Master”

Log In or post as a guest

Replying to comment #:

« Return to Article