VAT on eBooks, and yet more reasons to dislike Amazon

Posted at 10:54pm on Monday, January 7th, 2013 by

We all know that Amazon doesn’t pay tax. It’s a matter of public record and the subject of many a vainly attempted Christmas boycott. One of the many wheezes they use is to sell all of their digital books from a Luxembourg subsidiary. They do this because Luxembourg only charges 3% VAT on digital goods, whereas the UK government levies 20% VAT on ebooks.

This means that the largest retailer of digital books in the UK pays only 3% VAT on its ebook sales, but any UK based retailer is forced to pay 20% VAT. This dramatically skews the market in Amazon’s favour, and is hugely detrimental to any attempt by another retailer to break Amazon’s grip on digital reading.

Right now, for example, a book sold at £4.99 by Amazon nets Amazon £4.84 after tax, but only nets a UK based retailer £4.16. In a retail sector with such aggressive competition that 68p is vital and at the moment UK.gov is heavily favouring Amazon’s position.

Amazon are also playing fast and loose with the VAT rules in other ways. Right now a self published author through KDP only pays the 3% rate that Amazon pays. This means that the author lists their book at £1.93 and it appears for sale at £1.99 on the Amazon site. However, Amazon is charging traditional publishers the full 20% rate, despite only paying 3% themselves. In other words, they are screwing additional margin out of the traditional publishers while further tipping the balance in favour of the self published authors (and, one assumes, those published by Amazon themselves).

Currently there is a ruckus about VAT on ebooks in the UK, with a legal challenge to the validity of the tax underway. Physical books are VAT exempt in the UK, and there are two strong legal arguments that ebooks should be too. Firstly the book VAT exemption simply uses the word “book”; a digital book is still a book and any attempt to levy VAT on an ebook could be ruled a misinterpretation. Secondly, previous case law has ruled that where an item meets a consumers needs “in the same way” it should be classified similarly for VAT purposes; clearly an ebook satisifies this criteria too.

I’m hoping HMRC rules that digital books are VAT exempt:

  • Physical books are already VAT exempt for a good reason; as we move to digital by default we don’t want a stealth tax on reading
  • The UK government doesn’t get any revenue from ebook VAT anyway, as Amazon pays its VAT in Luxembourg
  • It’s hugely skewing the UK market in Amazon’s favour, making competition even harder
  • If the EU does force France and Luxembourg to increase their VAT rates on digital goods while we are VAT exempt it will create an advantage for UK online book retail throughout Europe

Back in 2001 Gordon Brown scrapped Betting Duty (where the punter paid 9% on either their stake or their winnings) because offshore gambling sites that paid no Betting Duty were skewing the market and killing UK bookmakers. Now is the time for a similarly enlightened view on ebook VAT.

[1] Amazon force publishers to pay full VAT

[2] VAT may be dropped on eBooks

[3] Gordon Brown scraps Betting Duty

Tags:

| Comments Off

A year in music 2012

Posted at 9:11pm on Sunday, December 30th, 2012 by

My albums of the year:

  1. Goat’s World Music (spotify). Daft costumes and songs with Goat in the title. I don’t think they intend themselves to be taken seriously, but it’s hard not to. Think acid soaked math rock; proper WTF, proper awesome
  2. Peter Broderick’s These Walls of Mine (spotify). Apparently this is a collection of “experimentations” but it sounds pretty darn complete to me… Glitchy, sparse, laid back and laid bare; I just love this album
  3. Golden Void’s Golden Void (grooveshark). Almost a Black Sabbath tribute album, but original enough to be much more than that. Gloriously heavy heavy psych
  4. Breton’s Other People’s Problems (spotify). I couldn’t stop listening to this for months. Like a South London LCD Soundsystem or Alt-J’s ASBO-toting cousin. Disaffected and dark, but pop music all the same
  5. Heavy Electrics (spotify). I might be on my own with this one. Driving, pulsing, krautrock designed to be played far too loud in seedy basement bars in Bladerunner’s Los Angeles.

Yet again I stumbled across a bunch of albums from previous years that I’d managed to miss, so special mention has to go to Citay, Yellow Moon Band and Tweak Bird (you might sense a theme among them…)

