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

    I should register an account. After "submit", I realized that I left out the tie-in:

    Likely, the developer was trying to activate the window, but some other process was interfering. Rather than trying to figure out what it was, the developer figured they would call Activate over and over until it worked. The same problem my Swing-dumb predecessor had: complacent incompetence.

  • (cs) in reply to OMGItsAGirl
    OMGItsAGirl:
    Several of you are missing the point. It's much easier if you quantify thus:

    One Two Many Lots

    One More

  • SCB (unregistered) in reply to Hatshepsut
    Hatshepsut:
    OMGItsAGirl:
    Several of you are missing the point. It's much easier if you quantify thus:

    One Two Many Lots

    One More

    Real programmers start counting from zero.
  • ted (unregistered) in reply to SCB
    SCB:
    Hatshepsut:
    OMGItsAGirl:
    Several of you are missing the point. It's much easier if you quantify thus:

    One Two Many Lots

    One More

    Real programmers start counting from zero.
    There is a difference between ordinal and cardinal numbers.

    What you are referring to is the convention of starting ordinal numbers with zero:

    index of 0 -> 1st index of 1 -> 2nd index of 3 -> 3rd etc.

    If cardinal numbers started at zero, it would look like this: count of 1 -> 0 count of 2 -> 1 etc.

    It wouldn't make any sense, so...

    "Real programmers know the difference between cardinal and ordinal numbers."

  • Anonymous Cow-Herd (unregistered) in reply to ted
    ted:
    SCB:
    Hatshepsut:
    OMGItsAGirl:
    Several of you are missing the point. It's much easier if you quantify thus:

    One Two Many Lots

    One More

    Real programmers start counting from zero.
    There is a difference between ordinal and cardinal numbers.

    What you are referring to is the convention of starting ordinal numbers with zero:

    index of 0 -> 1st index of 1 -> 2nd index of 3 -> 3rd etc.

    If cardinal numbers started at zero, it would look like this: count of 1 -> 0 count of 2 -> 1 etc.

    It wouldn't make any sense, so...

    "Real programmers know the difference between cardinal and ordinal numbers."

    WHOOOOOSH

  • .Net Guy (unregistered) in reply to The Nerve
    The Nerve:
    The Nerve:
    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).

    I should register an account. After "submit", I realized that I left out the tie-in:

    Likely, the developer was trying to activate the window, but some other process was interfering. Rather than trying to figure out what it was, the developer figured they would call Activate over and over until it worked. The same problem my Swing-dumb predecessor had: complacent incompetence.

    Needs more enterprisiness. Looks like you need a few more object factories generating crap from XML files deployed in glorified zip files.

  • ted (unregistered) in reply to Anonymous Cow-Herd
    Anonymous Cow-Herd:
    ted:
    SCB:
    Hatshepsut:
    OMGItsAGirl:
    Several of you are missing the point. It's much easier if you quantify thus:

    One Two Many Lots

    One More

    Real programmers start counting from zero.
    There is a difference between ordinal and cardinal numbers.

    What you are referring to is the convention of starting ordinal numbers with zero:

    index of 0 -> 1st index of 1 -> 2nd index of 3 -> 3rd etc.

    If cardinal numbers started at zero, it would look like this: count of 1 -> 0 count of 2 -> 1 etc.

    It wouldn't make any sense, so...

    "Real programmers know the difference between cardinal and ordinal numbers."

    WHOOOOOSH

    I got the joke, but someone was wrong on the internet

  • The Nerve (unregistered) in reply to .Net Guy
    .Net Guy:
    The Nerve:
    The Nerve:
    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).

    I should register an account. After "submit", I realized that I left out the tie-in:

    Likely, the developer was trying to activate the window, but some other process was interfering. Rather than trying to figure out what it was, the developer figured they would call Activate over and over until it worked. The same problem my Swing-dumb predecessor had: complacent incompetence.

    Needs more enterprisiness. Looks like you need a few more object factories generating crap from XML files deployed in glorified zip files.

    Not sure if you noticed, but this is not an entire application. Enterprisiness can definitely be hidden in the doSomething() method.

  • golddog (unregistered) in reply to C-Octothorpe
    C-Octothorpe:
    <snip/>

    Yeah, I totally agree about number of years != developer skills, but I do watch out for some red flags. [...]

    Had a really good interview the other day, I'm hoping to put in my resignation shortly.

    If there should come the point of discussing what people can handle my current tasks, I'm not so sure I won't be able to mention that I wouldn't hire a couple of my cow-workers to wash my car.

    These are people who've been around IT for 25 years +, but haven't changed their approach with the times, and are now the very definition of hack.

    Or perhaps they never had the analytical skills of you average chimpanzee to start with, I guess I don't know.

  • Just a Commenter (unregistered) in reply to golddog
    golddog:
    C-Octothorpe:
    <snip/>

    Yeah, I totally agree about number of years != developer skills, but I do watch out for some red flags. [...]

    Had a really good interview the other day, I'm hoping to put in my resignation shortly.

    If there should come the point of discussing what people can handle my current tasks, I'm not so sure I won't be able to mention that I wouldn't hire a couple of my cow-workers to wash my car.

    These are people who've been around IT for 25 years +, but haven't changed their approach with the times, and are now the very definition of hack.

    Or perhaps they never had the analytical skills of you average chimpanzee to start with, I guess I don't know.

    The bolded word made me shoot hot coffee out of several orifices simultaneously.

  • Rollin you (unregistered) in reply to golddog
    golddog:
    C-Octothorpe:
    <snip/>

    Yeah, I totally agree about number of years != developer skills, but I do watch out for some red flags. [...]

    Had a really good interview the other day, I'm hoping to put in my resignation shortly.

    If there should come the point of discussing what people can handle my current tasks, I'm not so sure I won't be able to mention that I wouldn't hire a couple of my cow-workers to wash my car.

    These are people who've been around IT for 25 years +, but haven't changed their approach with the times, and are now the very definition of hack.

    Or perhaps they never had the analytical skills of you average chimpanzee to start with, I guess I don't know.

    Why would anyone hire developers to wash their car?

  • Joe (unregistered) in reply to Luiz Felipe
    Luiz Felipe:
    Damn fucking convoluted logic. Who have coded it? I think i understood. 2 = few 3 = few 4 = few / several 5 = several 6 = many

    1, 2, many (3 <= i < \aleph_0), lots (i >= \aleph_0)

    --Joe

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

    Mouth, nostrils, tear-ducts - that's five, what were you thinking of?
  • Patrick (unregistered) in reply to OMGItsAGirl
    OMGItsAGirl:
    Several of you are missing the point. It's much easier if you quantify thus:

    One Two Many Lots

    A: 1 Couple: 2, sometimes 3 Few: more than 2, less than 5 Several: more than 3, less than 10 Handful: 5-20 Lots: 10-50 Many: 20-100 Heaps: 50-1000 Buttload (or the metric Ass-tonne): 500-9000 Over 9000!!!!!!!!: exactly what it sounds like.

    Does that help?

  • (cs) in reply to ted
    ted:
    I got the joke, but someone was wrong on the internet
    Wouldn't it be so funny if someone posted a link to xkcd right now? That way you could re-post ted's silly rant from the other day. And the regulars would be like "whoa, that's the same comment as the other day", and the non-regulars would post a wave of hate at you for "dissing" on xkcd links, and all the internets would be in complete turmoil.

    Oh yes, that would be so hilarious if that happened.

  • ted (unregistered) in reply to boog
    boog:
    ted:
    I got the joke, but someone was wrong on the internet
    Wouldn't it be so funny if someone posted a link to xkcd right now? That way you could re-post ted's silly rant from the other day. And the regulars would be like "whoa, that's the same comment as the other day", and the non-regulars would post a wave of hate at you for "dissing" on xkcd links, and all the internets would be in complete turmoil.

    Oh yes, that would be so hilarious if that happened.

    Are you being sarcastic? I can't tell at all!

    Anyway, I already did that in the base-64 encoding thread.

  • ted (unregistered) in reply to Patrick
    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.

    Does it really matter exactly what "several" means? Isn't it more relevant what the guy who originally used the word "several" meant? Instead of arguing about the literal definition and forgetting the context in which it was used, which defeats the purpose of trying to understand what the guy said?

    Hmmm.. If I heard someone else say this I might just tell them: "Welcome to the internet"

  • Anonymous Cow-Herd (unregistered) in reply to boog
    boog:
    ted:
    I got the joke, but someone was wrong on the internet
    Wouldn't it be so funny if someone posted a link to xkcd right now? That way you could re-post ted's silly rant from the other day. And the regulars would be like "whoa, that's the same comment as the other day", and the non-regulars would post a wave of hate at you for "dissing" on xkcd links, and all the internets would be in complete turmoil.

    Oh yes, that would be so hilarious if that happened.

    Bring it the fuck on! Also, screw you, Akismet!

  • asdf (unregistered)

    Or could it be that the coder was trying to pad the the LOC measurement that some managers use?

  • Codewarrior (unregistered) in reply to twofold

    You just had to ruin my day with a vision of Balmer bouncing around on stage.

  • (cs) in reply to ted
    ted:
    Are you being sarcastic? I can't tell at all!
    What gave you that idea?
    ted:
    Anyway, I already did that in the base-64 encoding thread.
    Did you? It just looked like random numbers and letters to me.
  • (cs)

    Perhaps we're missing the chance for some fun with this UI signaling...

    Activate(); Sleep(); Activate(); Sleep(); Activate(); Sleep(); Activate(); Sleep(); Sleep(); Sleep(); Activate(); Sleep(); Sleep(); Sleep(); Activate(); Sleep(); Sleep(); Sleep(); Activate(); Sleep(); Activate(); Sleep(); Activate(); Sleep();

  • John (unregistered)

    Won't work. Needs random numbers.

  • (cs) in reply to chron3
    chron3:
    Perhaps we're missing the chance for some fun with this UI signaling...

    Activate(); Sleep(); Activate(); Sleep(); Activate(); Sleep(); Activate(); Sleep(); Sleep(); Sleep(); Activate(); Sleep(); Sleep(); Sleep(); Activate(); Sleep(); Sleep(); Sleep(); Activate(); Sleep(); Activate(); Sleep(); Activate(); Sleep();

    I agree, the code's author definitely needs help.
  • ben (unregistered) in reply to dgvid
    dgvid:
    Under the category of code smells, repeated calls to activate, redraw, set focus, etc. would be the "smell of fear."

    Oh, and 1,890 lines of code for a single screen -- I don't think that's really unusual for WPF, from what little I've done with it so far. WPF has the smell of job security.

    I didn't even click on the link and knew it was some fag linking Wikipedia. It's not clever. It's not funny. Just the word "smell" with a link under it and the short, useless, one sentence post was all I needed to know that you were linking the cartoon where the editor iteratively one-up each other on how they input an article.

    It was great to read when it came out. It's even great when clicking on the Random Article button on the site and seeing it. It's NOT funny when someone links to it from a one-sentence post and thinks they're so fucking clever to have discovered Wikipedia.

    You probably still use lmgtfy and think you're so damn clever.

    It means in real life, you're an unoriginal hipster doofus.

    Got anything to do with sanitizing inputs to a SQL database, etc.? Link to Secure input and output handling. Got a nerd-project slow-ass turing machine? Like a minecraft logic circuit from redstone? Link to the one where it's some guy alone in the world making Stonehenge out of rocks. Got a story about password security or encryption? Link to the one where they broke RSA cryptography with brute force attacks.

    Fuck off. You're not clever.

  • (cs) in reply to Luiz Felipe

    [quote user="Luiz Felipe"][quote user="Grandma Narsi"] Damn fucking convoluted logic. Who have coded it? I think i understood. 2 = few 3 = few 4 = few / several 5 = several 6 = many [/quote]

    Be sure to use random selection for 4: It'll make the user's life more ... interesting ... that way.

    ("User friendly? What's that? Oh. We generally prefer user abusive.")

  • Chris the Author (unregistered) in reply to TheCPUWizard

    The actual title is Enterprise Software Architect - I think he just shortened it for the sake of the article, you are correct though........ This is also only a tiny tiny FRACTION of the WTFs I found within...... and to answer the code review question as to why an architect was doing tedious code reviews was because we needed to asses what it would take to either re-write or retro-fit the existing applications into our Enterprise Framework. In this case, it's a re-write - as were most of the apps I reviewed. That should make more sense...... :-D

    These comments are all priceless, I laughed all morning. Thanks everyone.

    TheCPUWizard:
    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)

  • Engrish Major (unregistered) in reply to ben
    ben:
    dgvid:
    Under the category of code smells, repeated calls to activate, redraw, set focus, etc. would be the "smell of fear."

    Oh, and 1,890 lines of code for a single screen -- I don't think that's really unusual for WPF, from what little I've done with it so far. WPF has the smell of job security.

    I didn't even click on the link and knew it was some fag linking Wikipedia. It's not clever. It's not funny. Just the word "smell" with a link under it and the short, useless, one sentence post was all I needed to know that you were linking the cartoon where the editor iteratively one-up each other on how they input an article.

    It was great to read when it came out. It's even great when clicking on the Random Article button on the site and seeing it. It's NOT funny when someone links to it from a one-sentence post and thinks they're so fucking clever to have discovered Wikipedia.

    You probably still use lmgtfy and think you're so damn clever.

    It means in real life, you're an unoriginal hipster doofus.

    Got anything to do with sanitizing inputs to a SQL database, etc.? Link to Secure input and output handling. Got a nerd-project slow-ass turing machine? Like a minecraft logic circuit from redstone? Link to the one where it's some guy alone in the world making Stonehenge out of rocks. Got a story about password security or encryption? Link to the one where they broke RSA cryptography with brute force attacks.

    Fuck off. You're not clever.

    Actually, Wikipedia is a perfectly acceptable citable resource.

  • (cs)

    Can i haz new wtf plz?

    kthxbai

  • (cs) in reply to spg
    spg:
    Here's a better version:

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

    Or maybe he manually unrolled the loop for an optimization.

    Or he was paid by the line

  • bar (unregistered) in reply to Engrish Major
    Engrish Major:
    Actually, Wikipedia is a perfectly acceptable citable resource.
    No, it's not.
  • bar (unregistered) in reply to John
    John:
    Won't work. Needs random numbers.
    It does. As few of you might now, the only good random number is 4. The plural, random numbers, is at least two of them, i.e. 8. That's exactly the number of times he called Activate().
  • (cs) in reply to chron3
    chron3:
    Perhaps we're missing the chance for some fun with this UI signaling...

    Activate(); Sleep(); Activate(); Sleep(); Activate(); Sleep(); Activate(); Sleep(); Sleep(); Sleep(); Activate(); Sleep(); Sleep(); Sleep(); Activate(); Sleep(); Sleep(); Sleep(); Activate(); Sleep(); Activate(); Sleep(); Activate(); Sleep();

    I can sympathize. I have looked at some code I have written and realized that I shouldn't have written it when I was that tired. I just needed Sleep() as well.
  • Just Wait (unregistered)

    Just watch, this is going to be the only article posted over and over for the next 8 days.

  • (cs) in reply to ben
    ben:
    dgvid:
    Under the category of code smells, repeated calls to activate, redraw, set focus, etc. would be the "smell of fear."

    Oh, and 1,890 lines of code for a single screen -- I don't think that's really unusual for WPF, from what little I've done with it so far. WPF has the smell of job security.

    I didn't even click on the link and knew it was some fag linking Wikipedia. It's not clever. It's not funny. Just the word "smell" with a link under it and the short, useless, one sentence post was all I needed to know that you were linking the cartoon where the editor iteratively one-up each other on how they input an article.

    It was great to read when it came out. It's even great when clicking on the Random Article button on the site and seeing it. It's NOT funny when someone links to it from a one-sentence post and thinks they're so fucking clever to have discovered Wikipedia.

    You probably still use lmgtfy and think you're so damn clever.

    It means in real life, you're an unoriginal hipster doofus.

    Got anything to do with sanitizing inputs to a SQL database, etc.? Link to Secure input and output handling. Got a nerd-project slow-ass turing machine? Like a minecraft logic circuit from redstone? Link to the one where it's some guy alone in the world making Stonehenge out of rocks. Got a story about password security or encryption? Link to the one where they broke RSA cryptography with brute force attacks.

    Fuck off. You're not clever.

    Well, you're a fucking offensive cunt, aren't you, shithead?

  • (cs) in reply to The Bytemaster
    The Bytemaster:
    chron3:
    Perhaps we're missing the chance for some fun with this UI signaling...

    Activate(); Sleep(); Activate(); Sleep(); Activate(); Sleep(); Activate(); Sleep(); Sleep(); Sleep(); Activate(); Sleep(); Sleep(); Sleep(); Activate(); Sleep(); Sleep(); Sleep(); Activate(); Sleep(); Activate(); Sleep(); Activate(); Sleep();

    I can sympathize. I have looked at some code I have written and realized that I shouldn't have written it when I was that tired. I just needed Sleep() as well.

    I've written my fair share of sleep code, and it goes a little something like this:

    var userService = new UserServrddddddddddddddddddddddddddddddddddddddd

  • (cs) in reply to Matt Westwood
    Matt Westwood:
    ben:
    dgvid:
    Under the category of code smells, repeated calls to activate, redraw, set focus, etc. would be the "smell of fear."

    Oh, and 1,890 lines of code for a single screen -- I don't think that's really unusual for WPF, from what little I've done with it so far. WPF has the smell of job security.

    I didn't even click on the link and knew it was some fag linking Wikipedia. It's not clever. It's not funny. Just the word "smell" with a link under it and the short, useless, one sentence post was all I needed to know that you were linking the cartoon where the editor iteratively one-up each other on how they input an article.

    It was great to read when it came out. It's even great when clicking on the Random Article button on the site and seeing it. It's NOT funny when someone links to it from a one-sentence post and thinks they're so fucking clever to have discovered Wikipedia.

    You probably still use lmgtfy and think you're so damn clever.

    It means in real life, you're an unoriginal hipster doofus.

    Got anything to do with sanitizing inputs to a SQL database, etc.? Link to Secure input and output handling. Got a nerd-project slow-ass turing machine? Like a minecraft logic circuit from redstone? Link to the one where it's some guy alone in the world making Stonehenge out of rocks. Got a story about password security or encryption? Link to the one where they broke RSA cryptography with brute force attacks.

    Fuck off. You're not clever.

    Well, you're a fucking offensive cunt, aren't you, shithead?

    Yep, that was the sound of the joke going over your head...

    woosh

    ... actually, I'm not being fair. There was this douchebag ted who flamed on the fact that people link to old xkcd articles, and this was a parody of it... I would link to it myself, but it may create a rift in the space-time continuum, and because I'm lazy.

  • Non-A (unregistered) in reply to C-Octothorpe
    C-Octothorpe:
    Matt Westwood:
    ben:
    dgvid:
    Under the category of code smells, repeated calls to activate, redraw, set focus, etc. would be the "smell of fear."

    Oh, and 1,890 lines of code for a single screen -- I don't think that's really unusual for WPF, from what little I've done with it so far. WPF has the smell of job security.

    I didn't even click on the link and knew it was some fag linking Wikipedia. It's not clever. It's not funny. Just the word "smell" with a link under it and the short, useless, one sentence post was all I needed to know that you were linking the cartoon where the editor iteratively one-up each other on how they input an article.

    It was great to read when it came out. It's even great when clicking on the Random Article button on the site and seeing it. It's NOT funny when someone links to it from a one-sentence post and thinks they're so fucking clever to have discovered Wikipedia.

    You probably still use lmgtfy and think you're so damn clever.

    It means in real life, you're an unoriginal hipster doofus.

    Got anything to do with sanitizing inputs to a SQL database, etc.? Link to Secure input and output handling. Got a nerd-project slow-ass turing machine? Like a minecraft logic circuit from redstone? Link to the one where it's some guy alone in the world making Stonehenge out of rocks. Got a story about password security or encryption? Link to the one where they broke RSA cryptography with brute force attacks.

    Fuck off. You're not clever.

    Well, you're a fucking offensive cunt, aren't you, shithead?

    Yep, that was the sound of the joke going over your head...

    woosh

    ... actually, I'm not being fair. There was this douchebag ted who flamed on the fact that people link to old xkcd articles, and this was a parody of it... I would link to it myself, but it may create a rift in the space-time continuum, and because I'm lazy.

    No no! We should link to it so then someone can flame me for linking to a Daily WTF comment!

  • West Mattwood (unregistered) in reply to C-Octothorpe
    C-Octothorpe:
    Matt Westwood:
    ben:
    dgvid:
    Under the category of code smells, repeated calls to activate, redraw, set focus, etc. would be the "smell of fear."

    Oh, and 1,890 lines of code for a single screen -- I don't think that's really unusual for WPF, from what little I've done with it so far. WPF has the smell of job security.

    I didn't even click on the link and knew it was some fag linking Wikipedia. It's not clever. It's not funny. Just the word "smell" with a link under it and the short, useless, one sentence post was all I needed to know that you were linking the cartoon where the editor iteratively one-up each other on how they input an article.

    It was great to read when it came out. It's even great when clicking on the Random Article button on the site and seeing it. It's NOT funny when someone links to it from a one-sentence post and thinks they're so fucking clever to have discovered Wikipedia.

    You probably still use lmgtfy and think you're so damn clever.

    It means in real life, you're an unoriginal hipster doofus.

    Got anything to do with sanitizing inputs to a SQL database, etc.? Link to Secure input and output handling. Got a nerd-project slow-ass turing machine? Like a minecraft logic circuit from redstone? Link to the one where it's some guy alone in the world making Stonehenge out of rocks. Got a story about password security or encryption? Link to the one where they broke RSA cryptography with brute force attacks.

    Fuck off. You're not clever.

    Well, you're a fucking offensive cunt, aren't you, shithead?

    Yep, that was the sound of the joke going over your head...

    woosh

    ... actually, I'm not being fair. There was this douchebag ted who flamed on the fact that people link to old xkcd articles, and this was a parody of it... I would link to it myself, but it may create a rift in the space-time continuum, and because I'm lazy.

    Yeah, Matt. There also used to be a guy here who posted as "Nagesh", pretending to be Indian.

  • bar (unregistered) in reply to C-Octothorpe
    C-Octothorpe:
    I've written my fair share of sleep code, and it goes a little something like this:
    var userService = new UserServrddddddddddddddddddddddddddddddddddddddd
    I call shenanigans. Everyone knows sleeping is
    zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
    not
    ddddddddddddddddddddddddddddddd
    .
  • (cs) in reply to West Mattwood
    West Mattwood:
    C-Octothorpe:
    Matt Westwood:
    ben:
    dgvid:
    Under the category of code smells, repeated calls to activate, redraw, set focus, etc. would be the "smell of fear."

    Oh, and 1,890 lines of code for a single screen -- I don't think that's really unusual for WPF, from what little I've done with it so far. WPF has the smell of job security.

    I didn't even click on the link and knew it was some fag linking Wikipedia. It's not clever. It's not funny. Just the word "smell" with a link under it and the short, useless, one sentence post was all I needed to know that you were linking the cartoon where the editor iteratively one-up each other on how they input an article.

    It was great to read when it came out. It's even great when clicking on the Random Article button on the site and seeing it. It's NOT funny when someone links to it from a one-sentence post and thinks they're so fucking clever to have discovered Wikipedia.

    You probably still use lmgtfy and think you're so damn clever.

    It means in real life, you're an unoriginal hipster doofus.

    Got anything to do with sanitizing inputs to a SQL database, etc.? Link to Secure input and output handling. Got a nerd-project slow-ass turing machine? Like a minecraft logic circuit from redstone? Link to the one where it's some guy alone in the world making Stonehenge out of rocks. Got a story about password security or encryption? Link to the one where they broke RSA cryptography with brute force attacks.

    Fuck off. You're not clever.

    Well, you're a fucking offensive cunt, aren't you, shithead?

    Yep, that was the sound of the joke going over your head...

    woosh

    ... actually, I'm not being fair. There was this douchebag ted who flamed on the fact that people link to old xkcd articles, and this was a parody of it... I would link to it myself, but it may create a rift in the space-time continuum, and because I'm lazy.

    Yeah, Matt. There also used to be a guy here who posted as "Nagesh", pretending to be Indian.
    I heard he died because he ate diarrhea... That's what you get for eating Indian food I suppose.

  • Léa (unregistered)

    Now if it had been named DoMagic instead of Activate I think it probably would have been worthy of some sort of award ;)

  • fwe (unregistered) in reply to boog
    boog:
    chron3:
    Perhaps we're missing the chance for some fun with this UI signaling...

    Activate(); Sleep(); Activate(); Sleep(); Activate(); Sleep(); Activate(); Sleep(); Sleep(); Sleep(); Activate(); Sleep(); Sleep(); Sleep(); Activate(); Sleep(); Sleep(); Sleep(); Activate(); Sleep(); Activate(); Sleep(); Activate(); Sleep();

    I agree, the code's author definitely needs help.

    Is there are suggestion he's sleep deprived?

    And why haven't the "Where's todays post?" posts started...

  • Cunny Funt (unregistered) in reply to ben
    ben:
    dgvid:
    Under the category of code smells, repeated calls to activate, redraw, set focus, etc. would be the "smell of fear."

    Oh, and 1,890 lines of code for a single screen -- I don't think that's really unusual for WPF, from what little I've done with it so far. WPF has the smell of job security.

    I didn't even click on the link and knew it was some fag linking Wikipedia. It's not clever. It's not funny. Just the word "smell" with a link under it and the short, useless, one sentence post was all I needed to know that you were linking the cartoon where the editor iteratively one-up each other on how they input an article.

    It was great to read when it came out. It's even great when clicking on the Random Article button on the site and seeing it. It's NOT funny when someone links to it from a one-sentence post and thinks they're so fucking clever to have discovered Wikipedia.

    You probably still use lmgtfy and think you're so damn clever.

    It means in real life, you're an unoriginal hipster doofus.

    Got anything to do with sanitizing inputs to a SQL database, etc.? Link to Secure input and output handling. Got a nerd-project slow-ass turing machine? Like a minecraft logic circuit from redstone? Link to the one where it's some guy alone in the world making Stonehenge out of rocks. Got a story about password security or encryption? Link to the one where they broke RSA cryptography with brute force attacks.

    Fuck off. You're not clever.

    I think one of these came not long after

  • Me (unregistered) in reply to bar
    bar:
    John:
    Won't work. Needs random numbers.
    It does. As few of you might now, the only good random number is 4. The plural, random numbers, is at least two of them, i.e. 8. That's exactly the number of times he called Activate().

    plural of random numbers >= 8 (and multiple of 4).... a couple of random numbers would be 8

    I wonder if the plural implies a few, several or many?

  • (cs) in reply to fwe
    fwe:
    boog:
    chron3:
    Perhaps we're missing the chance for some fun with this UI signaling...

    Activate(); Sleep(); Activate(); Sleep(); Activate(); Sleep(); Activate(); Sleep(); Sleep(); Sleep(); Activate(); Sleep(); Sleep(); Sleep(); Activate(); Sleep(); Sleep(); Sleep(); Activate(); Sleep(); Activate(); Sleep(); Activate(); Sleep();

    I agree, the code's author definitely needs help.
    Is there are suggestion he's sleep deprived?
    I don't know, but sleep deprivation is hardly a valid reason to send out a distress signal.
  • Resa (unregistered) in reply to frits

    Same difference.

  • Resa (unregistered) in reply to The Bytemaster
    The Bytemaster:
    Mason Wheeler:
    frits:
    Is WPF the new WTF?
    Yes, definitely. Even Microsoft seems to realize that now. Sure took them long enough...
    WPF is actually an amzingly powerful framework, and much faster to develop in than WinForms given a few conditions:

    I work on surface & multi-touch applications and have to work with WPF frequently. The documentation is horrendous. It's even worse for MS Surface.

  • RTFM... (unregistered) in reply to gs

    First - if you use a framework, trust it will Activate the window for you after the Activate() call.

    Second - It gives you an event, telling you when it is done.

    Third - Activating a window actually need to execute something in the UI thread, if it happen that you are blocking the UI thread, it will not activate - no matter how hard you try.

    When you are using WPF - use to the fact that you and the WPF engine are two separate entity, you tell it to work, and then it will be working at its own pace. After the work is done, it will tell you so.

    So in that code example - all it needs to do is to activate() at the end of the method, and believe WPF will activate the window.

    If you are uncomfortable and absolutely need the window to get activated. Place a timer - wait for the isactivated event or, if it does not come on time, retry as much as you want.

    The code sucks if you need some UI state in the mid of an event handler.

  • gs (unregistered) in reply to C-Octothorpe
    C-Octothorpe:
    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... :)
    It's not even about rounding up... But now I'm really interested to find out:

    Picture yourself interviewing a candidate (a seasoned C++ and C#/.NET developer) who, in his role as MS MVP, obtained early access to pre-release versions of ".NET FX"... Which includes "Avalon", as early as May 2005. Immediately recognizing the potential of the new platform, he starts experimenting with XAML and code-behind right away. In July 2005, MS makes the name "WPF" official. Subsequently, your interviewee publishes articles and hold speeches about the future technology. A publisher approaches him for a book about WPF. In September 2005, he is hired for his first real-world project involving WPF. Since then, and up to today, he has been working exclusively on WPF projects, and particularly as an expert of that technology - so in fact and every effect, as of today, your candidate has ~6 years of solid, in-depth, everyday, hands-on experience with WPF.

    Now, my question for you, dear valued interviewer: What exactly would you expect your candidate to put in his resume under the item "WPF experience", if not "5+ years", without you accusing him of "lying" or even "rounding up"? Isn't he rather modestly rounding down already? ;-)

    Really curious to know...

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

Log In or post as a guest

Replying to comment #:

« Return to Article