S Anand

Install Mercurial

If you’re jointly writing code with others, use Mercurial or Git. (Not SVN. Linus explains, but the quick version is: you can’t commit offline.)

Sites like bitbucket, github and Google Code let you maintain your code online with others editing it.

My preference is for Mercurial via TortoiseHg, which integrates well with Windows Explorer. (I use the command prompt, but people I collaborate with prefer this.)

Here’s a 2-minute video explaining how to install TortoiseHg and commit your code onto bitbucket.

Install Mediawiki

Once you’ve installed XAMPP, download MediaWiki and unzip it into your xampp/htdocs folder. You may need 7-Zip to extract tar.gz files. Rename the mediawiki folder to wiki.

You’ll first need to create a database, which you can do by visiting /phpmyadmin/ on your localhost, typing in the database name and pressing ‘Create’.

Now go to /wiki/ and fill out the form. Make sure you select “Use superuser account” since you haven’t really created a user for your database.

Click on the “Install Mediawiki” button, and you should have a wiki.

Install WordPress

Once you’ve installed XAMPP, download WordPress and unzip it into your xampp/htdocs folder.

You’ll first need to create a database, which you can do by visiting the /phpmyadmin/ on your localhost, typing in the database name and pressing ‘Create’.

Now go to /wordpress/, click the buttons and fill out the form. Type in ‘root’ for the database username and leave the password blank. Select any password you want for the administrator account. You can now log in with this administrator password and log into the WordPress dashboard.

Install XAMPP

I’ve been going around setting up open source software a fair bit recently. To minimise the pain of explaining it, I’m putting together a short videos that explain the process.

Here’s the first, on XAMPP, which is a starting point for most open source applications. It bundles Apache (web server), MySQL (database), Perl and PHP.

To install it, search and download “XAMPP for Windows”, and press enter for every question. Then install your application under C:\xampp\htdocs. That’s it.

You are in prison

(I had intended to write this post sarcastically, a bit like my web freedom survey. But sarcasm’s confusing to read. So I’ll just be straight and mild.)

If you’re a well-paid professional in an Indian IT services firm, your freedom is limited.
(This holds if you’re a student, too.)

The last bit worries me the most. Perhaps because in all the other cases, there are humans I can put to shame or fight, face-to-face. Or because I am a Net addict. Don’t know why.

Anyway, here’s the result of my survey (after de-duplicating and eliminating results where the company or geography was not clear).

web-freedom-survey

Some day, I will follow-this up with a post on “Surviving in Prison”, detailing out my experiences with the system, and beating it.

The Calvin and Hobbes search Takedown

Eight years ago, I started typing out each of the Calvin and Hobbes strips by hand. Four years ago, I set up a site that let people search for strips. Early this month, I was asked to take it down.

This is the story.


I can’t quite remember when I started reading Calvin & Hobbes. The earliest reference I can find in my blogs is in July 1999. I remember it didn’t take me long to become a fan. I’d read every strip on the newspaper; hunt them out at bookshops; and spend a fair bit of time searching for archives online.

At some point, I discovered a few archives of the complete Calvin & Hobbes images. These aren’t hard to find, and they’re still around in plenty. So that gave me a few more months of delight.

The trouble, though, was that I never could quite find a strip when I wanted to. A friend would refuse to accept something, and I’d want to pull out that strip where Calvin declares to reside in the state of “Denial”. Or if they said something fancy, I’d want to pull out the one where Hobbes says “I notice your oeuvre is monochromatic”. Or those strips where Calvin’s Dad explains how things work (“They build bigger and bigger trucks over the bridge until it breaks.”)

There were a few Calvin and Hobbes search engines around. None quite did what I wanted them to – which was to search the text, and show me the strip, with a nice scrollable interface.

So I set out to build one. I can’t remember when, exactly, but it was before Sep 11, 2002.

It took me many years. I’d spend several train rides and evenings typing this stuff out. My friends, employers and family were a bit puzzled, but just added it to my list of eccentricities and carried on. I was halfway there in 2005, pushed further in 2006, and with some help, I managed to finally complete it.

I was able to do a lot of cool stuff with this, like statistically improbable phrases and some amusing posts as well.

It also increased traffic to my site, which was a bit disconcerting. I didn’t want to attract attention. In 2007, I removed the page from Google’s indexes, which cut the number of hits a fair bit. Since then, the site was only visited by a few people that knew of it, and the occasional stumblers.

A month ago, I got reddit-ed and MetaFiltered.

It didn’t take me long to figure that a takedown notice would be on its way. It turned out to be quite a friendly mail, actually – scary only in parts. (A bit of a carrot-and-stick approach, perhaps.) Anyway, it took me all of 2 minutes to remove all of the pages and links.

