jQuery Unknowns of the First Half of 2011

Not everyone can know everything about jQuery plugins—not even John Resig. What is ruthless about some IT managers, from my hopefully distant past, is their expectation that you, the developer, know everything about the task you are about to undertake. It took me way, way too long to find out that this expectation, conscious and subconscious, is really the garbage of reckless youth—no matter how old the IT manager appears to be.

What is a nightmare scenario is realizing this magical expectation not only includes knowing all about the technology but also how the technology can be abused (the anti-patterns and just the anti-). I formally introduced this realm of hell to myself in “What’s most busy about the IT consulting business…” A couple of months later I’m still looking for a way to study Microsoft-based anti-patterns based on real data collected in the .NET 3.5/4.x timeframe.

So I have more experience with managing technological unknowns. The technology of the day (today) is jQuery. This is the client technology that’s paying my bills these days—so it would behoove me (my mother used that word) to hoof it and trot over the traps that caught me in these early days of HTML 5.


NY Tech Summit 2010

Here in the 21st Century, Internet Explorer Still Objectively and Scientifically Sucks

Internet Explorer is a living monument of corporate politics. This is why it sucks. Someone is going to write a book and then consult for a documentary film about Internet Explorer. Where’s the filmmaking skills of Robert X. Cringely when you need ’em?

In the meantime, install Internet Explorer 9 (there’s tweet I heard that said don’t install the 64-bit version because the JavaScript engine is “5x slower”—it’s not using the Chakra Engine) and go to http://html5test.com. This brand-new, 21st-century, browser will score the lowest of all the “modern” browsers.

In my recent work, here’s what stands out about Internet Explorer:

  • It has the best Jscript debugging experience for any integrated development environment on the planet. In spite of this, I still use Firebug on Firefox and console.log() (yes, IE Developer Tools also supports console.log()—in a super-annoying way).
  • Internet Explorer 8 can’t do rounded corners (easily)—so Cornerz, yet another jQuery plugin, is still needed.
  • Internet Explorer 8 can’t do CSS drop shadows (easily).
  • I recommend using jQuery UI for designing any “pop-up” visual because Internet Explorer 8 has a very different interpretation of the offset of a block display. I lost hours of time and wasted my client’s money (as far as I’m concerned) discovering this “innovation” from Redmond.

File Input on an HTML Form for Cross-Browser Consistency is Ridiculously Hard

The fact that I did not know just how awful the situation is for <input type="file" /> betrays my lack of concern for providing ways of allowing “users” (interactors) to write files to a web server. Looks like I missed Web 2.0 entirely. (I did notice over the years how, say, flickr.com took exceedingly tedious steps to make file upload sexy—with much success.) In “CSS: Styling File Upload / Select Input Control <input type=”file” … />,” the situation is made explicit:

Let’s face it, the native implementations of file uploading control of HTML form is ugly, throughout most of the browsers, and not consistent at all.

Recent work led me to Sebastian Tschan, his work, jQuery-File-Upload. Like SlickGrid (see below) it’s on github.com and, like SlickGrid, it has little documentation—but, compared to the other stuff that’s out there, it’s awesome. It became awesome after these humps on the learning curve:

  • jQuery-File-Upload by default uses an entire form element to do its magic. I tried to use a special, documented ‘micro-format’ to allow other visuals in the form but this did not work for me.
  • As I’m new to jQuery-File-Upload I prefer $('#my-form').fileUpload() over $('#my-form').fileUploadUI(). The latter being more complicated and unrelated to my client’s specifications. I notice that there is more documentation and code samples for .fileUploadUI().
  • The documentation for the onLoad option strongly suggests that the handler object in the function signature for onLoad has a parseResponse function. I have yet to find this function… perhaps it’s in another satellite file?

Deciding to Use SlickGrid Means Working with Almost No Documentation

There are too many freaking grids for the jQuery universe and no one is willing to declare themselves the supreme master of this space. I’m waiting for that grid episode on DocTypeTV to bust a move on this technical matter.

Before recent work, before my telecommuting experiment, I got mired in the well-documented, monumentality of jqGrid. Now it’s SlickGrid. I can see why I would prefer jqGrid over SlickGrid during my days at Amgen:

  • jqGrid has better documentation than SlickGrid
  • SlickGrid requires jQuery UI, which can be seen as an extravagant dependency (see below) that I would be unable to defend before a team of developers totally ignorant of the existence of jQuery UI.

