Aug 31

The Web is the most successful, fantastic virtual machine

Tech 6 Comments »

Chrome OS created a whole slew of buzz around the Web finally being an OS. There are many other examples of this of course. On the desktop we have had the likes of moblin and Jolicloud for quite some time. On the phone we have webOS.

The Web as a virtual machine

In many ways, it seems obvious that this will happen. When I look at my desktop, I often find it looking like this:

browserasvm

which looks surprisingly similar to this:

windowsinmac

Wait a minute. Can’t you look at the browser as being a virtual machine for the Web? A hugely successful one that has been ported to almost every platform known to man. It is a viral virtual machine that has become so successful due to its simple yet powerful constructs that allowed the platforms to do the porting (oh and it was friggin made to be free! Take that gopher!). As a virtual machine it grew so fast that it is quickly usurping the hosts themselves. The traditional operating systems. Applications are being written for the VM rather than the OS. This is very different to the diagram that has Windows running inside a VM on the Mac. In that case you are running applications written for Windows on the Mac. The virtualization crew have done wonders to make that emulation possible. With the Web you didn’t quite need those tricks, and instead thanks to Web standards, you just had to write a browser.

Going inside out

Normally, we have seen systems built natively and then we virtualize them. In the case of the Web, the “Web platform” is the host environment and the VM. As this environment has become stronger and stronger, there is bound to be the time to ask “do we need our host anymore?” We are on the fringe of that time right now where a huge bulk of the applications that people use are Web based.

I just ran an experiment in this area myself. The hard drive in my Macbook Pro died and while the kind folks at the local Apple store replaced it I had to pick up a random machine for use. What would life be like if I had to work on a random machine? I purposely didn’t restore from my own backup, and ended up with a week seeing how much of this cloud thing I use.

It turned out that all of the apps that weren’t somehow cloud based were now a pain in the arse. Obviously I could get my email with Gmail and the other Web apps were there. However it went further than that. I could download Tweetie and be instantly up and running where I left off (thanks to the fact that Twitter is just a Web service). I got to see which IM servers did a good job keeping my server based contacts, and what a pain it is when you make changes on the local client to tell you that flubber65 is Frank and suddenly you have no idea who anyone is without that (NOTE: if you build a service, for gods sake save everything up there!).

It even made me happy for Bespin, as I was able to get to a bunch of my code. That has incentivized me to help make Bespin great :)

So, I learned that Web based services won. I was productive on a random machine in minutes, and cursed the situations where this wasn’t the case (mainly around development).

If the entire OS was Web based, with a rich cloud infrastructure, then I could literally login to any machine and be ready to roll. X Windows productivity will be back! :) This will greatly change the role of devices too. Seamless upgrades. Multiple devices sharing data. Fun times.

So, Web OS it is. Hopefully the Web platform will be complete enough, and where it isn’t this kind of force behind it will push it even faster (this is why I am excited to see the space heat up, and also wanting to keep a watchful eye to see how things get standardized with crazy timelines behind them).

What do we lose?

But, wait a minute. We have seen that virtual machines are actually pretty awesome. Having an entire system in a single file that I can suspend, backup, and run multiple off? Cool. I am running multiple “Web OS’s” every day (Firefox, Safari, Chrome). I can update them whenever I want, and they can compete.

We also see fantastic features where we can watch over all of the connections from the virtual machine to the host. Tweak how ethernet works, set limits on various usage, etc. Just as we are getting amazing things out of virtual machines…. maybe we don’t need the Web platform to move from there just yet.

User-Agent

Chris Beard (Chief Innovation Officer at Mozilla) is often talking about what it means for the browser to be the “users agent”. There is so much that the s/browser/virtual-web-machine/g can be doing for us, and we have only just begun.

We need to be wary of losing out on any of these thoughts if the Web becomes the OS on the computer (whatever that means, of course!).

