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
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
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
Blog

Little Brother

I finished reading the new book Little Brother by Cory Doctorow tonight. It’s a really exciting book, one that leaves you wanted to read just a few more chapters before you fall a sleep. The book is about a not-so-distant future in which San Francisco is attacked by terrorists. And how the whole system is turned upside down because of the event. Besides the main story which is really good, the book is sprinkled with reference to geeky stuff like Tor, Electronic Frontier Foundation and crypto. The book is also stuck full of good humor, like the following quote:

the only person who’d spoken to me was a Jehovah’s Witness and a Scientologist, both trying to convert me. It felt gross, like being hit on by a pervert.

I was a little sceptical about the book at first, since I’ve read some his earlier works and I wasn’t that big of a fan of Down and Out in a Magic Kingdom. So I downloaded the book for free (CC-licensed) and started reading it on my laptop. After the first chapters the book really caught me, and I ordered the book on amazon, thinking I would read the rest of it when it got here in physical form. Of course I couldn’t let go of the book and finished it of before the amazon order has arrived. That doesn’t mean I’ll cancel my order, the book is really good and Cory deserves the praises he has been getting for this book.

Categories
Blog

Remix: Making art and commerce thrive in the hybrid economy

Just finished reading Lessig’s latest book. I’ve been widely fascinated by his earlier work, but this one falls short compared to his other work on the subject of copyright in modern society. The first two parts is more or less just rehashing of old ideas, while the last part, about the future, is where the book really shines. More specifically it mentions five ways in which we can actually change copyright to make it better suited for the world we live in now.

He presents an interesting story about the problems they had in the southern states of America with racial discrimination. The problem was that if stores opened their doors to African Americans then they would be seen as pro-black and loose a lot of their original business. So in 1964 (!) a law was passed that made discrimination in public restaurants and other related establishments a felony. This changed the game completely. This reminds me of a law that was passed not that long ago in Denmark, that made smoking in the same kind of places a felony.

Categories
Blog

Google as a spell checker

If you also have been using googles “did you mean” function as a spell checker for words, you might find this funny:

  • Open google
  • Type in exadurate
  • Click I’m feeling lucky

🙂