jQuery UI “Theme Roller” Means Dragging around a Bunch of Files

jQuery UI is a celebration of the image file—my “theme rolled” customization has about 13 image files. Most of these image files make the gradient effect that CSS 3 promises to eliminate. In spite of the impressive idea in the celebrated ThemeRoller application, I literally cringe and almost dread having to change my custom theme. The way you “save” your theme, for example, is with a super-long URL which, for me, fails to preserve every detail painstakingly specified (this URL is also saved in a CSS file in your download).

It is fascinating to me how I am unable to find other Blog posts criticizing ThemeRoller. Even the search term “ThemeRoller alternative” returns little or nothing. I refuse to accept that ThemeRoller is beyond serious improvement. I suspect that serious CSS people, building on some 960 grid system, don’t even use it.

Related Links

“Microsoft’s first Windows Phone 7 update coming this month?” and other links…

Chris Ziegler: “…and perennial Microsoft guru Paul Thurrott thinks it’s tracking for early February before it’ll actually reach users’ devices… so we wouldn’t go canceling vacations you’ve got scheduled this month just so you can be around to score the update as soon as it’s available.”

“Verizon’s iPhone story isn’t so black and white”

Robert X. Cringely: “There’s this disconnect that takes place sometimes where users and service providers see a problem completely differently. In this case customers are clearly being inconvenienced yet Verizon engineers are saying, ‘no they aren’t,’ which actually means, ‘there shouldn’t be a problem and if there is that problem is on the customer’s end, not ours.’”

“The Dark Side of Usability”

Chris Coyier: “People using the more difficult interfaces tended to perform better, were less fazed by distractions and were found more likely to transfer their skills to new interfaces or tasks. [original article at usabilitypost.com]”

“Windows Phone Comparison Wallchart”

Mike Halsey: “I have found this a very handy guide, it’s not changed my mind and instead made me realise that on things like weight and battery life the Mozart scores rather well.”

“Windows Phone 7 and Windows Live Calendar: What you can and can’t do”

liveside.net: “So as Thurrott puts it, this is an ‘example of something that is simple and elegant, but also functionally limited’ with the upcoming Windows Phone 7, and ‘you can’t be both simple and full-featured’. Well, at least in version 1 anyway. We definitely hope that some of these limitations with Windows Phone 7 will be fixed with one of the software updates to be coming soon after release…”

“Microsoft: over 1.5 million Windows Phone 7 devices sold to carriers and retailers”

Vlad Savov: “That tells us that the mobile industry is cautiously buying into Microsoft’s new OS, and it’d be foolish not to, but it doesn’t really educate us on the relative success of the platform’s launch—1.5 million units is a tiny, tiny number when you consider the platform launched on 10 devices on over 60 carriers in over 30 countries.”

“San Francisco’s Black Exodus” and other links…

Cafe Trieste San Francisco North Beach Jamilah King: “As in other cities across the country, San Francisco’s Black communities became the focus of massive urban renewal programs spanning from the late 1940s through the 1970s. In the city’s predominantly Black Fillmore district, a total of 4,729 businesses, 2,500 households and 883 Victorian homes were demolished to make room for government-owned housing and commercial businesses. …Some displaced residents moved to other parts of San Francisco, while others relocated to more affordable cities like Oakland and East Palo Alto. In total, more than 5,000 families were displaced. …Ironically, since the end of the urban renewal programs in the ’70s, San Francisco city officials have commissioned several studies investigating why Black residents are leaving and how to get them back.”

“Is Technology Evil?”

I, Cringely: “Goldman Sachs isn’t evil, just stupid. And that stupidity comes in the form of their witless abuse of technology. …Jim’s sports analogies are misplaced because while sporting events must inevitably have winners and losers economies don’t. TRADING has winners and losers but Goldman is an INVESTMENT bank (worse still, they are now a bank holding company) pretending to be on the side of economic growth. Trading relies on finding and exploiting inefficiencies in the system while investing grows the economy. Trading is a parasite on investing. I’m not saying to ban it, I AM saying that technology has enabled outfits like Goldman to be such efficient parasites that they threaten the survival of their hosts.”

“S.F. moves to stem African American exodus …Critics say effort to reverse longtime trend may be too late”