As we think about Jetpack and granting enhanced functionality from Web apps to browser-chrome I am often thinking about a morphing browser. When I am on Gmail, I don’t need the URL bar and all of that jazz. Instead, add new Gmail specific UI for me to use, and let me tie into the local system for contacts etc.

In that vein, it has been nice to see a step in that direction when listening to Alexander Limi speak about UX in Firefox last week. He and the UX team showed some concept mockups for future versions of Firefox such as this:

By the “home” tab you can imagine other tabs that are for applications. Thin tabs that just have an icon (e.g. an email notification icon showing new message counts). These “app tabs” can be slightly magical. The user has to bless them, and at that time can grant special powers to access local services such as a File API, or a Webcam, or Geo location, or [insert cool thing that native apps can do]. This feels like a small step for the browser, but one that can open up a lot.

In conclusion, I am bullish about the Web being called the ‘OS’ on certain computing devices. I am most excited about seeing this driving innovation into the Web platform as a whole, and also exploring the great side of having a platform run as a virtual machine on your hardware. Gotta love the Web :)

Aug 27

Want to make your Web developer tools more awesome? Join us and help make the Bespin editor revolutionary

Mozila, Tech with tags: 1 Comment »

Ben, myself, and the Bespin team are obviously excited about what we are doing. Giving Web developers a tool platform that is self-hackable and is also built-in-social has us up at night dreaming. We need help though! One way of course is joining the community, but if you fancy hacking on this problem full time, we have a new job opening for a Mozilla Labs engineer.

If you have a passion for open source, working with community, at an open company and want to spend some time making the editor sexy, please apply.

If you are interested in other positions, Mozilla is hiring across the board. I can tell you from experience that it is very difference working for a mission based organization, and if you think you would like that, come check us out.

Aug 21

Mashing up some GUI with your ancient command line

Bespin, Tech with tags: 6 Comments »

Mitcho has put together a killer tool, The Ubiquity Persistence Project, that lets you tweak the look and feel of Ubiquity on the fly in order to prototype it:

This reminded me of a topic that I have been mulling around in my head. With Bespin we spend time thinking about how text editors have innovated in little ways (and important ones: code completion etc) over recent years. We want to speed that up, hence the social features.

One part of Bespin is the command line which is a core part of the experience and continues to grow in its role. The goal has always been to merge the Bespin command line with Ubiquity in some way, and people have played with that idea since we modeled our commands to be similar to Ubiquity’s.

Since our command line is in HTML and not on a terminal, we had different ways of helping the user do what they want to do. Take the UNIX command line for example, what has changed there?

  • A shell created the notion of “completion”: first for files/dirs, and then to now where you can do super smart completion
  • At some point we got colors (LS_COLORS and the like). Woohoo!
  • Keyboard shortcuts get us to move around our history nicely

Useful things, but nothing compared to what you can do if you have more than text. We ended up following a pattern where, if you don’t put in the right command line parameters, you get prompted. This isn’t the same as having the command program itself ask you, as you can declare it in the command and the prompt can be as rich as you want. For example, here is the vcs clone command. In theory we could make the command take a bunch of options: vcs clone --url https://svn.mozilla.org/... --project myproj --username user --password pass ... or we could ask for it (and allow browser history to kick in and help):

bespincommandlineprompt

This is a touch crude, but shows you where we are going. I want to be able to declare the types and names of values that a command needs, and have a UI help the user out. As you are typing the command a popup can appear showing you the items that you have to complete, and those that are optional, and help you fill them in with values that make sense.

In fact, although it will be great to make the Bespin command line awesome, it makes me whimper when I am back to good ole Terminal.app. Can’t we mash that up too?

terminal

Time for Commandline 2.0! It would be awesome to have an incredibly rich version of Terminal.app that helps you in amazing ways. As the Web becomes the platform, that may just happen via Ubiquity itself :)

Aug 13

Social coding step one; Collaboration support in Bespin launched

Bespin, Tech with tags: 3 Comments »

