Makeover time!

Sunday, 9 August 2009, 17:28

The Elphin site has been due a makeover for some time. I’ll be moving technical posts from my personal blog to here, and showcasing recent projects. Excuse the dust while I set it up – I’m exorcising ten years of cruft from the site!

There’s a bit of me in PHP!

Wednesday, 3 June 2009, 18:39

Last October I found a bug in PHP’s SOAP module. It was pretty obscure bug in the way PHP used Digest authentication. As it was a showstopper for me, I submitted a bug report and wrote a patch to fix it.

It took a while, but my patch has finally been merged into the 5.* and 6.0 sources!

I’ve been using PHP for ten years, and so it’s perhaps a little surprising it’s taken me this long to give anything back. Truth is, this was the first time I’ve come across a bug which halted my development work.

It’s a tiny fix, 6 lines of code, but it makes me happy that after all this time, finally, there’s a bit of me in PHP! Hurrah for open source software!

Using Doxygen help in QtCreator

Wednesday, 20 May 2009, 19:23

If you’re documenting your classes with Doxygen tags you might be wondering if you can use that help inside QtCreator and get those F1 tooltips whenever you hover a documented class or method.

I wondered the same thing, and it turns out Doxygen needed a little tweaking to make it work. Karsten Heimrich at Nokia rather kindly wrote a patch which will eventually make it into Doxygen, but if you have burning desire to try this, here’s what you do….

Patching Doxygen

Once I hear that Doxygen includes this patch I’ll remove this section – so if you’re reading this, you probably need to patch. So, lets grab the latest sources and apply the patch.

svn co https://doxygen.svn.sourceforge.net/svnroot/doxygen/trunk doxygen-svn
cd doxygen-svn/src
wget -O doxygen.diff http://blog.dixo.net/doxygen.diff
patch < doxygen.diff

cd ..

Then configure and build doxygen with any options you might need. Most people should be able to simply do this

./configure
make
make install

You should how have the patched doxygen in /usr/local/bin.

Generating the help

There are some Qt Labs posts on generating Qt Help from Doxygen, but here's a quick run through:

To generate a Qt .qch file you'll need the following entries in your doxygen configuration file


GENERATE_QHP = YES
QCH_FILE = /path/to/output/helpfile.qch
QHP_NAMESPACE = com.yourdomain.subdomain
QHP_VIRTUAL_FOLDER = yourfolder
QHG_LOCATION = /your/path/to/qt/bin/qhelpgenerator

Run patched doxygen and you should end up with a .qch file in the filename given by the QCH_FILE option. Almost done!

Installing the help in Qt Creator

  • Go to Tools -> Options -> Help, click "Add" and browse for the generated .qch file.
  • Click OK and your namespace should now be listed in the registered documentation box
  • Click OK to dismiss the options dialog
  • Now for the important bit - restart Qt Creator. If you don't do this, the help doesn't get propertly integrated into the IDE, at least on Qt Creator v1.1.

That's it! Now hover the mouse over one of your documented classes and you should get a tooltip suggesting you press F1.

Documentation nirvana! Again, my thanks to Karsten Heimrich for writing the patch, hope someone else finds this useful!

Ammotin is coming!

Monday, 27 April 2009, 23:35

I’ve been spending a lot of spare time recently building a desktop application aimed at geocachers and walkers called Ammotin. As it is approaching a point where is becoming useful, I’ve set up ammotin.com to track the development and gather feedback.

Stay tuned to ammotin.com for more updates!

I’m a Qt Convert!

Tuesday, 31 March 2009, 22:11

Once upon a time, I used to do a lot of GUI app development. My professional career started back in 1993 writing Windows 3.1 apps in C, and continued for several years, switching to C++ and using the MFC framework. But from about 1998 I found myself steadily doing less native GUI application development, and more and more web server based work.

While I enjoy all the work I do, I do miss being closer to the machine. The average PC is ridiculously powerful these days, but your average web application can’t do much with that power.

I’ve switched my home desktop to Ubuntu recently, and loving it. But, there’s a few Windows apps I miss. What’s a developer to do? What is a developer, skilled in C++ GUI development, to do, eh? Answer me that.

The recent release of Qt4.5 and it’s accompanying licence change couldn’t have come at a better time. I had an itch to scratch, and it looked gooood. One simple install, and you have a great IDE, a GUI designer, and a stack of great classes and widgets. I was sold on the ease of integrating a WebKit browser and the fact I could build a ECMAScript based scripting engine for my app. But there’s so much more! I was a little skeptical of the smoke and mirrors behind the signals and slots paradigm, but having used it for a weekend, I’m sold.

Bottom line is that I spent more time writing my app than figuring out the framework. There’s hardly any “boilerplate” crap in each class. Once you’ve written your first signal and slot handler, you’re away. It’s all thriller, and no filler :)

As if that wasn’t exciting enough, recompiling for Windows and Mac is easy too. Qt doesn’t just get you closer to your machine, it gets you closer to *all* machines. Hallelujah, Flying Spaghetti Monster be praised, I’ve rediscovered a love of programming I didn’t know I’d lost.

Anyway…..

I don’t want to say too much about the app I’m writing, aside from the fact that it’s aimed at geocachers. It’s called Ammotin, and will probably get released much later in the year. I think it will be spectacular, because Qt has got me so fired up and focussing on the app, that I don’t need to worry too much about the framework.

Am I over excited?

Using Qt Creator with Ubuntu 8.10

