Tuesday, October 20, 2009

The Terror of Cascading Style Sheets

I've been involved in designing and building hundreds of web sites throughout my career. There is one common red thread that always seems to be present on any project that involves building and launching a web site: that thread could be summed up as 'layout and styling management'. The reason I'm mentioning that thread is to illustrate how, of all the other activities related to building/launching a web site, that one is the least predictable. However, at the same time, the layout and styling always gets buried in the mix, so that no one seems to be aware of the issues surrounding that activity.

Now, if we were to break down the effort needed to build and launch a typical web site, I'd say that, in my experience, the layout/styling efforts can unapologetically eat up anywhere between 15%  all the way up to 60% of the overall time and effort. Now, that's a significant chunk of resources that somehow never gets properly acknowledged. But in reality, and in hindsight, we all know that there always seems to be a lot of fiddling with the cascading stylesheets (CSS).

For some reason, no one seems to mind this wastefulness, but guess what -- I do! Rather than burning untold hours on making sure that certain CSS trick will work in certain versions of Microsoft Internet Explorer, I'd like to simply launch the site and move on to doing more lucrative things.

But the issue is with the CSS police (or, as I like to call them, CSS fascists). They insist that CSS is god, and it must be served and worshipped. So my question here is: why? What is it about CSS that should command a lot of our time, effort, and money? Why have we enslaved ourselves and found ourselves serving the gods of CSS? What could be realistically gained from this ridiculous system of slavery?

My answer is: nothing could be gained. We have merely fallen victims of some witless, clueless hackers who are terrorizing us with their oh-so impressive CSS skills. Who cares? And, oh, by the way, those hackers should get a life! Or at least get a girlfriend.

"But what's the alternative?" those who are more observant among you might ask. The answer is dead simple -- the alternative to CSS is NO CSS! Just abandon the crappy thing altogether.

"But, but, but, then our web sites will end up looking ugly!" I can hear you retort. Well, here's where the interesting bits come -- I've been lately launching a number of web sites that contain zero CSS code, either as separate CSS files or inline. The site's presentation is rendered by the browsers that strictly read the semantic markup and render the content in a knee-jerk fashion.

Guess what -- the customers love it! No one ever called to complain how the site is missing that inexpressibly lovely pale coral red background color, or what have you. Time to wake up, people: no one cares about that crap! No one is going to stop and marvel at the sublime colors, fonts, and layout decisions you and your team of designers have poured over for months (minor correction: no one except those same CSS fascists).

This is the ugly truth in today's world of web sites. Web designers of all colors will vehemently deny this, of course, but don't let them bully you. My advice is: be brave, be bold, be radical, lead the pack and release that site with no styling whatsoever. See what happens. And see how much money and time you save by firing those bloated designers and, by proxy, reducing the bloat of your site.

And in case you get cold feet, just placate yourself with these thoughts: "Hell, we can always add the facelift once the site is up and running; that's always a no-brainer. Throw in some colors, some layouts, fancy fonts, whathaveyou. But first, let's see if there are any detectable issues with the bare bones site."

Look at it this way: most people go on the web with a specific question in mind. All they are looking for is an answer to the specific question. And they really don't care about the appearance of the answer to that question, so long as the answer was easy to obtain.

For example, if I have a flight tonight, all I'd like to know right now is whether my flight is on time, or delayed, or cancelled. This information would be super important to me right now, wouldn't you agree? I'd like to be able to simply plug in my flight number, and get back one of the three possible answers:
  1. The flight is on time
  2. The flight has been delayed for x hours
  3. The flight's been canceled
Would I really care if the answer comes back to me in a certain font? No, no way! Would I get upset if the answer is not styled at all? Again, no way!

Time to wake up and smell the roses, folks. This may hurt for you to hear, but people in general don't care about visiting some dinky web site. All people want is the ability to ask a question and get back the correct and legible answer in less that 2 seconds. The appearances don't matter one bit.

Now that we know how things really work out there in the big bad world of world wide web, time to get back to the office and fire those pesky CSS gurus.

Friday, August 14, 2009

Can We Afford to Lose the Web?

Things are funny the way they tend to evolve. For example, common wisdom holds that hardware is the underpinning of software. However, in the recent years, we've seen software being used as an underpinning of hardware (in the form of virtual machines being hosted inside a software program).

Or, in the early days, one could have argued that the economy is the underpinning of literacy. In other words, it was thanks to the economy that some people were in the position to learn how to read and write.

Today, the situation is exactly the reverse: literacy is the underpinning of the economy. Being illiterate ensures that you cannot participate in any economic activities.

To go back to the question asked in the title of this post: "can we afford to lose the web?", the answer is "yes, provided that we can afford to lose our civilization."

In a manner similar to the above examples, civilization used to be the underpinning of the web. Meaning, without the civilization, the web couldn't have emerged.

But today, the evidence seems to be accumulating that the opposite is true, namely, without the web there couldn't be a civilization.

