Monday, September 27, 2010

The March of Progress

I'm on my way home from a programming conference in Baltimore right now, typing this out on my new laptop.  At the same time, I'm downloading videos from Amazon Video on Demand to watch on the flight through the airport Internet access.  In my backpack, I have my Amazon Kindle with ninety-two books on it and hundreds of thousands more available with a couple of mouse clicks.  In my pocket, I have my smartphone that can access virtually any website in the world, run a plethora of helpful applications as well as the more mundane placing and receiving of calls or text messages.  The battery in the phone lasts all day almost no matter what I do with it.  The battery in my laptop, if I'm careful, will last about five hours of active use.

Just a little over ten years ago I was flying to and from Taipei for work.  I had a few books with me, a laptop crammed full of music (video was too large to store more than a little bit on a computer) and one game that I had bought to bring with me so I would have something to do in the hotel room.  I carried a pager with me for text messages and a cell phone for calls, but I could only keep the cell phone on for a few hours at most even if all I did was just left it on ... so I gave out my pager number for people to get a hold of me and then called them back on the cell phone after turning it on.  The laptop battery lasted about five hours of listening to music and doing nothing else with the screen and everything else I could turned off on the plane.

A hundred years ago, I wouldn't have been taking a plane at all.  What I can do in just a few hours now would have taken days on a train or weeks on a boat.  For most, it would have been a one-way trip to start a new life rather than something taken at a whim or for leisure.

It is amazing how quickly things are changing within my lifetime compared to the period before it.  I wonder what the next ten years will bring?

Sunday, August 8, 2010

Files Are an Implementation Detail

John C. Dvorak recently wrote that the desktop gets no respect and it should.  This column has been a source of discussion and disagreement between my friends since it made the rounds.  Leaving aside the whole "licensing" issue, what Mr. Dvorak nearly captures is the divide between what most people need to use computers for and what professionals need to use computers for.  He claims that the desktop can do things that appliances can't.  I disagree, one only needs to look at the TiVo to see an example of an appliance that does things that one would once have needed a desktop computer to do or had to do manually.  But let me start by defining my terms ...

An appliance, for the purposes of our discussion, is a device that performs a task or set of related tasks in a way that a user can learn to operate it by intuition or usage and hides most if not all implementation details from the user.  A refrigerator is an appliance because you don't need to know how it works in order to keep your food cold, you just open the door, stick something in and a few hours later it is cold.

A desktop computer is not an appliance because you need to learn aspects of how it operates in order to properly use it.  You need to know about files, folders, networks, programs and a whole lot more.  And the more the computer can do, the more you have to learn.  A desktop computer does not hide its implementation details.  As a matter of fact, its job is more to piece together various things that let you use the implementation details without hiding them.  Yes, you can plug in to a network nowadays without needing to know much about TCP/IP, network protocols or the OSI stack.  But it doesn't keep that stuff from you either.  A refrigerator doesn't give you access to its compressor and let you tweak it.

Here's another point where I disagree with Mr. Dvorak.  The modern automobile is an appliance.  I don't need to know anything about how a car works in order to operate it.  I don't need to know about the transmission, the engine, or the brakes.  I just need to know that putting the car in D and pushing the accelerator makes it go.  I take my car to a mechanic to fix it, just like I have a professional come and fix the refrigerator if its broken.  It is only the American love affair with the automobile that has kept it so the average person still can get access to the engine and other internals.  And while I know more than many about how an automobile works, I have only the most basic grasp of newer automotive technology like anti-lock brakes and traction control.  Those are things that I have decided I don't need to understand, they just work.  That's the magic of an appliance, I don't need to know in order for it to work.

So let's take a look at what I believe computers are and should be evolving into, the modern camera.  You have the point-and-shoot camera for consumers and you have the SLR camera for enthusiasts and professionals.  With the point-and-shoot camera, I don't need to know about white balance, f-stop or any of a bunch of other technical aspects of photography.  I simply point it at what I want to take a picture of and click the button.  On the other end of the spectrum, there are the SLR cameras where I may not need to know those things in order to take a picture ... but it doesn't hide those things from me either.  The point-and-shoot camera is an appliance.  The SLR camera is not.

