Saturday, June 20, 2009

Where an illegal download is worth 3.33 a dead relative

I wonder what the thought process is when downloading bad pop music is worth $80,000 per song. How do you calculate that?

Thursday, June 18, 2009

Wednesday, June 17, 2009

Solidarity

Changed my blog profile and time zone to Tehran, Iran in solidarity with democracy protesters.

I guess in the end it's a fairly meaningless gesture, but it's better to do something small than nothing at all I think.

Saturday, June 13, 2009

Sunday, June 7, 2009

On Platforms and the Convergence of 2D and 3D Internet

Working in Virtual Worlds, we are often given to wonderful discussions about what the future will hold for the Internet, and when and how various technologies will converge.

One popular school of thought is that virtual worlds should be embedded in existing web browsers as "light" plug-ins -- in order to make installation easy, and leverage history's most popular connected application platform.

The other is that there should be a "heavy" viewer designed completely around a unique virtual world experience; which happens to contain a superset of features, including web-browsing.

I belong to the second school; and in fact that opinion had lead to conflicts within my previous company. Thankfully, my current employer very much shares my vision.

However there are many in the first camp, and I am sometimes asked why I will not join them, especially in light of recent developments specifically aimed at bringing 3D to web browsers. Let me try to explain why despite all the momentum for adding 3D to web browsers:

I believe placing a 3D virtual world viewer within a 2D web viewer is somewhat comparable to embedding a gopher viewer, or ftp viewer, or email viewer within a web browser -- it's of course been done, but it's backwards, leads to awkward results, and has never proven to be very popular.

In the long term, computer code is plastic. If the world decided to morph a web browser into a 3D application platform overnight, there is no technological reason why it couldn't happen. So the question of where to put certain features is more ideological, metaphorical, or about user interaction concerns

What is a web browser?


Is it the ultimate convergence point for anything internet-related? Is it a new OS that should have it's own version of OpenGL? Is it just a safer sandbox for internet applications that the OS itself?

For me, issues of security or specific features are not interesting. Clearly any application platform needs to constrain the ways in which hosted applications can access raw resources. And clearly the needs of the platform evolve over time, and that requires adding new APIs.

For me, the question of what makes a web browser is a question of design, and mental modes; and how the totality of those decisions affect the expressiveness of applications written for the platform.

A web browser, for me, is a transaction-oriented 2D document-centred internet application platform. A virtual world viewer is a stream-oriented real-time interactive 3D scene-centred internet application platform. I am not sure there exists any easy abstraction that allows one to fluidly translate concepts between categories. The commonality that they host applications that run on the internet is not enough to unite disparate modes, and inform the design of a coherent platform.

Web browsers will indeed need 3D features. But they way in which 3D will be used on the web will be document-oriented, and happen in transactions (not real time). Things like e-commerce catalogues can be made available in full 3D. Any number of static scenes relating to the host web document will add a lot of value -- the way embedded streaming video adds value to many current websites.

But World of Warcraft will never run in Firefox (not at least without a severe redefinition of "browser", "runtime", or "OS").

What is a platform?


What might the average computer look like in 10 years from the perspective of application platforms?

I feel that each computer will consist of several rings or layers of runtime platform:
  1. Native: applications are programmed against the native OS libraries, and constrained by native OS security model (ex: win32, POSIX, OpenGL, etc.)
  2. Managed: applications are programmed against a large, general purpose, coherent, high-level API; and run in a virtual machine with detailed, explicit, and programmable security model (.NET, Java, Python, etc.)
  3. Internet: applications are programmed against a special-purpose API, with clearly defined semantics, which is exposed though a common data model (the DOM for web) and standard set of operating primitives (HTTP for the web); security model is highly sandboxed, limiting access to private data where not explicitly required by the data model or operating primitives (IE, Firefox, and one day Virtual World Viewers?)
I expect that in the future, each computer will come equipped with one OS, a handful of managed runtimes, and precisely two internet application platforms: a web browser and a virtual world viewer.

How would the web look in a VW viewer?


I think it would be wrong to assume that because 2D embeds in 3D mathematically, that the web browser should go away -- entirely subsumed in a 3D viewer. That really ignores the long and ongoing history of humans quite preferring to do a lot of their most abstract work in 2D documents. It would also really undermine my own argument that the web and VWs are really very different modes of interaction.