Very strange, but that's how things are. Of course, there is, as always, a whole whack of naysayers, people who are denying any significance to the web. Some of them are simply knee-jerk, some come with certain hilarious arguments. I will present here one interesting counter-argument that I've found while perusing some mindless discussion among some techno-geeks who seem to revel in having no life whatsoever (in case you're wondering why am I lurking around these terrible sites, I am merely doing a little bit of social study, observing bizarre behavioral patterns in the wild):

Any, ANY, website could go down - hell the entire internet world wide web could blow up - and I'd be fine. Sure I'd have to drive to the bank (where... omigod... they use desktop software). But I'd survive, just as well. In fact, I think that my boss and my wife would both be happier.
Bottom line: No website matters to my well being (or anyone I know of for that matter). I'm happier to have them, but could go on just as well without them. The only people who care, are the people who make the sites, and the people who have nothing better to do with their time.

I've withheld the name of the clueless person above, because it may not be his real name. Other than that minor edit, the entire quote is taken verbatim off the discussion thread.

Let's now examine the interesting points he brings up. The first point is the self-centered survivalist argument ("Any, ANY, website could go down - hell the entire internet world wide web could blow up - and I'd be fine.") This is reminiscent of the claims made by some survivalists who organize their lives around the assumption that the end of civilization is near, and so they are fully prepared for the power grid to go down, they can still be OK without electricity. Thus, we can afford to lose the web providing that we're fine with losing civilization.

He then goes on to say that his boss and his wife would be happier if indeed we were to lose our civilization. Of course, if we were to lose many of the trappings of the civilization, such as TVs and so on, that distract us daily, we'd be left with more free time on our hands, free time which could be more readily exploited by our business and personal partners. Does it necessarily follow then that all these trappings are unnecessary?

He concludes with "no web site matters to my well being." With such blatantly self-centered conclusion, he then triumphantly dismisses any need for having the world wide web. How brilliant! It's like an extremely selfish person, who has no children, wanting to abolish all medical professionals who specialize in healing sick children because, hey, he doesn't need them, since he doesn't have any children.

Tuesday, March 31, 2009

The Web Continues to be Disruptive

When the web hit the mainstream some 15 years ago, it was largely regarded as being a massive electronic library. These were the days of the 'read web', and this read web was considered as an extension of the then leading edge technology: CD ROM.

The web quickly evolved into the read-write web, whereby it opened up to accept user-contributed content. At that point, content was king, and many online business models have been centered around that notion.

Fast forward to today, when the so-called social, or participatory web had clearly demonstrated that conversation, not content, is king.

All along the way, the web has proven itself as being the most disruptive and the most subversive technology ever. And it continues to roll into the future as the most surprisingly disruptive platform there is. There is hardly a way to envision how could this supremacy of disruptiveness ever be interrupted, or supplanted by any other platform.

A case in hand to illustrate the unstoppable subversiveness of the web: a well known online vendor, 37 signals had made their success riding the subversive nature of the web. Back in the early 2000s, the company had embraced the social aspect of the then budding participatory web in order to harness the ground swelling support of individuals/businesses in the light of the fact that the existing software productivity applications suck big time. They have boldly utilized the small footprint, lighthearted nature of the web by offering small, nimble web applications powerful enough to replace the bloatware that is Microsoft/IBM/Oracle etc. productivity suites.

The risk paid off, and 37 signals made their name thanks to their unreserved embracing of the subversive and disruptive nature of the web.

But the web didn't reach its pinnacle of subversiveness with 37 signals. The web continued to roll with its unstoppable disruption. Today, we have a comical, nay hilarious situation where the same business that once praised web's openness and subversiveness is crying foul for the same reasons! Today, 37 signals complain how it is unfair that other budding businesses and communities, who are embracing the conversation-is-king mantra, are disrupting their precious business (Get Satisfaction or Else...)

The thing that allegedly hurts 37 signals is the fact that they cannot seem to be able to lock their customers down into their proprietary web site. They'd like their customers to recognize that they don't have to go anywhere else on the web in order to get the service they're hoping to get. However, communities such as People-Powered Customer Service have further embraced the disruptive nature of the web and have shown the audacity to elaborate on the existing model (i.e. they've embraced the remix culture of the web). They've accomplished that by extending 37 signals' resources and allowing further conversations about pertinent topics. All this is perfectly fitting for a technological platform such as the world wide web, which is a fully democratic end-to-end communication platform where no one has to ask for permission to communicate with anyone else.

Of course, a proprietary vendor such as 37 signals would have none of that, hence their crying wolf in their today's blog post. Their wet dream is to create a locked-in hostage customers who will have no other choice but to only go to their web site for all their productivity tools needs. This is the exact same model that Microsoft and countless others old-school software vendors have been providing for decades. It is very sad that we're seeing the same greedy bullying on the web. Because of that, I say let's boycott the bullies, and let's turn instead toward the free software community offerings. Enough of supporting these fear mongering vendors!

Friday, February 20, 2009

User-contributed Resources

As we have already discussed on more than one occasion, the world wide web is best described as an ever growing collection of resources. What usually doesn't get discussed is how many of these resources are offered by the original authors, vs. how many resources are user-contributed.

By 'original authors' I mean people who have initially built the web site(s) hosting the resources. For example, if I build a web site dedicated to voting on the best sites available on the web, I may initially 'seed' that site by offering some of my best picks. These best picks would be offered as URLs to the original sites that I am offering as candidates to being voted on.

After the initial launch of my 'best of the best' web site, others may join and may start contributing by adding their picks. All these additional URLs will then be user-contributed resources.

In general, as the so-called participatory web keeps gaining momentum, we will start seeing more and more resources being user-contributed. In the early days of the web, most, if not all published resources, have been contributed by the original authors, or creators of the web sites. Today, we see increasing quantity of resources published on the web that are user-contributed (or, sometimes called member-contributed).

Let's examine now how do users, or members, contribute resources. Typically, there are two ways that resources get published on the web:

1. By filling out a form and successfully submitting it
2. By uploading some digitized information

Whichever the case may be, it is interesting to examine the nature of the content that is being published. For the most part, one would expect that the content is pure text. Sometimes, the content is binary, meaning a sound clip or a jpeg file (representing a photo) or a video clip.

Because the web is basically text-driven, we will now turn our attention to the text-based content. At this point, the question becomes: what is this text-based content supposed to represent?

By and large I'm sure we'll all agree that the text-based content is related to the ongoing conversation on the web. But that's not the whole story. The web as the medium isn't suitable only for enticing and recording various conversations. The web can also enable acting upon the ongoing conversations.

In order to understand in what ways can the web enable this acting upon, let's first refresh our memory on what the resources on the web are:
  1. Resources are abstractions, or entities, published on the web
  2. Resources know how to represent themselves upon request
  3. Resources know how to make a transition from one state to another, upon request