What does a general computing appliance look like?  Simply enough, it looks like the iPhone or iPad as far as the way it operates.  With these devices, you don't need to know about files or folders or networks.  You turn it on, download an app and perform a task.  Everything else is taken care of for you.  Does this mean you can't "calculate, with accuracy, the trajectory of a rocket shot to the moon, and the amount of fuel it needs to get there"?  Of course not, but you do need an app for that ... which someone else must have made for you.  Does it mean that you can't connect a Wacom tablet and do cool, unspecified things with Adobe Illustrator?  Well, for now, yes ... but the concept of a general computing appliance doesn't preclude this.  A general computing appliance is something for consumers and will hide the implementation details of how the computer works, but that doesn't mean it can't do powerful things or allow one to attach peripherals such as a Wacom tablet or a keyboard.

And here's where we get to files, the big argument amongst my friends was that files are the glue between applications that are never perfect.  A file allows one to take data that was created by one application that does part of the task I want to another application that allows me to finish the task.  The implicit fear is that on a general computing appliance, apps will turn into data islands that do not allow me to perform this kind of assembly-line workflow that the desktop PC has enabled since its inception.  If you look at the iPhone, this is mostly the case.  One app's data is not shared to any other apps, with the exception of some built-in applications like the camera and the photos app.

On Android, it is a different story.  Android has a system whereby one application can serve up its data to the rest of the device via a content provider system.  This allows any application on the device to integrate with the built-in contacts application, or the gallery application.  It allows new applications to serve new kinds of data and control how that data can be accessed or changed.  This system also does not resort to sharing files.  It is an OS-controlled communication protocol that allows an application to have its own data strongly protected but also affords sharing.  This type of system is what will allow for files and folders to truly become an implementation detail on consumer-level general computing appliances.

This is my idea of what the general computing appliance nirvana looks like from the user's perspective:

  • A way to download, install and uninstall applications.
  • A means of launching an application.
  • A system whereby installed applications can notify the user of events.
  • A means of switching between running applications and controlling what applications are running.
  • A system of configuring the settings of applications.
Additionally, a general computing appliance should afford the following without the user having to be involved:
  • Sharing of data between applications.
  • Access to the device's peripherals.
  • Other integration points between applications (a la Intents in Android).

And that's about it as far as a consumer is concerned.  This is the genius behind the iPhone and why I believe it will be considered revolutionary in the years to come.  It was the first true general computing appliance.

Where does this leave the desktop PC?  Should it get more respect or should it become the computing world's Rodney Dangerfield?  I partially agree with Mr. Dvorak here.  The traditional desktop PC will continue to have its place in the computing future.  But it will belong to enthusiasts and professionals, not to the consumer.  The people who are writing apps for consumer devices will use a desktop PC (or the future's version of it).  The people who are doing more free-form computing tasks will likely use a desktop PC, perhaps engineers or scientists or data miners, people who aren't performing the same task all the time.  I believe though that over time the set of people that use what we now call the desktop PC environment will shrink slowly but inevitably.  As operating systems evolve and developers begin to understand more of what people actually use computers for, we will be able to simplify more tasks to the level of an appliance.  It does not mean the end of the enthusiast or the professional, simply that one does not have to be an enthusiast or professional to get the benefit of the technology.

This is not something to be reviled, but something to be considered natural.  It is the march of progress.

Sunday, July 11, 2010

The Perfect IDE