Of course, the reason I went to all of this effort was because the original Calvin & Hobbes site does not have the search feature. I’ve reached out to United Media, offering my transcripts and code. Let’s see what happens.

A sense of proportion

A quote from David Heinemeier Hansson:

So the problem is, a lot of business managers and especially business owners, they have no sense of probability. They can’t fathom that concept. So They treat the probability of 1 to 10 trillion as the same as a 1 to a 100. And like, “We’ve got to deal with this 1 to a trillion probability, because, what if it happens?”

No! Doesn’t matter! I mean, don’t care.

So as soon as that sense of probability spreads, that people can treat that reasonably, I think all this nonsense just goes away.

This lack of proportion, sadly, is at the heart of my every day problems. (Just watch the video!)

Make backgrounds transparent

This is the simplest way that I’ve found to make the background colour of an image transparent.

  1. Download GIMP
  2. Open your image. I’ll pick this one:
  3. Optional: Select Image – Mode – RGB if it’s not RGB.
  4. Select Colors – Colors to Alpha…
  5. Click on the white button next to “From” and select the eye-dropper.
  6. Pick the green colour on the image, and click OK

The anti-aliasing is preserved as well.

Web freedom survey

There was a time when workers were searched when they left, to make sure they weren’t stealing. They were paid by their hour, and had to clock in/clock out. They had supervisors to ensure that they didn’t slack off. They weren’t allowed to make calls at work. After all, people were lazy and thieving in those days.

Nowadays, we’re enlightened. We respect and trust our employees. Like a family. We don’t micromanage their activities. We don’t tap their phone calls.

We don’t restrict or monitor their web usage.

Now, your company is enlightened, of course. Surely you can access these sites I believe essential for work? (If you work out of different offices, you should fill one for each office.)

So, please tell me: which sites can YOU access?

(View results)

Dear Tesco, your books are expensive

Dear Tesco,

I do like you. Really. Your products are invariably cheaper than I can find at most other places. I am a methodical, crazy gadget freak, and I find your gadget pricing impressive. I don’t always find what I want, but you often have the items I finally pick as the best value for money, and at very low prices.

But.

Your books are expensive.

Of Amazon’s bestsellers, just 2 out of the 100 books are cheaper on your site. And this is apart from the fact that I’d get free delivery from Amazon on 37 of those books (over £5), while you’d give me free delivery on 5 (over £15).

On average, that book list costs £5.66 on Amazon. With you, it’s £7.20. I don’t fancy paying 27% more. (36% if I include delivery.)

I’m not making this up. You can check: the books in red are cheaper at Amazon.
(as of 6pm on a cold, rainy Tuesday the end of March.)