When a request reaches a resource on the web (routed via that resource's Uniform Resource Identifier, or URI), that event triggers a response. To provide a response is the responsibility of the resource. And, from the perspective of the consumer who had initially requested the response, it is anyone's guess what form will that response take.

It is customary to expect the resource to respond to the request by sending back a response containing the representation of that resource. Of course, a single resource can represent itself in more than one way. Often times, the mode of representation will depend on the context of the receiving request. If the request is, for example, coming from a human user, the response will most likely be in the form of a hypertext markup, which can be rendered in the user's browser. If, on the other hand, the request is coming from a machine, the response will quite likely be rendered as an XML document (although other machine-readable formats, such as YML or JSON are possible). These are merely the most generic scenarios, and there are of course different circumstances, where the resource may represent itself in a binary format, such as a PDF document, or a JPEG image, or an MP3 audio file, or even as a movie clip and so on.

Another interesting thing that deserves further examination is where is this response going to be coming from? It is almost always blindly assumed that if the request gets sent to the resource that is published in a specific domain (such as bestofthebestsites.com, for example), the response will arrive from that same domain, or URL.

However, there is nothing in the web architecture that may enforce that convention. Let me illustrate this point by providing a specific example: if someone sends a request asking for the number one best web site ever to the bestofthebestsites.com domain, that request may travel to hypothetical URL such as bestofthebestsites.com/top_site. Upon receiving this request, the top_site resource will respond by preparing its representation which will be shipped to the consumer. But in addition to that, another, more elaborate and more involved representation could be readied and sent over to some other resource, which may live in a completely different domain. From there, the original requestor may be notified by receiving yet another representation. There really are no limitations to chaining events in such fashion.

At this point, this discussion deserves a more elaborate illustration. Suppose we launch a web site that allows users to publish their own resources, such as hand-made merchandise that they put up for sale. The resource will typically be published by asking users to log in, fill out the form representing the resource, and then submitting that form. If the submitted form gets properly validated, the resource will be published on our site.

Let us now examine what could one possible representation of the resource 'merchandise' be. This resource may have a name, or a title, a description,  a date when it was created, a date when it was offered for sale (i.e. published on our web site). In addition, it must have asking price (if it's for sale). It may also be offered for bidding between potential buyers, meaning that the merchandise will have an expiry date, after which it gets sold to the highest bidder.

And of course, that resource may also have a pictorial representation, such as one or more JPEG images, or video clips etc.

After filling out the form specifying many or all of the above properties of the resource, the form will be validated and, if correct, the item will get published on the site. At that point, all the information (i.e. content) will get stored on the hosting site, and the state of that resource will be persisted.

From that moment on, this resource will live in its own address (e.g. http://merchandisehost.com/items/123546). Any request arriving to this address will elicit a response from that resource. And, as we've already discussed above, the shape and form of the response will depend on the circumstances -- meaning, is the request coming from a human user or from a machine, and furthermore, are there any other constraints that could govern the specifics of that response?

So in this simplified hypothetical example, the entire interaction between the resource and its consumer is based on the assumption that the resource only knows how to represent itself by shipping the response from the http://merchandisehost.com domain.

The above constraint, however, is largely simplistic and overtly naive. It is presupposing that the resource on the web is only defined by its static content. But a web resource is not limited to only having static properties, such as textual or visual representation. In addition to having state, web resources also exhibit behavior.

The above statement may seem superfluous in the light of our previous understanding that web resources already know how to behave, by knowing how to represent themselves upon request and by knowing how to make a transition from one state to another, also upon request. But the kind of behavior specific to the web resources that hasn't been discussed yet is the user-contributed behavior. That aspect of the web resources could be the most interesting, and yet the least explored opportunity that the web has to offer.

Time for another illustration: let's say I create a series of prints and offer them for sale on http://merchandizehost.com. I supply the title of the print series, the number of available prints for sale, the item price and the photo illustrating the print. Nothing unusual so far; but suppose now the merchandize host allows me to specify what I would like to happen each time someone buys one of my prints. Even that is not unusual, as many websites today allow people to click on a checkbox saying "Send me an email or SMS when someone buys this". But that's not what I'm talking about here; I'm asking you to imagine a host which will allow us to specify the URL which will receive HTTP POST request on event, such as sales purchase.

Now what could that URL be? Why, it could be anything. It is user-contributed. And once the HTTP POST arrives at that URL, it is anyone's guess what happens next. The user who had contributed that URL is now in the driver's seat. Upon receiving the HTTP POST request, that user's code could post a Twitter update containing the tiny URL representing the item just sold. Furthermore, that same code could further elaborate by sending a request to the author's supplier requesting replenishment for the sold item. And so on, the sky is the limit.

The event when someone had purchased an item on the http://merchandizehost.com site can thus easily mushroom into all kinds of user-defined events that could continue percolating throughout the web. The user who had created the resource may then get notified about the purchase from his/her Twitter feed, or from any other source of alerts they care to set up. Also, the customer who had purchased that item may get confirmation not only from the original web site, but also from some other sources, driven by the author-contributed behavior enhancements.

We see from the above hypothetical scenario that user-contributed resources enhance and embellish not only the content on the web, but also the behavior on the web. Resources on the web put end-users in the driver's seat. Thanks to the radically distributed, fully democratized end-to-end nature of the world wide web, humans have finally achieved the ultimate freedom to fully control what happens to the resources, as they create them.

Monday, February 2, 2009

The Age of Unlimited Copying

I have a mix of good news/bad news to deliver today. The realization came about when I was pondering the choice of notions and words when evaluating our strategies geared toward our future survival and sustainability. One of the issues is that we seem to collectively believe that we're at the cusp of entering the Age of Ubiquitous Computing (or Ubiquitous Computation). You know, what with the World Wide Web and all that jazz.

But wait a minute, what if the notion/word 'computing' (or, 'computation') is a misnomer? After all, what is it that we're all so ubiquitously computing?

As the clear answer to the above question is not forthcoming to me, that is always a surefire sign that we're dealing with a misnomer here. While there is definitely no denying that we are pushing vigorously toward the 'ubiquitous' something, what that 'something' is isn't quite clear yet.

Allow me now to examine that elusive activity. And please bear with me, because this examination is going to prove very useful during the forthcoming analysis.

There isn't really that much computation, or math, that is transpiring in a day-to-day usage of the web. On the web (which is this machinery that is seemingly busting at the seams in its attempts to reach ubiquity), most of the activities revolve around searching/browsing/consuming/publishing/participating etc. Very little math overall.

That being the case, isn't it then kind of wrong to call all the above activities 'computations'?

Yes, but if those are not 'computations', what are they? I'd suggest switching to another notion, a different concept: these are largely acts of copying.

So the world-wide machinery that we have collectively built (i.e. the World Wide Web), which we're now nursing and growing in the hopes of seeing the day when, to use Bruce Sterling's precious analogy, it will become a fully qualified varnish on barbarism, is basically best suited for one, and pretty much only one activity -- copying.

As Cory Doctorow had put it so eloquently, there is never going to come a day when copying will get any harder than it actually is today (forgive the absence of the source, I promise that I will work on digging up the link documenting this gem uttered by Doctorow). Starting today and moving forward, copying on the web is only going to get easier and easer. So we see plainly that, as long as we stay on the web, in the cloud, etc., the activity of copying has a real bright future.

So why is copying so important, and why would it be so desirable? Isn't the act of copying in itself kind of worthless? If you have an original, and then you make a copy, isn't that like degrading the original? Since when is being derivative so desirable?

True, in the pre-internet days (that is to say, in the days when digital technology was in its early infancy), the act of copying couldn't amount to much. And the situation in the pre-digital days was even worse, much, much worse. To copy anything worth copying in the olden days would mean wasting a lot of time and energy producing something that was destined to end up being merely a pale copy of the original. Because of that, only few very specialized craftspeople have ever been engaged in the copying activities.

However, the unstoppable march of human inventiveness and ingenuity had shown us that we humans are pretty much hitching our star, our overall destiny, to the technology bandwagon. And that being the case, we have gladly accepted the fact that a digital artifact, a digital replica, is often times just as good as its analog counterpart (and in some cases it is perceived as being even better than the analog original).

So now we already find ourselves in the position where we often times prefer getting our greedy little hands on a digital copy of a book/article/song/photo/movie etc. then perusing the original, analog object. Digital version seems infinitely more pliable for our consumption, because it is demonstrably easer to thumb forward/backward through a digital copy without the fear of wearing it out, search through it at will (and at random), get it to follow us everywhere we go, store it safely and forward it to our friends, and so on. Not only that, but once digitized, the copy of our analog object becomes infinitely more malleable to any ad hoc efforts toward remixing and cutting and pasting through it to our heart's content.

In other words, a digitized copy opens up completely new and unforeseen doors of creativity and imaginative actions. We humans seem to, for some reason, like that a lot.

But one thing that barely crosses our minds as we're perusing and (ab)using these digitized representations of our analog object is that, each time we do something to it, it gets copied. And the cost of copying it is so negligible, that no one ever notices it. Now this fact is very significant, as it points to the very future of human society. Please make a mental note of this fact now, as it will come very handy a bit later in this essay.

Let me now talk for a moment about the maturing of our overall technological strategy. In the olden times, when human technology was in its germinating stages, we lived in the world of customers. This was the industrial society, where customers were expected to buy/consume products (physical objects) that were being produced by the machines. These crude days of the initial introduction of technology into the human society are now largely behind us.

According to Bruce Sterling, we have now made the transition from the customer/consumer-based economy to the end-user-based economy. Bruce claims that we now live in the world flooded with gizmos (one such gizmo being a cell phone, a veritable staple of the early 21st century economy). Just by casually glancing around, it's getting increasingly hard to argue with that claim.

We can actually track all these advancements of technology by matching it up with the breakthrough advancements in the general purpose machines. The first major breakthrough that pretty much announced that a change everything movement was afoot, was Alan Turing's universal ordinating machine (a.k.a. the predecessor of today's ubiquitous computer). What this invention offered was a platform, a ground to stand on. From there, another groundbreaking invention wasn't far off -- the Internet (or, the ubiquitous planet-wide network, built on the end-to-end organizing principle).

The above two groundbreaking inventions have indeed become so ubiquitous that they have penetrated lives of all people who today coexist under the auspices of Western Civilization. It basically took a meagre 50 - 60 years for this portentous event to take hold and penetrate almost every pore of our social lives.

One crucial thing to remember when we're talking about those sorting/ordinating machines (i.e. computers) and their network effects once these machines get plugged into the world-wide cloud (i.e. the Internet, or the World Wide Web), is that both the machines and the resulting network are general purpose by design. This is significant, because the general purpose nature of these technological inventions is what turns them into tools capable of bringing different kinds of freedoms to humans.

For example, the most liberating aspect of this technological platform is that it is a general purpose copying machinery. Being a general purpose copying machinery, it has the capacity to free us from numerous constraints by offering a generous sharing platform for many of the important artifacts that our culture is comprised of. As we've already mentioned, it is never going to be harder to copy something on the web than it is today. This fact gives us a reason to rejoice, as it offers each and every one of us a free chance to participate in sharing many facets of our cultural heritage. 

As described thus far, this generous technological platform, this stupendous copying machine, is founded upon two legs: one leg is the general purpose filtering/sorting machine (a.k.a. the computer, the ordinator), the other leg is the general purpose end-to-end communications mechanism (a.k.a. the Internet). However, for this platform to be fully functional, a third leg is required. This third leg is needed in order to give the platform true stability, so that it could reach out into the material, three dimensional world.

We've seen that the giant ubiquitous copying machine can even today afford us the ability to make limitless copies, at practically no cost, of any cultural artifact that is of interest to us. It goes without saying that any residual cost of making a copy, no matter how tiny, will continue to shrink rapidly, until it approaches the ideal no-cost asymptote. 

This is significant for various reasons. The most important reason today is that this arrangement is allowing us to rescue, at a marginal cost, copious amounts of otherwise doomed cultural artifacts. By this we mean countless out-of-print books and magazines, as well as countless other artifacts, such as sound and visual recordings. In addition to that, this ability to endlessly copy at little or no cost has opened up the doors for many talented people to freely express themselves without having to wait to be 'discovered' by the officially established publishing mechanisms.

By far, the most interesting and exciting aspect of this newly arrived situation is our ability to produce, at will (or on a whim), something that we call object on demand. If someone discovers in their grandparents' attic an interesting, out-of-print archival photograph, and then they make a copy of it by digitizing it using their digital camera, they can then further copy that cultural artifact by downloading it into their computer or mobile phone, publish it on the web with a simple push of a button, thus allowing anyone in the world to continue copying it till the proverbial cows come home. What's even more exciting than that is how anyone who obtains that copy can treat it as an object on demand, meaning they can, on a whim, demand that this copy be rendered as an object (e.g. a photo) that could be framed and hung up on their kitchen wall.

This production cycle, sometimes described as cradle to cradle, is definitely a novel way to look at how we handle our everyday affairs. The most interesting and revealing change that has made its way into the mainstream society is the turning of the tides in the way we regard the hardware/software equation. In the olden days, hardware was traditionally meant to be used for hosting software. Today, the tables have turned on us, and we now view software as the platform for hosting hardware. Things got turned on their head, all thanks to the simple fact that we have built a stupendous, ubiquitous general purpose copying machinery. What we have at our disposal today is the ability to demand hardware products at will, and on the cheap (this demand comes with minimal, or sometimes no cost at all). Thus I can copy as many Linux servers as I wish and demand that my hosting provider renders them for my perusal. All that power at a ridiculously low price (which is going to quickly erode in no time). Compare that with millions of dollars that businesses of yesteryear were expected to shell out for a single server (and a pretty lame one at that). The million dollars price tag was the norm not that long ago.

Times have changed all right, but that's nothing compared to the change that is afoot. Right now we have the ability to render, on demand, an inexpensive replica of a mind-blowing plethora of very desirable cultural artifacts, such as an out-of-print book, and out-of-circulation vinyl record, a rare photo, a forgotten TV show, a salvaged old newsprint, a powerful web hosting server, and so on. But the interesting thing is that we don't stop there; once we're satisfied with consuming the rendered object, we can safely pass it on, share it with our friends, neighbors, the community, the world. All that with a simple click of a button, at a next-to-nothing cost. Fantastic, right? And quite unthinkable only 15 - 20 years ago.

But what if we wanted to demand an object such as a plain glass of water? Where do we find a copy of that object, so that we could demand it?

In order to answer that question, we need to look a bit more deeply into how is it that we are able to demand, from the comfort of our homes, objects such as books, photos, movies, music, web servers and such. The answer is actually quite simple -- we can afford to demand such objects because we have obtained the blueprints of these objects. If I spend some time building and configuring a web server, such as a Linux box, I have in effect created a blueprint of that object. Once created, that blueprint can be freely copied and distributed at no extra cost. Anyone in the world who has the need to demand a web server can conjure it up by utilizing the blueprint I have provided.

Here's another example: if I record my guitar performance and publish it on the web, others can freely demand that object (i.e. the recording of my performance) due to the fact that I have provided the blueprint for that object. In this case, the blueprint used for rendering my performance comes in the form of a special arrangement of bits that get copied all around the world. This unique arrangement of bits is then used by the machinery to render the signal that will be interpreted by the listeners' brains as a 'guitar performance.'

So we see that once we obtain the blueprint, we can demand that the object that is represented by that blueprint be rendered. Following that logic, before I can demand an object such as a plain glass of water, I need to first obtain the copy of that object's blueprint. However, such a blueprint doesn't seem to be available anywhere. Hence the conundrum.

"But wait", I can already hear your cries, "even if such a blueprint was available, of what use would it be? Surely you cannot hope to be able to produce a glass of water by using an LCD screen or a pair of speakers or even some fancy holographic whachamacallit projector!"

True, my hopes of obtaining a blueprint for the plain glass of water are nothing more than castles in the sky. It's wishful thinking, mere daydreaming.

It is precisely because of this vanity that we don't see any blueprints for things such as plain glass of water being published. The exact same thing held true in the days before the invention of a phonograph -- no one was producing vinyl records (i.e. blueprints for reproducing  musical performances) before they knew that there exists a machinery that can read the blueprints and render the object on demand.

So instead of putting the cart before the horse, the community is waiting for the machinery that will be capable of rendering various blueprints of various objects. But unlike machinery such as phonographs and TV screens and headphones etc., which are highly specialized machines, this hypothetical machinery must not be specialized. It must be general purpose.

This necessity simply stems from the already established two legs of the technological platform. Recall that both the ordinating machinery (the computer) and the end-to-end communication network (the internet) are general purpose machines. For the third leg (the one that will give the platform its final stability) to function properly, it must also be a general purpose machine. Once we have three general purpose legs supporting the world wide technological platform, we will get pretty darn close to understanding what does it mean to change absolutely everything.

If the general purpose ordinating machine is called 'the computer', and if the general purpose end-to-end communication machine is called 'the Internet', what is the general purpose object-on-demand machine called? Not surprisingly, we already have a name for that machine -- it is called general purpose nano assembler (also called molecular assembler). A general purpose nano assembler is a machine capable of ordering and ordinating the building bricks of material reality (i.e. molecules and atoms) according to the instructions contained within the supplied blueprint. Allow me to provide a hypothetical example:

Suppose I wish to bake a loaf of bread, but then realize that I am out of wheat flour. Suppose now that I have a general purpose nano assembler mentioned in the previous paragraph, and that furthermore I can ask for a copy of the blueprint containing instructions on how to render wheat flour. I should then be able to feed that blueprint to the nano assembler, which will then, following Michael Braungart's and William McDonough's waste=food model, allow me to exercise my object-on-demand privileges. The outcome of this exercise will be a bag of flour made out of waste. Needless to say, I could then use that waste-turned-food bag of flour to bake a loaf of bread.

In and of itself, the above hypothetical event illustrating the act of turning waste into food on demand is mind blowing. However, much larger mind blowing things lay ahead. Let's examine it this way: in the event of reaching the point of actually producing the general purpose nano assembler (which today still feels like pure speculative science fiction), the question remains -- who are those among us who will be privileged to own these revolutionary machines? But the funny thing is that anyone who asks that question is actually missing the point, because what is being overlooked here is the fact that the first, initial general purpose nano assembler, the one with a bar code that specifies its serial number as reading something like 0000000001, has been assembled from a blueprint. What that means is that a general purpose nano assembler can bootstrap itself and assemble more versions of itself. All it basically takes to produce another general purpose nano assembler is a simple push of a Copy button.

So if I have access to a nano assembler, and my less fortunate friend over there doesn't have access to it, that's a non-issue, because I can exercise my object-on-demand rights and produce a copy of a nano assembler for him.

So we see that a general purpose nano assembler is akin to the genie who resides inside Aladdin's magic lamp. A wish fulfilling genie who obeys his master's orders and can conjure up different kinds of objects -- render them on demand. But the nano assembler we're talking about here is capable of going one up on the genie -- it can replicate itself, thus endlessly spreading the joy and the wealth. (in the original fairy tale, genie's masters were not able to give genie an order to create more genies)

Conceived in this fashion, the giant general purpose copying machine has the capacity to encompass the entire planet, fulfilling many of our wishes by rendering various objects on demand by recycling waste (even in this aspect general purpose copying machines are superior to the genie since they conjure up objects by reusing waste, unlike the genie who conjures objects out of thin air, thus not doing anything useful toward reducing waste; in fact, the traditional genie only litters the place, which means he is downright harmful).
 
So far, all of this has been nothing but good news, excellent news in fact. So where's the catch?

As I've mentioned at the beginning of this article, I also have some bad news to communicate. Consider the following: in the age of unlimited copying, where pretty much any object can get copied as many times as we wish, while at the same time eliminating waste, money all of a sudden begins to pale and lose its luster. Pretty soon, money becomes meaningless. When that starts happening, we'll all find ourselves staring at a universal crisis of ownership. In an age of unlimited copying, where absolutely everyone is entitled to produce as many copies of any object as they wish (while at the same time reducing and recycling waste), it gets impossible to continue assigning the concept of ownership to any particular person or legal entity. The days of exclusivity-based economy then come to a screeching halt.

Consider now how everything, absolutely bloody everything that we know about human life revolves around this concept of ownership and exclusivity. We have been bred, for countless generations, to deal with scarcity in our lives by employing and applying the concepts of ownership and exclusivity, and, by extension, the concept of control. In order to control something, you need to first own it by excluding others from getting anywhere near it. If we hope to get to the point where the very idea of ownership disappears, where, as John Lennon sang "Imagine no possessions, I wonder if you can?", how are we to deal with it, if we can't even imagine it?

If I go on the web today and I download a wikipedia article that I wish to read, can I honestly feel that I 'own' that article simply by the fact that I've downloaded its copy onto my screen? Knowing that, at the same moment, potentially millions and millions of people worldwide have also downloaded that same copy to their screens, I cannot possibly feel the pride of ownership. This artifact, this wikipedia article is an object rendered on demand, and does not entitle me to assume any exclusive position in society.

The same sentiment will prevail once we get to the point where we're able to demand any object from the giant copying machine. The pride of ownership and exclusivity will simply not be present in that transaction.

This will then pose huge problems for most humans. Human civilization and human culture in its entirety is a veritable treasure throve filled to the brim with nuggets of wisdom on how to deal with scarcity. Scarcity comes natural to us, almost like breathing. We have never, ever in the recorded history been forced to deal with universal abundance. Making this inevitable transition from the economy that's based on scarcity to the post-scarcity and post-exclusivity economy (the one that's based on limitless and harmless universal abundance), will have a completely unpredictable freak-out effect on most of us. Outbursts of mindless violence will be almost unavoidable.