I've been writing a bunch of code lately for an Android project I'm working on.  What this means is that I've been writing Java code in Eclipse.  The Java part isn't bad, though coming from C# and .NET there are a lot of things that I miss.  But that isn't what this is about ... this about IDEs, Integrated Development Environments.  I don't know if Borland's Turbo products, Turbo Pascal being my introduction to the company, were the first ever IDEs, but they were probably pretty close.  Back in those days, one needed an IDE because computers could only run one program at a time ... so running an editor, then leaving it to compile, then running a debugger, etc was all a big pain.  Now, computers are never running just one program ... and even programs are doing multiple things at once.  My phone, right now, has a couple programs running on it with at least seven threads each.  But I digress ...

So we don't need IDEs anymore.  Why do we still have them?  Because opening one program that keeps track of all the minutia of writing code is a good thing.  It knows which files belong to the project so when one needs to build the project, it just takes one click (sometimes not even that) and it's done.  When there is an error in the build, one can simply click the error message and the offending place in the offending file is displayed for easy fixing.  There are all these little things that the IDE helps with that one simply can't get from a set of command-line SDK-style tools and an editor.

My problem with most IDEs is that you can't have just one.  I currently have five installed.  I have Visual Studio 2008 for working with older .NET projects.  I have Visual Studio 2010 for working on newer .NET projects.  I have the built-in PowerShell Integrated Shell Environment for PowerShell scripting.  I have Eclipse for working on Android projects and I have IntelliJ IDEA because a friend recommended I check it out also for Android projects.  Why do I have to have all these different IDEs installed?  Because Visual Studio is best for .NET projects, Eclipse has the tools I need for Android, the PowerShell ISE is the only thing that has syntax highlighting for PowerShell.  Don't get me started on why I need two copies of Visual Studio ... that's just extra stupid.  Could I use Eclipse for .NET projects?  Maybe, but the amount of work it would take to make that happen is just scary.  I'm not even sure that coercing Visual Studio into doing Android development is even possible.  IntelliJ seems to only be an IDE for Java, so using it for anything else is out.

So, essentially, the Perfect IDE means I only have to have one.  With it, I can write code for any language and platform and have all the tools I expect to have at my disposal.  Let's go over those, shall we?

  • Editor
    • Font selection
    • Color syntax highlighting
    • Flexible formatting support (brace style, etc) where the editor automatically formats my code as I type
    • Intelligent completion (like IntelliSense in Visual Studio)
    • Search and replace including regular expressions
    • Refactoring tools
  • Project support
    • Some way of knowing what files, objects, etc are in the project
    • Easy navigation to any project item
  • Build
    • One-click build (or background building if it works reliably)
    • Error integration
  • Debug
    • Breakpoints
    • Watch variables
    • Expression evaluation
  • Window manager
    • Support multiple top-level windows
    • Allows me to move any view group to any window
    • Allows me to dock any view group to one particular area of a window
    • Views can include a file in the editor, project explorer, etc.
This is just the bare minimum of what I expect from an IDE because this is what most IDEs get mostly right. Some additional features that most IDEs do not get right or don't offer:
  • Source control integration
    • Most IDEs have support for one or two source control packages, but they rarely are the one I'm using at the time.
  • Build integration
    • Most IDEs have their own built-in build tool, but they rarely make it easy to support advanced build tools such as Ant or MSBuild.  IDEs should get out of the build business and use these advanced build tools by generating the required files and letting the build tool do the work.
      • Visual Studio gets this kind of right, but there's a bunch of stuff that's done behind the scenes that makes it worthless if you try to use their generated stuff outside the IDE.
      • Eclipse supposedly gets this right in that it uses Ant internally, but I didn't see any Ant build files until I generated them myself.
  • Support for multiple languages and platforms
    • How hard is this?!?  The process of editing, compiling and debugging has been set in stone for decades.  Heck, even the syntax of most languages is becoming more and more similar ... there's C-derived syntax and everything else.
    • Make adding new languages drop-dead easy.  I've tried to add just color-syntax highlighting for PowerShell to a couple IDEs and it is a huge pain, if possible at all.
  • XML support
    • First-class support just like any other language with syntax highlighting, formatting support and intelligent completion.
    • Data visualization for well-known formats.
  • UI generation tools
    • This is something I can understand most IDEs not having support for a bunch of platforms because developing UI is very different even within a platform such as Windows, let alone across platforms.  Though with the advent of XAML and similar technologies, I see convergence happening here too in the coming years.
