• instigator (unregistered) in reply to jay

    That's a fair point. But it does assume the proper hooks are in that library. Even still, it may be the lazy approach, but under a deadline, is this really a WTF, or just a kludge?

    To me, I call something a WTF when I can say, "what a dumbass"; not "what a lazy bastard".

  • (cs) in reply to Your Name
    Your Name:
    They also double-click every single time.
    I -- still -- double-tap the "end call" button on my phone, which reacts fast enough that the first tap ends the call; the 2nd tap calls that person AGAIN.
  • Henry (unregistered)

    Looks like an attempt to "debounce" input

  • Barf 4Eva (unregistered) in reply to ParkinT

    I figure someone added that line precisely because they wanted to see it get displayed on TheDailyWTF. You know, the ol' "Don't touch the red button!"-but-now-I-cant-help-myself-because-you-said-not-to psychology.

  • Sam (unregistered)

    I think after 5 minutes the print job will time out and then you can click again. So it is for those people who double click instead of waiting patiently.

    Please close this ticket.

  • Barf 4Eva (unregistered) in reply to DrPepper
    DrPepper:
    Your Name:
    They also double-click every single time.
    I -- still -- double-tap the "end call" button on my phone, which reacts fast enough that the first tap ends the call; the 2nd tap calls that person AGAIN.

    Hahaha, me too! I wonder just how common this dilemma is...

  • Dann of Thursday (unregistered) in reply to DrPepper
    DrPepper:
    Your Name:
    They also double-click every single time.
    I -- still -- double-tap the "end call" button on my phone, which reacts fast enough that the first tap ends the call; the 2nd tap calls that person AGAIN.

    What? I'm curious as to what phone configuration/OS initially trained you to do this, I've never heard of it before.

  • ¯\(°_o)/¯ I DUNNO LOL (unregistered)

    I write the code for an embedded device with a small QVGA screen and a keypad. It has a simple user interface based on going through various levels of screens. I found out that I (as the programmer, who knows how it works, with it conveniently on my desk and not 5 feet up on a wall), I was screwing stuff up when I pressed the ENTER or ESC key once too many times, due to slow key bounce with the rubber keys. And this was even with flushing the keyboard buffer when changing screens.

    So I added a 200ms delay after changing screens (both forward and back) during which it would ignore either of those two keys. And it did the trick.

    But I actually documented in the comments what it's trying to do and why.

  • Apeiron (unregistered) in reply to daef
    daef:
    * if you have none: enable 3-button-emulation and middle-click by left+right-clicking simutaneously

    trwtf is the Synaptics Windows drivers. They don't even have middle-click emulation, which means good luck middle-clicking anything on a laptop unless you figure out a way to get one of their gesture features to spit out middle-click (couldn't find it).

    It does let you remap left/right, but then you lose left/right. Best bet is to either: A) Remap the left button to middle and only tap-click with the pad B) Switch to Linux, where the Synaptics driver is sane.

  • Darth Paul (unregistered) in reply to Ralph
    Ralph:
    Soon we were blessed with double-click and right-click and click-hold (drag) and triple-click and control-click and... you can probably spot a trend here.

    Anyone seen the table of finger gestures for Windows 8? It is a long list that replaces far fewer combinations of mouse clicks.

    distineo: When one has caught tinea and distemper.

  • Irritating Enlightener (unregistered)

    There is an interesting, related bug in Firefox - at least on the Windows version, when some system skin more fancy than Windows Classic is in use.

    Open two or three tabs. Double-click on the rightmost one's close button. Aside from closing the tab as expected, the browser window will (un)maximize.

  • (cs) in reply to Irritating Enlightener

    The bit next to the list of tabs counts as a title bar. If you double-click the title bar (both in windows and in linux) it maximizes/unmaximizes.

  • (cs) in reply to Apeiron
    Apeiron:
    trwtf is the Synaptics Windows drivers. They don't even have middle-click emulation, which means good luck middle-clicking anything on a laptop unless you figure out a way to get one of their gesture features to spit out middle-click (couldn't find it).

    There's a couple of registry keys you can set to enable middle-click emulation by either pressing both buttons or tapping with 2 fingers: http://iampaulh.blogspot.ca/2012/06/adding-middle-click-to-synaptics-touch.html

  • george (unregistered) in reply to Kaosadvokit
    Kaosadvokit:
    Bring Back Nagesh:
    So I'm assuming this abstraction for System.Windows.Forms.WebBrowser is written in VB or C# and is meant to work for built-in IE frames inside a parent application?

    If so, TRWTF is forcing someone to use an embedded web browser to do something rather than opening the link in the user's default web browser. A bit like Steam, which as we know, is also a WTF.

    And even if you absolutely MUST force people to use a browser panel inside your app, why does it need to have multiple tabs?

    why an integrated browser?

    Because your application has an integrated document viewer and you happen to use HTML-based documents--after all, that minimizes the effort to have the same documents available online.

    Because users (and IT staff) like to install different browser versions and you value a consistent user experience.

    Because you're writing software to run on a semi-embedded system where you want to lock the user into a single application (think kiosk software).

    Why support tabs?

    Because people are used to them. Back when IE6 had 90% market share, tabs were a niche feature that 90% of people didn't use. They use them now; support is expected. If you want angry users, provide a user experience that is inconsistent with their expectations.

    No, TRWTFs are developers who live in a small corner of the development world and don't understand that there are applications where this is a legitimate and proper design decision. TRWTFs are developers that rush to condem actions they don't understand because they don't understand them. Do you know of a better debounce mechanism? I don't; similar mechanisms have served me well across hundreds of projects, because it is simple, easy to implement/maintain, produces the correct result, and fails to produce an incorrect result. Sure, this one is rough around the edges, but it is pretty clear what it does and why.

    Maybe it was the smaller readership years ago, maybe it was the submission quality, I don't know... but TDWTF has really gone downhill over the last several years.

    Last several years? That's how long I been here posting comm.....oh....

  • mick (unregistered) in reply to urza9814
    urza9814:
    xorsyst:
    urza9814:
    What if, for (a somewhat poor) example, you're writing something like Outlook? Emails are going to be in HTML; you could write your own parser, but why reinvent the wheel? But you also don't want to launch a full browser every time the user clicks to view a message.

    To continue your example, what if there's a url in the message? If I click on it, should it spawn my browser, or render the webpage in my application?

    To use a different example (application help). Lots of applications have their help in html format in one form or another (including windows chm). Many of them launch the windows help viewer or a browser to view the help. Is that wrong?

    Obviously there's no firm line there but my opinion, as I said, is that core functionality shouldn't require an external app. Help isn't core; you can use the browser or windows help to do that. Clicking a link from an email isn't either if your app is an email viewer and not a web browser. Sure, both are HTML documents in a sense, but most users don't know that and they're certainly different conceptually.

    If I'm forced to interact with two separate applications simultaneously to use your software, you're probably doing something wrong. There are certainly valid reasons to do that, but definitely not for something Grandma might be using...unless Grandma is a sysadmin.

    webmail, anyone?

  • mick (unregistered) in reply to Kaosadvokit
    Kaosadvokit:
    Is it wrong to spawn a second application to interact with components of the first? Usually. When I open a mail message, I need to interact with it. Reply, forward, delete, etc. These are not operations for a web browser to handle, they are for my application. The browser that displays the message content should be embedded. When I click a link, I'm now transitioning to the standalone document interface; it should be a browser window and, at this point, user experience concerns say to use the user's preference because it is a standalone resource, it should conform to their expectations--your application supports the content, not the presentation now. Of course, if the link is a mailto: link, it shouldn'thand it off to the browser, it should create a new message (thats my opinion, feel free to disagree, but implementation details like this aren't the topic here).
    It's an interesting thought, but ultimately their expectation is based (generally) on previous experience....but somewhere along the way someone did something differently.

    Think Apple too. They were successful by forcing people to change their expectations. Isn't it weird that most pizza bars provide an app to order from an iPhone - I been ordering by phone for ages (before I even had a GUI on my phone - or a cell phone, for that matter).

  • XXX (unregistered) in reply to NH
    NH:
    It looks like a remedy for those sites that opens a kiloton of windows when you try to close one. Some phishing sites did that a few years back.
    Didn't realise they were phishing, but Farrk they promised some interesting videos....
  • Billy G (unregistered) in reply to Apeiron
    Apeiron:
    daef:
    * if you have none: enable 3-button-emulation and middle-click by left+right-clicking simutaneously

    trwtf is the Synaptics Windows drivers. They don't even have middle-click emulation, which means good luck middle-clicking anything on a laptop unless you figure out a way to get one of their gesture features to spit out middle-click (couldn't find it).

    It does let you remap left/right, but then you lose left/right. Best bet is to either: A) Remap the left button to middle and only tap-click with the pad B) Switch to Linux, where the Synaptics driver is sane.

    Just tap the pad in the middle to simulate a middle-click

  • jf (unregistered) in reply to da Doctah
    da Doctah:
    ZoomST:
    In fact, using the middle mouse button in FireFox over a link, opens it in a new tab.
    Cool! You just saved me something like 24 hours over the remainder of my lifetime.
    That will be $2000, or whatever your hourly rate plus compound interest over the corresponding years.
  • (cs) in reply to CodeSimian
    CodeSimian:
    Apeiron:
    trwtf is the Synaptics Windows drivers. They don't even have middle-click emulation, which means good luck middle-clicking anything on a laptop unless you figure out a way to get one of their gesture features to spit out middle-click (couldn't find it).

    There's a couple of registry keys you can set to enable middle-click emulation by either pressing both buttons or tapping with 2 fingers: http://iampaulh.blogspot.ca/2012/06/adding-middle-click-to-synaptics-touch.html

    Sorry, I should've mentioned you can also assign middle-click to 3-finger tap using the registry method. Obviously most people will want to keep 2-finger tap assigned to right-click.

  • (cs) in reply to DrPepper
    DrPepper:
    I -- still -- double-tap the "end call" button on my phone, which reacts fast enough that the first tap ends the call; the 2nd tap calls that person AGAIN.
    I have an almost opposite problem. After writing a message on my phone, I press "Send". But the phone takes just long enough to respond that I often think "oh, it didn't register the tap" and press it again -- just after it's changed into the Cancel button.
  • Chromatix (unregistered)

    One of the railway signalling systems in Scandinavia indicates different speeds with different numbers of lights. A single green light means "clear, full speed". Two or three green lights together mean "clear" and successively lower speeds. This leads to an obvious wrong-side failure mode where one of the green lights blows, and the signal indicates a higher speed than it should.

    Worse, the immediately neighbouring country has a signalling system that is very similar, was derived from the same older system, yet has some indications which are completely opposite to the indications in the first country. Accordingly it is prohibited for the same driver to operate a train in both countries, even though they speak nearly the same language and the networks are interconnected. The risk of incorrectly interpreting the conflicting indications is too great.

  • Norman Diamond (unregistered) in reply to ¯\(°_o)/¯ I DUNNO LOL
    ¯\(°_o)/¯ I DUNNO LOL:
    I write the code for an embedded device with a small QVGA screen and a keypad. It has a simple user interface based on going through various levels of screens. I found out that I (as the programmer, who knows how it works, with it conveniently on my desk and not 5 feet up on a wall), I was screwing stuff up when I pressed the ENTER or ESC key once too many times, due to slow key bounce with the rubber keys. And this was even with flushing the keyboard buffer when changing screens.

    So I added a 200ms delay after changing screens (both forward and back) during which it would ignore either of those two keys. And it did the trick.

    But I actually documented in the comments what it's trying to do and why.

    You mean you didn't document in the comments "Please don't post this to the Daily WTF"?

  • Dirk (unregistered)

    Please don't submit this to the daily WTF

  • QJo (unregistered) in reply to da Doctah
    da Doctah:
    ZoomST:
    In fact, using the middle mouse button in FireFox over a link, opens it in a new tab.
    Cool! You just saved me something like 24 hours over the remainder of my lifetime.
    Does it in Google Chrome as well. Haven't tried in IE yet but would expect the same to apply.
  • (cs) in reply to instigator
    instigator:
    LoremIpsumDolorSitAmet:
    Yuck... Kiosk browsers are a WTF in their own right.

    Are you saying we shouldn't have Kiosks? Or that Kiosk's should not have the ability to show documents? Even help documents? There are more things on Heaven and Earth than are dreamt of in your philosophy.

    Not saying that we don't need kiosks. I'm just saying that every implementation of a kiosk browser I've interacted with is a steaming pile of WTF.

  • (cs) in reply to Kaosadvokit
    Kaosadvokit:
    @LoremIpsumDolorSitAmet:

    Adhering to standards is all good and well, however the standards don't state which browser has the correct font-rendering engine. The standards don't mean you will have an ideal implementation with whatever your end-user has installed, and the standards don't get your application 508 certified if significant portions of the operating environemnt cannot be assessed.

    If there was One True font-rendering engine then web designers might be tempted to build extremely inflexible designs, so I thin this is just as well. Besides, if you're catering for multiple languages then you can't make assumptions about word length, line length, or even left-to-rightedness either. Responsive Design is the answer.

    Being dismissive of 99% of development efforts doesn't make your 1% right, it makes your views of the 99% wrong. You don't seem to understand that an embedded web browser isn't about browsing the web, it is abotu displaying application-centric content that happens to be stored as HTML. Kiosks that are powered by browsers strike a nice balance between cost and benefit. Strangely, this appeals to the suits, even if it isn't the most elegant solution from a software standpoint. Complicator's Gloves, anyone? Would you like an arbitrary system to pass condiments? I'm sure somebody can provide links if you don't get the references.

    I know an embedded browser doesn't necessarily mean web pages, but the article hints at CTRL-clicking links and opening new tabs, which sounds a lot like a browser to me. I wouldn't expect to see e.g. Outlook handling HTML emails in this manner. On the subject of kiosks, see my above comment. On the subject of The Complicator's Gloves, I put it to you that a program that's displaying HTML in embedded browser panes and supporting CTRL-clicking is the proposed wonderful new idea, and the traditional web browser is the 'gloves' in this case. And to bridge the gap, there are addons available for some browsers including Firefox that turn it into a kiosk app.

    It is pretty obvious you've never developed COTS or embedded software...

    Given that we don't know the context, it doesn't matter whether I do or don't know. I'm just voicing my opinion.

  • Kasper (unregistered) in reply to Ralph
    Ralph:
    Anyway this code is for those luzers who think you have to double-click web links because... well, um, I never really thought about it, just because.
    A few years back I was testing a feature in a webapplication. I had filled in a form with some invalid data and proceeded with the registration flow to see how it would deal with it.

    As I reached the end of the flow, I stopped and though "hang on, what was I testing again?"

    Then I realized that I had gone all the way through the flow without getting the error message, I had to test.

    It took me a few attempts to reproduce it and figure out what had gone wrong. On one page I had accidentally double clicked on a link to the next page. Or rather clicked a second time because the webserver was responding so slowly, that I somehow thought I hadn't clicked in the first place.

    Those two clicks caused two requests to be sent to the webserver and get handled by two different threads. This triggered a race condition in another developer's code. The two threads would share a status variable, which they should not have been sharing.

    The end result was that the result of the validation of the input data was ignored, and invalid data was written into the database.

    This particular bug got fixed before reaching production.

  • Herr Otto Flick (unregistered) in reply to ZoomST
    ZoomST:
    Remy Porter:
    In my day, that was "middle mouse click". You kids and your fancy scroll-wheels.

    In fact, using the middle mouse button in FireFox over a link, opens it in a new tab. Is it covered by this code? Seems not, AFAIK.

    Given that this code is a wrapper around System.Windows.Forms.WebBrowser, a wrapper for including IE into your app, your conclusion that it does not cover Firefox is spot on. Remarkable deduction skills.

  • furiant (unregistered)

    It's cute that you people think that comment was in the original code.

  • qbolec (unregistered)

    Am I the only one who after reading "System.Windows.Forms.WebBrowser." was expecting something more after the last dot and tried CTRL+A?

  • Nagesh (unregistered) in reply to Chromatix
    Chromatix:
    One of the railway signalling systems in Scandinavia indicates different speeds with different numbers of lights. A single green light means "clear, full speed". Two or three green lights together mean "clear" and successively *lower* speeds. This leads to an obvious wrong-side failure mode where one of the green lights blows, and the signal indicates a higher speed than it should.

    Worse, the immediately neighbouring country has a signalling system that is very similar, was derived from the same older system, yet has some indications which are completely opposite to the indications in the first country.

    Right: Sweden has (a) one green for "proceed" (b) two greens for "proceed, speed limited to 40 km/h", (c) three greens for "proceed, 40 km/h, expect stop in short distance", (d) blinking green for "warning, except stop at the next signal". And Denmark has (a) one green for "proceed, expect stop next" and (b) either two greens or blinking green (depending on the type of signal) for "proceed, except proceed next".

    But the two are only "derived from the same older system" in a very general and indirect sense (namely, that for a few decades in the mid-1800s both contries used systems where green was "danger" and white was "clear". They were modified in both cases because a broken green lamp glass would be a wrong-side failure).

    Accordingly it is prohibited for the same driver to operate a train in both countries, even though they speak nearly the same language and the networks are interconnected.
    This is not true. On the contrary, trains routinely run between Copenhagen and Malmö without driver changes underway, despite the signaling system changing in the middle of the Øresund fixed link. There's no place for a train to stop at the point where the signaling system changes.

    On the other hand, all trains on that line are required to be fitted with cab signaling Automatic Train Protection systems which independently prevent signal overruns.

    Norway has a third system, also incompatible with Sweden, where one green is "proceed slow" and two greens is "proceed fast".

  • Roman (unregistered) in reply to jbabs

    Disagree. If you ever find yourself writing such a comment, I think this is clear indication that THIS CODE NEEDS A REAL COMMENT. You know, one that explains exactly why the author realised that he wrote a WTF-like thing but left it in.

  • Norman Diamond (unregistered) in reply to Herr Otto Flick
    Herr Otto Flick:
    ZoomST:
    Remy Porter:
    In my day, that was "middle mouse click". You kids and your fancy scroll-wheels.
    In fact, using the middle mouse button in FireFox over a link, opens it in a new tab. Is it covered by this code? Seems not, AFAIK.
    Given that this code is a wrapper around System.Windows.Forms.WebBrowser, a wrapper for including IE into your app, your conclusion that it does not cover Firefox is spot on. Remarkable deduction skills.
    Given that this code isn't a wrapper around System.Windows.Forms.IE, we have to look in MSDN to find out if WebBrowser means the user's web browser or IE. And if MSDN doesn't say, or even if MSDN does say, we have to experiment to find out the real answer. And the real answer will depend on which version of Windows.
  • (cs)
    (Keyboard.Modifiers & ModifierKeys.Control) == ModifierKeys.Control)

    That feels wrong to me.

  • (cs) in reply to da Doctah
    da Doctah:
    ZoomST:
    In fact, using the middle mouse button in FireFox over a link, opens it in a new tab.
    Cool! You just saved me something like 24 hours over the remainder of my lifetime.

    Then take the day off tomorrow, otherwise your bonus day will be somewhat ruined by your dying on it...

  • WDL (unregistered) in reply to jbabs
    1. A manager forced you to implement this.... and you write a comment in the code to show other coders who stumble upon it, that you know it's stupid.
  • coyo (unregistered)

    Slow down, you click too fast You gotta make the e-vent last Hackin' down the windows code do do do dooo feeling wtfooky

    sha na na naaa na na na feeling wtfooky

  • Ubiquitous (unregistered) in reply to jbabs
    jbabs:
    If you ever find yourself writing a comment in your code that says "Please don't submit this to the daily WTF", it means two things:
    1. you're doing it wrong.
    2. it's going to end up on dailyWTF.
    c) You want your code to appear on DailyWTF.
  • Neil (unregistered) in reply to xorsyst
    xorsyst:
    urza9814:
    What if, for (a somewhat poor) example, you're writing something like Outlook? Emails are going to be in HTML; you could write your own parser, but why reinvent the wheel? But you also don't want to launch a full browser every time the user clicks to view a message.
    To continue your example, what if there's a url in the message? If I click on it, should it spawn my browser, or render the webpage in my application?
    I just use a single application capable of rendering both emails and webpages (but not in the same window, although I know an email app that wants to do that).

    CAPTCHA: sagaciter: Someone who quotes Beowulf.

  • Neil (unregistered)

    Oh, and TRWTF is being able to click on Submit before Preview, amirite?

    CAPTCHA: incassum: Click on Preview before Submit just incassum.

  • TortoiseWrath (unregistered) in reply to TheCPUWizard
    TheCPUWizard:
    It looks like the code is intended to handle situations where the person has ALREADY ctrl-clicked to open a new tab, is still on the old tab (ie the new tab has not opened and gotten focus)....

    Especially if the site in question is slow to load, this may actually be useful (the intent, not necessirly the implementation.

    )

  • Jasper (unregistered) in reply to jbabs
    jbabs:
    If you ever find yourself writing a comment in your code that says "Please don't submit this to the daily WTF", it means two things:
    1. you're doing it wrong.
    2. it's going to end up on dailyWTF.
    It's even worse: you're doing it wrong, you know you are doing it wrong, and you are still doing it! Therefore you deserve to be shamed on TheDailyWTF.

Leave a comment on “Slow Down, You Click Too Fast”

Log In or post as a guest

Replying to comment #:

« Return to Article