Like the last couple of years I’ve also done a month by month breakdown of what I listened to the most (as compared to what I liked the most). In a “measured life” kind of way I also started creating spotify playlists of every album that I enjoyed in each month. These are intended for my own (imagined) enjoyment in my (imagined) dotage, but they’re linked to too, in case you’re interested:

For those who wish to run the same analysis of their own habits you can download the script from my github. As long as you have python installed it will work like so:

python fetcher.py username year

e.g.

python fetcher.py offmessage 2012

A dirty race to the bottom

Posted at 10:12pm on Wednesday, December 19th, 2012 by

tl;dr: When there’s only one book retailer (and increasingly only one publisher) reviews are the only differentiator between books, yet they are being widely abused. At the same time there is a rapid race to the bottom of both content quality and marketing tactics. The utopian vision that Amazon’s self publishing tools presents is tainted and won’t get better until Amazon accept some responsibility, or until an alternative retailer can make a big enough dent in the market to matter.

A story for you.  My wife has written a diet book.  Claire is doing the diet herself, it’s working for her, and the text and recipes within the book are her own original work.  And people are (or were) buying it.

Let me also state right now that, despite how it will doubtless sound later on, this is not intended to be a whinge about competition.  As dispassionately as possible I’d like to discuss how Amazon, as sole retailer and publisher, also owns the only way consumers can discriminate between products, and how this is fundamentally broken.  I’ve deliberately not linked to the books in this article to try and avoid making this anything other than a story about some stuff that happened.  That this is based on Claire’s experience is a necessary fact, but not the point.

Claire’s book is published via Amazon’s KDP and Createspace services.  This is an increasingly common way for authors to bring their books to market; between them they provide both digital and physical publishing tools to allow authors to self publish their work on the Amazon network of sites.

Private pressings (or “vanity publishing” as it’s sometimes disparagingly known in the trade) have always existed.  Having invested long years of your life in preparing your magnum opus it’s obvious (if you have the resources, at least) that the shortsightedness of a closed, cliquey, distant few shouldn’t affect whether or not people have access to your book.  After all, we all have a book inside us; self publishing allows those with a little cash to taste the pleasures of seeing their name on a dust jacket.

It used to be that when an author approached a specialist book binder they were gently talked down from a print run of thousands, while at the same time talked up into taking additional services such as proof reading, editing and jacket design; all the things that help turn a manuscript into a book, in fact.  And so what might have been two thousand error strewn paperbacks stored in the spare bedroom for years to come becomes 100 or so beautifully bound and grammatically correct hardbacks for distribution to exactly the right bookshelves.  The author’s goals are met, the printer’s margins have been increased and the practical realities of the dead tree publishing industry explained and (in most cases) understood.

Like with so many old school media industries a few years ago the Internet began to change all that.  First there were print on demand services like Lulu, and then five years ago Amazon waded in with KDP (Kindle Direct Publishing) that allowed authors to sell digital versions of their books directly on the Amazon site.  And then two years ago Amazon bought Createspace (a print on demand rival to Lulu).  At this point the circle was complete; with a few simple tools an author can now get both paper and digital versions of their books for sale in the world’s largest bookshop, linked together, consistently listed and ranked.

As a long term resident of the Internet I whole heartedly approve of yet another dinosaur of an industry being disintermediated.  Seriously, an industry where the recommendation is to send a copy of your manuscript to upwards of 50 people from whom you are warned you shouldn’t expect a response within 6 months is ripe for being torn a new one.  Amazon saw that, and started tearing.  And more power to them, frankly.

In this process we have disintermediated traditional publishers who took, on average, 75% of net receipts (this is important – it means the author bears the cost of discounting to retailers) and replaced them with a retail channel that offers 65% to 70% of list price (meaning that any discounting is borne by the retailer).  A £7 paperback published by a traditional publisher will earn the author around £1 per copy.  Traditionally published ebooks are sold at the same price and under the same contractual terms, so that £7 book as an ebook also earns the author £1.  Published via KDP for £7 the book will net the author around £4.55 per copy.  Sold as a print on demand paperback via Createspace it will earn about £2.10.  And let’s not forget that due to the structure of publishing deals (net receipts again) if that £7 traditionally published book is sold in Tesco it might only earn the author 10p per copy sold.

So if you know, in your heart of hearts, that your book is not going to be one of the 10 a year that get the full marketing weight of the publishing house behind it (and that’s increasingly true for many major authors let alone new ones) then why go through the heartbreak of dozens of rejection letters when you could get straight to market via Amazon, sell your book digitally for £4 a copy and earn £2.50 a sale?