Bob in Boston: “Hey Harris, can you help me on a bit of code?”
Harry in Hamstead: “Sure Bob, can you send me the file?”
Bob: “I have an account on Bespin so I checked the project out over there and shared it with you”
Harry: “Ah, OK. I will ‘follow’ you and look at the project. What file?”
Bob: “bob+FooProject/bar.js.”

… go on to collaborate on the file and check it back into VCS …

I am really excited that with the beta release of collaboration in Bespin we have enabled that use case.

We really want to enable people to code in a more social environment. As someone who has worked with remote teams for many years, the value of code review and pair programming has been very apparent. On day one we put very simple collaboration in Bespin that enabled a couple of things:

  • Autosave: Your data was always saved back to the cloud, including your undo/redo queue. This enabled you to go home, open up your browser, and be right where you were from the work machine
  • Shared hacking: developing on the same code at the same time (a la SubEthaEdit etc)

Making this puppy scale is tough, and Joe Walker has working on this for awhile using Neil Fraser’s mobwrite system. What is interesting about mobwrite is the diff/patch mechanism that allows you to do fuzzy matching. This means that losing some packets here and there doesn’t matter as much and you catch up quicker. We still have a lot of work to do there, including the ability to create the diff’s manually (e.g. since we know your actions we can build the diff directly instead of doing a diff on a file) which will speed things up for large files.

What do we have right now? Check out the release:

Using Collaboration

As part of collaboration we need to notion of connections between people and access control. A few new commands give you access to this information:

  • follow/unfollow: allow you to decide whose shared projects you want to see in your project navigator. As we evolve Bespin this will become a way to get all sorts of information about the people you are working with
  • group: allows you to put the people you are interested in into groups to make it easy to manage sharing
  • share: allows you to export your projects read-only or editable to individuals, groups, or to everyone

To get started quickly, you can jump in to a public shared project that Joe has setup. Once logged in to Bespin follow the steps:

  • Press CTRL+J/CMD+J to open the command line.
  • Type follow joewalker to get someone to share files with. I’ve shared a project called pubproj globally.
  • Type project list. You should see joewalker+pubproj in your list of projects.
  • Type set collaborate on to turn on shared editing.
  • Open a shared file by typing open /joewalker+pubproj/example.txt.

Your command line should look something like this:

We have a collaboration sidebar that you can access from the top right icon (which turns blue if you have collaboration on, and yellow if you are actively collaborating on a file with someone).

If you want to see this in more detail, watch the screencast:

This is a beta release, and is just the beginning of the social roadmap. Once we have this core we can then strap on a bunch of helpful UI (painful that we don’t show where other collaborators are, and what each person has been doing) as well as killer features that excite us such as a full social bar with chat that ties to files and a “time machine” ability:

There is more in the 0.4 release too. One interesting experiment has been adding UI to the command line. You will notice that if you type vcs clone the command line will add an inline form for you to give it more information. This is a crude beginning, but an exciting one.

Aug 08

Apple sea change in effect? Control and Data

Apple, Ruby, Tech 23 Comments »

seachange

photo thanks to palestrina55

It has been a crazy few weeks. After writing about my changing thoughts on Apple I have come across a lot of Apple news that makes me really want to swallow the blue pill.

After the blitz of news on the craziness of the Apple review process (concluding with Google Voice) we had vocal figures such as Michael Arrington coming out against the policies.

Jason Calacanis laid out his case against Apple (in which he wants you to buy a ticket to his show even to read it… and I like the TechMeme “tip” ;)

It feels like we are at the start of a real sea change. A bunch of people reached out to say “I am kinda feeling that too.” Jason discusses:

  • iTunes anti-competitive practices
  • Monopolistic practices in telecommunications
  • Draconian App Store policies that are, frankly, insulting
  • Being a horrible hypocrite by banning other browsers on the iPhone
  • Blocking the Google Voice Application on the iPhone

We are being far too easy on Apple. Jason is right, we should be outraged!