So that's my laundry list.  How is this achieved?  That's a great question.  I'm glad you asked.

IDEs need to realize their main job is window and plugin management.  The IDE is simply there to mediate the interactions between various plugins that do the heavy lifting and provide windows that let the developer see what the plugins are doing for them.  I think what keeps IDE makers from seeing this is that every IDE includes, by definition, an editor.  So they write an editor first and then start tacking on all this other functionality and then they have an IDE.  Yes, even the editor should just be a plugin.  And I shouldn't have to be stuck with just one editor plugin.  Maybe I want one for XML and a different one for Java and yet another for C#.  I'm a developer, I'm choosy like that!  Multiple installed plugins for all services should be the norm, not the exception.

Maybe I'm asking for too much.  Maybe what we'd end up with if someone actually made what I'm asking for is something similar to Eclipse with eleven different versions to choose from and no help for someone just wanting to get some work done.  Maybe we'd end up with crazy, incomprehensible configuration dialogs (though pretty much every IDE has at least one of those already).  I think it is possible though.  I really believe it can be done right given the right vision.

Someone want to prove me right?

Thursday, July 8, 2010

Why I'm Considering Dumping Facebook for Google Buzz

I've been following the various Facebook privacy debates and I've been just as concerned as many people, but the reality, or so I thought, is that there weren't other good options. I really like being able to update all of my friends, family and extended acquaintances on (not so) significant happenings in my life in one easy motion. I like being able to easily share stuff like pictures, videos, links and commentary with these same people. I enjoy posting nonsensical musings that might make people smile, but if people don't have time ... they don't even have to delete them from their inbox. As far as I knew, there weren't other worthwhile* sites that offered that kind of functionality.

When Google Buzz came out to fanfare quickly followed by privacy issues of their own, I was immediately turned off and vowed to not consider the product, let alone use it.  But lately, I've been perusing Google's offerings for various reasons and well, it was right there, so I fiddled about with it.  I checked their privacy policy.  I checked the Google Dashboard, where one can see everything that Google has associated with your profile ... manage the privacy settings and in the case of Buzz, delete all content with just a few clicks.  And Google Buzz lets you easily do everything that Facebook can do and some other things besides.

So here's the breakdown of why I'm strongly considering using Google Buzz as my social network framework of choice:

Privacy

I can easily control who can see what entries I create on Google Buzz.  I can make something public to the entire Internet, assign one or more groups or even just one person as able to view and comment on my posts on a post-by-post basis.

Visibility

I can easily see what items can be seen by whom.  Through the Google Dashboard I can see everything that Google has connected me with and why.  I can then make informed decisions on how I use the service rather than relying on word-of-mouth and the latest Internet scare to tell me what Facebook has exposed to outsiders this week.

Anonymity

I'm not using this particular feature but it is well known that Facebook doesn't allow accounts with anything other than your "real" first and last name with an optional nickname (but only if it is a variation of your first name) or maiden name.  On Google Buzz, I could create a new Google Account for any of the various gaming names I've held over the years and post as that identity, if I was so inclined.

Control

Basically, what all this boils down to is a question of control.  Facebook CEO Mark Zuckerberg has publicly stated that in his opinion, the expectation of privacy is no longer a social norm.  Because of this, he decided to change Facebook's policies to match his vision of the current trend in social norms.  While I applaud him for taking his company in a bold direction, something most CEOs will not do.  I'd rather that access to my information be controlled by my vision of social norms.  As far as I can tell, Google Buzz gives me that control.

* Yes, I know about LinkedIn, Friendster, MySpace and the like.  LinkedIn is designed for business networking.  Friendster I can't even go to their main page without signing in.  And if you think MySpace is a serious site, comment after you get your driver's license.