Of course, you’d be advised to buy freelance proof reading at a minimum (no one can proof their own work. No one), and maybe editing too.  Proofing costs somewhere in the region of $150 for a medium sized novel (there are literally hundreds of people offering this service in the Kindle forums), so hopefully won’t break the bank.  And jacket design isn’t quite as important as it once was, now that people only see a postage stamp sized thumbnail of the jacket before buying.

All very utopian, no?

The big question, of course, is how does the author market their work?  65% of no sales works out just the same as 25%.  In the traditional publishing view of the world there is poster and TV advertising, weekly book supplements in the newspapers, placement on the 2 for 1 table in Waterstones and a myriad of other ways where the publisher’s resources ensure a route to market.

Self-published authors can’t tap into those routes.  There are no posters, no adverts, no ready and willing newspaper columnists with a deadline and inches to fill and no two for one table upon which to place their books.  Instead, after self publicity through channels like blogs, Twitter and Facebook authors are singly and utterly reliant on Amazon reviews.

And therein lies the rub.  Amazon’s review system places very few controls on who can review what.  You can’t, for example, leave reviews on the same item from different accounts that share a credit card, but that’s about it.  That’s not much of a control though; all it takes is a quick ring round your friends to get the reviews up.  Or if you’re too embarrassed to ask your friends you can buy them on Fiverr instead.

A couple of fake five star reviews to kick start the book isn’t too bad.  Friends and family want you to succeed and are going to rate your book highly whatever.  What’s killing the Amazon review system is the lack of control of negative reviews from competing authors and publishers.  Consumers have to take reviews at face value, and a couple of scathing reviews completely destroy sales.

And here’s where we get to Claire’s experience.  The book she’s written is about the “5:2 diet”.  There’s been a bunch of publicity around the diet recently, following a BBC Horizon documentary and a couple of articles in the mainstream press (including one in The Sun by, of all people, Dom Joly).  The big publishers move too slowly to get books out quickly, and when everyone suddenly wants a book about this miracle diet it’s only the self published authors who are there to service that market (take note, publishers, by the way). I’d argue that this is one of the many beauties of the KPD/Createspace system.

Claire’s book was receiving some nice reviews and selling very well until the negative reviews started appearing.  And they were vitriolic: “Cashing in”, “Read the Times instead”, “rubbish”, “This book has been rushed and it shows”, “Nothing new”.  It’s hard not to take those sorts of comments to heart. We spent a lot of time staring at the book and wondering how some people could interpret it the way they had, and why the reviews were so polarised.  We certainly didn’t feel it was rushed, it wasn’t badly formatted, all the content was original, including calorie tables and tried and tested recipes, and the description of the product made clear that it was a short book.

It took us a while to work out what was going on, but eventually we twigged that other people had had the same idea as Claire to write a book about the diet, and saw negative reviews on her book as a way of boosting the sales of their own.  At one point, with some lovely (real!) positive reviews of the book, she was selling close to 80 copies a day.  Now that the book has been swamped with negative reviews (all completely at odds with the positive ones) she’s down to 10 copies a day and falling.  At the same time less scrupulous publishers are riding high in the charts, bouyed both by the positive reviews they’ve left on their own book and by the negative ones they’ve left on Claire’s.

We’ve complained to Amazon.  We’ve marked reviews as inappropriate. But nothing’s been done. And now we live in fear of another negative review hitting our main competitor, because each time a bad one lands on theirs, another negative one appears on Claire’s.

Of the ten 1 and 2 star reviews on Claire’s book 5 are not verified purchases.  (Of the verified purchases one is a genuine complaint about a misprinting by Createspace, one is from a nutter, and one is by the author of the “rival” book, but more of that later.)  Given that the book is published by Amazon and only available through Amazon it seems strange that such a high proportion of reviews are not verified purchases; the user leaving the review has to explicitly choose to remove the Verified Purchase message from their review.

Indeed, if we look at other KDP/Createspace books where there are lots of reviews (I used books with more than 30 reviews) and where the reviews are relatively consistent (i.e. not polarised) we can see that on average only between 10 and 15% of reviews are marked as not verified purchases.  On books where the reviews are polarised the reviews show the same characteristics as those on Claire’s – a disproportionate number of either the positive or the negative reviews are not verified purchases.