Leslie Fulbright: “San Francisco officials are now calling the thousands of black people who have moved away ‘the African American diaspora,’ and the mayor’s office is putting together a task force to figure out what can be done to preserve the remaining black population and cultivate new residents. …San Francisco’s black population has dropped from 96,000—or 13.4 percent of the city—in 1970 to an estimated 47,000 in 2005, about 6.5 percent of city residents, according to the U.S. Census Bureau. African Americans make up about 12.1 percent of the nation’s population overall.”

“Movable Type Since 2004” and other links…

VDS - OpenGoo codinghorror.com: “In retrospect, my choice of Movable Type was a fortunate one. Although I also use and appreciate WordPress, it’s a bit of a CPU hog. Given the viral highs and lows of my blogging career, there’s no way this modest little server could have survived the onslaught of growth with WordPress. It would have been inexorably crushed under the weight of all those pageviews… What’s Movable Type’s performance secret? For the longest time—almost 5 years—I used the version I started with, 2.66. That version of Movable Type writes each new blog entry out to disk as a single, static HTML file. In fact, every blog entry you see here is a physical HTML file, served up by IIS just like it would serve up any other HTML file sitting in a folder. It’s lightning fast, and serving up hundreds of thousands of pageviews is no sweat. The one dynamic feature of the page, comments, are handled via a postback CGI which writes the page back to disk as each new comment is added.”

OpenGoo: An Open Source Web Office

Lisa Hoover: “OpenGoo is free and open source server-side software with a collection of apps that are perfect for small businesses. It includes a word processor, task lists, calendaring, an address book, and an email client. A hosted option is also available for various monthly fees, depending on your storage needs and number of users. …I took a demo of OpenGoo for a test spin and it performed really well. I made lists of tasks, complete with nested sub-tasks, then easily assigned them to my imaginary friends. Documents were easy to create and edit, and even included a revision tracker. I used the timesheet feature to track time spent on various projects I made up and then used it to generate various custom reports. The email portion of the suite is still in beta, but looks like it will be very useful once it sees its first release.” This news comes to me via Tiffany B. Brown.

“Google Taketh Away”

I, Cringely: “It is important to remember that Flash video was not a significant competitor until it was embraced by the pre-Google YouTube. Flash video simply wasn’t that good. It relied on an antiquated H.263 codec that was originally intended for video conferencing and, while fast, was of not particularly good quality. But quality didn’t matter to the early YouTube, just fast and reliable streaming connections, which a video conferencing codec could provide. …The lower quality of streaming video had the industry broadly turning away from streaming, moving to the download delivery model championed by Apple with iTunes. Then YouTube changed everything seemingly overnight.”

“Three Mile Island Memories” and other links…

March 28, 2009  TMI Anniversary- Maria FrisbyI, Cringely: “What happened at Unit 2 was a little more complex.  A cascading series of events caused the computer to notice SEVEN HUNDRED things wrong in the first few minutes of the accident.  The ONE audible alarm started ringing and stayed ringing continuously until someone turned it off as useless.  The ONE visual alarm was activated and blinked for days, indicating nothing useful at all.  The line printer queue quickly contained 700 error reports followed by several thousand error report updates and corrections.  The printer queue was almost instantly hours behind, so the operators knew they had a problem (700 problems actually, though they couldn’t know that) but had no idea what the problem was.”

“Parrot Secrets”

I, Cringely: “The owner of Parrotsecrets isn’t Nathalie Roberts, isn’t even a woman, and isn’t even American.  He’s Indian and lives in India.  When Parrotsecrets began he lived (and still lives as far as I know) with his parents, who are both medical doctors.  When the site started in 2004 he was 18 years old, making him 23 today. …Imagine what it would be like to make $400,000+ per year.  Now imagine what it would be like to be 23, single, living in India, making $400,000+ per year.  And Parrotsecrets is not his only web site.” I hear that this article caused outrage (more like ‘white rage’).

“Refrigerator Alternatives”

HowStuffWorks.com: “No matter what the cooling source, people without a refrigerator have to change the way they buy food at the store. In other words, no more trips to the Costco meat department. Buying chicken for dinner means buying exactly how much chicken you can eat, because you don’t want to have to store leftovers. Same goes for other perishables: Instead of a 3-pound (1.3-kilogram) bag of apples, you have to limit yourself to just a few; gallons of milk may have to be replaced with quarts due to space limitations in the cooler. And buying smaller amounts can mean spending more money. Throwing away food that’s gone bad can cost you money, too. So finances have to factor into the decision to unplug the fridge.”