Student + 2 am + energy drink + Saw



  •  .equals()

     

    /**
    * I swear, coding from 6 to 6, 2 litres of red bull and a roommate watching saw is 150% the best setting to code
    * @return true if all other threads managed by GameMaster are succesfully killed
    **/
    public bool KillYourBrothersOrDieYourself throws Exception
    {
        int thisThread;
        for(int i=0;i<this.master.childeren.size;i++)
        {
            if(this.master.childeren[i] == Thread.currentThread())
            {
                thisThread = i;
                continue;
            }
            if(this.master.childeren[i].isAlive())
            {
                this.master.childeren[i].kill();
                // Yield to the game master and dying thread so they can clean up
                Thread.currentThread().yield();
            }
        }
        // Muhaha, all your attempts at saving yourself have been futile
        this.master.kill(thisThread);
    }
    


  • The sleep deprivation and excessive caffeine presumably also explain why the actual code matches neither the method name nor the javadoc, as well as the idiosyncratic spelling and capitalization.  Not to mention the other peculiarities, like the overbroad "throws" clause or the fact that the children appear to be subclasses of Thread, but this method is either not part of the subclass or is referring to itself in the third person (via Thread.currentThread()).



  • Couldn't resist.

    http://xkcd.com/323/ 



  • @MyKey_ said:

    Couldn't resist.

     

    Referencing xkcd is against the law and you will be brutally clubbed for this transgression.  Also, your reference is absolutely lame: the only relevancy it has to this thread is that both involve programmers drinking liquids.



  • Here's a better graph for you

     

    Oops, I might have mixed "average skill of people with that concentration" and "influence of concentration on persons skill"



  • Just remember to remove all unneccesary commenting and change the name of the method.

     Angry coding is unadvised.

    And why is it whenever I see "this" I think its superstitious coding?

    I think they should add a "this" paranoia/superstition disorder to the DSM IV.



  • @dtech said:

    public bool KillYourBrothersOrDieYourself throws Exception

    Nah, that was too readable and not at all mysterious. Perl still wins. =)



  •  @alehx said:

    <p>And why is it whenever I see "this" I think its superstitious coding? </p>
    <p>I think they should add a "this" paranoia/superstition disorder to the DSM IV.</p>


    i think you're way off there

    there are a few reasons people use "this"
    1. clarity, it makes it very clear you a referencing a variable that is global in the class.
    2. it's handy in situations where you have a constructor argument and want to give it the same name as a property already defined in the class
    3. intellisense, if i hit "this." in visual studio i get a nice list of all the available methods and properties.



  • @element[0] said:

    @alehx said:

    <p>And why is it whenever I see "this" I think its superstitious coding? </p>
    <p>I think they should add a "this" paranoia/superstition disorder to the DSM IV.</p>


    i think you're way off there

    there are a few reasons people use "this"
    1. clarity, it makes it very clear you a referencing a variable that is global in the class.
    2. it's handy in situations where you have a constructor argument and want to give it the same name as a property already defined in the class
    3. intellisense, if i hit "this." in visual studio i get a nice list of all the available methods and properties.

    I used Java on and off for a year before I found out you could leave out "this".  None of my textbooks ever mentioned it.  Personally, I prefer the clarity it brings.  I'm also fond of Ruby's use of sigils to show scope and PHP's explicit scoping. 



  • @dtech said:

    Here's a better graph for you

    Audible laughter...



  • @element[0] said:

     @alehx said:

    <p>And why is it whenever I see "this" I think its superstitious coding? </p>
    <p>I think they should add a "this" paranoia/superstition disorder to the DSM IV.</p>


    i think you're way off there

    there are a few reasons people use "this"
    1. clarity, it makes it very clear you a referencing a variable that is global in the class.
    2. it's handy in situations where you have a constructor argument and want to give it the same name as a property already defined in the class
    3. intellisense, if i hit "this." in visual studio i get a nice list of all the available methods and properties.

    Just pressing Ctrl+Space will also bring intellisense, without the need to type this.



  • What the hell kinda language is this supposed to be in, anyway?

    The 'bool' return type and the use of properties suggest C#, the JavaDoc and throws clause suggest Java.



  • @Fabian said:

    What the hell kinda language is this supposed to be in, anyway?

    The 'bool' return type and the use of properties suggest C#, the JavaDoc and throws clause suggest Java.

    It's not a real property (missing get {}) and C# doesn't support the throws at all, so except for the bool it looks like Java.



  •  @XIU said:

    @Fabian said:

    What the hell kinda language is this supposed to be in, anyway?

    The 'bool' return type and the use of properties suggest C#, the JavaDoc and throws clause suggest Java.

    It's not a real property (missing get {}) and C# doesn't support the throws at all, so except for the bool it looks like Java.

     I don't see any parentheses behind what you're suggesting is a method call...

    An equally valid remark would be:"except for the strange comment format and the unsupported throws clause, it looks like C#." But in the end it's neither Java nor C#, which brings us back to my original question...



  • @Fabian said:

     I don't see any parentheses behind what you're suggesting is a method call...

    An equally valid remark would be:"except for the strange comment format and the unsupported throws clause, it looks like C#." But in the end it's neither Java nor C#, which brings us back to my original question...

    Still makes more sense as Java, if we add () and change the bool into void (there are no return statements at all) it's completely valid Java.
    To make it a valid c# property we need to add get { }, remove throws, change all casing that uses lowercase method/fields (Thread.currentThread, .size).



  • @Fabian said:

     @XIU said:

    @Fabian said:

    What the hell kinda language is this supposed to be in, anyway?

    The 'bool' return type and the use of properties suggest C#, the JavaDoc and throws clause suggest Java.

    It's not a real property (missing get {}) and C# doesn't support the throws at all, so except for the bool it looks like Java.

     I don't see any parentheses behind what you're suggesting is a method call...

    An equally valid remark would be:"except for the strange comment format and the unsupported throws clause, it looks like C#." But in the end it's neither Java nor C#, which brings us back to my original question...

     

    dtech hasn't come up with anything interesting in a while, so he's just trying to make shit up to be back on the forumns again. because that's what the cool kids are doing.  Although this time he forgot to make it believeable. 



  • @Fabian said:

    What the hell kinda language is this supposed to be in, anyway?

    The 'bool' return type and the use of properties suggest C#, the JavaDoc and throws clause suggest Java.



    The JavaDoc is for Doxygen.

    'throws' is valid C++.



  • @amischiefr said:

    dtech hasn't come up with anything interesting in a while, so he's just trying to make shit up to be back on the forumns again. because that's what the cool kids are doing.  Although this time he forgot to make it believeable.

    This kind of personal, off-topic flamebait is uncalled for and I would appreciate it if you would refrain from derailing threads in the future.  Thank you. 



  • @morbiuswilters said:

    This kind of personal, off-topic flamebait is uncalled for and I would appreciate it if you would refrain from derailing threads in the future.  Thank you. 

     

    Yeah sorry, looking at the code it just looked like something made up just to impress TDWTF crowd and not a piece of code found, say in production somewhere.  Not as funny to me if it's just fabricated *shrug* IMO. 



  • @simoncion said:

    'throws' is valid C++.

    Err, no. <font face="Courier New">throw</font> is, but you still need to parenthesize the argument(s).

    It can't be C++ anyway for a variety of reasons (such as the lack of -> and ::).



  •  Getting back on topic, how much does 2 liters of redbull cost?? Based on the prices I've seen, I think that's about $16 of redbull in a single sitting.



  • @savar said:

     Getting back on topic, how much does 2 liters of redbull cost?? Based on the prices I've seen, I think that's about $16 of redbull in a single sitting.

    It's probably actually this:

    "Euroshopper energy drink", euroshopper is the bugdet line of the largest supermarket here. It's quite good stuff for €0,20 a can though, better than cheap-cola compared to coca or pepsi.

     



  • @XIU said:

    It's not a real property (missing get {}) and C# doesn't support the throws at all, so except for the bool it looks like Java.
     

    It's java yes. I always mistype bool instead of boolean (thanks to prior coding in C#). The size should ofcourse be length (working to much with ArrayList lately)



  • @amischiefr said:

    Yeah sorry, looking at the code it just looked like something made up just to impress TDWTF crowd and not a piece of code found, say in production somewhere.  Not as funny to me if it's just fabricated *shrug* IMO. 
     

     YEAH LOOK AT ME IM MAKING A POST IM SO COOL NOW

     

    Seriously, I just typed over some student development code because it made me snicker.

    If you really want it you can look in the dutch TV guide for screenings of saw. pbean can confirm we're on a deadline justifiïng the all-nighter. 



  • @dtech said:

     YEAH LOOK AT ME IM MAKING A POST IM SO COOL NOW

     

    Seriously, I just typed over some student development code because it made me snicker.

    If you really want it you can look in the dutch TV guide for screenings of saw. pbean can confirm we're on a deadline justifiïng the all-nighter. 

     

    Lol, well considering how badly the code was typed over that's exactly what I thought it was.  I'm sure Saw I - III were on and that you did an all night cod-a-thon.  I'm too lazy to look much of anything up.



  • I was coding a daemon some months ago, and reading Northern Lights during my free time. This led to the .intercision() method, which basically cancels the Timer, thus stopping the daemon from running again. At least the method name was kind of related to the book's concept.

    Of course, back in college there were more popular culture references in code: I do remember some school project involving Muad'dib, the Kwisatz Haderach and Shai Hulud; or our "genetic algorithm" project being under the team1.ia.xmen package.



  • @amischiefr said:

    I'm sure Saw I - III were on and that you did an all night cod-a-thon.

    Mmmm... cod-a-thon... 



  • @dtech said:

    Here's a better graph for you

    That graph only works if you include "sense of what should be programmed" as part of "programming skill".  While I pretty much never code while under the influence of xkcd, I've seen the output of others who have, and generally, it's not particularly bad code, nearly as much as it's misguided code.

    (Note that these were all people who could code more or less OK to begin with.  I don't personally know any amazing coders who program under that influence, nor do I admit to knowing any lousy programmers who program under that influence.)


  • :belt_onion:



  • @dtech said:

    @savar said:

     Getting back on topic, how much does 2 liters of redbull cost?? Based on the prices I've seen, I think that's about $16 of redbull in a single sitting.

    It's probably actually this:

    "Euroshopper energy drink", euroshopper is the bugdet line of the largest supermarket here. It's quite good stuff for €0,20 a can though, better than cheap-cola compared to coca or pepsi.

     

     

     Hmmm-mmm! Euro Shopper Energy Drink from the Appie Happie, my personal favorite as well.

    And at only a fraction of the cost of Red Bull, which is criminally expensive.



  • @morbiuswilters said:

    @amischiefr said:

    I'm sure Saw I - III were on and that you did an all night cod-a-thon.

    Mmmm... cod-a-thon... 

     

    I'm starting one now. 7:00 PM now. Deadline 9 AM tomorrow morning. 3 students in an old abandoned haunted police-station (really! one of my group-mates rents it as anti-sqautting)

    We have 24 bottles of beer, 4 sacks of doritos with dip, 6 cartons of fruit juice, 2 bottles of coke, 6 pizza's and a chocalate bar.

    We also have 23 toilets shattered throughout the building, not including those in the holding cells.

     

    Wish me luck



  • @dtech said:

    We have 24 bottles of beer, 4 sacks of doritos with dip, 6 cartons of fruit juice, 2 bottles of coke, 6 pizza's and a chocalate bar.
    So I'm guessing that whoever wins at Paper-Scissor-Rock wins the chocolate bar? (and the others will get a bottle of coke)



  • @Zecc said:

    So I'm guessing that whoever wins at Paper-Scissor-Rock wins the chocolate bar? (and the others will get a bottle of coke)
     

    It's a 400g chocolate bar. And it's 2 x1,5L coke

    @Zecc said:

    no one cares about the extra sack of doritos

    Two of those are actually empty already.



  • @dtech said:

    We also have 23 toilets shattered throughout the building
    Don't you think that you should have been coding, not taking a sledgehammer to every toilet you could find?



  • @belgariontheking said:

    @dtech said:

    We also have 23 toilets shattered throughout the building
    Don't you think that you should have been coding, not taking a sledgehammer to every toilet you could find?

     

    Altough some of the toilets definitly look like we did that, we didn't. They're scattered though.



  •  First Cod-a-thon program sanity lobotomy commencing now. We discovered the quasi-usefull "formula" for early-booking discount wans't going to cut it according to the specs. It needs to be editable by an admin. So we're just going to add 12 fields to the database corresponding with, you guessed it, the percentage of discount you get if you book in that particular month 



  •  We just decided on catching exactly 1 REM-phase by sleeping 2,5 hours from 4:30 to 7. We need to be back at the university on 8:30 for some minor practical which nonetless fails you if you don't deliver it on time.



  • @dtech said:

    We need to be back at the university on 8:30 for some minor practical which
    nonetless fails you if you don't deliver it on time.

    In this case, shouldn't you be furriously coding instead of advertising your dire situation on forums?



  • @jeffg said:

    great! more pointless shit from jeffg
    Do you see what I did there?  I changed morbius' name to yours, implying that you, not morbius, are the one spouting pointless shit. 

    If you have a beef with someone over a certain issue, talk about it in that thread.  When that thread gets locked because of your incessant whining about being wrong, that's it.  You don't get a do-over.  Suck it up and find something else to talk about.  Start a new thread about how you want morbius to be abducted and dropped from a plane without a parachute in the middle of the Sahara desert, or the rain forest if you really hate morbius that much.  Following him from thread to thread flaming him with no substance makes you the highest form of a douchebag.

    If you have a beef with someone for no reason, STFU and DIAF.

    Oh, and welcome back MPS version three.

    So now, by reading this, hopefully I've wasted your time as much as you've wasted all of ours by following morbius around trolling.

    Oh, BTW, I've booked a charter plane for you.  I won't tell you where you're going, but I think you'll like it.  A taxi will pick you up in an hour.  Make sure you have sunscreen.



  • @Farmer Brown said:

    @jeffg said:
    great! more pointless shit from morbius
    The forums. They are full of it.

    I think the stress* has finally gotten to MasterPlanSoftware and he's responding to his own sockpuppet accounts...

     

    * I don't know what kind of "stress" this is...  Have any Krispy Kreme or Kentucky Fried Chicken franchies in rural Connecticut closed down in the last month?



  • @morbiuswilters said:

    Have any Krispy Kreme or Kentucky Fried Chicken franchies in rural Connecticut closed down in the last month?
    Note to self: new business idea: Kentucky Fried Krispy Kreme.  Should be a gold mine.  I better not mention it to anyone.



  • @bstorer said:

    @morbiuswilters said:
    Have any Krispy Kreme or Kentucky Fried Chicken franchies in rural Connecticut closed down in the last month?
    Note to self: new business idea: Kentucky Fried Krispy Kreme.  Should be a gold mine.  I better not mention it to anyone.

    Yeah, but you're only going to be able to open franchises in rural Connecticut and West Virginia.  Can you imagine the quality of employees you'd have working for you?  Also, you're going to be competing with the likes of Ford for the business of retarded hicks. 


Log in to reply