A different race



  • Follow up to: [url="http://forums.thedailywtf.com/forums/p/25156/269977.aspx"]It's Stupid But It Works Worked[/url]

    Quick summary: Client requirement is "When logout clicked, save current form, show message that form was saved, then logout".

    "Accomplished" by, logout's javascript click function is:

    1) Submit form
    2) alert("Your shit'll be saved")
    3) window.locaction = "logout.aspx"

    Stopped working because:  FF6 (and now chrome, and soon IE) will not block the form submission during the alert. The form submits in the middle of #2. The page "flashes", and the result of the postback is shown, no #3. No logout.

    Okay, that was five months ago. When it happened, I raised the issue, pointing out it'll only get worse. The fix is to rewrite the logout function, do some QA to ensure shit gets saved, then push to production. 2-3 hours. I propose:

    Logout.click:
    1) alert("shit will be saved").
    2) A hidden field, let's call it LogMeTheFuckOut, gets its value set to 1
    3) Submit the form to be saved
    4) NOTHING ELSE!

     Save function:
    1) Save, exactly as it was before
    2) If request.form("LogMeTheFuckOut") = 1, then response.redirect("Logout.aspx")

    Boom, done.

    But no. I get told I don't know what I'm talking about, I don't understand the problem (read: the boss doesn't understand how www works), and that any of the other coders can just get this fixed in fifiteen minutes. Besides, Firefox is a stupid browser that no one uses. It's reassigned, forgotten about, and that's that.

    Flashforward to two days ago. The client, who is USING FIREFOX, finds the bug after its reported to her by her customers who are USING FIREFOX AND CHROME! I re-raise the nature of the issue (we're trying to do two postbacks at once), and the solution (don't fucking do two postbacks at once). I get told, again, I don't understand the issue, and another coder can get it done in 5 minutes.

    So now there's a "solution"* in place. I checked the timelogs, and this "solution" took 5 [b]hours[/b] to code-- and it hasn't even been deployed yet. The "solution" is:

    Logout.click javascript function:
    1) Submit form
    2) [b]Do long, complex, buggy-ass, copy-pasta'd from expert-sexchange.com function that poorly determines the user's browser[/b]
    3) [b]If browser is not firefox or chrome[/b] alert("your shit might be saved because we're fucking retarded")
    4) location.href = "logout.aspx"

     #1 and #4, start your engines and race race race! Will the browsers redirect before the form finishes submitting? WHO KNOWS!?!  Will the browser abort the form submission once the redirect occurs? MAYBE!?! EXCITING!!! Or... will the form submission be far enough along that things will work? ONE SOMEONE'S MACHINE, POSSIBLE!!!!

    Hey, what happens when the Save routine goes into the session to get the user's ID, but the logout page has already abandoned the session?  [b]I DON'T KNOW, BUT STAY TUNED TO FIND OUT!!!?!?!?!??!?$##!![/b]



  • And you stay there just for the comedic value you give us?  Thank you for the sacrifice of your sanity my friend.



  • Yeah, I'd leave. When management isn't smart enough to accept solutions provided to them and pretends to know more than their devs... time to move on. The fact that your company deals with web and he thinks Firefox is a niche browser. At this point both Firefox and Chrome have more market share than IE. Individually. Hell, Firefox was the browser of choice by a long shot for quite some time.


    Of course it stinks of stereotypical C-level ego and the false consensus effect that goes hand in hand with it, "I use IE therefor everyone does!!!HUURRR DURRRR!"


    I just left a company that was driving their key product (the one that creates the revenue the company survives on) into the ground. The product that pays for the C-level pet project money holes. Yes, those pet projects may make money one day (I'm told 10's of millions). But in the meantime wouldn't it be a good idea to protect your cash cow as all it would take is a small team of devs and 6 months to create a better less buggy system? One should assume that is exactly what the competitors are doing. If you aren't moving forward you're getting passed. Hell I even heard the CEO quote that. That and the whole burning through customer good will that exists do to their previous product (which was stable).. oh well.



  • Or, you could use AJAX to send the POST form and when it gets back, you log out the user if it succeeded.



  • @dubbreak said:

    Yeah, I'd leave. When management isn't smart enough to accept solutions provided to them and pretends to know more than their devs... time to move on. The fact that your company deals with web and he thinks Firefox is a niche browser. At this point both Firefox and Chrome have more market share than IE. Individually. Hell, Firefox was the browser of choice by a long shot for quite some time.
    ...
    Note that I have no love for IE, but you should read the fine print on that web page:

    W3Schools is a website for people with an interest for web technologies. These people are more interested in using alternative browsers than the average user. The average user tends to the browser that comes preinstalled with their computer, and do not seek out other browser alternatives.

    These facts indicate that the browser figures above are not 100% realistic. Other web sites have statistics showing that Internet Explorer is a more popular browser

    I would recommend going to wikipedia for this it has all kinds of tables and breakdowns on it: http://en.wikipedia.org/wiki/Usage_share_of_web_browsers

     



  • @dubbreak said:

    At this point both Firefox and Chrome have more market share than IE.

    Bullshit. Those numbers are wrong.

    IE's about 50% still, according to my own analytics tool. (It is true that Chrome's overtaken FF, though.)



  • I wouldn't count on those numbers either. Apparently Safari was outdone by Opera for a brief while! Sorry, no.



  • @Anketam said:

    I would recommend going to wikipedia for this it has all kinds of tables and breakdowns on it: http://en.wikipedia.org/wiki/Usage_share_of_web_browsers

    Better, but I still wouldn't rely on Wikipedia for browser stats; it's hardly the best sample (although it's far better than W3 schools--seriously, how can someone do web development and think the W3 schools stats are at all accurate?) Ultimately, you should know the stats for your own app, because it may differ from the Internet at-large.



  • @morbiuswilters said:

    Ultimately, you should know the stats for your own app, because it may differ from the Internet at-large.
     

    Bingo. And the client uses "not IE", and she's paying us-- and there's a non-zero number of her customers using it who are paying her-- I'm fixing the issue properly.  Of course, there's already been spent an order of magnitude more time "discussing" the problem, and fixing it incorrectly, than the proper fix will take.

    Also: It doesn't work on Safari. So it doesn't work on an iPad. Which means the boss' ipad can't use the site properly. Which means it's a problem (now). So good to know, in the future if I want anything fixed, just break it on an iPad.

    (And yes, my resume is up to date. The only advantage this place has left is an excellent commute that allows my wife and I to carpool, and I'm out the door after exactly 8 hours each day)


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.