Thursday, March 08, 2007

The Death of the Web 2.0 Company?

I recently attended a talk by a Yahoo! executive on "Socially Immersive Media". That's the term they use for the phenomenon of user-generated content and other Web 2.0 elements. He was rather gung-ho about the prospects of these new Social Media companies, and how traditional media was finding it difficult to compete.

And then it hit me right in the middle of the talk. These "Web 2.0 companies" will be going the traditional way very soon. Their victory is a short victory.

Let's take a look at the web as being composed of "content", "applications" and "infrastructure". Early on, all these three components were supplied by one central, logical entity, not unlike how "old media" does it. And then came these new media companies, the "social media" companies, who ceded control over creation of content to the masses. They just provided the application (like Blogger, Flickr, etc.) and the infrastructure, but content was by the masses, of the masses and for the masses.

Of course, it's not written anywhere that applications or infrastructure are the exclusive domain of these social media companies. Open source applications, community-owned, have existed for a very long time now. Indeed, many users are already constructing applications (or "mashups") using APIs provided by some of these companies. These companies are the lucky ones. They'll go, but slower. It's not difficult to surmise that a few years on, these companies will be relegated to just providing infrastructure on which the masses write and run their applications.

But to truly democratize the web, we must own the infrastructure too. Now, this is a difficult problem. Can we set up a masses-owned Google, for instance, that meets similar standards of quality and performance and even exceeds them? Peer-to-Peer applications have already demonstrated that infrastructure can be owned by the masses, but how long is it before these protocols go "mainstream"?

Pipe-dream? Science fiction? Thanks to the Democracy TV/Player, it's not. This is a perfect example of what I'm talking about. The content for this Wired Magazine's "future of Net TV" application is all user-generated. It's a Free Software application written by the community. And it uses BitTorrent to get around the nasty problem of hosting video broadcast infrastructure. And it works!

Me doth think these companies rejoice too soon.

Saturday, March 03, 2007

On the Mechanics of Code Writing

Code writing contains some mechanical activities which are best automated by your editor. Here are some features any decent code editor should provide, to make your code writing more pleasurable. If you didn't know that these features existed, you should revisit your editor's manual now!

Block commenting and uncommenting of code

You've written some code, and you want to try out some other approach. You don't think this is worth a version control system, so you comment out code, and write new code. You probably do this frequently.

So it makes sense for your editor to support automatic code commenting and uncommenting features. You select a piece of code, press a few keystrokes, and the code selection is commented out. Beats inserting comment characters, especially when certain languages don't have a single-character comment delimiter.


Indenting and Re-indenting

Indenting improves code readability. I do not find reading badly indented code a pleasure. Perhaps the editor they used to write the code didn't support code indentation. Indentation affect newly written code, or old already written code. A good editor supports both.

When new code is being entered, the editor keeps track of the current indenting level, and then automatically indents the next line of code for you. Most editors do this.

Then re-indenting old code, some editors provide manual block indent and un-indent block features. You select a block, and then you can indent the block in or out, but manually. This is better than nothing.

The really good editors will allow you to select a region of code, and re-indent that region as per surrounding code.


Syntax Highlighting

After indenting, the next best feature that improves readability is syntax highlighting. Unlike most other features, this is something that you don't invoke, but something that always works in the background.


"Locate Symbol" Feature

Most editors have a Find feature, but a "locate" feature isbetter. You position the cursor underneath a symbol (function name,constant, etc.) and invoke locate. You'll find yourself at the definition of that symbol, regardless of whether it's in the current file or somewhere else.


Autocomplete Features

Autocompletion of variable names, function names, and other symbols. Very very productivity enhancing when done right. Unfortunately it's not easy to do this for some languages, and hence not many editors support it.