Thoughts on the new browser wars
Disclaimer: I work for Microsoft but these opinions are mine alone. And I work far, far away from anything resembling browser technology :-)
Google's Chrome has got the usual suspects all in a tizzy. My take? It'll be *really* interesting to watch if Google distributes this with their toolbar.
I was also fascinated by the depth of technical detail in the comic. It is not often that you see a description of conservative and precise GCs in marketing material. You see some common patterns emerging in the browser world.
Websites as processes
One direction the browser world seems to be moving to is 'one url - one process'. One thing I haven't seen in all the blog coverage is any mention of IE8 implementing the same design (announced several months ago). I do like Google's twist on this idea of implementing a task manager within the UI (in IE, you would probably have to look it up in the task manager yourself). By doing this, users will now start to blame the true culprits of bad browser behavior - websites and the plug-ins they use. Have a website running a Flash ad hogging up CPU? You'll be able to spot it instantly instead of frantically closing tabs trying to see who the culprit is.
The interesting side-effect is that, for the first time, web applications will be first-class processes to the underlying operating system and will be treated as such. However, there are downsides to this approach. You're going to use more memory as there will be code+data duplication across processes. Threads (which IE used for individual tabs) are much more lightweight to launch and in terms of memory usage. It just won't be possible (atleast on NT processes) to launch with the same speed as a thread.
Javascript VM advances
All of the major browsers are speeding up their JS implementations. However, each is taking a different approach. If you're a VM person, there's a lot of interesting work being done here to study and learn from. Here's a quick reference list.
Google's V8
For several months now, there have been rumors flying around of a super fast dynamic language VM being implemented by Lars Bak and his team. Lars is well known in the VM world for his work on Self, StrongTalk and the Java HotSpot VM. Some of the v8 optimizations we know about
- Hidden class transitions
- a fast JIT (presumambly supports x86. My guess is that ARM support will come soon, if not already present)
- incremental garbage collection
Lars has a talk at the JAOO conference where we'll probably find out more.
Mozilla
The Mozilla folks seem to be focusing on integrating Adobe's Tamarin with Spidermonkey. From Brendan Eich's recent post
- Bigger bytecode cache
- Polymorphic property cache
- A tracing JIT based on trace trees
Internet Explorer
I know that the folks who work on the Javascript runtime in IE have been hard at work. Here's the work for IE8 that they've shared publicly *so far*
- Adaptive GC
- Treating sparse arrays and dense arrays appropriately
- Optimized string concatenations
The bleeding edge of VM technology seems to have shifted somewhat from VMs like Java and CLR to the ones that run dynamic languages - be it the new Javascript VMs or getting existing VMs to run dynamic languages. This should be interesting to watch.
Changes
Last week,I moved to a new team at Microsoft. Unfortunately, I really can't talk (yet) about what my new team does and what I do. All I can say is that it involves the 'cloud'. Don't worry though - you'll find out everything at the PDC. In fact, I'm tentatively signed up to a do a talk on the stuff I work on.
One interesting tidbit about my new team - Dave Cutler is a part of it and in fact, sits on the same floor I do now. I'm still trying to cook up a work-related excuse to meet him :-)
The origins of second price/Vickrey auctions in AdWords
Popfly - creating games the easy way
I can't believe I missed this video! Watch till the end for an awesome Master Chief moment
Firefox 3 virus scanning
I consider myself reasonably familiar with the APIs that ship with Windows and I'm surprised whenever I come across some new API that I had never heard of before.
In a lunch discussion with Aarthi yesterday, I mentioned Firefox 3's virus scanning. Browsers have done this in the past (IE7 does it silently and prompts if it finds something evil) but seeing the explicit notification gave me a sense of security.
We got into a debate over how Firefox must have implemented it. My first guess was that Firefox must be using some online service which checks URLs - this would be similar to how all modern browsers support anit-phishing. However, that doesn't make sense when you consider how compute intensive virus scanning is. Doing it as a service for a popular browser would be a non-trivial effort.
I did some digging later and found this bugzilla bug which pointed me to the right path. It turns out that Windows has *2* in-built APIs to scan files for viruses. Relatively unknown (atleast to me), they wrap around the installed virus scanner.
The first one if IOfficeAntiVirus and the other is IAttachmentExecute. IAttachmentExecute, which is supported on XP SP2 and upwards, IAttachmentExecute (which is used by IE6 and 7 ) does a lot of magic behind the scenes - from supporting NTFS alternate streams to enumerating the installed virus scanners for you.
I'm amazed at the breadth of APIs you find across Windows!
Recursive generators are elegant
I just wrote a piece of code which drove home how simple and elegant generators in Python can be. I needed to loop through a *very large number* (lots and lots of digits) and though I needed only the string representation of the number, I couldn't write the loop in the typical fashion since the number was too large for Python to handle.
This is what I came up with. Does anyone have suggestions on how I can make this prettier?
def generate(prefix, remaining):
if remaining ==0:
yield prefix
else:
for i in range(0,10):
for number in generate(prefix + str(i), remaining-1):
yield numberfor number in generate("", 25): #25 digit number
print number
Zune and ZunePass will change the way you listen to music
Disclaimer: I work for Microsoft but these opinions are my own, yada, yada. And I have nothing to do with the Zune team.
Here's the short version - paying a low monthly fee and being able to download as many songs as you want is killer. I've downloaded over 1000 songs just in my first week and I'm going strong. And the 'social' works.
ZunePass is the Zune's subscription service. You pay $14.99 per month and you can download any number of songs from the Zune marketplace. Since it is a subscription service, you lose access to the songs once you stop paying the monthly fee. Sounds DRM (it is) and evil, doesn't it? Not quite.
I'm staunchly anti-DRM. And I'm a huge fan of Apple's devices. I did all my music shopping on Amazon's MP3 store and listened to all my songs on my iPhone. When Mel Sampat asked to get a Zune, saying that it will change my life, I thought he was joking. But Mel was persistent and I went and got myself a red Zune 80 custom engraved from Zune Originals. I will post a review on the device soon but I wanted to talk about ZunePass and the Zune software first.
Exploring is a lot easier
Buying songs on Amazon/iTunes is cheap but not free. I bought a lot of songs but I would buy them only if I really wanted them. I would rarely take a chance on an unknown artist or song or album.
With ZunePass, since I'm not paying per song, I find myself spending several hours randomly browsing through the Zune marketplace. I'm trying out *way* more artists and songs. Example? Someone on the internal Zune mailing list gave a thumbs up to William Shatner's (yes - *that* William Shatner) 'Has Been'. That's an album I would have never risked money on - but guess what - it's actually quite nice.
The closest analogy I can come to the exploring I do is how we browse through Wikipedia - where you click on an article and find yourself reading a totally unrelated article a couple of hours later.
If the Zune marketplace gains popularity, I'm willing to bet that we would see some interesting changes in how artists become popular. When you have to pay nothing to try out a new artist or a new album, it removes ton of 'impedance'.
I went crazy this morning on ZunePass downloading old Tamil and Hindi movie songs from ZunePass. My Tamilian readers will understand why I'm so excited about getting songs from movies like 'Mr.Bharath' or Duet or more recent movies like Bombay. The selection of world music, atleast the Indian section, is quite deep and is very up-to-date.
I can hear a lot of folks (especially all my college friends reading this post) saying "You already get this from Bittorrent". Apart from the legal aspect and quality aspect, you're going to have a lot of trouble finding seeds for rare or unpopular content.
Under the right circumstances, DRM isn't so bad
There. I said the unthinkable. Here are the limits the Zune DRM puts on you
- You can listen to your music on three given machines at any time, For me, that's my home machine, my work machine and my laptop. I stream content from my home machine (over UPnP) to my XBox 360 hooked up to my home theater system.
- You can take it on your Zune device if you have one
- You lose access to your music once you stop paying the subscription fee. Of course, if you wanted to, there's an option to buy the song outright as well (ala iTunes or Amazon's mp3 store)
I've been using it for a week now and I don't find any of it limiting. The biggest blocker for a lot of people will be lack of native Mac or Linux support but I guess Parallels/Bootcamp/Fusion can help out in that regard. Another big blocker is that these songs don't work with iPods - so you'll have to listen to these songs from your computer alone or get a Zune. As I've found out in the last one week, the new Zunes aren't bad at all.
This made me think - is all DRM evil? Without DRM, there's really only one business model - buying each song or album. DRM, *implemented correctly*, lets you 'rent' content and doesn't necessarily mean a bad user experience. I have a feeling that there are a lot of people out there who will be happier with the renting model (due to the dramatically lower prices) for some forms of content.
'The social' works
Finding songs and artists to listen to based on what your friends are listening turns out to be an exceptionally good model. In my case, a lot of my friends are doing the same sort of exploration I talked about above so I get to reap the benefits of their effort. At the top of this post, you can see my Zune card with a live updated list of the songs I listen to, my favorites, etc.
It's incredibly cheap
I've already downloaded over 1000 songs in the short time I've had a Zune. I'm sure I'm going to get several thousand more over the next year or so. Paying $1 or so per song for thousands of songs would be *very expensive* when compared to paying a flat $15 for per month .
Archives
November 2004 January 2006 June 2006 July 2006 August 2006 September 2006 October 2006 November 2006 December 2006 January 2007 February 2007 March 2007 April 2007 May 2007 June 2007 July 2007 August 2007 September 2007 October 2007 December 2007 January 2008 February 2008 March 2008 April 2008 May 2008 June 2008 July 2008 August 2008 September 2008