Saturday, 14 March 2009, 17:26

The recent change of licencing model for the Qt toolkit got it a lot of press recently. My GUI-based development experience is all Windows based, using MFC and wxWidgets. As I’ve found myself using Ubuntu and OSX a lot more recently, the idea of using Qt to write software to run on Windows, Linux or OSX has some appeal. Of particular interest was the ease with which you can integrate WebKit, allowing you to embed web capabilities into a cross-platform app with ease.

Installation under Ubuntu 8.10 is straightforward, but I’m writing this post just to note the install steps I took. Hope it helps someone!

  • Download and install the SDK, which includes an IDE
  • Once installed, there’s a few packages you’ll need to ensure your first build completes:
  • sudo apt-get install libfreetype6-dev libfontconfig-dev libxrender-dev libsm-dev libglib2.0-dev

Now you’re good to go!

Edit: Edvaldo in the comments noted he needed to install some additional packages as follows:

  • sudo apt-get install libxext-dev libxext6-dbg x11proto-xext-dev

Stack Overflow

Tuesday, 16 September 2008, 7:38

Stack Overflow opened its doors yesterday after a closed beta test period of 6 weeks or so. At first glance, it’s a programming support forum, but it has interesting mechanisms to ensure the signal-to-noise ratio is high.

Borrowing from the idea of XBox360 achievement points, Stack Overflow awards its registered users “badges” for partipating in the site and exploring its features. Some badges are easily won, such as “Autobiographer” for completing your profile. Others might take some time, such as “Necromancer”, for successfully resurrecting a year old question with a popular answer!

Added to that is a system of karma, or reputation, where your contributions to the site are voted on. If someone likes one of your answers, or thinks you asked a good question, they can vote you up, giving you more reputation points. If your answer is the preferred answer to a question, you get even more. It works both ways, if you post something dumb or irrelevant, it will get voted down, lowering your reputation .

The key thing is that your reputation level influences which site features you have access to. It gradually exposes more moderation features to you as you contribute more to the site. For example, earn 2000 reputation points and you get the ability to edit and delete other people’s posts.

If it works, the site will practically run itself, but it will be interesting to see how much people try to game it and abuse additional privileges. Some of these ideas might even be applicable to how Geograph’s moderation system works, so it is doubly interesting to me.

Anyway, if you have a programming question, give it a try. Most questions seem to get answered withing a few minutes, and it certainly beats Googling and getting one of those paywalled Experts Exchanges pages!

VMWare enable 100% reduction in server electricty costs from August 12th!

Tuesday, 12 August 2008, 17:15

How? By stopping you running any virtual machines!

I’m about to evaluate VMWare ESXi server both for work and various side projects.

Sadly, VMWare tripped up today, by rendering it impossible to start a virtual machine if the date was August 12th 2008 or later. The VMWare forums are awash with disgruntled customers, starting with irate aussies as their country was one of the first to enjoy the excitement of August 12th. Aside from a short KB article, VMWare are staying tight lipped, and being a little tardy with it, promising a fix in 36 hours.

While ESXi may be free now, I’ll be taking a closer look at the alternatives. Hopefully VMWare will publish something which restores confidence…

Geograph Torrents

Monday, 30 June 2008, 22:03

Something Geograph has needed for some time is a way to get at the entire archive without causing us huge bandwidth bills – it’s currently around 100GB in size.

So I’m please to announce http://torrents.geograph.org.uk/ where you will be able to download the entire archive via BitTorrent!

More details…

We’re going to release the archive as a series of volumes, each containing around 50,000 images and weighing in at around 5GB. The first volume is available now, with a smaller sample volume which allows you to preview how the metadata is delivered.

All the metadata for each volume is delivered as a RDF formatted file called manifest.rdf, which should be self explanatory, here is a sample fragment:
Look

<rdf:Description rdf:about=”00/00/000014.jpg“>
<dc:identifier>http://www.geograph.org.uk/photo/14</dc:identifier>
<dc:title>Durdle Door from the east</dc:title>
<dc:subject>Coastline/Beaches</dc:subject>
<dc:creator>Helena Downton</dc:creator>
<dc:dateSubmitted>2005-03-06T10:20:26Z</dc:dateSubmitted>
<georss:point relationshiptag=”is-picture-of”>50.6205085825182 -2.27398572077417</georss:point>
<georss:point relationshiptag=”was-taken-from”>50.6211552007986 -2.26663784055893</georss:point>
<dc:licence>http://creativecommons.org/licenses/by-sa/2.0/</dc:licence>
<dc:format>image/jpeg</dc:format>
<dc:type>http://purl.org/dc/dcmitype/StillImage</dc:type>
<dc:publisher>www.geograph.org.uk</dc:publisher>
</rdf:Description>

How to download

If you are new to using bittorrent, you will need some software, such as Vuze (aka Azureus) or uTorrent. Once installed, go to http://torrents.geograph.org.uk/ and click a torrent link to set it downloading – easy!

Please seed!

Please seed these torrents if you are able – simply leave your torrent client software running after your download has completed. You’ll be helping others to complete their downloads faster!

Pastebin post filtering

Sunday, 16 March 2008, 7:56

As there’s been some cases of cracked email address lists being posted on pastebin recently, this week I tweaked the spam filtering to block such posts. A few legitimate posts got caught in the crossfire, causing a few more tweaks to the rules.

If you’re having trouble posting something because pastebin says it looks like spam, post a sample in a comment below and I’ll see what I can do to improve it!