To continue this train of thought we can examine the reviews on the rival diet book.  Here we see that none of the 5 star reviews are verified purchases (and all were written in the same 48 hour period), yet both of the one star reviews do come from verified purchases.

And it’s not just the unverified reviews that can be untrustworthy.  One of the negative verified purchase reviews on Claire’s book is from a user that calls herself “Crafty Mama”.  She used to have a five star review on the rival book until it disappeared (one assumes because she tried to leave another review on the same book from an account that shared a credit card).  This user has reviewed very few books but appears to have very strong opinions about Ukelele books.  The Ukelele book she likes is published by the same publisher as the rival diet book.  The one she doesn’t is not.

There’s also an unverified 5 star review left on the rival book by “Cooking Mama” who has only reviewed one other book, published by the same publisher and being a book to which “Crafty Mama” has uploaded customer images.

With most fake reviews you can’t prove anything. If, like Cooking/Crafty Mama, you do it consistently there’s an easy to follow trail, but there’s no real way for a consumer to tell if a one off review is fake or not. And it’s not like most people would even notice those with the obvious trails – it’s just too many clicks.

I can only assume that if this is happening to Claire’s book (a pretty niche title) it’s happening to hundreds if not thousands of others as you read this.

Ideally the vision of self publishing books via Amazon is that every author gets a fair crack of the whip in an open marketplace.  One of our friends (the lovely Sophie, whose second novel is out now) had huge success with her first novel last year, selling tens of thousands of copies via KDP, and it’s that type of story that Amazon would have us buy in to.  What we aren’t hearing so much about (yet) is the vast morass of books produced by unscrupulous authors/publishers who are unafraid of violating copyright or plagiarism, or of damning competitors with fake reviews.

Where the Amazon self publishing tools should really be helping is in the ‘long tail’ of low volume books where publishers are less and less inclined to take an interest. Unfortunately it’s exactly in these low volume books where the reviews are least well policed. There’s been considerable noise and bluster recently about established authors posting both positive and negative fake reviews, but down the sales ranks and in the niche subjects no one’s paying any attention. Yet it’s there that thousands of authors are trying to eke out a living with no external support.

Because the review system is so baked-in to the Amazon experience I would argue that it has to be managed very closely – certainly more closely than it is now.  Amazon’s success with the ubiquity of the Kindle is even more powerful than Apple’s early success with the iPod.  Right now the self published book market doesn’t have an editorial voice or a recommendation system outside Amazon.  Unlike, say, Pitchfork or The Quietus for music there isn’t an established independent voice (or voices) yet. The book social networks like Goodreads are a way off providing recommendations of the quality of Last.fm. And because getting content onto a Kindle by any other means than via the Amazon store is so cumbersome there’s little to no opportunity for direct sales via your own site or via an alternative service (like Bandcamp, for music).  In every way we are more tied to Amazon and the Kindle than we ever were to iTunes and the iPod.

The utopian ideal of disintermediating the large publishers is turning into a filthy race to the bottom, shepherded by Amazon.  Their apparent position of “as long as you buy something we don’t care” allows the unscrupulous to rise to the top in all but the very biggest genres, ruining the experience for authors and readers alike.

What could Amazon do to fix it?  I think there are a couple of easy steps.

Firstly, if a book is published via KDP or Createspace they should only allow verified purchase reviews. These books are only available through Amazon, so any review that comes from an unverified purchase is either too close to the author or acting against them.  It’s not a huge barrier to fake reviews, of course, but it stops a quick ring round your mates having quite the effect it does now.  This would solve almost all of Claire’s book’s problems in one fell swoop, and I imagine would solve a lot of other people’s problems, too.

Secondly, they need to take the ‘flag this review as inappropriate’ reports seriously.  If I can identify a proportion of the fake reviews simply from the public information available on the site imagine how easy it would be with additional information like account age, IP addresses and browsing history?  Claire’s income from her book has dwindled to nothing since the negative reviews started piling on; I don’t think it’s too much to ask from Amazon as the only intermediary between author and reader to at least investigate these reports and remove the obviously fake reviews.

