Categories
Blog

Bridging the gap between web applications and desktop applications

Google gears has been touted as the answer to offline web applications, but so far very few sites have adopted it. Maybe its because exactly what makes web applications great is the fact that you can communicate with people in real time, or maybe its because adopting a non-trivial web site to work with gears is a very significant task, or maybe its because gears was never bundled with a browser by default (until now).

One area where it really makes sense is for email. Google of course realized this, but it took them a complete phone stack before they actually did it 🙂 The only other thing that I use geagle for wordpress, but that’s only speeding it up. So contrary to the gmail integration it doesn’t allow you to read, modify and post while offline.

Even with the ubiquity of fast wireless 3G connections coupled with netbooks, the offline support is a welcome change to gmail and only adds to the already long list of reasons for using gmail. It still amazes me that google was able to deliver a new email client at a time when at least I thought the webmail race was over. It really just goes to show that building rock-solid products is still king. Not just time to marked. And that is really good news for the ones of us that still care about that 🙂

Categories
Blog

Vdpau without tearing

Acmelabs made a great blog post about how to install the latest nvidia drivers (180.29) and set them up to avoid annoying tearing. I installed it on my system and it A/V sync has also been much better so far. Upgrading heavily recommended 🙂

Categories
yayart

Yay, lot of things happening at YayArt

Yay! Bunch of new 21st century art on YayArt. And we have a new competition, Art for better health, with some awesome submissions. Really think they’ll put a smile on the face of people at the hospital. And also make sure that you take our survey, if you want to help us better understand how you use the site and have a chance of winning a 90×90 canvas 🙂

It appears that the Yay Nay voting system has spread to shoes as well 🙂

Categories
Blog

Distributed development using bzr

It’s no secret that I have been a big fan of distributed development tools for a while. One of the maybe best things about them is that they have almost zero overhead settings up. This means that the biggest argument for not using (are there really any?) a version control system is gone. We have been using bzr in MMS for quite a while and recently the core team of developers with access to the source code has grown quite a bit.  So we started having trouble with revision numbers, since they are in a distributed version control by definition not absolute. But fear not, there is a good solution to “work around” that problem. One that goes well with the good idea of having multiple branches. I’ll just use mms as an example. First thing to do is to create a local main branch, a mirror of the what is available on the web:

bzr get http://bazaar.launchpad.net/~team-mms/mms/1.1.0 mms-1.1.0

Now we have a local version of the main repo. So lets branch that for our own changes:

bzr branch mms-1.1.0 mms-1.1.0-arj

Then whenever I want to do something I just work in mms-1.1.0-arj. Commit to that locally. Then when the changs are look good enough to be push, do a bzr pull in the main repo, bzr merge ../mms-1.1.0-arj. Then bzr push to push the changes to main repo.

When changes come in from other people through local the main repo, just do a bzr merge ../mms-1.1.0 inside the mms-1.1.0-arj directory.

Futhermore if one is working on a big new feature, it might be a good idea to create another local branch just for that. This makes it easier to track everything in the long run.

Categories
Blog

Small review of Cory Doctorow’s Content

Content, is a new book by Cory Doctorow filled with small essays. Essays ranging from 2 to 10-15 pages in length, so they are quickly read but still takes some time to digest because of the depth. Cory knows his stuff and it really shows. The book includes the now infamous DRM talk at Microsoft. Not that they have learned much from it it seems 🙂 And a lot of other good stuff, including stories on how he deals with copyright in an internet age using Creative Commons.

The good thing about the short stories is that they are easy to go through, so I found myself just wanting to read one more. The bad side of putting that many short stories in there is that the stories can be a little tiring when many of them are about the same subject.

The whole book can be downloaded from here (CC licensed) in a variety of formats.

Categories
My Media System

Experiences with nvidia vdpau support in mplayer

Updated: Fixed a bunch of issues by using latest patch for mplayer from here.

I installed a nvidia 9400 fanless graphics card today. I’ve been hearing good things about the rate of their driver development so I thought I’d try it out. My experiences after having tried the latest 180.18 drivers is:

  • A good deal of 1080p mkv’s still crashed after a second or so of playback. Even with the hack posted here.
  • cpu usage is very low (max 20% and the cpu is at 1GHz)

I changed it to my default movie player in MMS to use vdpau by default with the following script to detect extension as vfm is not working yet. Linux kernel was 2.6.27-r2 in case anyone is interested.

Categories
Blog

Openstreetmap 2008

Very cool and inspirational video showing the progress of openstreetmap in 2008.


OSM 2008: A Year of Edits from ItoWorld on Vimeo.

Categories
Blog

Scoping rules in c#

What a dull subject. Exactly so because it’s supposed to be a done deal, I don’t hear many people arguing about scope rules anymore. That is why I was so suprised when the compiler complained about some perfectly valid code I had written.  At first I thought it was only a peculiarity of the way closures are implemented in c#, but as I dug deeper, the scoping rules of c# seems to be… well just annoyingly stupid. Lets start with a simple case:

OleDbCommand command = SQLServer.CreateCommand();

if (true)

{

OleDbCommand command = SQLServer.CreateCommand();

}

I don’t think many people would argue that is just bad programming practice, but look what happens if we just change it a little:

if (true)

{

OleDbCommand command = SQLServer.CreateCommand();

}

OleDbCommand command = SQLServer.CreateCommand();

This fails with the exact same error. Apparently the command of the if statement prevents the other command from being declared, but since you can use command anymore this is just plainly wrong.  Furthermore closures behave the same way:

VoidFunction t = delegate

{

OleDbCommand command = SQLServer.CreateCommand();

}

OleDbCommand command = SQLServer.CreateCommand();

Please note that the closure has just been declared. For more discussion of the examples see this thread on stackoverflow.  I followed up with a question of why the language guys at microsoft would have made such a bonehead mistake and there wasn’t any good reason in my mind.  I’m still puzzled why the compiler wouldn’t just issue a warning, but maybe warnings is one of those things they hated about C++ and decided it was just easier to swing the big No-hammer and be done with it.

Categories
Blog

Writing readable regular expressions

I was talking to Ole today about regular expressions, and one of the problems with regular expressions is that it, like SQL, compounds the actual problem into on string, thus making it very hard to read again. Luckily we now have ORM’s to take care of most of the SQL mess, but regular expressions hasn’t received the same kind of limelight. I immediately thought that one could use a similar technique to deal with the regular expression problem, just by expression it as a language (DSL) and running something like LINQ on it. And of course, several people has already been doing this. Nifty stuff!

Categories
yayart

YayArt covering my home

Almost forgot to mention that Yayart did an interview with pictures from my home of the art I bought. You can read it here.