I have been thinking it kinda fun and cute to watch Palm and Apple go at it on whether the Pre should be able to talk to iTunes. Instead, I should be friggin’ up in arms. If I was a Pre user, doubly so. Don’t lockup my darn data Apple. I have never given into the iTunes way, and keep my media DRM free and with my own formatting. Less convenient…. but I just had too. Now I am very glad. The next war will be around data and who owns it. Hopefully the winners in the cloud grok ownership, and we get the best of all worlds, being able to go between services and devices.

Apple is treating its users badly, and its developers even worse. Developers, like anyone really, don’t read what they sign… and we all need to be talking about that.

Hopefully the publicity keeps poring in on Apple and we get more than Phil Schiller saying a few words. It will be tough to keep it up, as Apple will continue to produce fantastic goods.

For example, I still read this about iTunes 9 and think “finally! I can deal with my applications through the desktop. Yay Apple!”

Related Posts

Aug 05

The secret to productive software development: Creating the Happy Path

Tech with tags: , 17 Comments »

happypath

I am reading A Theory of Fun written and illustrated by Raph Koster. It is a fantastic little book that the renaissance man of Mozilla, Atul Varma, passed over (to Ben actually, and I nabbed it for a quick read!)

In theory, the book is about computer games, but in practice it is applicable to Everything. The content is deep in a way that has you applying it to your own areas of interest. For me, my thoughts kept rolling over to two loves…. software development, and parenting (education).

Some of the early thoughts were about how the brain works, and the “chunking” that the brain does with information. We are not robots or computers. Most of us are unable to recall exact events. If someone says “what searches were run at 12:34pm last Sunday” to Google, it could tell you. If you asked me to explicitly name the events of the day, the detail would be replaced by the general. “Got out of bed, got dressed, went to work” etc. The brain is chunking away the details that don’t matter.

You can then jump from that to think about what happens when you master something. We talk about “muscle memory” which has less to do with muscle, and more to do with the brain. There is research that shows that thinking about actions helps grow muscle memory…. so Chevy Chase is right when he told us to be the ball This is old hat for sporting chaps who are often told to think about events with positive outcomes, preparing for that fantastic cross from Cristiano Ronaldo and your split second attempt to glance a header into the bottom corner. Practice is more than physical.

It is interesting to think about how the brain constantly internalizes patterns. Raph mentions the obvious data point of how our eyes see our nose, but we don’t see it. In fact, most of the time we are filling in the blanks. There is a reason why eye witnesses are so awful. We think that we “see” things in the literal sense, but in fact we are seeing our own doctored reality.

Anyway, how does this relate to software again?

Creating the right path for a challenge

If something is too easy, we find it boring. If something is too hard, we dismiss it and don’t want to play. We can see this with Tic Tac Toe (discussed in the book). If you are playing a kid, they tend to lose all the time, until they grok it and then they can draw all the time and it instantly becomes no fun.

To do our best work, we need to cut the right path. When I think back to the best teachers that I had, they were the ones that created that path. They balanced enough repetitive thinking so my brain could happily learn patterns (it reeeeally likes patterns), but in a way where you were constantly growing and building. We have all heard the following said: “That teacher was great. They made Math fun.” Sometimes you may think it was the funny teacher, or the young teacher who let you get away with anything that would be the most fun. For me though, that wasn’t the case at all. It isn’t fun to not push yourself, or feed the brain at all. If you think back, you will probably find that your favourite teachers actually had very high expectations of you, they just also gave you a path with a good learning curve.

ASIDE: This is probably why I have found that my best teachers weren’t necessarily the smartest ones. It is hard to teach a tough concept to a student when it is innate and obvious in your own mind. A seminal moment for me in Math was when I sneakily changed teachers in high school.

The goal of the team on a software project should be to recreate this curve. That arc of the project needs to keep you growing in a way that has you enjoying the growth.

Why Rails?

There is another tension in software development. Once you get really good at a given technology, when does it make sense to jump to the next one versus staying the course?

