Digital Magpie

Ooh, ooh, look - shiny things!

New York Post Blocks iPad Users

It seems that the New York Post have decided to block all access to their site from iPads, telling users to download their (subscription only) app instead. As Scripting News said…

I wonder how Apple feels about this? I can’t imagine they like it. I can see the ads now. ‘Get an Android tablet to read the web.’ Hmmm… I wonder how long said app will remain in the store after pulling a trick like this?

Writing Smart Code

This quote has been doing the rounds lately, at least I’ve seen it on two or three different blogs, most recently here

> Debugging is twice as hard as writing the code in the first place.
> Therefore, if you write the code as cleverly as possible, you are, by
> definition, not smart enough to debug it.

Brian Kernighan

I rather like that.

How to Convert PDFs to Postscript

It’s easy using pdftops, part of the Poppler suite of programs. First make sure it’s installed, or install it (using Homebrew on OS X):

1
2
$ brew update
$ brew install poppler

Then the command pdftops infile.pdf outfile.ps can be scripted as per usual, something like this:

1
2
3
4
for page in pages/*.pdf
do
  pdftops $page postscript/`basename -s .pdf $page`.ps
done

Recorded in the interest of helping Google organise my brain.

Building Clojure With Maven

Just a quick reminder on the steps I needed to take to build Clojure and install it in my local repository:

  1. download the Maven Ant tasks, version 2.1.0 at the time of writing;
  2. move them to $ANT_HOME/lib (this is /usr/share/ant/lib on Mac OS X);
  3. cd to my Clojure download folder, run git pull if needed;
  4. run ant -Dsnapshot.repo.dir=~/.m2/repository clean nightly-build, this will perform a clean build and install it into the supplied repo; this can be anywhere, the default though is /var/www/maven-snapshot-repository which is probably no good;
  5. to also install clojure-contrib just change to it’s download directory and run mvn install.

Is simples!