warning: Creating default object from empty value in /home/townxorg/public_html/modules/taxonomy/taxonomy.module on line 1364.

External validation of programming skill

We've had some bad news here over the past week or so: OpenAdvantage will go under wraps at the end of September. No money is available for the project to continue, so, consequently, we're all job hunting. This has resulted in a lot of soul-searching for me, an urge to hone my skills, and a need to work out what I'm really capable of. I started looking around on the web for self-tests I could use to determine my skill level and find out where I'm rusty. Like many open source types, I can turn my hand to pretty much anything, but have few certificates to prove it. The training courses for Linux certification, MySQL, etc. are very expensive and time-consuming; I was looking for something cheap and quick, to provide a rough indicator of my skill level. Here are a few resources I found useful:

  • JavaBat is a series of free, online Java practice problems. They are pretty simple, but very useful for reminding me of some parts of Java I'd otherwise ignore.
  • oDesk is a marketplace for remote workers. You can put your profile up there, bid for jobs, search for work, build teams, post jobs etc., all from the comfort of your web browser. The reason I like it is that they have a series of free tests you can take, which you can use to get some proof of your skills. Given that there are around 18,000 contractors on there, a potential employer can get an idea of where your skills sit within that pool. For example, I scored 3.6 out of 5 on the Ruby on Rails test, putting me at rank 15 in the pool of 83 people who've taken the test (of which 49 passed). You can see my profile here.
  • BrainBench is another US company providing some online tests for free, and lots more if you pay. My public transcript demonstrates I'm a bit rusty on Java, but better than I thought on Apache (3.99 out of 5, in the top 14% of test takers). Perhaps I should be an Apache administrator... You can also add your BrainBench certifications to oDesk, which is pretty nifty.
  • Transcender provides a range of free Microsoft (gasp! shock! horror!) tests for download, to practice for the MCSE exams. I'd always been intrigued by this qualification, and wanted to find out how whether it was actually difficult, so I did a few of the tests. I tried the one on .NET (bearing in mind I've never written more than about 6 lines of it), and I managed 40% on a multiple-choice test. Even more astonishing was that I scored 60% on the SQL Server test, and have hardly used it (though I did do a SQL Server course about 6 years ago). Ironically, the harder tests seemed easier to me, because they are more generically about design than specifics of the applications or languages. The SQL Server one, for example, gives you a case study and asks you to build the application to fit the requirements, which I've done plenty of.
  • I also found out about the CIW (Certified Internet Webmaster) qualification, which I'd seen as requirements for a couple of job adverts. Anyone heard of this or have it? I've ordered a cheap second-hand book from Amazon because it might be worth reading up and taking the exam (for £90).

Even though these services haven't had widespread coverage or acceptance in the UK, they're better than nothing, and a quick way to brush up your skills and identify your strengths. It's occurred to me over the past couple of weeks that programmers need external validation, particularly those of us who work with open source. I'd like to see cheaper, more readily-available courses available for normal developers who work independently or in their spare time, to help fill this need.