I have been through this quite a few times. Take Web development as an example. I had my own Web framework when that was all the rage, and it evolved with the needs of my projects. I knew it intimately, it was nice and lean as it only had what I wanted in it, and there was room to grow. Fast forward to 2009, am I better off having fulfilled projects across a series of frameworks or platform, or would I actually be better off staying the course with my Web.pm and friends?

My personal framework breaks down fairly quickly when you think about working in teams with varied backgrounds, but beyond that I also find myself back thinking about “fun”.

A lot of developers jumped onto the Rails bandwagon as they thought it made Web dev fun again. Writing code that does real stuff feels more “fun” to me than the scaffolding of XML required by the big Java frameworks of the time.

I also believe that Rails did a fantastic job at giving people one of those nice paths to success. It is “easy” to get started using it, but there is enough to learn to keep you enjoying life in the framework.

There are a huge number of other factors of course, and the marketing and community that DHH created have a lot to do with the path that Rails itself has taken (good and bad). Both marketing and community are key as they can change the needle on perceived fun which is all that really matters.

Refactoring as a way to help the path

How can you help build the magic Happy Path? One way is by giving yourself the gift of time, and using it correctly.

Over time, code on a project can get crufty. If you are running fast and hacking together new features your source will become sludge and your velocity will suffer. At this point in time the coding becomes Less Fun to deal with (productivity goes down) and the brain runs into a steeper path which borders on “too hard”. Give yourself the gift of frequent refactoring and you may well be able to do the gardening that will keep the path green. Agile folk have talked about the benefits of paying forward through refactoring, and using testing to enable safety as you change things. You may also enjoy the act and art of refactoring itself, and creating functionality afterwards.

Refactoring also offers something else. It offers a way to better yourself as a developer. If you only ever write an API once, then you can only learn so much. If you are continuously evolving your systems you are trying out new tactics and approaches which you learn from.

“Project Plan” == Happy Path

This comes together and makes me want to revisit the light “project plan” and make sure that it is leading ahead, shining the light on the happy path itself.

Chunking your code

As I thought about the fact that our brain chunks what it does, and how it is probable that it doesn’t see the reality of the code, it makes me wonder. How does this affect our code? Shortly after we write it, we forget what we did. We probably forget some of the reasoning that made sense at the time. You may remember to put some inane comments in there if you are lucky, but that still won’t help too much with the big picture.

Since we can’t keep the exact code in our brain, how does that affect what we write? It makes me feel like the importance of a clean architecture, small modules, and simplicity really kicks in. Patterns can really help here too. When you cracked open an early Rails project, you would be able to understand a lot about the project based on the patterns that you are used too. That enabled a higher level of thinking about the project. If you can create your own higher level modules that build on each other then a lot of understanding comes along with you when you crack open a nice small module.

DSLs: Patterns are brain food

The DSL movement continues to grow in some ways (they had a DSL conference!) and in others it has always been there (SQL is a DSL!)

When you think of the pattern matching brain food, it makes me think of DSLs. Once more, if you let your brain learn those DSLs then it makes life easier to build products based on them.

Functional Programming == Pattern Matching

And the pattern matching logic of the brain brings me to another hot spot of current dev talk….. the re-rise of the functional languages!

Testing builds stairs

There aren’t many insights here per se. Refactoring, simple code, keeping things fun…. all good stuff that we kinda know.

We have all been on projects that aren’t fun, and progress is sloooooow. On the other side, we have also all been on projects where you can’t step away from the computer.

I had a reprieve of this only a short week ago. I was staring at some functionality in a project that was a lot of messy work and my brain wasn’t ready for it. It was only when I took a step back and plotted the Happy Path that things came together. By plotting “first, lets just get up the first stair” it kept me engaged. Then I continued to climb the stairs and the brain kicked in. Before I knew it I had reached the next level and things were done.

One way to build out the stairs on the path is by creating unit tests. Knowing that you have 40 tests completed lets you focus on the first. You know that if you keep learning and climbing you will get there.