Instead, I believe that the VW viewer will know of the system's web browser, and rely on it directly for all web-related tasks. Examples might be embedding a browser window for the purpose of authenticating with an OpenID or oAuth provider for some network resource, such as gaining access to your facebook profile, or to send emails through gmail. Web applications like Google Apps would also make a simple and effective document sharing service available from within a virtual space.

So from a user's perspective, the web browser would be rendering elements of the regular user interface, or displaying discrete web pages in an integrated manner without appearing as a full web browser. There will also be cases of rendering to texture in order to display web pages as in-world objects, but their purpose will be peripheral.

As a some what related aside, I find it constantly amusing to see VW implementers try to embed 2D documents in 3D spaces. With few exceptions, there is no benefit whatsoever to being able to see your spread sheet in perspective projection as a texture. Give me a use case where having 2D documents in 3D is more than a gimmick, and I'll give you a modified use case where dimensionality is irrelevant, and the interaction feels much more natural.

Not just the browser


Other internet applications that I feel should not be subsumed within the virtual world viewer, but instead should integrate smoothly with them using an inter-process communication channel are things like E-mail, IM/Chat networks, Streaming Media, Office programs, etc.; all of which are regular desktop applications that the viewer calls out to in response to in-world stimulus; or alternatively, will respond in-world to a stimulus from the user's desktop.

Imagine a "meet in-world" button on your IM client, or having the streaming audio in your virtual home synced with your current desktop play-list (or vice versa).

Saturday, June 6, 2009

Why Windows is not yet ready for the Desktop

I don't spend my time telling other people which OS should or shouldn't suit their way of working. But it seems there are people who do, and like to get blog hits for it.

The problem with these "critiques" is always that the author is carrying around the self-serving assumption that their preferred OS embodies the only real way to organize a software ecosystem, and all others have inferior value. Moreover, since they are naturally only looking for a way to justify their existing pre-conclusion, they are often sadly misinformed about most of their "complaints", half of which are either entirely subjective, or just flat-out wrong.

And it is thus that I find myself moved enough to mock their contribution to the state of public discourse as follows (public service announcement: this is tongue-in-cheek parody):

Preface:

In this document we only discuss Windows deficiencies while everyone should keep in mind that there are areas where Windows has excelled other OSes.

A primary target of this comparison is Linux OS.

Windows major shortcomings and problems:

0. Premise: free and open software will stay indefinitely. Full stop. You may argue eternally, but free software is the ultimate disruptive technology, moving up from the low ground, replacing complicated and ill-fitting proprietary alternatives at every turn, such as web-browsers, e-mail clients, video players, office software, etc., which at one point cost money, but now most people find that they can no longer justify spending money to buy an upgrade for more "Clippy the Happy Assistant". Proprietary software will only be able to stay relevant by searching out ever more niche applications, or by massive expenditure on research in high-end applications for which it will take time for the ideas and algorithms to filter down to the greater community, and thus a brief window of profitability will remain. Software patents are nothing but a destructive force to retard innovation, and with more and more of the technology and legal communities realizing this basic fact, software patents are about to go away forever.

1. Security

1.1 History's greatest playground for malicious software. With unpatched machines on the internet taking only minutes to become infested with viruses, or become a slave bot for massive illegal spamming operations, Windows is a blight on the Internet's infrastructure.

1.2 Countless applications are released every year with obvious security holes. The programmers that make Windows applications are clearly some of the worst.

1.3 Microsoft has countless times avoided appropriate steps to secure the OS and limit the potential damage a compromised binary could cause. It has consistently either or added half-measures, out right refused to take necessary steps to ensure a safer computing environment for all users, for fear of making "Auntie Jo'" 10% more confused about the "1.3GHz hard drive" on her desk.

1.4 Every windows application I've ever installed messes with the Registry, places files about my hard drive which it never cleans up, installs icons, or worse surreptitiously installs spy- or ad-ware.

1.5 Any OS that regularly requires a wipe and reinstall to fix is beyond tolerance by any sane person.

1.6 A galore of software bugs across all applications. Just look into Vista, or call Microsoft tech support, pay exorbitant support fees, then wonder why some bugs are now ten years old with over several dozens of duplicates and no one is working on them.

2. User Interface

2.1 No consistent API. Win32? MFC? WinForms? WPF?

2.2 No scripting bindings for UI programming. No Python, Perl, Ruby, Java, etc.

