Thursday, October 15, 2009

karmic ubuntu on hp mini 1000

I've spent the last couple of days trying to get Karmic (beta) on a HP Mini 1000 (1030NR).

This is simple enough with the help of unetbootin. My problems started when I tried to get wireless working with the proprietary drivers. I have never enjoyed satisfaction with proprietary drivers and this occation was the same.

In the 'Live mode' the installed (jockey) happily identified the hardware and swiftly installed ssb broadcom drivers. Once installed jockey didn't seem to be `all there'. I couln't install the drivers.

What finally worked was to go to synaptic package manager and search for 'broadcom' and force a reinstall of the relevant drivers:

bcmwl-kernel-source and bcmwl-modaliases

After this, it all worked perfectly.

Monday, October 12, 2009

Tomcat6 on Fedora 11

I'm contemplating using Tomcat for my next project. I'm going to be developing on my Fedora 11 desktop.

I am new to this whole app server business and have spent this morning getting everything working. It shouldn't have taken that long, but it did.

My aim was to have some thing running on localhost which I could connect to and click about in. Compressed down in to a couple of steps I needed to do:
  1. yum install tomcat6 tomcat6-webapps tomcat6-admin-webapps
  2. edit /etc/tomcat6/tomcat-users.xml
    add the line:
    <user name="manager" password="tomcat_manager_secret" roles="manager"/>
  3. service tomcat6 restart
tomcat6 is a basic package. to get something which you can click about with when you point your browser at localhost:8080, you need tomcat6-webapps. To get the manager component, you need tomcat6-admin-webapps.

This sounds obvious enough now that I've done it.

Thursday, September 10, 2009

plotting for cairo

I've been using cairo quite a bit recently. Inevitably, i've found myself wanting to do some graphs. Instead of doing an exhaustive search on the internet, I quickly decided that there was nothing suitable out there and I should do my plots manually for my application.

Some weeks (months?) on, I've noticed that this is not a sensible approach. I've spent a little more time on the internet looking for solutions, and had some helpful suggestions on email lists.

The primary candidate is:
PLplot that provides an 'extcairo' driver. This driver will allow you to construct a cairo context in your app, pass it to PLplot, call PLplotting commands, and provide you with a nice graph plotted on your context.

An example is provided: http://plplot.sourcearchive.com/documentation/5.9.2/ext-cairo-test_8c-source.html

Up until now, I've been a heavy user of gnuplot. I'm currently interested in extending gnuplot to support this type of work-flow.

Friday, August 21, 2009

firefox 3.5 landscape printing orientation icon

I have recently upgraded to Firefox 3.5. I am experiencing pretty poor performance from it, but this is no different to 3.0 I was running previously.

I suspect that it is either: the extensions i'm using (adblock, noscript, cookiemonster?) or my machine setup: openSuse 11.1.

Today i'm posting on something which I have noticed: I think the 'landscape' icon in firefox printing dialogues is broken. This icon appears in 'page setup' and 'print preview' and I believe it should show the picture of a person rotated through 90deg anti-clockwise to be correct. Here is an annotated screenshot capturing the offending icon.
The same criticism could be leveled at the 'reverse landscape' icon.

UPDATE: it would appear that these icons are provided by GTK, not firefox.

Thursday, July 9, 2009

creating a custom widget with pyGTK

I'm working on a desktop app for Gnome.

I thought I'd write my own widget to display the results, and since I had made rapid progress with python, I figured I'd stick with it.

After a hour or so looking around the web, I found an excellent tutorial on extending GTK.Widget with Python:
http://www.learningpython.com/2006/07/25/writing-a-custom-widget-using-pygtk/
and subsequently found a link to some demo code on the gnome website:
http://git.gnome.org/cgit/pygtk/tree/examples/gtk/widget.py

So, now I'm armed with these resources, I can get hacking!
Next post: the results!

Thursday, June 18, 2009

Hamster time tracker on opensuse

I've got interested in trying to identify what I spend my time in front of my computer doing. I knocked up a python script to watch 'wnck' and 'dbus' for desktop events (dbus for screensaver) which is available on my website.

While I was thinking of alerting the gnome community to the embryonic work, I discovered the 'Hamster' applet, which apparently is aimed at fulfiling the same need as my scratchy program.

So, I visited the hamster site and cloned the git repository onto my machine. Then I went about configuring it.

For OpenSuse, this turned out to require a bunch of dependencies to be fulfilled, so I thought I'd record them here so others may benifit.


zypper install autoconf automake libtool glib2-devel libgconf2-dev intltool gconf2-devel python-devel
zypper install gtk2-devel python-gtk-devel python-gobject2-devel python-gnome-devel


I might have missed some out while going through my .history, but that should get you close.

I'm not sure how much this is an additional OpenSuse specific feature, but I needed to set $PKG_CONFIG_PATH which I set to: /usr/lib64/pkgconfig/ (i'm on 64bit).

Friday, June 5, 2009

PostgreSQL row overhead

As mentioned previously, I'm in currently planning a +1 billion row ingestion. I've begun to examine the on-disk storage requirements. Memory will be treated in a future post.

One of the properties of the dataset which I'm ingesting is that it is time stamped. Infact, there is not too much else other than timestamps. With one obvious representation, total cost of the data in a row is ~ 8+4+4+4+4 = 22 bytes.

However, what I didn't appreciate was that the overhead which PostgreSQL imposes on a row is ~34bytes! This figure has improved slightly in 8.3, but not significantly enough.

So a couple of options occur to me: use a data base with a smaller row overhead (MySQL?) or redesign the tables.

I've plumped for the latter. Basically I'm working the tables into a form where they are much squarer. Reducing the row count and increasing the amount of data per row. I'm using arrays to increase the amount of data.

This redesign has a cost, and without exact requirements from our users it's too early to tell if this decision will return to haunt me...