• (cs) in reply to boog
    boog:
    Jaime:
    I have no problem with C#, I'm simply more productive in VB. I've certainly never run into a circumstance where it would be significantly harder to write VB than C#.
    Hmm... Let me rewrite that to make it more generic.
    I have no problem with X, I'm simply more productive in Y. I've certainly never run into a circumstance where it would be significantly harder to write Y than X.
    People prefer certain languages because they feel more productive (or comfortable) in them. Jaime's opponents could easily take the statement above and swap VB and C#, and they'd be about as justified as he is. So really, there is no best programming language. Some languages work better than others for some tasks, but programmers generally prefer languages purely for subjective reasons.

    That about sums it up for almost every this-programming-language-is-better-than-that-programming-language debate ever.

    Yes it does. However, sometimes a person is more productive in language Y than language X because they have more experience with language Y, and sometimes language Y really does suck (VB Script would be a good example of a language that truely sucks, and T-SQL sucked before exceptions were added). I thought that by sharing the fact that I prefer VB.Net over C# and I am comfortable with both meant a bit more than simply stating my preference. We could also make some objective comparisons, like number of keystrokes required to perform a specific task, and I'm certain that VB will win for a good portion of tasks.

  • (cs) in reply to Jimmy Jones
    Jimmy Jones:
    My favorite is the one that appears when windows boots after a bad shutdown and decides it need to check the hard disk.

    It's something like: "Your disk will be scanned in 30 seconds time, press any key to not scan the disk..."

    A key for "scan it now!"...? Nope. You have to sit and wait the full 30 seconds.

    (And repeat for every drive in the machine!)

    NTFS exists there for a reason. Get with the program already, convert those FAT partitions. You'll be pleasantly surprised.
  • (cs) in reply to Jaime
    Jaime:
    We could also make some objective comparisons, like number of keystrokes required to perform a specific task, and I'm certain that VB will win for a good portion of tasks.
    I would question whether such objective comparisons are any real indication of productivity. Number of keystrokes seems about as useful a measurement as lines of code.

    My point from my previous comment was that productivity is hardly measured, and more often estimated by a programmer with personal preferences. Whether it's due to experience level, novelty, ego, work practices, etc., it's still a bias specific to the individual programmer.

  • Krenn (unregistered) in reply to DC
    DC:
    I saw a cute solution for this on a tech site the other day - place the mouse on an analogue watch The movement of the hands causes the cursor to move slightly.

    Of course the downside is someone would pinch the watch, and who wears a watch these days anyway?

    I've always liked the "jigglers" that forensics people have, to keep a given computer from entering screensaver mode, and thus requiring the password (which they may not know yet).

    It's just a little USB dongle that claims to be a mouse, to the O/S, but sends random small movements every few seconds.

  • (cs) in reply to Mood WestWatt
    Mood WestWatt:
    Steve:
    Em Bedded:
    No, TRWTF is that this wouldn't work on embedded systems because there is no room for a file system.

    (BTW, where's the original story for this meme?)

    The original story that started the "embedded system" nonsense is this one: http://thedailywtf.com/articles/The-cbitmap.aspx. Read the comments.
    Whooops, I stand corrected.

    Orthopedic shoes?

  • (cs) in reply to Allan Olesen
    Allan Olesen:
    I am confused why nobody has commented on this line: if (DateTime.Now > lastMouseActivity.AddMinutes(5))

    Does lastMouseActivity do what the name says: Record time of last mouse activity only?

    That would piss off some keyboard users. Including me. I hate when programmers think that nobody is going to use their software with a keyboard.

    ^---this.

  • AndyC (unregistered) in reply to Anon
    Anon:
    Never understood why MessageBox is sealed.
    Because it's a very thin wrapper around the Win32 message box functionality and thus not something that can be easily adapted. If you need something more complex, you're almost certainly better off just creating a custom form instead.
  • neminem (unregistered) in reply to Krenn
    Krenn:
    I've always liked the "jigglers" that forensics people have, to keep a given computer from entering screensaver mode, and thus requiring the password (which they may not know yet).
    Almost 3 full pages, and nobody's linked to an xkcd comic? Unthinkable! http://xkcd.com/196

    (Except not actually linked, because apparently any post with a link in it is spam.)

  • (cs) in reply to Krenn
    Krenn:
    DC:
    I saw a cute solution for this on a tech site the other day - place the mouse on an analogue watch The movement of the hands causes the cursor to move slightly.

    Of course the downside is someone would pinch the watch, and who wears a watch these days anyway?

    I've always liked the "jigglers" that forensics people have, to keep a given computer from entering screensaver mode, and thus requiring the password (which they may not know yet).

    It's just a little USB dongle that claims to be a mouse, to the O/S, but sends random small movements every few seconds.

    You write have a program (in Windows, idk about other OSs) that keeps the computer from going into screensaver mode. Why would you need a hardware solution?

  • Lyle (unregistered) in reply to DaveK

    I could do it better!

    CAPTCHA: decet (Deceit?)

  • Lyle (unregistered) in reply to DaveK
    DaveK:
    anon:
    Anonymous:
    Honestly I don't care, it's nothing to do with me, it was just a recent example of you spouting bullshit about something you don't understand (complete with a citation that doesn't even support your argument). Another thing you don't seem to understand is that VB.NET != VB. I'm not debating this with you, it's a plain fact.
    Can't we ban teenagers from this forum?
    Bert Glanstron could do it!

    I could do it better!

  • (cs) in reply to frits
    frits:
    Krenn:
    I've always liked the "jigglers" that forensics people have, to keep a given computer from entering screensaver mode, and thus requiring the password (which they may not know yet).

    It's just a little USB dongle that claims to be a mouse, to the O/S, but sends random small movements every few seconds.

    You write have a program (in Windows, idk about other OSs) that keeps the computer from going into screensaver mode. Why would you need a hardware solution?

    Because you're doing forensics. The less you alter the machine, the better.

    (Once you've got the disc image, then go ahead and have fun.)

  • (cs) in reply to Bellinghman
    Bellinghman:
    frits:
    Krenn:
    I've always liked the "jigglers" that forensics people have, to keep a given computer from entering screensaver mode, and thus requiring the password (which they may not know yet).

    It's just a little USB dongle that claims to be a mouse, to the O/S, but sends random small movements every few seconds.

    You write have a program (in Windows, idk about other OSs) that keeps the computer from going into screensaver mode. Why would you need a hardware solution?

    Because you're doing forensics. The less you alter the machine, the better.

    (Once you've got the disc image, then go ahead and have fun.)

    You can't run a program from removable media (CD ROMs, etc)?

  • Oro (unregistered) in reply to Anon
    Anon:
    Chelloveck:
    I don't know the language; does MessageBox have a built-in timeout or not? The text isn't clear:

    "...and being that tbe program halts until either Yes or No is clicked, doLogoff() wouldn't execute until after the user indicated that he was not there or took too long to say that he was there."

    So, does it block until it gets input, or will it return if the user takes too long? If the latter, this isn't a WTF. That's exactly the desired behavior.

    Oh, I know, it's a meta-WTF! TRWTF is the assumption that the article is supposed to make sense! :-)

    TRWTF is you wade in here without knowing what your commenting about and without bothering to read anybody else's comments first. Yes, MessageBox.Show blocks, otherwise this wouldn't be a WTF. You lacking the knowledge to get the joke does make it a non-WTF.

    You're throwing TRWTF for no reason, that man's comment is justified. The wording implies (upon interpretation) either that the logoff is execute in two cases (user indicates he's not there or he waits too long) or it may mean it doesn't execute in the same cases. But by looking at the code you see that the two cases are not equivalent in outcome, MessageBox blocks the flow therefore in the case where the user waits, nothing happens while if the user says no, the logoff is indeed executed. So, poor wording with the "or" in the last paragraph.

    While I appreciate the WTF in the article, the wording of the last paragraph constitutes a WTF of its own (especially since the "liar, liar" popup pun is uncalled for, a change of wording in the popup to offer choice between staying logged and logging off makes more sense than just eliminating one option).

  • (cs) in reply to Oro
    Oro:
    While I appreciate the WTF in the article, the wording of the last paragraph constitutes a WTF of its own (especially since the "liar, liar" popup pun is uncalled for, a change of wording in the popup to offer choice between staying logged and logging off makes more sense than just eliminating one option).
    Huh? The last paragraph was indeed poking fun at the choice of wording for the popup, but in what way did it suggest eliminating one option as a solution? The only place I've heard that suggestion is here in the comments section.
  • (cs) in reply to Vlbuttic Pickles

    I second on that TRWTF motion. It's as if a VB6 programmer decided to jump to C# because (s)he heard that using C# pays more somehow from an in-law who works in the automotive industry, and not as a programmer.

    When the dynamic "var" was introduced to support LINQ and functional-ish programming, I bet the .NET people's biggest fear was the re-introduction of VB6-style variant variables used everywhere.

    So long, strongly-typed compile-time bliss. Hello, runtime exceptions! :)

  • (cs) in reply to Jaime

    The difference is in having a compile-time error vs. a runtime exception. Although I think "strawman" is a bit harsh, I'm sure some strongly-typed zealots deserve it.

    My argument is when using a strongly-typed language, why not use it as such? I do agree though that in this case the programmer had nothing to fear by using var.

  • (cs) in reply to drfreak
    drfreak:
    I second on that TRWTF motion. It's as if a VB6 programmer decided to jump to C# because (s)he heard that using C# pays more somehow from an in-law who works in the automotive industry, and not as a programmer.

    When the dynamic "var" was introduced to support LINQ and functional-ish programming, I bet the .NET people's biggest fear was the re-introduction of VB6-style variant variables used everywhere.

    So long, strongly-typed compile-time bliss. Hello, runtime exceptions! :)

    The var keyword is strongly-typed.

  • (cs)

    That's brillant!

    You only get logged out if you're there to confirm that yes, you are inactive.

  • Scott (unregistered)

    If I could change 30 seconds to two minutes I would have been done typing this 1:45 ago.

  • (cs) in reply to frits
    frits:
    Bellinghman:
    frits:
    Krenn:
    I've always liked the "jigglers" that forensics people have, to keep a given computer from entering screensaver mode, and thus requiring the password (which they may not know yet).

    It's just a little USB dongle that claims to be a mouse, to the O/S, but sends random small movements every few seconds.

    You write have a program (in Windows, idk about other OSs) that keeps the computer from going into screensaver mode. Why would you need a hardware solution?

    Because you're doing forensics. The less you alter the machine, the better.

    (Once you've got the disc image, then go ahead and have fun.)

    You can't run a program from removable media (CD ROMs, etc)?

    Running a program - any program - tampers with memory, which could contain evidence.

  • FM (unregistered)

    Another option, is to do what Cognos (an IBM BI application implements).

    When a user runs a request, a conversation is started between the client and the server.

    In order for the server not to cancel the request, the client must actively tell the server (assuming the report the is still running of course) the it is still waiting.

    Request are asynchronous in cognos. Therefore, you're disconnected. So the client enters a loop, where as long as the it hasn't gotten the request back, every 30 seconds it will say that it's still waiting.

  • Matlab Guru (unregistered)

    If you can and haven't, try asking Matlab why...

  • Sebastian Ramadan (unregistered)

    There are 2 WTFs here. The first is that this 'feature' clearly hasn't been well planned. If it were documented the programmer would know what he/she was programming.

    The feature: The system is required to log users out after 2 minutes of inactivity. The constraint: The system must wait for user input before logging the users out.

    In 99.9% cases this will just annoy users who come back from lunch to a messagebox telling them "You have been idle for 2 minutes. Do you want to log off?". This is why agile development isn't always a good idea.

    The next WTF is in the second piece of code. The messagebox displays not after 2 minutes, but immediately, once every loop cycle. If the user clicks no or yes, he/she will be prompted again. Immediately.

  • Joe (unregistered)

    Yeah, this does seem basic, but how many things seem basic to someone that has had the experience to know better? Who's the coder that wrote it? A colleague? Was it a Jr programmer that hasn't had much time or experience threading or with modal dialogs?

    There's a lot more to understanding programming than knowing modal dialogs. I work with DB gurus that can code csharp but would be lost in a business layer. They can dance circles around me when it comes to complex TSQL.

    I wouldn't have put this up on WTF if it was someone that's unfamiliar with the language or framework. And shame on those that condescend...you wrote some shoddy stuff back in the day...

  • Anonymous (unregistered) in reply to Matlab Guru
    Matlab Guru:
    If you can and haven't, try asking Matlab why...
    Thanks Guru, I had no idea about that! The scariest thing is that a lot of the time it's actually right. It just told me the system manager obeyed some engineer which is EXACTLY why I'm in the mess I'm in right now! Other times it just goes mental:
    Matlab:
    The bald and not excessively bald and not excessively smart hamster obeyed a terrified and not excessively terrified hamster.

Leave a comment on “The Why Timeout”

Log In or post as a guest

Replying to comment #:

« Return to Article