Tuesday, March 18, 2008

Bravissimo!

Dang. Every time I think Joel Spolsky's getting too big for his britches, he reminds me of why I write off 90+% of his elitism and slightly embarrassing self-promotion. The write-off is not the price of genius so much as the price of learning so much from a smart person who can also communicate. A very small price, even for my Midwestern sensibilities. (If you could take Warren Buffett or Bill Gates out for lunch--seriously, would you actually let either of them pay the bill? I would bloody well hope not.) And so I return to the "Joel on Software" blog every week or so, for something like the 8th or 9th year running.

Yesterday's Martian Headsets is a case in point. (If you have any interest whatsoever in developing for the Web, read it. Now. Yes, right this very nanosecond. If you don't come back after that--it's a looooonnnng post--that's okay. You'll gain far, far more there than you will here.)

For all that, I'm not positive that I agree that if HTML had been more retentive about standards, it would have halted the explosion of the World Wide Web during the mid/late 1990s. Here's my reasoning:

If you were an impecunious computer science student (such as I was), your development environment was Notepad. You stayed up until two in the morning figuring out that your JavaScript was blowing up on the perfectly-@#$%^&*-valid-thank-you-very-@#$%^&*-much code of Line 459 because you flipped around a curly-brace waaaaay back on Line 273. (I'm not exaggerating about that. 'Spesh'ly the profanity part. Ask Dearest.) But the bottom line was that you had to to get that code out the door, and the browser didn't give a hot cup of jack-squat what you meant to do with that curly-brace on Line 273.

If, on the other hand, you worked for one of the fifty bazillion web design firms in business back in the day, your employer could probably afford tools, which would have handled the messy details of tag-completion, tag nesting, and so forth.

In either case, strictness of standards would have not mattered as much as Mr. Spolsky makes it sound. In the latter case, the tools would have enforced rigor (as did the gawdawful homegrown SGML editors we were forced to use at IBM), or you would have learned very quickly to humor the browser's rendering engine and scripting runtime. And, in my opinion, the web would have been better for it. The sheer number of person-hours saved in keeping both Netscape and IE (and later Opera) happy would have freed up a not-insignificant amount of time for more coding.

In fairness, Mr. Spolsky makes the excellent point that standards are not always written clearly, even without intentional self-serving misinterpretation. That still doesn't exonerate the major players. Have you ever made the mistake of saving an HTML document in Word? Not pretty. I spent the better part of a day undoing the damage of that mistake. And with AJAX becoming more prevalent all the time, having to branch my handling code is ridiculous:

function doAjax()
{
   var httpReq;

   ...

   if(window.ActiveXObject)
   {
      httpReq = new ActiveXObject("Microsoft.XMLHTTP");
   }
   else
   {
      httpReq = new XMLHttpRequest();
   }

   ...

   if(navigator.appName == "Microsoft Internet Explorer")
   {
      httpReq.onreadystatechange = handleAjaxResponse;
   }
   else
   {
      httpReq.onreadystatechange = handleAjaxResponse();
   }
}

Two salient points from the much-snipped snippet above:
  1. If you instantiate an AJAX request object, IE should be able to figure out that it's supposed to be an ActiveX object under the hood. Honestly--now no-brainer is that???
  2. "handleAjaxResponse" is a function call. Functions use parentheses. Variables don't. Normally, it's a bad thing when Marketing involves itself in software design, but anyone from Marketing should be able to tell you that you mess with customers' expectations of "correct" behavior at your peril. And developers are customers. Something--as I've previously kvetched--Microsoft seems to have forgotten quite some time ago.
And for companies that bring in bling on a Microsoft scale, I think that developers have a right to expect better. And because every right carries a responsibility, they also have the obligation to insist on it. Mind you, wallets normally count more than feet, but if feet are all you have, sooner or later the vendors will pay attention.

Perhaps a bit too much expectation of noblesse oblige from the 800-lb gorilla of the software world. But companies can expect to manage their clients' expectations only so much. The way I see it, Microsoft's slowly waking up to the position that the Republican Party's in right now. Both are already behind schedule for the soul-searching and reformation that will stop their base from hemorrhaging.

Also, in my opinion, Mr. Spolsky's missing a chunk of the point. This is not all about the browser and whether or not it should be the martinet of web code. Browsers can be forgiving, but the toolsets should most definitely not be. Honestly, how many people are coding in Notepad anymore? Even on the Windows platform, a WYSIWYG editor like Amaya is free. As is the web-based editor with which I'm composing this post. 'Nuff said.

