• (cs) in reply to C-Octothorpe
    C-Octothorpe:
    Just a Commenter:
    The blacked words and thinking of the Nagesh character involved made me shoot hot coffee out of several orifices simultaneously.

    I can understand the first 3 orifices, but anymore than that and you should probably see a doctor.

    Mouth, nostrils, eyes, ears, urethra, anus, belly-button, nipples and sweatglands - where's the problem?

  • (cs) in reply to a flaming pineapple
    a flaming pineapple:
    fixed:

    try { Activate(); Activate(); Activate(); Activate(); Activate(); Activate(); Activate(); Activate(); Activate(); } catch (Exception e) { Activate(); Activate(); Activate(); Activate(); Activate(); Activate(); Activate(); Activate(); Activate(); }

    These and a couple of the successors caused me to LOL.

    But I really think it would be better as a possible infinite loop:

    int i = 0;
    do while (i < 8)
    {
      try {
      activate();
      i++;
      } catch (Exception e) {
      }
    }
    
  • (cs) in reply to Shinobu
    Shinobu:
    I've written code like this, and since that was also interfacing an MS object model, I can sympathise. It went essentially like this:   do   {       x.enable();       sleep(100);   } while(!x.enabled()); Often it didn't loop, sometimes it would loop twice and rarely a handful of times. Remove the loop, and the program would crash on a method call that required x to be enabled.
    Interesting, but if it doesn't loop, that means you wait 100 milliseconds for no reason. What a waste of valuable time.
  • (cs) in reply to C-Octothorpe
    C-Octothorpe:
    It is powerful, unfortunately it's on the way out (IMO). SL and WPF are converging technologies that share a lot in common. With SL's ability to run out of browser, I really don't see any reason to even keep WPF alive...
    I have said from Silverlight 1.0 (codenamed WPF/Everywhere) that the two technologies would eventually converge.

    WPF still does a whole lot that Silverlight cannot, especially in reguards to 3D capabilities, among other things. They are slowling taking the best new features of each and putting them into the other so I do see a merger at some point. In the mean time, you can multi target both Silverlight and WPF using many framerowrks out there and if you are smart about how you manage your assemblies.

    C-Octothorpe:
    Slightly off topic: I even recall reading an article recently that said MS will completely do away with .Net soon and go completely HTML5 and JS. I'm sure that can't be true though considering how many developers and clients/partners that would alienate, not to mention the at least two-dozen web applications written in .Net. <ducks>
    There was some people over-reading into Microsoft's lack of mentioning .Net support in the next version of Windows at a specific conference. That focus of that conference was at casual developers, not professional developers. You can use HTML and Javascript to create gadgets in Windows Vista and 7 now, so I do not see why people are running scared. There is a reason Windows phone apps are based in Silverlight. I have also read rumors about WPF/Silverlight being heavily baked into the new UI for Windows, but we will see...
  • (cs) in reply to Matt Westwood
    Matt Westwood:
    C-Octothorpe:
    Just a Commenter:
    The blacked words and thinking of the Nagesh character involved made me shoot hot coffee out of several orifices simultaneously.

    I can understand the first 3 orifices, but anymore than that and you should probably see a doctor.

    Mouth, nostrils, eyes, ears, urethra, anus, belly-button, nipples and sweatglands - where's the problem?

    Absolutely nothing, other than having hot fucking coffee coming out of anything other than the first two listed...

  • (cs) in reply to Matt Westwood
    Matt Westwood:
    C-Octothorpe:
    Just a Commenter:
    The blacked words and thinking of the Nagesh character involved made me shoot hot coffee out of several orifices simultaneously.

    I can understand the first 3 orifices, but anymore than that and you should probably see a doctor.

    Mouth, nostrils, eyes, ears, urethra, anus, belly-button, nipples and sweatglands - where's the problem?

    I don't know about you, but the last time I checked, my belly button was not an orifice since birth... now it's just some wrinkled "dimple" in my fat-bastard belly.

  • (cs) in reply to C-Octothorpe
    C-Octothorpe:
    Sorry, knee-jerk reaction to people telling me in interviews they have a solid 15+ years of .Net experience, or when .Net 4 *just* came out, apparently they had been using it for 2+ years... oh really?

    Off topic: Depending on my mood/schedule, I'll either end the interview there (lying is a big character flaw IMO), or give them enough rope to hang themselves with (I love teaching people to never lie in an interview).

    I see this myself on resumes. I think I get passed over sometimes for my number of years experience on my resumes on various items, when it is completely true.

    It is getting to be a useless metric in a lot of respects. I know pepople that have been using .Net for years and still can not write decent code.

  • (cs) in reply to The Bytemaster
    The Bytemaster:
    C-Octothorpe:
    Sorry, knee-jerk reaction to people telling me in interviews they have a solid 15+ years of .Net experience, or when .Net 4 *just* came out, apparently they had been using it for 2+ years... oh really?

    Off topic: Depending on my mood/schedule, I'll either end the interview there (lying is a big character flaw IMO), or give them enough rope to hang themselves with (I love teaching people to never lie in an interview).

    I see this myself on resumes. I think I get passed over sometimes for my number of years experience on my resumes on various items, when it is completely true.

    It is getting to be a useless metric in a lot of respects. I know pepople that have been using .Net for years and still can not write decent code.

    Yeah, I totally agree about number of years != developer skills, but I do watch out for some red flags. Technical ability is great, but if they're going to lie to me before even starting, then show them the door.

    Addendum (2011-06-15 16:06):

    The Bytemaster:
    C-Octothorpe:
    Sorry, knee-jerk reaction to people telling me in interviews they have a solid 15+ years of .Net experience, or when .Net 4 *just* came out, apparently they had been using it for 2+ years... oh really?

    Off topic: Depending on my mood/schedule, I'll either end the interview there (lying is a big character flaw IMO), or give them enough rope to hang themselves with (I love teaching people to never lie in an interview).

    I see this myself on resumes. I think I get passed over sometimes for my number of years experience on my resumes on various items, when it is completely true.

    It is getting to be a useless metric in a lot of respects. I know pepople that have been using .Net for years and still can not write decent code.

    Yeah, I totally agree about number of years != developer skills, but I do watch out for some red flags. Technical ability is great, but if they're going to lie to me before even starting, then show them the door. I wouldn't, however, pass someone over if they claim on their resume that they have 5+ years of WPF, and it's only been our for 4.5 years. I tend to round "up" when it comes to experience as well... :)

  • (cs) in reply to Matt Westwood
    Matt Westwood:
    boog:
    I think this code could be cited as justification for blah blah bullshit blah...
    Oh come on, get real...
    Not a chance.
    Matt Westwood:
    ...there were eight peers of the programmer who put this together. "You need an Activate()," said the first. "Yes, you need an Activate()," said the second. "You know what's missing here, an Activate()," said the third.
    Okay, and the follow-up ("hey guys, here's a diff of my changes, have a gander and let me know if I totally fucked up") should have indicated that the code's author is a moron and provided adequate reason for firing him.

    Out of a cannon.

    And into the sun.

  • (cs) in reply to C-Octothorpe
    C-Octothorpe:
    Matt Westwood:
    C-Octothorpe:
    Just a Commenter:
    The blacked words and thinking of the Nagesh character involved made me shoot hot coffee out of several orifices simultaneously.

    I can understand the first 3 orifices, but anymore than that and you should probably see a doctor.

    Mouth, nostrils, eyes, ears, urethra, anus, belly-button, nipples and sweatglands - where's the problem?

    Absolutely nothing, other than having hot fucking coffee coming out of anything other than the first two listed...

    Worse yet if you didn't drink any to begin with.

  • (cs) in reply to boog
    boog:
    C-Octothorpe:
    Matt Westwood:
    C-Octothorpe:
    Just a Commenter:
    The blacked words and thinking of the Nagesh character involved made me shoot hot coffee out of several orifices simultaneously.

    I can understand the first 3 orifices, but anymore than that and you should probably see a doctor.

    Mouth, nostrils, eyes, ears, urethra, anus, belly-button, nipples and sweatglands - where's the problem?

    Absolutely nothing, other than having hot fucking coffee coming out of anything other than the first two listed...

    Worse yet if you didn't drink any to begin with.
    Oh, that's not coffee...

  • Oregon Trailz (unregistered) in reply to Just a Commenter
    Just a Commenter:
    Siva:
    Nagesh:
    This reminds me of state machine I develop at university for Master's thesis. Activeate call to be change state and new Activeate can be diferent funtionality.
    Friends, real Nagesh's funning to stop. Have you wondering why he not has posted some time? This is very sad situation: He take long struggle with dysentery and died of much diarrhea food poisioning. He has wife and 16 childs who are missing his provision and in bear feet on the streets.

    Please be sparing his good name from abuse further.

    The blacked words and thinking of the Nagesh character involved made me shoot hot coffee out of several orifices simultaneously.
    Ha ha, dysentery. [image]

  • Shinobu (unregistered) in reply to boog
    boog:
    if it doesn't loop, that means you wait 100 milliseconds for no reason. What a waste of valuable time.
    Not my time, as it happens.
  • CodeCaster (unregistered)

    'Multiple exclamation marks,' he went on, shaking his head, 'are a sure sign of a diseased mind.'

  • LANMind (unregistered) in reply to Siva
    Siva:
    Nagesh:
    This reminds me of state machine I develop at university for Master's thesis. Activeate call to be change state and new Activeate can be diferent funtionality.
    Friends, real Nagesh's funning to stop. Have you wondering why he not has posted some time? This is very sad situation: He take long struggle with dysentery and died of much diarrhea food poisioning. He has wife and 16 childs who are missing his provision and in bear feet on the streets.

    Please be sparing his good name from abuse further.

    Hey! That's enough of that - this is a respectable place. We don't tolerate retards making fun of retards.

  • Just a Commenter (unregistered) in reply to LANMind
    LANMind:
    Siva:
    dysentery...diarrhea...
    ...this is a respectable place...
    Yet another comment that made me shoot hot coffee out of multiple orifices.
  • LANMind (unregistered) in reply to Just a Commenter
    Just a Commenter:
    LANMind:
    Siva:
    dysentery...diarrhea...
    ...this is a respectable place...
    Yet another comment that made me shoot hot coffee out of multiple orifices.

    You're welcome.

  • DominiK (unregistered) in reply to a flaming pineapple
    a flaming pineapple:
    fixed:

    try { Activate(); Activate(); Activate(); Activate(); Activate(); Activate(); Activate(); Activate(); Activate(); } catch (Exception e) { Activate(); Activate(); Activate(); Activate(); Activate(); Activate(); Activate(); Activate(); Activate(); }

    [code] //Fixed too many Activates beign called occasionally /* This woz a troublsome bug that had everyone stumped

    • for long time - sometimes Activate woz called more
    • than 8 time, and it was causing problem and interrupting
    • too much solitaire. Thankfully, awesome coderz like me
    • exist, and after much searches on interwebs, and discussions
    • with other brain giants in high educated forums, I have
    • elegantely fixed the problems. All will now be asking me
    • for send teh codez...Man they pay me not enough */

    int numTimesCalled = 0; try { Activate(); numTimesCalled++; Activate(); numTimesCalled++; Activate(); numTimesCalled++; Activate(); numTimesCalled++; Activate(); numTimesCalled++; Activate(); numTimesCalled++; Activate(); numTimesCalled++; Activate(); numTimesCalled++; } catch (Exception e) { switch(numTimesCalled) { // Note: We want this code to drop through - break statements are for wusses case 0: Activate(); // Note: We want this code to drop through - break statements are for wusses case 1:
    // Note: We want this code to drop through - break statements are for wusses case 2: Activate(); // Note: We want this code to drop through - break statements are for wusses case 3: Activate(); // Note: We want this code to drop through - break statements are for wusses case 4: Activate(); // Note: We want this code to drop through - break statements are for wusses case 5: Activate(); // Note: We want this code to drop through - break statements are for wusses case 6: Activate(); // Note: We want this code to drop through - break statements are for wusses case 7: Activate(); // Note: We want this code to drop through - break statements are for wusses //Default: can't happen anyways coz I am brillant, do nothing default: }
    }

  • DominiK (unregistered) in reply to DominiK
    a flaming pineapple:
    fixed:

    try { Activate(); Activate(); Activate(); Activate(); Activate(); Activate(); Activate(); Activate(); Activate(); } catch (Exception e) { Activate(); Activate(); Activate(); Activate(); Activate(); Activate(); Activate(); Activate(); Activate(); }

    Perhaps wen I lernt code tags....
    //Fixed too many Activates beign called occasionally
    /* This woz a troublsome bug that had everyone stumped
     * for long time - sometimes Activate woz called more
     * than 8 time, and it was causing problem and interrupting
     * too much solitaire.  Thankfully, awesome coderz like me 
     * exist, and after much searches on interwebs, and discussions
     * with other brain giants in high educated forums, I have
     * elegantely fixed the problems.  All will now be asking me
     * for send teh codez...Man they pay me not enough
     */
    

    int numTimesCalled = 0; try { Activate(); numTimesCalled++; Activate(); numTimesCalled++; Activate(); numTimesCalled++; Activate(); numTimesCalled++; Activate(); numTimesCalled++; Activate(); numTimesCalled++; Activate(); numTimesCalled++; Activate(); numTimesCalled++; } catch (Exception e) { switch(numTimesCalled) { // Note: We want this code to drop through - break statements are for wusses case 0: Activate(); // Note: We want this code to drop through - break statements are for wusses case 1:
    // Note: We want this code to drop through - break statements are for wusses case 2: Activate(); // Note: We want this code to drop through - break statements are for wusses case 3: Activate(); // Note: We want this code to drop through - break statements are for wusses case 4: Activate(); // Note: We want this code to drop through - break statements are for wusses case 5: Activate(); // Note: We want this code to drop through - break statements are for wusses case 6: Activate(); // Note: We want this code to drop through - break statements are for wusses case 7: Activate(); // Note: We want this code to drop through - break statements are for wusses //Default: can't happen anyways coz I am brillant, do nothing default: }
    }

  • Wendy (unregistered) in reply to Siva
    Siva:
    Nagesh:
    This reminds me of state machine I develop at university for Master's thesis. Activeate call to be change state and new Activeate can be diferent funtionality.
    Friends, real Nagesh's funning to stop. Have you wondering why he not has posted some time? This is very sad situation: He take long struggle with dysentery and died of much diarrhea food poisioning. He has wife and 16 childs who are missing his provision and in bear feet on the streets.

    Please be sparing his good name from abuse further.

    I saw him fall from a cliff on "World's most dangerous roads"

  • (cs)

    EVERYBODY has missed the real WTF here.

    An Enterprise Architect has NOTHING do do with IT, computers, software, et. al. The role of an EA is to define a strategy for the Enterprise as a whole. Some examples:

    1. How should manufacturing (if applicable) be handled? Our own Factories? OutSourced

    2. How should Financial Aspects be Structured?

    3. How should Products (if applicable) be sold? Our own Stores? Franchises? Outlets?

    etc. etc. etc.

    Basically everything that makes the company what it is.

    If all computers were to vanish tomorrow, the ROLE of an EA would not change. The viable options definately would, but the role itself would not.

    So if you were hired as an EA..then perform that role. Research all aspects of the companies operations, do comparitive analysis of other relevent companies, markets, etc. When you have analyzed all of theis and have come up with a set of Strategic Initiatives, along with their risk/cost/benefit analysis and are ready to present them to the CEO for approval and execution. Then you are an EA.

    (Of course it is much more likly that you were hired as an Applications/Software/Systems/Solutions Architect)

  • Johno (unregistered) in reply to Doug
    Doug:
    add Activate() (which probably worked for a previous problem) repeatedly until it seems to work and go on to the next problem. It is easy to get into this pattern when required to muddle about in a soup of code you don't understand.

    You might call this a "test pattern". Keep testing till it passes the test due to unknown circumstances and call the last thing you did the solution.

    we were lucky this time.
    This is our normal bugfixing - if something doesn't work repeat it. This has been through 3 fixes, and so far we believe we have the issue under control. When we get to 10 repetitions we consider using a loop. Once we're looping, we can increase the repetition rate quicker. If we ever get to a thousand repetitions, there is a small chance the issue is actually somewhere else, and we're only masking the problme...

    captcha: bene - "Bene Grazie, e Lei?"

  • Pedant (unregistered) in reply to Just a Commenter
    Just a Commenter:
    C-Octothorpe:
    Just a Commenter:
    The blacked words and thinking of the Nagesh character involved made me shoot hot coffee out of several orifices simultaneously.

    I can understand the first 3 orifices, but anymore than that and you should probably see a doctor.

    Last time I checked, "several" means "3".

    Uhm...then why didn't you say 3 - it would have taken less typing. Actually, "several" means "more than a couple" ie ("more than 2"), but implies a non-specific quantity (like "we didn't actually bother counting them, but it was more than 2") - if you want to specify an exact quantity, several probably ain't the right word....

    several != 3 (although it may refer to it): *several == 3 sometimes.

  • Grandma Narsi (unregistered) in reply to Gunslinger
    Gunslinger:
    Just a Commenter:
    C-Octothorpe:
    Just a Commenter:
    The blacked words and thinking of the Nagesh character involved made me shoot hot coffee out of several orifices simultaneously.

    I can understand the first 3 orifices, but anymore than that and you should probably see a doctor.

    Last time I checked, "several" means "3".

    Nope, couple is 2, coupla or few is 3, several is 4 or more.

    Bah Humbug, they are much the same thing, except Several implies more than two, whereas few simply implies a small number - I am always amused when people try to quantify them, given that I would think their whole purpose is to avoid quantifying (I'm guessing the yankees {who as an old teacher used to remind me "never learnt to speak English properly" might say quantification or quantificating).

    Some definitions, carefully chosen to support my thoughts:

    Few –adjective 1. not many but more than one : Send me a few. –noun 2. ( used with a plural verb ) a small number or amount: Send me a few.

    Several –adjective 1. being more than two but fewer than many in number or kind: several ways of doing it. –noun 6. several persons or things; a few; some.

  • Jiminy (unregistered) in reply to C-Octothorpe
    C-Octothorpe:
    The Bytemaster:
    C-Octothorpe:
    I figured someone with 5+ years of WPF experience would notice that it hasn't been around for even 5 years yet... Hmm...
    Ok, so the official release of .NET 3.0 was in November 2006, not quite 5 years... the beta and preview releases were arround a long time before that.

    Sorry, knee-jerk reaction to people telling me in interviews they have a solid 15+ years of .Net experience, or when .Net 4 just came out, apparently they had been using it for 2+ years... oh really?

    Off topic: Depending on my mood/schedule, I'll either end the interview there (lying is a big character flaw IMO), or give them enough rope to hang themselves with (I love teaching people to never lie in an interview).

    We all know you're just a pedantic F*&k. I've had a solid 15+ years .Net experience - and that's just in the last 18 months....Before that, I was having 20+ years solid Java experience - and all before I'm 30!!

  • Hagrid (unregistered) in reply to C-Octothorpe
    C-Octothorpe:
    Matt Westwood:
    C-Octothorpe:
    Just a Commenter:
    The blacked words and thinking of the Nagesh character involved made me shoot hot coffee out of several orifices simultaneously.

    I can understand the first 3 orifices, but anymore than that and you should probably see a doctor.

    Mouth, nostrils, eyes, ears, urethra, anus, belly-button, nipples and sweatglands - where's the problem?

    Absolutely nothing, other than having hot fucking coffee coming out of anything other than the first two listed...

    Apparently it is possible from the eyes....

  • tsilcyc (unregistered) in reply to C-Octothorpe
    C-Octothorpe:
    The Bytemaster:
    C-Octothorpe:
    Sorry, knee-jerk reaction to people telling me in interviews they have a solid 15+ years of .Net experience, or when .Net 4 *just* came out, apparently they had been using it for 2+ years... oh really?

    Off topic: Depending on my mood/schedule, I'll either end the interview there (lying is a big character flaw IMO), or give them enough rope to hang themselves with (I love teaching people to never lie in an interview).

    I see this myself on resumes. I think I get passed over sometimes for my number of years experience on my resumes on various items, when it is completely true.

    It is getting to be a useless metric in a lot of respects. I know pepople that have been using .Net for years and still can not write decent code.

    Yeah, I totally agree about number of years != developer skills, but I do watch out for some red flags. Technical ability is great, but if they're going to lie to me before even starting, then show them the door.

    Addendum (2011-06-15 16:06):

    The Bytemaster:
    C-Octothorpe:
    Sorry, knee-jerk reaction to people telling me in interviews they have a solid 15+ years of .Net experience, or when .Net 4 *just* came out, apparently they had been using it for 2+ years... oh really?

    Off topic: Depending on my mood/schedule, I'll either end the interview there (lying is a big character flaw IMO), or give them enough rope to hang themselves with (I love teaching people to never lie in an interview).

    I see this myself on resumes. I think I get passed over sometimes for my number of years experience on my resumes on various items, when it is completely true.

    It is getting to be a useless metric in a lot of respects. I know pepople that have been using .Net for years and still can not write decent code.

    Yeah, I totally agree about number of years != developer skills, but I do watch out for some red flags. Technical ability is great, but if they're going to lie to me before even starting, then show them the door. I wouldn't, however, pass someone over if they claim on their resume that they have 5+ years of WPF, and it's only been our for 4.5 years. I tend to round "up" when it comes to experience as well... :)

    WOW!!! I didn't know bikes can go backward that fast!!

  • BobDobbs (unregistered)

    I worked on a tool using Autodesk Maya and MEL scripting, and there was a particular operation that would get close each time you ran it, and so it actually took about three tries for it to actually work (or get close enough to be imperceptible to humans). Unfortunately that led to constructs JUST like this WTF.

  • mtj (unregistered)

    Developers(); Developers(); Developers(); Developers(); Developers(); Developers(); Developers(); Developers();

  • Luiz Felipe (unregistered) in reply to frits
    frits:
    Those calls to Activate() should be called in a while(true) loop concurrently in another thread, making sure to invoke the actual call on the UI thread, of course.
    I think the same thing, but i will put some background worker.
    while (true) 
      BackgroundWorker.RunWorkerAsync((a) => 
        { while (true) {
             var t = new Thread( () => { Activate(); } );
             t.Start();
          }
        });
    
  • Luiz Felipe (unregistered) in reply to Grandma Narsi
    Grandma Narsi:
    Gunslinger:
    Just a Commenter:
    C-Octothorpe:
    Just a Commenter:
    The blacked words and thinking of the Nagesh character involved made me shoot hot coffee out of several orifices simultaneously.

    I can understand the first 3 orifices, but anymore than that and you should probably see a doctor.

    Last time I checked, "several" means "3".

    Nope, couple is 2, coupla or few is 3, several is 4 or more.

    Bah Humbug, they are much the same thing, except Several implies more than two, whereas few simply implies a small number - I am always amused when people try to quantify them, given that I would think their whole purpose is to avoid quantifying (I'm guessing the yankees {who as an old teacher used to remind me "never learnt to speak English properly" might say quantification or quantificating).

    Some definitions, carefully chosen to support my thoughts:

    Few –adjective 1. not many but more than one : Send me a few. –noun 2. ( used with a plural verb ) a small number or amount: Send me a few.

    Several –adjective 1. being more than two but fewer than many in number or kind: several ways of doing it. –noun 6. several persons or things; a few; some.

    Damn fucking convoluted logic. Who have coded it? I think i understood. 2 = few 3 = few 4 = few / several 5 = several 6 = many

  • Tasty!!!!!!!! (unregistered) in reply to Siva
    Siva:
    Nagesh:
    This reminds me of state machine I develop at university for Master's thesis. Activeate call to be change state and new Activeate can be diferent funtionality.
    Friends, real Nagesh's funning to stop. Have you wondering why he not has posted some time? This is very sad situation: He take long struggle with dysentery and died of much diarrhea food poisioning. He has wife and 16 childs who are missing his provision and in bear feet on the streets.

    Please be sparing his good name from abuse further.

    TRWTF is consumption of diarrhoea. Mrs. Nagesh seriously needs some food hygiene training.

  • Juli (unregistered) in reply to Luiz Felipe
    Luiz Felipe:
    Grandma Narsi:
    Gunslinger:
    Just a Commenter:
    C-Octothorpe:
    Just a Commenter:
    The blacked words and thinking of the Nagesh character involved made me shoot hot coffee out of several orifices simultaneously.

    I can understand the first 3 orifices, but anymore than that and you should probably see a doctor.

    Last time I checked, "several" means "3".

    Nope, couple is 2, coupla or few is 3, several is 4 or more.

    Bah Humbug, they are much the same thing, except Several implies more than two, whereas few simply implies a small number - I am always amused when people try to quantify them, given that I would think their whole purpose is to avoid quantifying (I'm guessing the yankees {who as an old teacher used to remind me "never learnt to speak English properly" might say quantification or quantificating).

    Some definitions, carefully chosen to support my thoughts:

    Few –adjective 1. not many but more than one : Send me a few. –noun 2. ( used with a plural verb ) a small number or amount: Send me a few.

    Several –adjective 1. being more than two but fewer than many in number or kind: several ways of doing it. –noun 6. several persons or things; a few; some.

    Damn fucking convoluted logic. Who have coded it? I think i understood. 2 = few 3 = few 4 = few / several 5 = several 6 = many

    Easy way to test....
    int i;
    while(i=2; i instanceof few; i++)
    {
      System.out.print(i + ", ");
      if(i instanceof several) System.out.println("Several");
      if(i instanceof many) System.out.println("Many");
    }
    System.out.println();
    if(i instanceof several) System.out.println("Several");
    if(i instanceof many) System.out.println("Many");
    
    On my machine, this prints
    2, 3, 4, 5, Several
    6, Several
    7, Several
    8, Several
    9, Several
    

    Several Many

    I haven't tested what happens with i> 10, so I don't know when Several stops and only Many continues....

  • gratuitous_arp (unregistered)
    void Activate(void)
    {
        static int n = 0;
    
        n++;
        if (n == 8)
        {
             __Activate();
             n = 0;
        }
    }
  • bah bah coder (unregistered) in reply to TheCPUWizard

    Perhaps this is the developer who committed such horrid code. Looks like you put as much thought into your comments as your code....

  • (cs)

    Am I the only one seeing "activate()" thought "MAIN SCREEN TURN ON!"? Probably not.

  • gs (unregistered) in reply to C-Octothorpe
    C-Octothorpe:
    I figured someone with 5+ years of WPF experience would notice that it hasn't been around for even 5 years yet... Hmm...
    Oh - not? How do you explain then that I published my first WPF article 6 years ago, in July 2005 (back then, WPF was still code-named "Avalon"), based on beta and pre-release versions we received from MS? But yes - the "official" RTM under the name WPF was only in late 2006 - not fully 5 years ago.
  • Martian Kyo (unregistered)

    Danger(); Danger(); Danger(); Danger(); WillRobinson();

  • MicrosoftDev (unregistered)

    lets google:

    http://msdn.microsoft.com/en-us/library/system.windows.window.activate.aspx

    Attempts to bring the window to the foreground and activates it.

    But why 10 time?

  • Anonymous Cow-Herd (unregistered) in reply to MicrosoftDev
    MicrosoftDev:
    lets google:

    http://msdn.microsoft.com/en-us/library/system.windows.window.activate.aspx

    Attempts to bring the window to the foreground and activates it.

    But why 10 time?

    Because we want to be sure, dammit!

  • (cs) in reply to Ramsey
    Ramsey:
    Badgers(); Badgers(); Badgers(); Badgers(); Badgers(); Badgers(); Badgers(); Badgers(); Badgers(); Badgers(); Badgers(mushroom, mushroom);

    Hahaha, omg.

  • Jibble (unregistered) in reply to Yohann
    Yohann:
    It's so obious he shall have writed ;

    for(i=0;i++;i<8) { activate(); }

    so we have a better readability maintenance is easy (want 50 activate just change the number)

    for (i=0;i++;i<100) { comment(); }

    Should have put it in an external function:

    static int activeMult = 1; void doActivate(int n) { for(i=0;i++;i<(n*activeMult)) { activate(); } }

    That way you can increase the multiplier as requirements change.

  • Jibble (unregistered) in reply to MicrosoftDev
    MicrosoftDev:
    lets google:

    http://msdn.microsoft.com/en-us/library/system.windows.window.activate.aspx

    Attempts to bring the window to the foreground and activates it.

    But why 10 time?

    Reading comprehension fail? The function only "Attempts" to do it...

  • gnasher729 (unregistered) in reply to Wondering in Motion

    Without a comment why it is done eight times it is a WTF. If there is a reason but no comment giving the reason then it is an even bigger WTF than doing it with no reason at all.

  • Olius (unregistered)

    If you are an Enterprise Architect, are you going to have them change the "Active" function to "Engage" ?

  • (cs) in reply to boog
    boog:
    Shinobu:
    I've written code like this, and since that was also interfacing an MS object model, I can sympathise. It went essentially like this:   do   {       x.enable();       sleep(100);   } while(!x.enabled()); Often it didn't loop, sometimes it would loop twice and rarely a handful of times. Remove the loop, and the program would crash on a method call that required x to be enabled.
    Interesting, but if it doesn't loop, that means you wait 100 milliseconds for no reason. What a waste of valuable time.

    It doesn't loop because you waited 100ms, to give time for the enable() to take effect.

    Of course, you might have only had to wait 50ms, or 20, or 70 - so some time has been wasted. But as another commenter has pointed out, it's someone else's time...

  • eVil (unregistered) in reply to Olius
    Olius:
    If you are an Enterprise Architect, are you going to have them change the "Active" function to "Engage" ?

    MakeItSo();

  • ted (unregistered) in reply to eVil
    eVil:
    Olius:
    If you are an Enterprise Architect, are you going to have them change the "Active" function to "Engage" ?

    MakeItSo();

    Number riker = new Integer(1); riker.makeItSo();

  • OMGItsAGirl (unregistered)

    Several of you are missing the point. It's much easier if you quantify thus:

    One Two Many Lots

  • The Nerve (unregistered)

    Here's the Swing version (I've actually seen this in code-in-the-wild):

        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                SwingUtilities.invokeLater(new Runnable() {
                    public void run() {
                       doSomething();
                    }
            }
        });
    

    For the uninitiated, Swing events are processed sequentially on the SwingEventQueue. You have limited ability to manipulate items on the queue, but anything GUI-related (repainting) should be processed there. To put the item on the end of the queue, you use the utility method: SwingUtilities.invokeLater. What happens in the run method is what happens when that event is processed. What is going on above is: "When you get to my event, add another event to be processed when all the other events after me get processed." "WTF is the motivation!!!!!!!!" you ask? Developer in question was trying to solve some sort of timing issue. This is a (stupid) way to delay an event, hoping and praying it somehow happens at the right time.

    (Yes, I know I used anonymous inner classes and didn't explain what they were. I'll leave that as an exercise for the curious).

Leave a comment on “Activate!!!!!!!!”

Log In or post as a guest

Replying to comment #:

« Return to Article