Richard Jones' Log

Sun, 30 Sep 2007
Beware of Ubuntu Kernel 2.6.20-16!

A few days ago I noticed the Ubuntu updater saying there was a new kernel version for my Feisty desktop. Clicky clicky and it's installed. Reboot and everything's soooo slowwwwww.

Oddly enough, there's reports about this problem from way back at the start of May. I wonder why I was then prompted to install it in September??

category: News | permanent link
Sun, 30 Sep 2007
Shuttle HTPC update

It's been a while since my last post about my Shuttle PC woes, but I'm still getting hits, comments and emails from people who are having similar problems, so I thought I'd post my "solution".

In the end all of the on-board fan controllers died so I ended up hard-wiring the fan directly to the power supply via a single high-amp 56 ohm resistor (the resistance needs to be miniscule and regular resistors can't cope with the load).

As I mentioned in my last post I will never buy a Shuttle PC ever again and I certainly recommend to everyone I know that they also never buy one. Great idea (cool hardware) but crappy, crappy motherboards :(

category: Toys | permanent link
Wed, 26 Sep 2007
So how about "-tt" on by default?

I've just hit my first-ever logic bug in a Python program that is directly attributable to tabs-vs-spaces.

I had code that looked like:

def tasty():
    spam = some_complex_code_resulting_in_True
    eggs = some_complex_code_resulting_in_False
    if eggs:
        print 'yum, eggs!'
    if spam:
        print 'mmm, spam!'

I was observing that I was never seeing "mmm, spam!" when I really ought to have been. That the code was also a Django site - which I have a rather unhappy relationship with to start with - meant that I was looking all over the damn place to try to figure what was going on.

Of course the real problem was that I was coding on a remote system in vim and I didn't realise that I'd not yet configured it to use "expandtabs", though the tab stop was set to 4 spaces. So the indentation of the "if spam" block was actually tabbed in, thus forming part of the "if eggs" block.

Questions: anyone know why "-tt" is not turned on by default? Is there any way to turn it on for something like mod_python?

Update: hey, look, the .vimrc does have expandtabs set on... it's just not working for some reason. Hrm.

Mon, 24 Sep 2007
Another PyWeek is over - rejoice in new Python games

PyWeek number 5 just officially finished with the peer-based judging of entries complete.

Congratulations to the winners (Disk Field and Wound Up!) and everyone else who participated. This Pyweek saw yet another modest growth in particpation:

Challenge Entries People Finished
1 112160 26
2 78130 36
3 82143 30
4 102191 53
5 111220 50

Sadly, I couldn't compete this time. I even had to enlist some helpers to code up some new website functionality and sort out some of the administrivia during the challenge. Big thanks to them!

Yes, the web server melted down again - this time due to the default apache configuration of 256 processes not nearly fitting into the ~600MB virtual machine donated by tummy.com

category: Python | permanent link