How to restore grub with a live CD en

By drm on Saturday 12 March 2011 14:23 - Comments are disabled
Category: Linux / BSD, Views: 3.528

I borked my primary boot device’s grub installation last week because I wanted to start Windows 7 to play some LAN games. Windows 7 wouldn’t boot from grub, so I thought I’d install a new grub version. I reinstalled grub before regenerating the config file and rebooted. Too bad the Arch packages don’t handle that for you, as I was used to in Debian. This caused the grub to fail booting both Windows and Arch, so I resorted to changing my primary boot device in the BIOS.

Now, one week later, I decided to fix it, and as I can never recall by heart what the steps to take are, here’s a recipe, pretty much for my own convenience.

I’m running Arch Linux currently, but the same principle should work for any Linux flavour you might be using.

Read the entire post at

Unit testing and Drupal; what's wrong with this picture? en

By drm on Sunday 20 February 2011 23:00 - Comments are disabled
Category: Development, Views: 5.608

I guess the guys at didn’t really understand the concept of unit testing. In comparison to the Zend Framework 1.13 and Symfony 1.4 test suites, of which some tests did not pass mainly due to some configuration issues (98.6% and 99.9% respectively), Drupal had some, let’s say, surprising results. Though it reported 100% of the tests to pass, 2 fatal errors occured. That might indicate expected fatal errors, but I doubt that. But the real surprising bit was that the tests took nearly 2 hours (!!) to finish.

Read the entire post at

Enhancing Python unit tests further with decorators en

By drm on Sunday 13 February 2011 17:55 - Comments are disabled
Category: Development, Views: 3.495

Decorators in Python are awesome. In follow-up to my previous post on a missing feature in Python’s unittest module in comparison to PHPUnit, here’s the implementation of PHPUnit’s @expectedException annotation in form of a Python decorator

Read the entire post at

Endless scrolling based on a simple HTML pager en

By drm on Tuesday 8 February 2011 22:53 - Comments (19)
Category: Development, Views: 6.290

We had a little brainstorm today at work at how endless scrolling could be best implemented utilizing progressive enhancement. Here’s my idea and a proof of concept. And a good example of progressive enhancement in pure form, if I may say so.

The concept

When I think of endless scrolling, I see it as just another form of paging. Any content asynchronously loaded when scrolling down is in fact the same you would have seen when an ordinary pager was implemented, clicking on a link “next”. In practice, you don’t see the page change, the content is just loaded below the content already there.

Read the entire post at

PHPUnit style dataProvider in Python unit test en

By drm on Monday 7 February 2011 21:40 - Comments are disabled
Category: Development, Views: 4.313

PHPUnit has a handy feature with which you can provide testdata to your tests. This is called a data provider, and is implemented by annotating a test with @dataProvider methodName. Python’s unittest module doesn’t seem to have such a feature.

Read more