We certainly can't change the past, but we can insist on a better future. True, web pages can hang around for quite awhile, but sooner or later they will be updated for reasons other than browser optimization. If the tools are in place to make them standards-compliant, sooner or later the underlying code will hew more closely to the standards.

Will we then pass into a merry world for developers and their users? Of course not. In fact, humankind regresses when it insists on perfection--better to be good than holy, after all. But I see no reason to assume that the future is the Balkanization of the web among browsers (and their "interpretations" of the standards). Any more than I believe in some sort of Highlander-esque "There can be only one" mentality. Or even a return to a Godzilla vs. Mothra slugfest between the two biggest players.

The bottom line is that there is a real cost to this Balkanization (of which the code snippet above is not even a mere whiff, much less a taste), and that customers will take out their frustrations on developers who make life difficult for their browsers, and developers will in turn take it out on the makers of those browsers.

And the makers of tools to write HTML/JavaScript/AJAX/Flash/Silverlight/TheNextNewThing.

And the people who publish the books on those subjects.

And the trade publications that hype the technologies/platforms.

You get the idea. There's far more at stake than just IE8 and which faction eventually wins at Microsoft.

But for all my carping criticism, the Joel on Software post is still well worth your time and brain's CPU cycles. If you've slogged through my opinionated naysaying, you certainly have time for "Martian Headsets." Assuming you haven't already done so: Go ye forth and read!

Friday, March 14, 2008

The second most important question...

...that anyone should be asking of the Bush Regime and its posse is simply: "Why do telecom companies need retroactive immunity if warrantless spying is legal?" I'm just hoping that the Congress-critters in the House evolve enough backbone to keep stalling the FISA bill (last night's street theater aside) until the clamor of common sense becomes too loud for even the thugs in residence at 1600 Pennsylvania to dismiss.

