ImportHtml doesn’t auto-refresh

A cool thing about Google Spreadsheets is that you can scrape websites using external data functions like importHtml. It’s really easy to use. The formula: =importHtml("http://www.imdb.com/chart/top", "table", 1) imports the Internet Movie Database top 250 table on to Google Spreadsheets. Since you can publish these as RSS feeds, it ought to, in theory, be a great way of generating RSS feeds out of arbitrary content. There’s just one problem: it doesn’t auto update. There are claims that it does every hour. Maybe it does when the sheet is open. I don’t know. But it definitely does not when the sheet is closed. I wrote a simple script that logs the time at which the script was accessed, and prints the log every time it is accessed. ...

Calvin, speechless

Comments Vinu 28 Apr 2010 11:25 pm: Nice ! what did you do? Manually erase the text? Knowing you, i suspect there is some automation at work here :) S Anand 29 Apr 2010 7:17 am: Oh, not quite. By 2006, I’d typed out all the Calvin and Hobbes (by hand, spending 6 years at it). This was just filtering all the strips that didn’t have any text on them :-) Vinu 30 Apr 2010 5:52 pm: Ouch. That’s a lot of typing. Surprised you did not crowdsource it… Perhaps for the next assignment? Asterix comics anybody?

My weight line

Comments Saiprasad K S 25 Jun 2010 8:21 pm: Hi Anand, Not sure you will recall. This is Saiprasad ( Sai) was your neighbour at " The Presidency", TISL way back in 1996-97. I always knew you were a genius and a man of many talents. I had chanced upon your site sometime ago but while I was trying to get some facts on Ilaiyaraja chanced upon the section of Ilaiyaraja. I didnt pay attention to the name of the author as I approached midway realised this must be the handiwork of Anand and as I cast my eyes upwards found my guess was on the dot. Good work Buddy. May you continue to shine like you always do. I am still with IBM. My contact no is 9886678319. Realise you are in London. I was there too for a couple of years on a sales assignment. Now back to Blore. Shall write again. do write when you can. Take care…. Sai Eating more for less | s-anand.net 19 May 2011 7:12 pm (pingback): […] for less May 19th, 2011 How I do things Visualisation S Anand A couple of years ago, I managed to lose a fair bit of weight. At the start of 2010, I started putting it back on, and the trajectory continues. I’m at the […] Weight lines, again | s-anand.net 14 Jan 2014 2:04 pm (pingback): […] few years ago, I ended up losting weight, mostly by dieting. That worked out rather well up to a point: I lost about 20kgs rapidly. But I […]

Recruiting smart people

Recently, I have ended up giving bits of advice to people recruiting at start-ups, and a few patterns have emerged that are worth sharing. Before I go ahead, I should warn you that I have no qualifications whatsoever. (All consulting advice should come with this caveat, perhaps!) You might be better off reading Joel Spolsky’s Smart and Get Things Done (read). I haven’t read it myself, but from what little I see of it, the thoughts seem similar. ...

SSH Tunneling via Rackspacecloud

I wrote about SSH Tunneling through web filters using Amazon’s EC2 at 8 cents/hr. With Rackspacecloud, you can get that down to 1.5 cents/hr. This turns out to be a lot simpler than EC2 as well! Ingredients Rackspacecloud account (sign up for free – you won’t be charged until you use it) Putty (which may be available on your Intranet, if you’re lucky) Directions On the Rackspacecloud console, click on wordpress website hosting– Cloud Servers – Add Server and select Ubuntu 9.10 (Karmic Koala). Actually, you can pick any other instance. I’m going to talk through this using Ubuntu 9.10 as the example. Type any server name, pick a 256MB RAM instance, and click on Create Server. Once the server has started, you’ll get the screen below. Click on the Console to open a session. Your password would have been e-mailed to the account you registered with. Log in as root with that password. Now type the following: sed –i “s/^Port 22/Port 443/” /etc/ssh/sshd_config /etc/init.d/ssh restart ...