Book Amazon Tesco
The Girl Who Kicked the Hornets’ Nest 3.86 3.86
The Girl with the Dragon Tattoo 3.48 3.86
The Girl Who Played with Fire 3.79 3.86
Wolf Hall 3.86 3.86
61 Hours 9.49 9.49
Solar 8.90 13.00
One Day 3.79 3.86
Mums Know Best: The Hairy Bikers’ Family Cookbook 8.98 13.00
The Lovely Bones 2.98 2.98
Breaking Dawn (Twilight Saga) 7.49 14.99
Eclipse (Twilight Saga) 3.99 6.99
New Atkins for a New You: The Ultimate Diet for Shedding Weight and Feeling Great 3.99 5.99
The Return: Nightfall (The Vampire Diaries) 3.49 6.99
New Moon (Twilight Saga) 2.98 6.99
Twilight (Twilight Saga) 3.44 6.99
The Struggle: Bks. 1 & 2 (The Vampire Diaries) 3.48 6.99
Brooklyn 3.86 3.86
Vampire Diaries: Bks. 3 & 4 (The Vampire Diaries) 3.49 5.99
Hamlyn All Colour 200 Slow Cooker Recipes (Hamlyn All Colour Cookbooks) 2.48 2.48
Shutter Island 3.98 3.59
101 One-pot Dishes: Tried-and-tested Recipes (Good Food 101) 1.97 1.97
The Secret Ingredient: Delicious, Easy Recipes Which Might Just Save Your Life 5.97 5.98
Percy Jackson and the Sea of Monsters 3.48 6.99
Percy Jackson and the Last Olympian 3.99 6.99
The Guernsey Literary and Potato Peel Pie Society 3.49 3.49
The Double Comfort Safari Club (No 1 Ladies Detective Agency) 7.99 12.00
The Hummingbird Bakery Cookbook 8.49 8.49
The Gruffalo 2.96 5.99
Percy Jackson and the Titan’s Curse 3.99  
Percy Jackson and the Battle of the Labyrinth 3.48  
The Big Short: Inside the Doomsday Machine 12.50 17.50
The Secret 4.55 4.55
The Time Traveler’s Wife 3.82 3.86
Miss Dahl’s Voluptuous Delights 11.50 13.00
Ching’s Chinese Food in Minutes 9.98 9.98
The Little Stranger 3.86 3.86
ReWork: Change the Way You Work Forever 5.50 7.69
Percy Jackson and the Lightning Thief 3.48 6.99
The Girl Who Kicked the Hornets’ Nest 9.49 9.49
Dead and Gone: A True Blood Novel (Sookie Stackhouse Vampire 9) 5.20 5.20
The Forgotten Highlander: My Incredible Story of Survival During the War in the Far East 9.48 9.48
Room on the Broom 2.98 5.99
Lord Sunday (The Keys to the Kingdom) 3.49 3.49
The Official Highway Code 1.65 1.65
The Gruffalo’s Child 2.94 5.99
The Return: Shadow Souls (The Vampire Diaries) 3.50 5.24
Three Cups of Tea 4.98 4.98
The End of the Party 12.50 12.50
The Very Hungry Caterpillar [Board Book] 2.97 5.99
Annabel Karmel’s New Complete Baby and Toddler Meal Planner 8.69 8.69
Bad Science 3.57 3.57
The Snail and the Whale 2.96 5.99
True Blood Boxed Set (Sookie Stackhouse Vampire) 19.95 19.95
Gone Tomorrow 3.86 3.86
The Italian Diet 6.98 6.98
The Snowman 6.48 9.09
Wedlock: How Georgian Britain’s Worst Husband Met His Match 3.86 3.86
Little Darlings 4.89 8.00
Eat, Pray, Love: One Woman’s Search for Everything 3.98 3.98
101 Meals for Two: Tried-and-tested Recipes (Good Food 101) 1.97 1.97
The Immortals: Blue Moon 3.48 6.99
The Host 3.82 3.82
The Catcher in the Rye 4.48 4.48
The Final Fantasy XIII Complete Official Guide 11.24 14.24
The Book Thief 3.95 3.95
Mexican Food Made Simple 9.99 9.99
Tea Time for the Traditionally Built: The No.1 Ladies’ Detective Agency: The No.1 Ladies’ Detective Agency, Book 10 (No 1 Ladies Detective Agency10) 3.86 3.86
The Oxford Companion to Food (Oxford Companions) 20.00 28.00
Sacred Hearts 3.86 3.86
A Squash and a Squeeze 3.00 5.99
Pokemon HeartGold/ SoulSilver Official Guide 9.74
Cutting for Stone 3.86 3.86
Trespass 8.98 8.98
Wheels on the Bus (Pre School Songs) 2.44 4.76
Alone in Berlin (Penguin Modern Classics) 4.98 4.98
The Good Man Jesus and the Scoundrel Christ (Myths) 7.50 10.00
Twenties Girl 3.85 3.86
The Last Straw (Diary of a Wimpy Kid) 3.48 6.99
Rodrick Rules: Diary of a Wimpy Kid (Book 2) 3.48 6.99
The Natural Navigator 7.48 10.49
The White Queen 3.99 6.39
The Shack 3.95 3.95
Good Food, 101 Cakes and Bakes 1.97 3.45
Faces (Baby’s Very First Book) 2.48 4.99
Lustrum 6.38 6.38
Blacklands 3.86 3.86
The Lost Symbol 8.78 9.00
A Touch of Dead (Sookie Stackhouse Vampire Myst) 5.20 9.09
The Spirit Level: Why More Equal Societies Almost Always Do Better 4.96 4.96
Jamie’s Ministry of Food: Anyone Can Learn to Cook in 24 Hours 15.00 15.00
Ottolenghi: The Cookbook 12.50 16.25
The Ice Cream Girls 5.89 9.00
The Best of Times 3.79 3.86
Whoops!: Why Everyone Owes Everyone and No One Can Pay 11.50 11.50
The Children’s Book 3.86 3.86
Twilight: v. 1: The Graphic Novel (Twilight the Graphic Novel 1) 6.49 12.99
Too Big to Fail: Inside the Battle to Save Wall Street 7.48 7.49
Dark Days (Skulduggery Pleasant – book 4) 5.84 12.99
It’s Only a Movie: Reel Life Adventures of a Film Obsessive 6.00 5.98
The Smartest Giant in Town 3.00 5.99

I do like you. Really. (Despite trying to stop me scraping via user agent detection.) I don’t mind that you don’t have every book. I trust you to pick what I’d most likely want. You’re good at that.

Please make your books less expensive?