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 🙂
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 🙂
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.
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.
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.
Openstreetmap 2008
Very cool and inspirational video showing the progress of openstreetmap in 2008.
OSM 2008: A Year of Edits from ItoWorld on Vimeo.
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.
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!
YayArt covering my home
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.