Catch up on stories from the past week (and beyond) at the Slashdot story archive


Forgot your password?
Programming It's funny.  Laugh. IT Technology Hardware

Most Expensive JavaScript Ever? 405

ekran writes "A while ago Opera Software needed more servers. Not just a few servers either — they were planning Opera Mini's growth, implementing Opera Link, and My Opera was also growing quickly. Most of the major hardware vendors grabbed their specs and came back with offers and sample servers shipped all the way to Oslo for testing. One of the biggest vendors, however, did not do their homework. They shipped the server, but when the Opera sysadmins started up the web-admin interface, they were met with a JavaScript statement that managed to piss off the whole company including the CTO. The script, apparently, locked out the Opera web-browser."
This discussion has been archived. No new comments can be posted.

Most Expensive JavaScript Ever?

Comments Filter:
  • by Loopy ( 41728 ) on Tuesday July 21, 2009 @09:01AM (#28768635) Journal

    And if it was outsourced.

  • by noundi ( 1044080 ) on Tuesday July 21, 2009 @09:04AM (#28768677)
    Don't be a jackass. Their market share has nothing to do with the article. I don't care about Opera but the story is still funny as hell and worth repeating. I just wish that kind of stuff happened to me at work. :(
  • by fuzzyfuzzyfungus ( 1223518 ) on Tuesday July 21, 2009 @09:05AM (#28768691) Journal
    Why? I can see not bothering to test much on Opera, or putting a "We only support browsers X and Y." statement in the manual, or even not bothering about any issues that crop up if you use Opera to access the admin interface; but why would you deliberately add a check that breaks Opera?
  • by judolphin ( 1158895 ) on Tuesday July 21, 2009 @09:08AM (#28768713)

    This nonsense would never happen.

    I started as a web developer in the mid-90s. I know how hard it is to develop for multiple browsers and versions. When Netscape and Internet Explorer 4.0 came out, they quickly gained the majority of market share. Many colleagues did not want to keep their sites compatible with 3.x browsers because they felt it was a pain. I would always hear the sentence, "They only have a 5% market share."

    To me this was and still is a ridiculous attitude. You're OK randomly raising your middle finger to 1 in 20 potential customers visiting your site? What if that 1 in 20 is the wrong person? Obviously, in this case, they definitely raised their middle finger to the wrong people.

    But this gets even worse, because Opera is not obsolete and is fairly standards-compliant. To top it off, the vendor specifically broke the web site for the browser they were too lazy to design for, rather than doing something that makes sense -- like investing time and money to reach a small but tech-savvy segment of the population.

    All told -- shamefully -- it makes me feel a little Schadenfreude that it bit them in the rear.

  • Headline (Score:2, Insightful)

    by iVasto ( 829426 ) on Tuesday July 21, 2009 @09:10AM (#28768737) Homepage
    The headline is misinformative. Based upon the headline I would have expected to read about a company hiring a bunch of developers for a lot of money to code something cool in javascript. Perhaps a more appropriate headline is "Javascript locked out Opera, Opera locked out the company."
  • by schon ( 31600 ) on Tuesday July 21, 2009 @09:13AM (#28768765)

    since they are insignificant in the browser market I'd probably do the same thing.

    Then you're a fucking moron.

    If you were running a store with a physical presence, would you also ban customers who drove Toyotas, telling them "Toyota is insignificant, and therefore you are not allowed to shop at my store. Come back when you have a Ford or GM"?

  • Heh. (Score:5, Insightful)

    by popeyethesailor ( 325796 ) on Tuesday July 21, 2009 @09:17AM (#28768805)

    Classic case of a company not knowing what their product is used for.

    Opera != Work Browser.
    Opera == Bestest P0rn Browser ! Swift image resizing, superior mouse gestures, and remaining responsive even after a gazillion tabs are opened.

    It's like turning up with your purpose-built race car at the city center, and whining about speed humps.

  • by blackraven14250 ( 902843 ) on Tuesday July 21, 2009 @09:26AM (#28768875)
    Toyota has the #1 marketshare in the world at something like 15-18%. That's akin to Firefox in terms of share (20-something percent). Opera is lucky if they have 1% of the browser market. It's more like saying Ashok Leyland [] doen't have a sizable marketshare, therefore we're excluding them from the market.
  • by tsm_sf ( 545316 ) on Tuesday July 21, 2009 @09:40AM (#28769009) Journal
    Actually, he has a very valid point. In your Toyota example, you are forgetting that in order to support Toyota, you have increased development costs and time in order to support a very, very small percentage of users, compounded by the fact that supported browsers are free and can be installed in a matter of minutes.

    If you hire a good developer your site should work for all browsers. It's not fucking rocket science.
  • by afidel ( 530433 ) on Tuesday July 21, 2009 @09:42AM (#28769045)
    HP's not much better though:
    var detect = navigator.userAgent.toLowerCase();
    var ie = detect.match(/msie ([\d\.]+)/);
    var moz = detect.match(/rv:([\d\.]+)/);
    var fire = detect.match(/firefox\/([\d\.]+)/);
    ( ie!=null && ie[1] >= "6.0" ) ||
    ( fire!=null && fire[1] >= "1.0.2" ) ||
    ( moz!=null && moz[1] >= "1.6" )
    ) {
    // supported browser; do nothing
    } else {
    alert( "Integrated Lights-Out 2 supports Microsoft Internet Explorer version 6.0 or greater, Firefox version 1.0.2 or greater, and Mozilla version 1.6 or greater. Some functionality may not work and pages may not format correctly on other browser platforms. This browser platform reports it is \""+navigator.userAgent+"\""); }

    Of course that's just a warning, not just dumping them to the error page. It IS annoying that we do such stupid browser detection tricks instead of coding to standards. In an ideal world that statement would be something like:
    If browser.supports(HTML4) do {} else alert ( "upgrade to a modern browser" );
  • by tepples ( 727027 ) <{tepples} {at} {}> on Tuesday July 21, 2009 @09:44AM (#28769071) Homepage Journal

    [Old versions of popular browsers] "only have a 5% market share."

    To me this was and still is a ridiculous attitude. You're OK randomly raising your middle finger to 1 in 20 potential customers visiting your site?

    They probably did a business decision that people in the last 5 percent to upgrade their web browsers buy less. You see, older browser versions tend to run better on obsolete PCs, and people who don't replace an obsolete PC are probably misers []: people who stretch their dollar so far that they are less likely to demand your luxury product. Case in point: PCs running IE 6 or Firefox 2 are likely to be at least eight years old.

  • by jenn_13 ( 1123793 ) <> on Tuesday July 21, 2009 @09:46AM (#28769091)
    ... who was expecting this to involve the new
  • by RingDev ( 879105 ) on Tuesday July 21, 2009 @09:47AM (#28769107) Homepage Journal

    Thanks for that, now I feel kinda like an idiot. At least I am now a smarter idiot than I was half an hour ago.


  • by afidel ( 530433 ) on Tuesday July 21, 2009 @09:48AM (#28769119)
    You are assuming WAY too much. Some subcontractor wrote software to a specification that said support browsers x and y with functionality a,b,c,..q and pass these tests. To make sure some clever tester didn't find some obscure bug with Opera that would keep him from getting paid he just errored the browser out. This passed functionality testing and was approved. Later this now approved and standard code was delivered with the imbedded management card of a server that just happened to be shipped to Opera. The two events have nothing to do with each other and it unbelievably unlikely that for an account the size of Opera that someone would have done regression testing on their software to make sure it works with Opera's product.
  • by ihavnoid ( 749312 ) on Tuesday July 21, 2009 @09:53AM (#28769169)

    It is common to deliberately add a check that breaks the whole stuff when some 'unexpected' condition happens. You know, assertions.

    Which one is better? Not working at all, or seems like working but a not-so-commonly-used-some-sort-of-admin-command somehow gets screwed and the web browser fires a do-not-touch-this-unless-you-want-complete-meltdown-command because there was some minor difference on the javscript engine parsing some parameters? Yeah, can be extremely rare, but if it isn't tested, nobody can be sure.

    Obviously, the best thing to do would be to test all possible conditions. However, if you can't, then there can be three choices:

    1) Leave it to the users, Nah, I'm not gonna test it.
    2) Launch a big warning message and blame the users if something goes wrong, or
    3) Make it never work when some unknown condition is reached.

    Number 1 is perfectly reasonable when the worst consequence isn't so bad. For example, a web forum interface, or things like Facebook. Maybe number 2 would be better in most cases. But, if an untested scenario may cause huge, irrecoverable damage, number 3 may be the best choice. (You should remember that the product in question was the server management console, which can bring the whole datacenter down when things go wrong.)

    My opinion is that, deliberately excluding Opera was a quite reasonable idea. Trying to sell a product that deliberately excludes Opera (web browser) to Opera (the company) was the stupid idea.

  • by TrippTDF ( 513419 ) <(moc.liamg) (ta) (dnalih)> on Tuesday July 21, 2009 @09:56AM (#28769203)
    you're being too simplistic... we don't know the context of the blocking of Opera. I'm sure every programmer out there would want to support it, but if you're 998 hours into a project and you have just discovered that the coding needed to make Opera work with the software is going to take at least another 25 hours, you do what this guy did... I'm not saying it's the best solution, but when you're trying to hit a deadline, you sometimes have to take shortcuts. From a business standpoint, it was probably the right thing to do, even though the coder hated having to do it. The team that built the software probably didn't even know the server was going to Opera anyway

    Again, we don't have all the information, so there is no way to tell. While it's not rocket science, there are more factors involved than just the code.
  • by Mystra_x64 ( 1108487 ) on Tuesday July 21, 2009 @10:10AM (#28769385)

    Is it possible that the admin interface in question uses oncontextmenu?

    Why would it do that in the first place? It's not a desktop application. It's a damn web page and is not some Google maps wannabe.

  • by MrMr ( 219533 ) on Tuesday July 21, 2009 @10:10AM (#28769389)
    Especially as Ford and GM need many more spare parts than Toyota anyway?
    Sorry, couldn't resist
  • by KillerBob ( 217953 ) on Tuesday July 21, 2009 @10:22AM (#28769567)

    Picture VW Polo next to Rolls Royce Phantom. Polo will fit nicely out the front of your local 7-11 / Tesco store; Good luck getting the Phantom in anything smaller than the Disabled spaces.

    Though to be fair, if you're the kind of person who a) ows a Rolls Royce Phantom (or a Bugatti Veyron, or a Mercedes-MacLaren F1, or...) and b) shops at 7-11, you probably qualify for the Disabled spaces... Mentally.

  • by omnichad ( 1198475 ) on Tuesday July 21, 2009 @10:22AM (#28769573) Homepage

    You're missing one obvious factor. There are a lot of great browsers written using pre-existing code. Omniweb is a great Mac browser that uses Webkit for HTML, and Spidermonkey for Javascript. The behavior of that javascript is known, but browser detection routines for every minor browser made of major software is ridiculous. You write based on standards, and test in a few major browsers. #2 is the only option. NEVER BLOCK A USER.

  • by Clairvoyant ( 137586 ) on Tuesday July 21, 2009 @10:25AM (#28769615) Homepage

    As Opera has been complaint to most standards for years, while it took other browsers years to do the same, it is the websites that have the incompatibilities, not Opera.

    Driving your nice little environment degrading Toyota Prius to Germany and finding out they have trimmed all branches of trees so that only VW, BMW, Merc and Audi can pass through without being scratched would probably upset you just as much as your statement would to any Opera supporters. And you would not be blaming Toyota, you'd be blaming the German government. Why does the word rationale mean something completely different when it's about IT?

    Also, afidel's post is far from "right-on", as he/she/it too makes at least two assumptions (while debunking someone elses!): Opera being an insignificant browser; you're forgetting all mobile devices here. And Opera's request being insignificant. Judging from what's Opera's requirements are, I'm assuming (see, there's one!) they're ready to order some very serious amounts of high-end server stuff.

  • by Midnight Thunder ( 17205 ) on Tuesday July 21, 2009 @10:29AM (#28769689) Homepage Journal

    Don't forget this was demo hardware from companies responding to a tender. At this point Opera was still evaluating the hardware. Two things seem to have happened:
        - the software was implemented with an abort for Opera, either because QA was not done for Opera.
        - the vendor didn't appear to know what the primary product of Opera was, and what the browser requirements of their admin interface were.
    While the first scenario is bad enough, the second is just unforgivable, since it shows to the customer that the vendor apparently made no attempt to know who their customer was.

  • by Clairvoyant ( 137586 ) on Tuesday July 21, 2009 @10:33AM (#28769729) Homepage

    We DO know the context; it's a flippin' webadmin site! How hard can it be to write it in proper HTML/CSS/whatever?!

    Chances are 90% of it was stolen from Open Source PHP stuff anyway.

  • by TheGratefulNet ( 143330 ) on Tuesday July 21, 2009 @10:45AM (#28769883)

    If you hire a good developer your site should work for all browsers. It's not fucking rocket science.

    more to the point, try doing less 'fancy schmancy stuff' and you'll find that simple web forms and UI's work JUST FINE with all browsers. even lynx.

    I am not a fulltime web devel (I write software, not web pages) but I have been able to get some web sites up and running that use the form/cgi paradigm and they work across ALL browsers. what's not to work?

    oh, you want flash and blinking and 'as you type' stuff that happens?

    go elsewhere, then. go write some stupid windows program if you want to 'act that way'.

    but that crap does not belong on serious web apps. 'web masters' (what a joke..) have ruined the web with all the blink/fancy crap they try to pull off.

    the web was designed so that you would NOT have to check (!) what browser you are sending data to.

    why the hell SHOULD a server-side program care how you render data? you've done your job, you tagged paragraphs as paragraphs, lists as lists, images as images. you did what html was designed to do!

    just annoys the hell out of me that the web was NOT designed for 'making remote word processors'. it just was never meant for such things. we have twisted this nice interoperable (key term that has lost its meaning, sadly) web into some overly complex beast that 'needs' to know how you render data. or worse, wants to TAKE PART in the font sizing, spacing, colors and so on. what a huge mistake; and its already too late to fix the web at this point; too many idiots are trying to make web programming just another bloated GUI.

    in a way, I wish we didn't have such fat pipes or such fast processors. maybe then we'd see a return to sanity and some level of minimalism. that's what web UI's were *supposed* to be. tag the elements and stay the hell away from FORMATING.

  • by dpilot ( 134227 ) on Tuesday July 21, 2009 @11:55AM (#28770817) Homepage Journal

    Stupid practice.

    The reason for standards isn't to keep companies like Microsoft in check, though it has that result, and that is good for the marketplace. Standards are supposed to reduce costs. In this particular example, the way your iLO team *should* do the job is to first check for html compliance, then check for IE6 - as the largest-share noncompliant browser, then check for any other non-compliant browsers you can't afford to ignore. At that point, you have 3 ways to branch in your code - compliant, IE6, and unsupported.

    The software industry is pretty nearly hopelessly fouled up, because of the lack of clear and properly used standards. A large part of this is Microsoft's fault, though not all, by any means. Unfortunately, rather than software getting better, other industries are getting worse. Customer lock-in is an addictive drug, and in the long term is probably as wise, even from a business sense.

  • by dpilot ( 134227 ) on Tuesday July 21, 2009 @12:44PM (#28771453) Homepage Journal

    Does this really work? For the given example, does "if (document.gelElementsByClassName)" really mean that it will work the way you expect, for any and every implementation? That's the other part of standards - there's following the standard, and then there's "following the standard", which aren't necessarily interoperable... like Kerberos and a certain unnamed implementation.

  • by anonymous donor ( 1440447 ) on Tuesday July 21, 2009 @12:57PM (#28771635)
    This has nothing to do with web standards. The alert message says it's not _supported_ on other browsers. Here "supported" means "someone has actually tested it on every supported version, if it something doesn't work, call us". If anything breaks and you call support, they can't say "that's a bug in your browser". If it is a browser bug they have to work around it.
  • by billcopc ( 196330 ) <> on Tuesday July 21, 2009 @12:58PM (#28771651) Homepage

    Except the Cadillac doesn't specifically forbid Ford executives from riding in it, nor does Airborne refuse to deliver to UPS clients.

  • by b4dc0d3r ( 1268512 ) on Tuesday July 21, 2009 @01:06PM (#28771773)

    So much wrong - I don't even know where to start.

    Stuff happening "as you type" is extremely useful in some circumstances. Excluding that functionality because it might not work is a terrible idea. Updates to small portions of the page instead of waiting for a page reload is a good way to make the site work better and faster.

    you don't need a windows program to make it "act that way". You just need proper feature testing and graceful fallback. Unfortunately, that takes a while to test. If a browser has one feature but not another, and another browser is backwards, you could have some strange results depending on the order of feature checking.

    Flash can add a lot to the usability as well, again if you have a graceful fallback. And again, different browsers or even different add-ons can change the experience. You can have NoScript blocking both scripts and Flash, or just one or the other. You don't want the website to be 100% flash with no other options - that's just stupid. I don't spend any more time on those sites. It's not the "web masters" creating this problem - it's the people who write requirements for the site (or work with the web dev). They want it to work a certain way, and pay enough to get that done - but not for additional execution paths like graceful fallback.

    The web was designed to transfer data. It was not designed to make all data render on all clients. Ideally, every client should support the same feature set. But there are a lot of optional "MAY" or "SHOULD" items just in HTML, making it a vastly different experience even if written 100% to the standard. In an ideal world you'd write it once. But we all know that software has bugs, and we have to be aware that other people's bugs make us as web masters look bad.

    A server-side program SHOULD care how you render data, because it can make the difference between an amateurish site and one that looks like a real business. People are more likely to spend time on a site that looks like someone took time with it, as opposed to a fly-by-night operation shoved up in a few hours.

    the web was not meant for a lot of things, but it is easy to add simple features which make browsing a lot easier, more intuitive, and entertaining. Images weren't even intended in the original development efforts, but I think you would agree they can help. Especially on commercial sites. Things evolve, and it's stupid to ignore these things just because they weren't intended.

    You seem to be advocating zero fonts, zero colors, zero images, zero layout - even I, who browses with scripts off and no flash plugin and uses "ImgLikeOpera" so I can quickly disable/enable images, realize that there are benefits to using all of the enhancements available.

    I agree that the web should be browsable with Lynx, but I also think it should be browsable with all the extras, if they add functionality or increase ease of use.

  • Vogon Poetry (Score:5, Insightful)

    by zooblethorpe ( 686757 ) on Tuesday July 21, 2009 @01:11PM (#28771833)

    You asked for it, ladeees and gentlemen! It may not be that grand masterpiece, Ode to a Small Lump of Green Putty I Found in my Armpit One Midsummer Morning, but I think this little joy from Prostetnic Vogon Jeltz should be enough to warm your hearts:

    Oh freddled gruntbuggly,
    Thy micturations are to me
    As plurdled gabbleblotchits
    On a lurgid bee
    That mordiously hath bitled out
    Its earted jurtles
    Into a rancid festering ...
    [drowned out by moaning and screaming]
    Now the jurpling slayjid agrocrustles
    Are slurping hagrilly up the axlegrurts
    And living glupules frart and slipulate
    Like jowling meated liverslime
    Groop, I implore thee, my foonting turlingdromes
    And hooptiously drangle me
    With crinkly bindlewurdles,
    Or else I shall rend thee in the gobberwarts with my blurglecruncheon
    See if I don't.


  • by GayBliss ( 544986 ) on Tuesday July 21, 2009 @01:36PM (#28772199) Homepage

    Not that Opera doesn't have serious funding... but I'm going to go out on a limb and say that this javascript would be more expensive, most of the time . .

    if (is.explorer) { window.location.href="config/error.htm"; }

    It would cut our UI development time by at least half!

    It typically comes down to developing the UI once for IE, and once for all others.

  • by metamatic ( 202216 ) on Tuesday July 21, 2009 @03:49PM (#28773839) Homepage Journal

    My code is probably wrong(it's a hack job on some badly designed pre-existing code, not a clean rewrite), but nevertheless it works fine on everything else.

    So basically, you admit your code is probably wrong, but you can't be bothered to fix it? Fine, but don't complain when your code stops working or fails in someone's browser and you lose business as a result.

    The way I see it, this is only incidentally a story about stupidity. Not working in a standards-compliant web browser is a good indicator of poor web application quality. The cited behavior of deliberately failing in Opera would make me unlikely to pick the product, even though I'm a Firefox user.

  • by eihab ( 823648 ) on Tuesday July 21, 2009 @08:15PM (#28776845)

    Then use a library like jQuery or Mootools. The overhead is low (30-50kb) and the gains in speed, cross-browser support and extra functionality (jQuery's CSS3 selectors in IE!) is enormous.

    Even if you're a veteran who knows how to code your way around all the different inconsistencies, it's so much nicer to let a library handle that and focus on what you really need to get done.

    You'll eventually run into something or even find that the library maybe working against you in some way. But I want to say that 99% of the time it'll save you time and headaches.

"You must have an IQ of at least half a million." -- Popeye