A couple of relatively simple algorithms would make this easy, I think.  Viewed less then 4 items on the site?  Only bought one item?  Repeatedly view only the same one or two items?  Repeatedly logging in from the same IP as other users with reviews on the same item?  Always logging in from the same browser session as another user with reviews on the same item?  Always logging in from the same IP, but with no cookies set (using private browsing)?  Funded by gift card, rather than credit card?  Reviewing items negatively/positively in the same chart as items reviewed positively/negatively by related users (shared credit card, IP, etc)?

If 4 or 5 of those 8 questions come up yes, just don’t publish the review.  For a long time I had assumed that it was simply a case of the more reviews the better, but when upwards of 50% of reviews are fake this no longer holds true.  Only 3 reviews, but all good quality, is far better than 6 good quality ones out of a total of 12.

At the time of writing Claire’s book has 16 reviews.  We’re pretty confident that 9 of the negative ones are fake (and 2 more are just insane, but you can’t really adjudicate for that).  At the same time, the rival book has 10 reviews of which we’re confident 6 of the positive ones are fakes (timing, lack of verified purchase, links to other books from the same publisher, etc).

Yet the only way readers can decide between the two titles is by this review system.  It’s all a bit messed up.

Claire has just published a second edition of her book. What do we do if that starts getting poisoned by fake reviews too? Stoop to the same level and start slating our competitors? Or take some ineffectual moral high ground and watch sales plummet again? With the Amazon marketplace structured the way it is these are currently our only two options. Neither work for me.

Tags:

| 2 Comments

Dead trees

Posted at 11:21pm on Tuesday, January 3rd, 2012 by

Claire reads a lot more than me. Claire got a lot more books than me for Christmas. And yet our bed side tables look like this at the moment:

Despite my attachment to “book as object” it’s pretty hard to argue for dead trees when you see that.

Also two of the books I got for Christmas (Perdido Street Station and 1q84) weigh in at about 1,000 pages each. Frankly I find books of this size a bit off putting, to the point that I may not have asked for them if I’d realised they were quite so damn long. And then I saw this tweet from Neal Stephenson (himself author of many 1,000 page plus novels):

No one will ever call my novels bloated again because they won’t have the faintest idea how long they actually are.

When we were doing some work on the future of books for HarperCollins one of the things that really resounded was that novels are 3/4″ thick for a very practical reason; manufacturing. Charlie Stross blogged about this much better than I could, but it’s clear that eBooks are going to revitalise many forms of publishing; short stories, serialisations and epics. Tolkien would have got his way and had Lord Of The Rings published in a single volume if it were published now.

Tags:

| Comments Off

A year in music

Posted at 6:55pm on Saturday, December 31st, 2011 by

Following on from last year I’ve been running the numbers on this year’s listening habits. This year has been directly affected by my signing up to spotify; lots more back catalogue stuff and less obvious front runners each month. That said, each month was still easily typified by something… I’ve also put together a spotify playlist of how 2011 sounded for me for the masochists among you (one track from each album in chronological order)

  • January: The Decemberists; still going from last year, plus New! Album!
  • February: …still going with The Decemberists (need inspiration)
  • March: Other Beach Boys had solo careers? Really? Dennis Wilson!
  • April: In which I discovered my new favourite band, and the album I played most all year – Wolf People’s Steeple
  • May: Drone rock! Oh yes! Moon Duo!
  • June: New Fleet Foxes! Turned out to be shit, but it took a few plays to realise
  • July: New Bon Iver!
  • August: Neil Young! (caused entirely by this awesome Neil Young playlist)
  • September: Drone rock! Oh yes! Wooden Shjips!
  • October: New Wilco!
  • November: Deerhunter side project you say? Why yes, I’d like some of that. Atlas Sound
  • December: WHY HAVE I NEVER HEARD OF TUNNG BEFORE?

And my albums of the year?

  1. Mazes
  2. West
  3. Tomboy
  4. Unknown Mortal Orchestra
  5. Circuital

Special mention has to go to Wolf People’s Steeple; by far and away my most played record this year (despite it being released in 2010).

For those who wish to run the same analysis of their own habits you can download the script from my github. As long as you have python installed it will work like so:

python fetcher.py username year

e.g.

python fetcher.py offmessage 2011

Second screen advertising

Posted at 3:43pm on Monday, October 31st, 2011 by

The “rise of the second screen” should, in many ways, be a godsend for TV advertisers.