If anyone knows of any other self-tests (e.g. where's a good place to sharpen my Python skills?), please add a comment.

Removing a password from a PDF on Linux

I just bought a PDF, legally, from a publisher's website. However, in their wisdom, they decided it would be a good idea to password protect all legally-purchased PDFs. This means that each time you open the PDF using Acrobat Reader, you have to remember and type in the password to read it. (Evince, the built-in PDF viewer in Linux, allows you to permanently save the password, but I tend to use Acrobat as it copes better with some PDFs.)

So, if you know the password for a PDF and want to remove it, you can use the command line tools pdftops and ps2pdf to free your PDF from its chains.

  • Install pdftops. On Ubuntu, you can do:
    apt-get install xpdf-utils
  • Install ps2pdf. I think this is already included with a default Ubuntu.
  • Convert the PDF to a postscript file, using the password:
    pdftops -upw <password> <file>.pdf
  • Convert the resulting postscript (which is now sans password) back to a PDF:
    ps2pdf <file>.ps

The only thing you lose are any PDF-specific features which don't translate to postscript, e.g. hyperlinks.

Remember, this only works if you know the password for the PDF: it doesn't break the PDF password for you.

Dell laptops with Ubuntu have arrived

Finally, you can now, in the UK, buy a laptop with Ubuntu pre-installed. This is fantastic news. I'll definitely be getting my next laptop there. Just imagine: a laptop with no hardware/Linux compatibility issues. How cool that would be?

I tried putting one together and managed to get 2048Mb RAM, dual core 1.73GHz Celeron processor, plus the basics (basic DVD/CDRW drive, no accidental damage cover, basic screen etc.) for £512. Not bad at all.

LUGRadio Live this weekend

LUGRadio Live 2007 is running tomorrow and Sunday. I can't make tomorrow (which is a shame, as most of the good talks seem to be on Saturday), but will be popping in for Sunday. See you there if you're going. If you're not going, I'd recommend it if you're at all interested in free and open source software: I've been to the previous two events, and thoroughly enjoyed both. This year (unlike last year) I'm not doing any talks or BOF sessions, so will be able to just have a good nose around and enjoy the talks. At £5 to get in, it's a snip.

Open source showcase report

The Open Source Showcase at OpenAdvantage on 20th June 2007 was a great event. I enjoyed putting it together (along with the other staff at OpenAdvantage, of course), and was pleased at the turnout (50 people) and the number of speakers we managed to get (13). Despite my chicken timer (to keep speakers to the 10 minute time limit) almost breaking, everything went swimmingly. Though it was a bit like a wedding, in that I was so busy trying to organise everybody that I didn't get to sit and enjoy it; I just hope the attendees and speakers found it fruitful.

I've written up a report on the event on the OpenAdvantage website.

Progress on Drupal module

I had another issue with my module the other day, which is why it's currently turned off. I think it happens if the feeds are unavailable; causing the module's HTTP requests to time out; which in turn causes the whole of Drupal to time out as it waits for the response; which means my whole site falls over.

I've been using the drupal_http_request() function to run my HTTP requests, but unfortunately you can't adjust its timeout setting. So I dug around in that code, and have submitted a feature request and patch which enables you to customise the timeout when using this function. I then rewrote my module with shorter timeouts when making requests to, which seems to do the trick.

Hopefully, if this patch makes it into Drupal, I will be able to release the new version of my module, complete with timeouts, so it won't cripple my site or anyone else's. It also adds a recent tracks listing to user profiles (if they've set up their username) and has a block (only for one user - I just put it in for myself, really). It still needs a bit of work, and only handles recent tracks, but it's coming along fine.

Don't you Windows users get fed up?

I've switched my Windows machine on today, as my sister sent me a CD which won't open on my Linux machine, but inexplicably will on Windows. I'm currently copying a load of music tracks from it to my laptop. However, every 5 minutes or so, Windows pops up a dialogue box which says it has updated itself and needs to restart, with two buttons: Restart now and Restart later. It also has a countdown progress bar, which gives me 5 minutes to decide which I want to do: presumably if I left it, it would restart once the progress bar reached zero. Despite me pressing Restart later, the Window has popped up 3 times already. When I click Restart Later, I mean "later, when I've decided I want to restart"?! Not "I can't decide, ask me again in 5 minutes"!

Do you people out there using Windows find this enjoyable? How on earth do you stop yourself putting your fist through the monitor with the constant nagging?

By the way sis, if you're reading this, thanks for the MP3s.

Packt Open Source CMS Awards

I'm a judge on the panel of the Packt Open Source CMS Awards, in the category of Best Overall CMS.

Nominations open on 16th July 2007, so remember to twitch your voting fingers. There's a $5000 prize to the winner in the category I'm judging, plus prizes of $3000 for second place and $2000 for third. Other categories include Most Promising, Best PHP, Best Other, and Best Social Networking; but I'm not a judge for any of those.

(By the way, despite using Drupal myself, I will be scrupulously objective as always.)

Pro Drupal Development - Review

Pro Drupal Development (by John K. VanDyk and Matt Westgate, published by Apress; get it here) is a great little book. I know a bit about Drupal, and have written a couple of modules, but always felt like I was skirting the edge of some dark lake I dared not step into; when I did get in, I was quickly overwhelmed by the currents, got wet, and struggled out as soon as I had what I needed. (OK, a bit melodramatic, but you get the picture.) My knowledge was mostly gleaned from the handbooks on the Drupal site, which vary widely in quality, some being excellent and complete, others patchy and inaccurate, or for obsolete Drupal versions. I've also dug around in Drupal code a lot, but a clear understanding of the architecture continued to elude me.

This book, however, shines a clear strong light into Drupal's innards. I feel like it's written for someone like me: pretty technical, fairly able to make sensible inferences if given decent examples, and with some experience of Drupal of a user and dabbler. The chapters are pretty terse, but pack in some excellent code examples and fragments to help with common tasks. For example, I've been working a bit on my module this week, and this book helped me to:

  • Work out how to use the caching system.
  • Modify the page which displays a user's account details to show data from my module.
  • Figure out how to extend an existing Drupal "object" (a user) with fields from my module's table.
  • Understand how to write HTML generation code which works nicely with the themes system.
  • Understand Drupal coding conventions a bit more and how to document my module.
  • Write a proper module installer/uninstaller.

And probably other stuff I've forgotten. Things I had been working out from the handbooks, by making inferences from other people's code, reading forum posts etc., were covered briefly, pleasantly and clearly. They've probably saved me a good few weeks of scrabbling around. The book covers most Drupal concepts with enough depth for you to get a good overview of the whole architecture, as well as giving you practical snippets (table of contents here).

Highly recommended, and a snip at $22.50 for the ebook. No Drupal developer should be without it! Especially useful if you're not a complete Drupal nut but want to be able to write modules properly.

Ruby HTTP clients revisited

A while ago I posted about Ruby HTTP clients, and how I'd been messing around with writing my own. As is so often the case with open source, I waited around long enough, and now the good solutions are floating to the surface. When writing some simple HTTP client stuff recently (to do spidering of a Rails application), I found that the following combination worked really well and meant I could dispense with my hoary old scripts:

  • The RFuzz HTTP client library, to fetch pages.
  • The Hpricot HTML/XML parser library for parsing the pages.

Installing them was as easy as:

gem install rfuzz
gem install hpricot

Though you're likely to need a lot of build tools installed, as they build native extensions.

Once they were in place, I could do stuff like this (to parse all the URLs out of an HTML page):

require 'rubygems'
require 'hpricot'
require 'rfuzz/client'

client ='localhost', 4000)

# to fetch http://localhost:4000/people and get the response body
body = client.get('/people').http_body

# to parse the links out of the response body using XPath
doc = Hpricot(body)
links ='//a')

# to get the URLs out of the links
urls = { |l| l.attributes['href'] }

etc.. Pretty good. I think my quest is over.

Syndicate content