If unit tests only helped you build the foundation for the stairs then rather than being “a waste of time and code we need to maintain” they become something much more. And of course, this adds to the fact that they are insurance for the future, and help you become a client of your own APIs immediately.

As you can see, I thoroughly enjoyed reading the book and day dreaming my way to apply it to software.

Aug 03

Open Source != Open Distribution

Open Source, Tech with tags: , 4 Comments »

opendistribution

With the iPhone / App Store debacle a lot of people are thinking about distribution these days. As more news comes in, I definitely feel a lot closer to taking the blue pill that is for sure.

I have also overhead several conversations in the last few weeks that conflate open source and the magic of distribution.

Alex (was so tempted to say Dylan here for a second, man! ;) posted about perspective and how not only is all open source not equal but that doesn’t make something on the lower end of the scale intrinsically evil.

I have to keep reminding myself of this. When a company comes along and open sources something I am open initially cynical due to the large usurping of the term “open”. If I feel that said company is using open source as a marketing vehicle only I get defensive. One example may be Flex and Adobe. You could look at the open sourcing of Flex with a wink and say “Erm, the core platform is proprietary, so by open sourcing the pieces on top….. nice work ;)” Or, you could see that Adobe has potentially added value to the Flex community there.

For one, there is huge value in having the darn source. For example, Francisco Tolmasky just said:

No amount of documentation can ever surpass just having the source in front of you (read: thank god webkit is open source)

If you run into a bug in Flex, you have another avenue to hunt it down.

However, that is just one important surface value. Adobe could potentially get so much more out of a more open development process, including the community, etc etc. They could do well to get some more points, although that doesn’t come without a cost to. Dealing with people is hard.

The thing is, the company in question gets to choose how they open source their software. When we jump up and down over the fact they use GPL, or how they don’t listen to us, we have to realize that. That doesn’t mean we have to be quiet, and that we shouldn’t review what their “opening” could mean…. but we can still respect them. I would love to see a podcast that talks about the various forms of “Open”. I think it would open up a lot of eyes to have rigorous discussion on various case studies.

To the distribution part. Open source is fine and dandy, but how do you get your bits out to real users? That is what matters, and that is what is causing the kerfuffle with the App Store. You are in lock-down. It shows us how friggin’ awful the mobile Web is compared to the wired Web. Imaging a world where you put a website up and had to ask ONE company “hey, can you allow people to go to mynewapp.com please?” makes you shiver… but that is the way of the world on far too much of the mobile Web. As locked down as Apple is, the world is still vastly better than the world where the carriers ruled the waves. Making those buggers just in charge and competing on creating the best pipes to the ‘net is something I can’t wait to see.

The Web won majorly due to distribution. As long as you can get someone a URL, you are there. Getting URLs to people keeps getting easier with various viral and communication systems. That Google thing helps connect the docs too.

You don’t have to look too far though to see the closing of the walls in some ways. Facebook, and the like. It seems that they have seen this though and instead of wanting to stay in their ivory tower, they want to bring the tower to all websites via Facebook Connect.

With the lens of distribution you can look at technology such as browser add-ons, Gears, Flash, browsers themselves and see that you need more than open source. It is fantastic that I could take Gecko or WebKit/Chromium and create a browser. That doesn’t mean that anyone will use it. I really like the path that Yahoo! BrowserPlus is on….. not just because they are open sourcing the platform, but because they are working on a strategy to allow people to create their own services. Gears punted on this issue. You could write up a spec and try to persuade the Gears team to put a new Gear into the toolbox, but that would be really hard. For one, it has to be tested and secured on the list of platforms that Gears supports. And, thanks for version 1, but what about maintenance? Tough problems. It still feels like we need to allow developers to “experiment on the edges” and the best platforms allow just that (hence, hoping that Y!BP takes off).

So, maybe we need a 100 point guide to open distribution to go along with the open source one? They definitely overlap. A good open source community driven process will get you some points on the distribution ladder, but you could also easily have an open distribution mechanism on a closed platform.