Until recently putting URL, Facebook or Search calls to action at the end of a 30 second spot in the middle of Coronation Street was always a leap of faith when, for most viewers, the computer was turned off in the next room.

Nowadays however, when according to some reports up to 75% of us are using other media while watching TV, there’s a real chance that an advert’s call to action is going to get followed.

What’s vital in this new environment is that the agencies producing these campaigns take into account this change in behaviour and the related routes of access.

And by this I mean “Don’t even think of using Flash

If you’ve persuaded someone to search for your term and click the link you’d better make sure they get more than “you are trying to access this site from a non-Flash enabled device”.  Particularly when your site is at best a poor implementation of the Github 404 page.

Tags:

| Comments Off

More on heroku and Lucid

Posted at 10:25pm on Friday, October 7th, 2011 by

In my last post on heroku, django and Ubuntu Lucid I went through a fair old rigmarole and a lot of (Ruby illiterate) guesswork to get the Heroku toolchain working on Ubuntu Lucid (10.04 LTS).  Only a few days later Heroku published official Python and Django documentation.

Unfortunately, if you’re new to Ruby even Heroku’s excellent documentation isn’t quite enough… Essentially there’s still an assumption that you know what the hell you’re doing with Ruby.  Obviously for people steeped in Python this is not the case!

The Linux readme says the following:

apt-add-repository 'deb http://toolbelt.herokuapp.com/ubuntu ./'
curl http://toolbelt.herokuapp.com/apt/release.key | apt-key add -
apt-get update
apt-get install heroku-toolbelt

That’s all very well, but it isn’t all the steps. To actually get the Heroku toolchain working on a previously Ruby-less Ubuntu Lucid install you’ll need to do the following:

sudo apt-get install ruby libopenssl-ruby libreadline-ruby curl
apt-add-repository 'deb http://toolbelt.herokuapp.com/ubuntu ./'
curl http://toolbelt.herokuapp.com/apt/release.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install heroku-toolbelt

Note the following:

  • Ruby is not a dependency of heroku-toolbelt, so you can install the toolbelt without Ruby
  • Just installing Ruby isn’t enough – you’ll get “no such file to load — net/https” unless you also install libopenssl-ruby
  • You’ll also get “no such file to load — readline” unless you also install libreadline-ruby
  • Without some faffing (that I’ve not done yet) you can’t install Foreman as Heroku recommends because the Lucid packaged version of RubyGems is too low to meet the dependencies. Personally I don’t see this as necessary for dev environments on smaller projects, but if I were to try a larger one this would need to be resolved

Hopefully this will help others new to Ruby trying to make the most of Heroku’s excellent infrastructure.

Tags:

| Comments Off

Heroku, Django and Ubuntu Lucid

Posted at 10:56pm on Sunday, September 18th, 2011 by

The short version

The following commands on a previously rubyless Ubuntu Lucid machine will get a Django project called awesome with an app called nonsense running on Heroku. Explanations are at the end.


sudo aptitude install rubygems1.9.1 libopenssl-ruby1.9.1
gem install addressable
gem install heroku
ln -s ~/.gem/ruby/1.9.1/bin/heroku ~/bin/heroku
ssh-keygen -t rsa
heroku keys:add
mkdir -p ~/projects/heroku-django
cd ~/projects/heroku-django
virtualenv --no-site-packages .
source bin/activate
pip install psycopg2
pip install gunicorn
pip install Django
pip freeze > requirements.txt
django-admin.py startproject awesome
cd awesome
python manage.py startapp nonsense
cat >Procfile <<EOF
web: bin/gunicorn_django --workers=4 --bind=0.0.0.0:$PORT awesome/settings.py
EOF
cat >.gitignore <<EOF
bin/
include/
lib/
*.pyc
EOF
git init .
git add .
git commit -m "Initial commit"
cd ~/projects/heroku-django
heroku create --stack cedar
git push heroku master
heroku run bin/python awesome/manage.py syncdb --app app-name-XXXX
firefox http://app-name-XXXX.herokuapp.com/ &

The details

dtt101 has been nagging me about the benefits of Heroku for ages now. It’s fair to say that the fact that the two main frameworks it advocates are Rails and Node rather put me off (I am, after all, Python through and through). I’d seen the odd blog post recently that suggested that you could run Django (and all sorts of other things) on their new Cedar platform, but hadn’t taken it particularly seriously. This morning, however, I came across the excellent Deploying Django on Heroku (Mac OS X) so I thought I’d finally have a look at trying it out for one of my own projects.

