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."
I'm more curious who did their QA (Score:3, Insightful)
And if it was outsourced.
Re:ok so the company lost money... (Score:5, Insightful)
Re:ok so the company lost money... (Score:5, Insightful)
If large corporations would only use common sense, (Score:5, Insightful)
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)
Re:ok so the company lost money... (Score:3, Insightful)
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)
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.
Re:ok so the company lost money... (Score:2, Insightful)
Re:ok so the company lost money... (Score:5, Insightful)
If you hire a good developer your site should work for all browsers. It's not fucking rocket science.
Re:So who was it ?? not (Score:3, Insightful)
var detect = navigator.userAgent.toLowerCase();
var ie = detect.match(/msie ([\d\.]+)/);
var moz = detect.match(/rv:([\d\.]+)/);
var fire = detect.match(/firefox\/([\d\.]+)/);
if(
( ie!=null && ie[1] >= "6.0" ) ||
( fire!=null && fire[1] >= "1.0.2" ) ||
( moz!=null && moz[1] >= "1.6" )
) {
} 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" );
Old browser == old PC == miser (Score:2, Insightful)
[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 [wikipedia.org]: 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.
Am I the only one... (Score:2, Insightful)
Well I learned something new today (Score:5, Insightful)
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.
-Rick
Re:ok so the company lost money... (Score:5, Insightful)
Re:ok so the company lost money... (Score:5, Insightful)
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.
Re:ok so the company lost money... (Score:2, Insightful)
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.
Re:ok so the company lost money... (Score:2, Insightful)
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.
Re:ok so the company lost money... (Score:3, Insightful)
Sorry, couldn't resist
Re:ok so the company lost money... (Score:4, Insightful)
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.
Re:ok so the company lost money... (Score:5, Insightful)
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.
Re:ok so the company lost money... (Score:3, Insightful)
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.
Re:I'm more curious who did their QA (Score:5, Insightful)
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.
Re:ok so the company lost money... (Score:2, Insightful)
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.
Re:ok so the company lost money... (Score:5, Insightful)
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.
Re:So who was it ?? not (Score:4, Insightful)
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.
Re:So who was it ?? not (Score:3, Insightful)
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.
Re:So who was it ?? not (Score:2, Insightful)
Re:So who was it ?? not (Score:5, Insightful)
Except the Cadillac doesn't specifically forbid Ford executives from riding in it, nor does Airborne refuse to deliver to UPS clients.
Re:ok so the company lost money... (Score:3, Insightful)
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)
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, ...[drowned out by moaning and screaming]
Thy micturations are to me
As plurdled gabbleblotchits
On a lurgid bee
That mordiously hath bitled out
Its earted jurtles
Into a rancid festering
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.
Cheers!
Re:I'm going to go out on a limb, and say.... (Score:3, Insightful)
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.
Re:Technically it's correct behaviour (Score:4, Insightful)
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.
Re:So who was it ?? not (Score:3, Insightful)
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.