(And the most important question is still, of course, "Where's Osama?" In round numbers, the Bush Regime has "avenged" 3000 9/11 casualties with the deaths of 4000 American soldiers, hundreds of contractors, not to mention tens of thousands of citizens from a country that was not involved in any way, shape, or form in 9/11. Yet the mastermind is still free. Got any more bright ideas, chickenhawks? Wait: On second thought, keep 'em to yourself.)

Wednesday, March 12, 2008

All your base are belong to Apple

In the Noodlely name of the Flying Spaghetti Monster, wtf is Steve Jobs thinking these days???

Bricking unlocked iPhones (thus enabling AT&T's snitching to the NSA) was unforgiveable in itself. Now comes the news of the nasty little "gotcha" in the ballyhooed iPhone software development kit (SDK): Applications written with the SDK can only be distributed via the AppStore, presumably iTunes. In short, Big Brother Apple will decide whether what you write is "acceptable" for their platform.

Nuh-uh. If we (meaning programmers) want to be managed, we'll go to work and be paid for it. We're not putting up with that on our free time, 'spesh'ly not to put more money on Apple's balance sheet.

Moreover, how, exactly, is one supposed write iPhone apps for a real-world client? In that scenario, you would have to make the code (which more than probably includes the client's proprietary information) available to all. And that's if Apple gives your app. a pass. Good luck getting a paying customer to put up with those terms.

In the proverbial nutshell, Apple has created next to no incentive for anyone to add value to one of their flagship products. Your sweat, toil and head-banging as a programmer (for fun or profit) are rendered nil if Apple decides that your oeuvre doesn't align with their objectives.

This doesn't affect me personally, even with the trinket-temptation of a shiny new SDK. (Like Mordor I'd sell my users out to the NSA!) I'm just sort of gobsmacked at the fact that people whose salaries are orders of magnitude larger than mine can think that this sort of behavior will hang with the developer community as a whole. In fact, I can totally imagine Steve Wozniak--the tinkerer's tinkerer--going suborbital at the news. Who's to blame him?

Sure, Apple'll get some Mac fanboys and fangirls to risk their time and talent--cultists don't question, after all. But the rest of us? I find that dubious at best. Painting with a broad brush, many (if not most) programmers have a healthy libertarian streak. We like things we can take apart and make even better. Admittedly, the "cool factor" of a sparkling new gadget does have considerable pull--particularly from "the BMW of computer companies". But the cool factor shrivels quickly under ham-fisted police state tactics like Apple's employing. And that never bodes well for anyone who wants to build a "platform."

Microsoft (with occassional backup from Adobe) brasses me off as a developer on a fairly regular basis, so it's not like I'm short on aggravation in my professional life. Watching the leaders of the Apple cult drink their own Kool-Aid, however, is just plain disturbing.

Tuesday, March 11, 2008

A new slogan

I've joked for years that when I run for benevolent dictatorship, my campaign slogan will be "Close enough for government work."

Now, in all seriousness, one that I would much, much prefer to see is simply "Big shoulders." Because that, if nothing else, is what we've lost in the six-plus years since 9/11.

Seriously, now: Are we (meaning America) such a bunch of nancies that a double-handful of dogma-drunk wankers can undermine eight hundred-plus years of the notion that no one is above the law?

Dearest pointed to me to this collection of commentaries on torture, titled "No torture. No exceptions.", with such bright lights as Jimmy Carter, Leon Panetta, Chris Dodd and more. But it was Wesley Clark who--so far as I'm concerned from a sampling--abso-friggin-lutely nailed it:

Something in the American soul has always demanded fair treatment and respect for the individual. Perhaps it was our flight from the repression of the Old World and the practices of European monarchy. We were different. We expressed it in our Declaration of Independence. We captured it in our adaptation of English common law, in our trials by juries of peers, and in our spirit of justice. We were a better nation for it, more respected, more influential, and more secure. Certainly, we committed historical wrongs that today we wish we could set right, but overall we advanced, step by step, striving to live the values we professed.

Until now. Until weak, fearful leaders had so little belief in our values and principles that they gave away our birthright and proud claim in order to follow a shadowy emulation of the very dictatorships and tyrannies we had struggled against. For shame, America, that we aren't brave enough and strong enough to live our values.

Lest it be lost on my gentle reader, allow me to reiterate the key words: "...weak, fearful leaders had so little belief in our values and principles that they gave away our birthright and proud claim in order to follow a shadowy emulation of the very dictatorships and tyrannies we had struggled against."

In the President's case, weak enough to keep reading a children's book with a deer-in-the-headlights look during the crucial minutes when he could have been scrambling fighters into the air and ordering that all planes that could not answer the friend-or-foe signal be shot from the sky. In the instance of the Vice President, weak enough to scurry off to his secret hideaway--as if the nation could not risk the loss of his *cough* "leadership" *cough*. Very telling reactions from both. Reactions which, by themselves, should have had both on the curb in January of 2005.

But no.

General Clark may have been too polite to mention this, but I'm not. The shame belongs in equal measure to you, reader, if you re-elected this tribe of bullies--meaning cowards--in 2004. Shame too for those who still parrot the PRAVDA that killing more towel-wearing brown people will prevent the next attack. Shame particularly to those who think that there is a wall between what can be done to a foreigner and what can eventually be done to her or him, should s/he fall afoul of what the government considers right-thinking. A "nanny state" indeed, except funny how it's not liberals who are relieving you of the burden of those pesky civil and human rights, now are they? It's not the peacemongers who are Osama's best recruiters and who are--in the ill-defined front lines of Iraq and Afghanistan--teaching Jihadists how to fight Americans.

You @$S#@+$ have, in short, sold the soul of America for precisely nothing. A loss, in the long run.

And it's not simply a crime of gutlessness, it's a crime of pure stupidity. More people die in forty days on the roads and highways of America than perished on 9/11. Yet you twits still climb into your cars every morning without blinking. Probably into an SUV with an alarming rollover rate and anti-lock breaks that you wouldn't know how to use anyway. In any case, you're too busy alternating between figuring out your cellphone and sucking down a double mochaccino to pay attention to what's actually going on around you.

In other words, the American Right in the proverbial nutshell--the perfect storm of arrogance and willful stupidity.

Why? Because you're idiots that would rather be spoonfed the illusion of "control" and "safety" than (gasp!) assume the responsibility for your own well-being. Which would be all well and good if you were only in danger of wrapping your complacent @$$ around a lightpole. But you've managed to drag me along for the ride. And that I don't appreciate.
I want out of this road-trip. If that means hitching a ride to another country, that's fine. Because if Congress can't scrape together the cajones to say "No" to torture, to stand up to that spoiled rich kid and his twisted old puppet-master, well, then, #$%^&* it. I'm just gonna hafta find me a place that does still have some stones. Not eyeball-deep in mouth-breathing sissies who are willing to not only stand by, but actually cheer while our government brutalizes other human beings.

Bluntly put, if we can't give a fair trial to Lucifer himself, than our Sociopath-in-Chief might as well continue to wipe his @$$ with the U.S. Constitution, just as he's done for seven years. And the pinheads who voted him back into office deserve even worse.

Monday, March 10, 2008

Cheeseburger poisoning claims another "victim"

Well, well, well: Apparently someone bought into his own legend, and alarmingly quickly.

Needless to say, Spitzer will not fare well behind bars--like any other dirty cop. I think, though, that he has the smarts--and residual sense of propriety--to resign. As well he should. Not for extra-marital sex, understand--unless it involves workplace issues, it's no one's business. But lawbreaking is another matter. With extra points for egregious hypocrisy.

Despite all the history I've ever read, despite the mucky tracks of corruption across the headlines of late, I still can't begin to fathom what gives anyone in power that sense of entitlement, of carrying a free pass from the rules others are expected to live by.

Geeze, this just brasses me off. I would have considered Spitzer decent Veep material in 2012 or 2016.

Yet I'm beginning to think that this country doesn't need more reformers or crusaders or white-hat-wearing cowboys. What we truly need is a Court Jesters Guild. Clone Jon Stewart and Bill Maher and Stephen Colbert and Gary Trudeau and Burke Breathed, et. al. umpteen times and put them to work as the official balloon-prickers to the Egos-in-Chief of this world. Something--anything--to neutralize the private clubs and chauffeured SUVs and woeful lack of the word "No" in these lives. Trust me, the jesters' salaries would pay for themselves in cheeseburgers alone.

Friday, March 7, 2008

And speaking of PHBs...

Someone who's been my friend for over half my life has been laid off from his job of 18 years, which brings the recession a bit closer to home. And adds even more acid to my attitude toward the PHB country club.

That being said, I don't think that the government interest in the issue of CEO paychecks will even begin to bridge the "Two Americas." But Ted Davis should be formally censured for the sheer hypocrisy of the following:
"The impact of corporate executive compensation is debatable," said Rep. Tom Davis of Virginia, top Republican on the committee. "Fine, but that debate ... should not degenerate into a sanctimonious search for scapegoats."
Will Rogers observed that the problem with giving someone a lesson in meanness is that they usually learn it. And the GOP has done nothing if not set the platinum standard for both sanctimoniousness and scapegoating.

Apparently, such behavior is only acceptable when the sanctimoniousness couches itself in Old Testament idiom, and the scapegoats are immigrants, gays, or brown people who have the gall to live near Third World oilfields. Not rich, powerful (and overwhelmingly white) males whose mistakes and hubris damage thousands upon thousands of working families.

Every.

EmEffin'.

Year.

Unbelievable. If that's what rubbing elbows with people who have less sense of responsibility than a spoiled teenager does to your perspective, I'll stick with my crowd. We'll start a gopher ranch next door to the country club...

Thursday, March 6, 2008

A contribution

The http://www.oldapps.com site saved my bacon today when I needed to find downlevel versions of Adobe Acrobat Reader for testing browser plug-in detection code. Assuming that Adobe makes those downloads available anywhere on their site, they did an excellent job of hiding them.

This is the second time in fewer than 24 hours that I've found critical development information about Adobe products on a third-party site. Apparently Adobe's going the way of Microsoft in the sense that they no longer grok the fundamental rule of platform-building: Don't piss off your developers.

On the surface, it seems like a no-brainer. That is, I suppose, until you factor in the effect of PHBs in corner offices. It's not even that these wankers are twelve-o-clock flashers. It's merely another facet of the One Cheeseburger Too Many Syndrome that you find everywhere else in that feudal Ponzi scheme otherwise known as corporate capitalism.

But in this age when programmers have more tools to play with than ever before, only the megalomaniacal egos of prima donna companies like Microsoft and Adobe can believe that manufactured "cool" will draw much mind-share--much less the best and brightest of those minds--to their tools and toys.

Or at least that's my opinion. Now that Sun's open-sourced Java, I'm pretty certain that I'm no longer developing with any proprietary code. Even the PDFs are cut straight from OpenOffice, not Adobe. Granted, I'm not doing anything remotely bleeding-edge, and the cool factor is probably in the negative. But the fact that I can do that--just the fact that I have the option of ditching the buggy and temperamental BlueFish for Geany, for instance--should keep the IDE suite-peddling crowds at the proprietary companies awake at night. But you and I know that the the barons of the corporate world are too busy slipping stilettos into their rivals to pay notice if the kingdom is crumbling about them. But, then, it's not like they've ever had to pay the price of their arrogance, greed or stupidity: That's only for the little people.

Sadly (from my perspective), the OldApps website does not have a PayPal donation link. All they ask is that you post a link to their site, and if interested, visit the websites of their advertisers. They, like so many other non-commercial resources (Wikipedia, SourceForge, etc., etc.) are making developers' lives easier in ways that would never, ever occur to the 800-lb. gorillas to try, even when their bottom line is directly affected.