The most interesting thing, however, is that we have already been through this transition from scarcity to all-inclusive abundance once, and we've seen the consequences, and they were mostly ugly. I am talking about the infamous days of Napster, the first massively popular online resource sharing machinery. Back in the prehistoric days of the ancient web (8 - 9 years ago), Napster gave us the first glimpse and the first foretaste of things to come. Many of us, including myself, got our first cognitive dissonance shock upon experiencing Napster's object-on-demand genie in action. One thing that most of us had trouble initially wrapping our heads around was the concept of turning scarcity into abundance; turning exclusivity into all-inclusive abundance. Here is how the cognitive dissonance typically went (at least for me, but I've also checked this with some of my friends, and they all share similar war stories):

We all intuitively know, deep down in our bones, that you can't have your cake and eat it too. If, for example, I obtain a bag of apples, the more I consume them, the less apples remain in the bag. Therefore, apples are a scarce resource, the one that has to be rationed and consumed carefully. That's common sense knowledge, the one every child learns in kindergarten, if not at a much earlier age.

Applying that common wisdom to the machinery such as Napster, I knew that if there is a rare out-of-print song that is much coveted by the community, and was then suddenly made available to the community, that event should create a so-called race condition. In other words, whoever gets lucky enough to be there first and grab the much coveted object, consumes it, squirrels it away, thus winning the race, and as a consequence ends up being the envy of the group. That person can now claim victory and the rest of us can only curse our bad luck.

But shockingly, this 'the more you grab and consume, the less of it remains' mentality got drastically turned on its head when using Napster. On Napster, a strange thing became apparent -- the more we rush to grab the object and consume it, the more that same rare and coveted object becomes readily available. More consumption actually paves the way toward much smoother, easier consumption. Sheep shit grass. Amazing!

But how's that possible? Again, we were mystified because at that time (back in 1999 - 2000) we weren't aware of the fact that we are, for the first time ever, dealing with a massive machinery that offers unlimited, general purpose copying free of charge! By consuming all those super rare and out of print cultural artifacts, we were getting engaged, for the first time in history, in the object-on-demand revolutionary activities. Not only that, but with each individual, and let's face it, selfish action of consuming an artifact, we were making the world for the ones who follow in our footsteps much smoother, much friendlier. Thanks to our efforts, the next wave of object demanders could get those once scarce and coveted objects much faster. Hence the cycles were getting shorter and shorter.

Until, of course, those who fancy themselves as exclusively 'owning' the blueprints that were being shared on Napster, issued a court injunction on March 5, 2001, ordering Napster to cease and desists and to shut down its machinery. Thus, the first innocuous attempt at turning scarcity into all-inclusive abundance and making the transition from scarcity based economy to the post-scarcity economy was a spectacular failure.

There are no indicators that would point to a different scenario once we start entering the next phase ushering into the post-scarcity economy. The crisis of ownership that this movement will entail will definitely stir up many negative, even violent sentiments, and those who view the world as consisting of the 'haves' and the 'have nots' will insist, with all their might, that they remain in the 'haves' camp, and that the 'have nots' remain in the gutter, as they always have been, labeled as the 'unwashed masses'.

How will that conflict play out is anyone's guess, but I am personally not convinced that the resolution could be reached in a peaceful manner.

In conclusion, we have seen that historically, all our efforts invested so far in the technological progress seem to be now converging toward the universal, all-inclusive general purpose technological platform. In other words, the odds seem to be in our favor when it comes to reaching the age of unlimited copying. What that means is that, thanks to the fundamentally generous nature of this general purpose technology, every human being is entitled, by their birthright, to engage in this copying activity to their heart's content. And because the objects rendered on demand will use waste as the source material, no danger of over-consumption is imminent. If anything, the more we consume under this model, the more we get rid of the waste.

This arrangement is unprecedented in human history. It by far surpasses even the most imaginative fairy tales (such as the already discussed Aladdin's magic lamp). Only the Buddhist lore, which has been, from the very outset, portraying the worlds of bewildering abundance, talks about something similar to what we've discussed here (the Buddhist portrayal of the abundance that surpasses even the wildest imagination has its utmost culmination in the world famous Diamond Sutra).

But just as much as this prophecy excites us, the flip side of it should gravely concern us. As we've already mentioned, arriving at a non-rivalrous position, whereby any desirable goods could be easily rendered on demand by each and every human being, means almost certain death of economy as we know it (simply due to the fact that economy is based on the exclusive ownership of the means of production which, once everyone owns all the imaginable means of production, becomes a non-issue). Once that happens, uncontrollable outbursts of violence may be imminent. Managing and channeling this irrational side of our collective minds will be our biggest challenge in the future -- the future that is rapidly and unstoppably rushing toward us.

Friday, June 20, 2008

Software Development Detox Part 5: Session

In my previous installment (oh-my-god, it's already been a year!), I've discussed the hard-wired need to retain central point of control when building software. Today, I'm going to examine the central software concept that implements this urge for control: session.

Session is a vessel used for retaining the memory of all the events that had occurred during the software interaction. It often gets implemented with the intention of providing continuity during the interaction.

Because of its central position in the overall architectural solution of a networked software, session as a concept is very brittle. It can quickly gain entropy and can end up costing a lot in terms of computing infrastructure.

On the web, however, since the prevailing architecture is stateless, the concept of session is entirely unnecessary. The memory of an interaction that may occur on the web need not be retained by any participant.

Realization of this simple dictum is proving to be extremely difficult for many software developers. They feel that, without having the crutches and training wheels that the concept of session provides, they will have no way of knowing how to make a decision on what to do next. At least when they use the state of the conversation, as recorded in the session, they can write some logic that would help them execute some meaningful actions. But without that knowledge available to them, they feel lost.

This sentiment bellies the lack of understanding of the web architecture. On the web, each request contains all the information necessary for the server code to make a decision on what to do next. There is absolutely no need for the server to keep track of any previous requests. Not only is such a task exorbitantly expensive, it also creates a single point of failure, which is the primary cause of faulty software being deployed live worldwide.

So the advice to all budding software developers is: abandon the idea of a session, and rely on your own wits when building the business logic that drives your site. Going through such software development detox procedure will ensure that you build and deliver robust, lightweight web sites that will be easy to host and maintain.

Sunday, January 20, 2008

Why is Software Development on the Web so messed up?

It's been said that those who do not learn history are doomed to repeat it. In the spirit of absolutely not wanting to go again through the excruciating pain of software development that was the norm in the '90s and the first 5 - 6 years of the 2000s, I am going to dissect the following historical document: XML, Java, and the Future of the Web, published on October 2, 1997, by Jon Bosak.

As I walk through some of the salient points exposed in that portentous documents, I will try to bring to your attention certain glaring errors in understanding and judgment regarding what is the goal of computing and of the information processing on the web, in particular.

Let us then begin with the opening sentence:

"The extraordinary growth of the World Wide Web has been fueled by the ability it gives authors to easily and cheaply distribute electronic documents to an international audience."

Right out of the gate, Mr. Bosak takes the left turn and commits himself to the implementational aspect of the technology he is discussing. The key concept, of course, is 'electronic documents'. In his view, the web is useful in its ability to offer an affordable distribution channels for prefabricated electronic documents.

The problem with the Ivory Tower views of the web is that, being high-tech bent, the high priesthood inhabiting the Ivory Tower tends to view the smallest unit of processable information as an object, such as electronic document.

Following at the heels of the opening salvo, the second sentence in this paper claims:

"As Web documents have become larger and more complex, however, Web content providers have begun to experience the limitations of a medium that does not provide the extensibility, structure, and data checking needed for large-scale commercial publishing."

This is now quite confusing. If the smallest unit of information processing on the web is an electronic document, what need for extensibility, structure and data checking is he talking about?

Let's look at the third sentence; maybe we'll find some clarification in there?

"The ability of Java applets to embed powerful data manipulation capabilities in Web clients makes even clearer the limitations of current methods for the transmittal of document data."

Huh? Java applets? OK, this is completely obsolete, but still belies the unexplained bias toward powerful data manipulation capabilities in Web clients.

In the fourth sentence (and opening a new paragraph), the author introduces the concept of Extensible Markup Language, and explains:

"... an Extensible Markup Language (XML) for applications that require functionality beyond the current Hypertext Markup Language (HTML)."

What is not clear yet is what kind of "functionality beyond the current Hypertext Markup Language (HTML)" is he referring to?

HTML -- imaginary limitations

After delivering the opening salvo, as exposed above, the author goes on to elaborate on the severe constraints that HTML introduces and how debilitating these constraints appear to him. Here is the author's list:
  • Lack of Extensibility
  • Absence of Structure
  • Inability to perform Validations

Extensibility

This feature is the holly grail to developers who are keen on creating their own, proprietary protocols. The much celebrated power that Extensible Markup Language (XML) brings to the table -- namely extensibility, is at the same time the most troublesome aspect of the failed attempts to engage in collaborative computing. If anyone and everyone is free to use the technology that enables them to daydream any protocol they wish (in effect creating their own unique language), the Babilonian confusion created that way must quickly reach cosmic proportions. This is exactly what's happening right now on the web -- everyone feels entitled to dream up their own bloody protocol, and the potential online conversation tends to fall mostly on deaf ears.

The author states this clearly: "HTML does not allow users to specify their own tags or attributes in order to parameterize or otherwise semantically qualify their data." The key phrase is "their own" -- which amounts to "invent your own language".

Structure

Similar to the old adage 'form follows function', structure typically follows the meaning of the information. Mr. Bosak's lament in this respect is largely unfounded, since HTML does offer fairly comprehensive structure for expressing the semantics of the represented information.

Whether the author was aware of that ability to express semantics using HTML, remains a bit of a mystery. In any event, what the author seems to be complaining about with regards to the lack of structure in HTML is the erroneously perceived need for representing complex hierarchical dependencies.

There is really no evidence that an average consumer perusing the web resources has such a pressing need for consuming large and increasingly complex hierarchical constructs. In author's own words: "HTML does not support the specification of deep structures needed to represent database schemas or object-oriented hierarchies."

Yes, the above is true, but the question is: why would anyone have the need to consume 'deep structures, object-oriented hierarchies, or database schemas'? The question, of course, remains unanswered.

Validations

Let's examine Mr. Bosak's objection regarding HTML's inability to perform validations: "HTML does not support the kind of language specification that allows consuming applications to check data for structural validity on importation."

I must admit that I'm a bit confused -- why would anyone use a semantic markup language, such as HTML, to perform validations on 'importation'? Importation to where?

Responsibilities of the Web Client

The author then enlists some imaginary responsibilities that are, in his view, mandatory for the web client:
  1. Web client may have to mediate between two or more heterogeneous databases
  2. There is a need to distribute a significant proportion of the processing load from the Web server to the Web client
  3. Web client often has to present different views of the same data to different users
  4. Intelligent Web agents will attempt to tailor information discovery to the needs of individual users
The above list belies a strong desktop-centric approach to software development. All of the 'needs' listed in the four items above fall naturally into the server-side jurisdiction. The client is only responsible for rendering the representation that the server side business logic prepares.

Linking

Toward the end of his paper, Mr. Bosak addresses some perceived inefficiencies that he sees in the hypertext system as implemented using HTML. His list is, again, very revealing. Here is his list of perceived inefficiencies when implementing linking via HTML:
  • HTML lacks location-independent naming
  • It lacks bidirectional links
  • It lacks the ability to define links that can be specified and managed outside of documents to which they apply
  • No N-ary hyperlinks (e.g., rings, multiple windows)
  • No aggregate links (multiple sources)
  • No transclusion (the link target document appears to be part of the link source document)
  • No attributes on links (link types)
Below is my response:

Location-independent naming: Huh? If I link to a resource representation, such as google.com, how's that location dependent? Where in that hypertext link do we see any information that would reveal location of the resource representation named google.com?

Bidirectional links: This is the engineer's wet dream; having links that will never get broken. Not gonna happen, time to grow up and deal with reality.

Links that can be specified and managed outside of documents to which they apply: It's the damned documents again! Snap out of the document dogma and start living in the world of resources and their representations. In other words -- content!

N-ary hyperlinks (e.g., rings, multiple windows): Not sure what this means, but I really cannot see any real life use for it.

Aggregate links (multiple sources): OK, 10 years ago no one apparently knew about real simple syndication and such, plus the aggregators etc.

Transclusion (the link target document appears to be part of the link source document): Also, no clue about the mashups that will become all the rage 10 years later...

Attributes on links (link types): What on earth does that mean? Link types? Like what?

Giving Java something to do!?!

Finally, the author cites the slogan "XML gives Java something to do" (no sources quoted in the original paper).

What does he mean by this battle cry? What would he envision Java will do with XML?

It's hard to say after more than 10 years had passed since that battle cry was uttered, but my hunch would be that he was referring to the 'nomadic' nature of Java. In the olden days, Sun Microsystems was selling the "network is the computer" slogan, and so at that time Sun's trailblazing language was Java. According to Sun, Java lives on the network, and is nomadic, courtesy of RMI (Remote Method Invocation). Snippets of Java code can travel the network, on demand, in order to supply just-in-time computations on the requesting client.

Supposing that the client had just received an XML document but doesn't know how to present it to the user, a snippet of Java code could be invoked and downloaded on a whim. Once installed on the client, Java routine will massage the XML etc.

This dated model of 'distributed computing' has long been pronounced dead and buried. The problem is, we still have armies of software developers who tend to think in a similar vein. Because of that, software development on the web has turned into a terrible chore, and the resulting web sites tend to be nightmarish.

The moral of this story is to learn the lesson from the history, become aware of the blind alleys that have been paved by the developers a decade ago, and learn how to avoid the minefields, pitfalls and traps of the obsolete software development practices.

You're welcome!