java bot

JavaScript Engine Develops Consciousness, Hates Programmers

(From the point of view of V8 JavaScript Engine)

So I’m just sitting there, minding my own business and all of a sudden, out of nowhere this guy gets up in my face and says:

Oooookay…. now at this point I don’t know what to expect.  “numpoints” isn’t any variable I’ve ever heard of, and 5 seems like a fine value to assign to it.  Ditto for this “graphValues” business so I decided to play ball.

Next he’s all like

Woah woah woah there buddy what is this “$” ?  Never heard of it.  I have no idea what you’re talking about.  I ain’t searching the internet for your JavaScript library of choice. Here’s how this works: you do the thinking and the typing, I do the doing.  Thanks.  Try again.

Okay so after he tells me ALL about this “JQuery” thing (that he just refers to as “$”) he sends me back the same stuff as before.

So I un-hide this maincanvas thing for him.  But big Mr. “Programmer” still isn’t satisfied. He says:

And I nearly want to puke.  Why keep telling me over and over what canvasElement and ctx are each time?  I’ve known that since this “i” was zero.  Ugh.  But, alas, who am I to judge?  He goes on:

I didn’t even need to read any more.  Sorry buddy a canvas context doesn’t have any method called “movTo”.  So I says to the guy:

Now I know what you’re thinking. It seems pretty obvious from a human reader’s perspective that this dolt programmer is trying to use the “moveTo” method, so why, you ask, don’t I suggest this to him? I simply refuse to be an accomplice in the dumbing down of the JavaScript language. Sure this time I could tell him that he forgot the “e”, but what’s next? Should I let him leave out the “a” in a variable declaration? Should I allow curly OR square brackets in array assignment?  Hell why don’t we just forget the semicolon altogether!?!? No. No leeway will be given to the barbarians constantly attacking my native tongue.

So… long story short he figured it out and then his whole quaint little program is:

So after all that what does this guy end up with?

One of these “radar charts” that are just all the rage these days.  But there are no axes labels, a boring color scheme, no support for multiple lines, no way to dynamically load data, no error checking, generally no way to reuse any of this code. The list goes on and on.  A good start; that is the best I can say about this program.  I keep telling myself I will stop caring about these sorts of things but I just can’t.

And the icing on the cake?  It’s only Monday.

html5 icon1 500x360

Coming Soon: HTML5 meets the Mobile Web

HTML5 Background

Jointly developed by W3C and WHATWG since 2004, HTML5 was created in response to the observation that the HTML and XHTML in common use on the World Wide Web has become a mixture of features introduced by various specifications, along with those introduced by software products such as (various) web browsers.   The ultimate objective being the establishment of more uniform practices as well as to define a single markup language that can be written in either HTML or XHTML.

In this sense,  HTML5 adds many new syntax features to improve inclusion and handling of multimedia and graphic content on the web, new elements are designed to improve the semantic richness of documents and new attributes have been introduced to improve and simplify the semantic expression.  The standards also define the required processing for invalid documents, so that syntax errors will be treated uniformly by all conforming browsers and other user agents. Ancillary benefits promise to increase security, expand storage and offline functionality.

In the end, it’s about a smoother, richer, more useful web.

A mobile Era

While proprietary programs like Flash and Silverlight have dominated the past decade of modern desktop oriented website programming, the complexity and resources associated with such programs makes them unattractive on the mobile web. As a result, developers began responding to user demands through a logical workaround: the mobile application.  In this instance, all content, functionality and experience is contained within an app on top of a smartphones or tablet operating system.

The popularity and ubiquity of mobile apps has steadily increased over the years, Apple’s iPhone launch in 2007 radically altered the expectations that the public had for the mobile web by choosing to use WebKit, the same system that underpinned its desktop Safari browser. In 2008, Google followed suite by using the same open source browser engine to power Chrome, and handset makers like Nokia, Palm, Samsung and RIM have since incorporated WebKit browsers into their devices. As WebKit secures its place of dominance in mobile web browsing, the appeal of HTML5 becomes all the more attractive, considering current support for the standard ranges between 77% – 96% amongst top browsers:

HTML5 browser support

The Convergence

Since many of the nuances have yet to be agreed upon by the collaborating development groups, it’s clear that HTML5 will need time to mature and find its stride.  But as the trend for HTML5 browser support shows that compatibility will strive for perfection in the near term (Microsoft’s IE notwithstanding), web developers can begin programming with the confidence that HTML5 will come through for the mobile masses.