WP-SuperCache

That dip there in response time is thanks to WP-SuperCache. My average page load time has dropped from 1 second to 0.25 seconds.

Laptop power usage

I just got a digital wattmeter. Had no idea about these until Google PowerMeter, but now, they’re all the rage. Mine’s a pretty simple model and all  I plan to do with it is play around with a few household gadgets. My first target, obviously, was my Dell Latitude E5400. The statistics are interesting: Power … when… 0.3W Laptop is switched off. The adapter must be consuming the power 1.3W Laptop is on standby. 12W The lid is closed, and no applications are running. 18.5W The laptop is on, the lid is open, and no applications are running 25W The laptop is writing to the hard disk 34W One CPU is fully utilised 41W Both CPUs are fully utilised Looks like the display and hard disk each consume about 6.5 watts each, while the CPU consumes a whopping 15 + 7 = 22 watts. ...

My new Blackberry Bold 9700

Comments Laptop power usage | s-anand.net 7 Feb 2010 6:13 pm (pingback): […] lesson was that turning off the wireless had no effect whatsoever. (It worked quite well for my Blackberry, though. Increased the battery life quite a bit. I thought the same might apply for laptops, but […] Anil 16 Feb 2010 7:34 am: Can you see browse Hindi websites on Blackberry Bold 9700. Can you see Hindi/Devanagari fonts being rendered on Blackberry Bold 9700 (Blackberry OS 5.0). The old Blackberry Bold (Blackberry OS 4.6) does not render Hindi. pradip 2 Sep 2010 12:26 pm: I have also same problem do u have any idea how to read hindi on blackberry bold 9700 .which I am useing now. Pls reply Thanks Pradip

Command line alarm

When I’m in front of my laptop, I usually forget the world around. Sadly, the world around has important things that need to get done on time. Like eating medicines, turning off the washing machine or the hob, etc. The one thing I’ve been lacking on my machine was a simple alarm system. I’d like to set an alarm to remind me to do something in 5 minutes, for example. And it should be dead simple to set up. ...

Portable Apps

I’m totally hooked to portable apps now. You don’t need admin rights to install them. You can run them off a USB stick. They won’t make your machine slower. All the reasons not to install an application vanish. PortableApps.com is a good starting point. For what it’s worth, here are my portable apps by category (most used on top). Platforms Firefox. If you’re using IE6, please die. Lack of admin access is no longer an excuse. Cygwin brings you UNIX commands to Windows. Portable Ubuntu run Ubuntu as a window in Windows. Tiny utilities ...

SSH Tunneling through web filters

You can defeat most web filters by spending around 8 cents/hr 0 cents/hr on Amazon EC2. (It’s usually worth the money. It’s a fraction of the cost a phone call or a sandwich. And I usually end up wasting that money anyway on calling someone or eating my way out of the misery of corporate proxies.) Most web filters and proxies block all ports except the HTTP port (80) and the HTTPS port (443). But it’s used to carry encrypted traffic, and, as Mark explains: ...

Open source in corporates

Last month, my first application went live. I’ve been writing code for 20 years. Not one line of my code has been officially deployed in a corporate. (Loser…) It’s a happy feeling. Someone defined happiness as the intersection of pleasure and meaning. Writing code is pleasurable. Others using it is meaningful. But this post isn’t quite about that. It’s about the hoops I’ve had to jump through to make this happen. ...

Inline form validation

A List Apart’s article on Inline Validation is one of the most informative I’ve read in a while — and it’s backed by solid data. Some useful lessons: Inline validation can reduce form completion time by 40% Use inline validations where the user doesn’t know if they’ll get it wrong (e.g. is a username available?). Don’t use them if user knows the answer (e.g. their name) Validate on blur, not on keypress (it’s distracting, and users can’t multitask) Comments jesse 25 Sep 2009 4:15 pm: maybe u should add some inline validation on your comments form, instead of the wordpress error page?

A flaw in rationality

I found this piece from “The Happiness Hypothesis” pretty interesting: In the 1990s, Damasio found that when certain parts of the orbitofrontal cortex are damaged, patients lose most of their emotional lives. They report that when they ought to feel emotion, they feel nothing, and studies of their autonomic reactions (such as those used in lie detector tests) confirm that they lack the normal flashes of bodily reaction that the rest of us experience when observing scenes of horror or beauty. Yet their reasoning and logical abilities are intact. They perform normally on tests of intelligence and knowledge of social rules and moral principles. ...

IE6 in Corporates

PPK’s State of the Browser – IE Edition mentions one reason why IE6 will probably stay on for a while. Now why do I expect IE6 to stick around while IE7 goes down? The answer is simple: Intranets… many office workers will continue to be condemned to IE6. At work, that is. It’s quite likely that on their private computer at home they run another browser — IE7 or 8, Firefox, or maybe one of the smaller ones. ...

The Bing effect

This graph is the number of referrals Microsoft’s new search engine, Bing, sent to my site over the last few days. Looks like the hype is dying out. Though Bing did leapfrog Yahoo briefly, that lasted just one day.

Round buttons with Python Image Library

After much hunting, I finally settled on Hedger Wang’s simple round CSS links as the most acceptable cross-browser round button implementation. The minified CSS is about 2.5KB, and the syntax is very simple. To make an input button into a round button, just wrap it within a <span class="button">: <span class="button"><input type="submit"></span> … and it’s just as easy to convert a link into a rounded button: <a class="button" href=”/”><span>Home</span></a> It works by using a transparent PNG / GIF that looks like this: ...

Error logging with Google Analytics

A quick note: I blogged earlier about Javascript error logging, saying that you can wrap every function in your code (automatically) in a try{} catch{} block, and log the error message in the catch{} block. I used to write the error message to a Perl script. But now I use Google’s event tracking. var s = []; for (var i in err) s.push(i + "=" + err[i]); s = s.join(" ").substr(0, 500); pageTracker._trackEvent("Error", function_name, s); The good part is that it makes error monitoring a whole lot easier. Within a day of implementing this, I managed to get a couple of errors fixed that had been pending for months. ...

15 years of Dilbert searchable

The Dilbert search index now carries 15 years worth of Dilbert comics — over 5,500 strips typed out. This is mainly due to the contributions of BFMartin (over 6 years worth of strips) and Paul Dorman (over 3 years worth of strips), myself (over 3 years worth of strips) and a long tail of contributors. You can search the strips here. While you can find strips as far back as 1989, you won’t see the images earlier than 2002 because geek.nl (whose images I’m shamelessly hotlinking without permission) only holds images that far back. But once you know the date of the comic (say 1991-02-03), you can visit the Dilbert official site at dilbert.com/1991-02-03/ and see the strip. ...

Short notes

I’m quite busy on a project right now, and don’t get time to write long articles. So for a while, I’m going to stick to short notes on interesting stuff. Peter Bregman has a very interesting piece on Why You Should Encourage Weakness. It boils down to a choice: do you focus on on improving strengths or minimising weaknesses? Conventional performance evaluations focus on the latter. I very strongly support Bregman’s view on this. The weakness isn’t why you hired the person! Unless it’s killing the organisation, just leave them to focus on their strengths. Google Analytics has a fairly interesting API that I hadn’t explored until recently. Picked up [Advanced Web Metrics with Google Analytics](http://www.s-anand.net/amazon-browser.html#advanced web metrics with google analytics) and learnt that you can track outbound clicks, page load times, Javascript events and error logs, almost anything at all using Google Analytics. You can also mirror the logging on your local server using pageTracker._setLocalRemoteServerMode() The whole concept of a Sandbox environment seems to be picking up within Google. There’s a Checkout sandbox, an AJAX API playground, an AdWords sandbox, an AdSense API sandbox, the Mapstraction API sandbox, even an event called Developer Sandbox. (After saying Sandbox 6 times, I feel a bit like Hobbes.)