The server that hosts House Price Please is due to be decommissioned so it needed a new home. It’s also fair to say that it’s never had that much traffic, so it makes an ideal candidate for trying heroku out.

All these steps were on Ubuntu Lucid (Isotoma‘s standard desktop OS). They also assume that you’ve already got a Heroku account.

The heroku CLI is provided as a Ruby Gem, so the first step was to get rubygems installed. Lucid provides 1.8, 1.9 and 1.9.1 from apt, so I plumped for 1.9.1. In theory I could then use the gem install command to install the heroku gem.


sudo aptitude install rubygems1.9.1
gem install heroku

However, this blew up saying ‘launchy relies on addressable’, so I needed to try again, installing addressable first:


gem install addressable
gem install heroku

There are also some warnings about /var/lib/gems/1.9.1 not being writeable, but I’m not aiming for a system wide install of the heroku CLI, so that’s fine. However, to get the heroku command on my path I had to do the following:


ln -s ~/.gem/ruby/1.9.1/bin/heroku ~/bin/heroku

Next step is to add ssh keys to heroku. If you’ve not already got a key pair you’ll need to generate one using ssh-keygen -t rsa. Then add them to heroku using:


heroku keys:add

On a previously rubyless machine this blows up for with a message saying no such file to load -- net/https. To fix this I had to:


sudo aptitude install libopenssl-ruby1.9.1

When you run heroku keys:add again it will upload the public key from your .ssh directory. If you’ve got more than one it will offer you a choice.

From this point on you can pretty much follow the instructions at the post that inspired this one. The only changes I’d make are:

  • You don’t need the second (celeryd) line in the Procfile (unless of course you plan on using celery for async tasks)
  • You need to push to heroku before you syncdb, not after

Once I’d converted housepriceplease to this structure (we use buildout on our servers) I dumped the data on the old live server using python manage.py dumpdata housepriceplease > data.json, checked data.json into the fixtures directory of my main app and ran:


heroku run bin/python housepriceplease/manage.py loaddata data.json --app high-wind-5409

Finally I following the instructions for custom domains on the excellent Heroku dev center to point housepriceplease.co.uk at Heroku, and voila! we’re live:

housepriceplease.co.uk

Minor edit: On the Heroku/Facebook page (which is well scary, actually) there is a link to some instructions for installing the Heroku toolbelt for Linux. Looks very new, but likely that the faffing with Ruby at the start of this article may not be needed soon.

Tags:

| Comments Off

This never happens to me!

Posted at 9:39pm on Thursday, June 30th, 2011 by

The Kindle edition of the rather excellent book Red Plenty is broken.  It has lots of footnotes in it that are completely unlinked from the body of the text.  This, combined with the Kindle’s inability to show footnotes in any other way than inline, means that at the end of every chapter you find yourself either undertaking a very fiddly process of trying to skip back and forth to reread the text, now with footnotes, or simply angrily flicking past them (which in the case of this book is 24 pages for the first chapter; or “click, pause” 24 times).

I’d been really looking forward to reading this, so I was genuinely pissed off.  I ranted a bit on Twitter (as you do) but then actually got angry enough to go and write a review on Amazon.  I’ve never done this before, but felt cross enough about the combination of a) poor execution of something so simple by the publisher, b) the fact that the Kindle edition was £1 more than the paperback, and c) that Amazon has no Kindle returns policy (even if it’s fundamentally broken), that I actually went and did it.  Spleen vented, I moved on (after checking that it had been published, of course).

This morning, through the contact form of our company website, the author got in touch with me.  He asked me about the problems with the book (not having a Kindle himself) and offered me an author’s copy of the book to make up for my poor experience.

Isn’t that awesome? (and doesn’t it show how hard it is for publishers to add value in a world of pure digital distribution?)

And of course I can’t let this pass without linking to this conversation on Twitter ;)

…gone tomorrow

Posted at 11:47am on Wednesday, March 9th, 2011 by

Thanks for the kind words from friends in response to my previous post, which included:

  • Go on, do it
  • You mean you haven’t done it already?
  • Less an antennae, more a CB aerial in the front garden of a bungalow

So… It’s done

It is, quite literally, a weight off….

Tags:

| Comments Off