2.3 Themeing and skinning support is laughable. Widget toolkit, display, rendering, input, and window managers, are all joined in a ridgid, monolithic blob, opaque to outside developers. Non-trivial changes to look and behaviour of the UI require either proprietary add-ons or third-party hacks; and even then most of your choices are hard-coded by Microsoft designers.

2.4 Lack of CLI (command line interface) errors for user applications (see clause 4.). All GUI applications should have a CLI errors presentation. Why on earth would you flash some crazy warning message to the user when you should be logging it to a file for a skilled technician to view instead of the poor unsuspecting end-user.

3. Interoperability

3.1 Windows has NO interoperability with non-Windows OSs. Installing Windows arrogantly destroys any previous OS boot-loader you may have had. Totally unable to read non-FAT or NTFS partitions.

3.2 Windows ships no other runtime environments except .NET. Has actively tried to disable or cripple competing platforms such as Netscape or Java.

3.3 Microsoft is in regular legal trouble for monopolistic and anti-competitive practices, which as a consumer of non-Microsoft products, means Microsoft considers me an enemy. Why own an OS that is constantly out to defeat you, from a vendor that requires massive anti-trust lawsuits to force it to simply not behave in an under-handed manner?

3.4 It should be possible to configure everything from the command line. Why should I give myself a work-place injury clicking everywhere with the mouse like a tweaking junkie in order to make a change that could be described succinctly in a line or two of text?

4. Drivers

4.1 Windows driver support is so abysmal, each individual device manufacturer must ship drivers with the device itself. If you have to reinstall windows, none of your devices will work until you individually download and install the latest versions from each vendor's website, potentially consuming many long frustrating hours.

4.2 Drivers often need to be installed, tweaked, or configured before they can even be used as intended. They often don't work "out of the box". Moreover, they never seem to be *just* drivers, there is always some application that gets installed without your consent which provides questionable value yet consumes resources and slows your computer down.

4.2 Drivers are one of the main sources of system instability (likely just behind viruses/malware). Poor quality drivers make Windows experience painful.

4.3 Windows has no means to reliably update drivers when critical updates have been made available for them.

4.4 A lot of Linux specific embedded devices do not have any Windows support. An argument that embedded device developers should make their device Windows compatible is silly since that way Windows won't ever gain even a traction of popularity among people who need source-level access to the OS. Why should I install an OS where my own hardware doesn't work?

5. Installing Applications

5.1 Very few Windows applications, by volume, are free or open source; which means you are totally beholden to application developer in ways that would never be allowed by law for makers of physical products. Happen to have your business critical data in a proprietary format when your license runs out? Lost your dongle just before the big presentation? Had to transfer your application to another computer because your laptop was stolen? Sorry to hear you just went out of business.

5.2 Windows has no regular time-based release cycle. You paid good money for a few features and a lot of bugs. It may be a few years from now when you can expect them truly fixed, but you can't count on it. And you'll have to pay again.

5.3 Windows has no central means of downloading new software, their dependencies, or upgrades. Each new application must be purchased from a physical store, or from each individual vendor's website. There is no dependency tracking (or worse no library sharing!), and updating for security, bug-fixes, or features is ad-hoc and entirely dependent on the whim of the vendor. Likely the vendor will use remote updating features to unethically sneak updates to your computer without your knowledge.

5.4 Windows comes almost barren on a fresh install. To get your machine back to a usable state, you must spend hours remembering what applications you had installed, and manually downloading and installing each one individually. With a reboot in between each install.

5.5 Windows applications need to reboot any time a new application or library is installed. 1991 called. They want their loading technology back. I hear DLL-hell isn't a problem any more though.

5.6 Microsoft enforces a great many intra-windows compatibility constraints to minimize the ever-present costs of portability, but it comes at the cost of inconsistent behaviour, buggy programs, and internal complexity that is slowing rotting Windows itself from the inside out.

5.7 Lack of hard-core Linux programs like grep/awk/GDB/valgrind/SystemTap/SELinux. Programmers just won't bother installing Windows until they can work for real.

6. Problems stemming from the fact that Windows isn't Linux

6.1 Ok I am officially tired of this game.

To be clear, I don't necessary truly believe all of the above, as unlike most people, I realize the world is full of complications and subtlety -- I'm just tired of hearing coming in the opposite direction, and had to vent lest my head explode from idiocy-overload.

Wednesday, June 3, 2009

Structured Streams

TCP done right, implemented over UDP, as a user-space library.

What more could you ask for? Seriously, the paper is simple yet beautiful.