2024 1

Perl, 1994-2011

In 1994, I learnt Perl. It was fantastic. I used it to: 1995: Build CCChat - the unofficial IITM email system and software repository 1999: Build my entire blog from scratch 2000: Author my 2nd year thesis on the Behavioural Aspects of Financial Analysts by analyzing 600MB of IBES data 2002: Analyze where to place the central processing hubs for a bank 2004: Analyze the interest durations of public sector banks 2005: Creating music quizzes 2006: Create my own music search engine (which earned me about $100 a month in Google Ad revenue for a while) 2006: Automated resume filtering 2007: Create custom search engines 2008: Build application launchers In 2006, I was convinced I should stick to Perl over Python. ...

2011 1

The Social Network

4:00pm. Just started watching The Social Network. I’m fairly sure I won’t like the film, mostly because I’ll be jealous of Mark. About 5 minutes into the movie. I find myself rewinding to catch the dialogues. They’re very fast. Very, very fast. 10 minutes. I like the code. I stopped on a screen to start checking if it’s real code. It’s in Perl. Stopped myself before I started dry-running the code. ...

2009 1

To Python from Perl

I’ve recently switched to Python, after having programmed in Perl for many years. I’m sacrificing all my knowledge of the libraries and language quirks of Perl. The reason I moved despite that is for a somewhat trivial reason, actually. It’s because Python doesn’t require a closing brace. Consider this Javascript (or very nearly C or Java) code: var s=0; for (var i=0; i<10; i++) { for (var j=0; j<10; j++) { s = s + i * j } } That’s 6 lines, with two lines just containing the closing brace. Or consider Perl. ...

2008 2

Caching pages on Apache

I don’t use any blogging software for my site. I just hand-wired it some years ago. When doing this, one of the biggest problems was caching. Consider each blog entry page. Each page has the same template, but different content. Both the template and content could be changed. So ideally, blog pages should be served dynamically. That is, every time someone requests the page, I should look up the content, look up the template, and put them together. ...

Launching applications

Opening programs from the Start - All Programs menu is painful. For many years, I relied on the quick launch bar. But it’s space constrained. There are only so many applications you can place there. I want space enough for frequently used documents as well. Recently, I decided that I need all the space on the screen. So my task bar is on auto hide, and that makes the quick launch bar a little tougher to use as well. And finally, I can’t use the quick launch bar with the keyboard. That’s important. ...

2007 3

Reducing the server load

I’m been using a shared hosting service with 100 WebSpace over the last 7 years. It’s an ad-free account that offers 100MB of space and 3GB of bandwidth per month. Things were fine until two months ago, which was when my song search engines started attracting an audience. I had anticipated that I might run out of bandwidth, so I used a different server (that has 5GB of bandwidth per month quota) for loading the songs. But what I didn’t anticipate whas that my server load would run over the allotted CPU limit. ...

Splitting a sentence into words

I often need to extract words out of sentences. It’s one of the things I used to build the Statistically Improbable Phrases for Calvin and Hobbes. But splitting a sentence into words isn’t as easy as you think. Think about it. What is a word? Something that has spaces around it? OK, let’s start with the simplest way to get words: split by spaces. Consider this piece: "I'd look at McDonald's," he said. "They sell over 3,000,000 burgers a day -- at $1.50 each." High-fat foods were the rage. For e.g., margins in fries were over 50%... and (except for R&M & Dyana [sic]) everyone was at ~30% net margin; growing at 25% too! Splitting this by spaces (consider new lines, tabs, etc as spaces too.), we get the following: ...

Hindi songs online

Click here to search for Hindi songs. This is an article on how I wrote the search engine. I find it a nuisance to have to go to Raaga, search for a song, not find it, then go to MusicIndiaOnline, not find it, then go to Musicplug.in, and so on until Google. So I got the list of songs from some of these sites, put it together in one place, and implemented a find-as-you-type. ...

2006 5

Programming theorems

Programming theorems. The likelihood of Perl being involved in a system is directly proportional to the length of time the system has been in maintenance. Every 5 minutes you spend writing code in a new language is more useful than 5 hours reading blog posts about how great the language is. Think twice before presuming that CSV is a nice little easy file format. (see Leon)

Automated resume filtering

I had to screen resumes from a leading MBA school. I’m lazy, and there were hundreds of CVs. So after procrastinating until this morning, I decided on 2 principles: I will not spend more than 45 minutes on this. (That’s the duration of my train ride to office.) I will not read a single CV. (I would write a program.) The CVs were in a single PDF file. I saved it as text (it shrunk from 66MB to 1.6MB without the photos). Then I wrote a Perl program to filter CVs by keywords. We were looking for people with an interest and/or experience in IT consulting, so I picked “technology”, “consulting”, “SAP”, “IBM”, “Accenture”, “Deloitte”, etc. ...

Software for my new laptop

And so, thanks to Infosys Consulting being spun off as a separate legal entity in the UK, I got my new laptop. (Because our old laptops were legally the assets of Infosys Technologies Ltd, and not Infosys Consulting Inc. Weirder things have happened, but who’s complaining?) My old Toshiba Portege A200 has been replaced by a Dell Latitude D420 (which I was dreaming for, after having just read Jeff’s post on big laptops). ...

Experiments in sound

Wikipedia says the human voice frequency for speech is between 85 to 155 Hz for men, and 165 to 255 Hz for women. That set me thinking. What is the limit to our hearing? How do sounds differ? How can we synthesise speech? What are the limits to our hearing? Kids can hear frequencies from 20 Hz to 20 kHz, while adults hear only up to 12-14 kHz (Frequency Range of Human Hearing). ...

Python vs Perl

Python vs Perl. Sums up my feelings perfectly: Python may be better for larger projects, but for my meddling, I’ll stick to Perl. It’s served me well for 10 years. Until 1999, I used Perl a fair bit, but no more than Java or C or anything else. My first “real-life” use of Perl was in 2000, when I was processing 600MB of IBES data. Access and SPSS couldn’t handle the load. Perl slurped all the data in a few seconds, though. A few years later, when processing bank data (3GB worth, this time), Perl again was the only saviour. In fact, between Excel and Perl (and CPAN), I think I have all the data analysis power I’ve ever needed. This blog, for instance, is written in an Excel spreadsheet, exported to XML, and converted into the blog format by Perl.

2005 2

Matching misspelt Tamil movie names

I don’t like hunting for new songs either. Too much effort. External recommendations like Raaga Top 10 help, but not much. I usually like only 1 of the top 10. I don’t really know the recent music directors. But many interesting songs I’ve heard recently (like Ondra Renda in Kakka Kakka, Vaseegara in Minnale, and Kaadhalikkum in Chellame) are by Harris Jayaraj. So maybe if I can find the music directors I like, other songs by them would be good recommendations. ...

How social network analysis is used

An interview with the creators of InFlow (a software to map social networks) shows how social network analysis is used. Comments Dhar 30 Oct 2005 6:10 am: Anand, do you know of any freely available Social Network Analysis tool? S Anand 31 Oct 2005 6:16 pm: Afraid not. I’ve only done this twice in projects, and I just used Excel and Perl both times.

2003 1

Perl illiteracy

US high school seniors can’t read Perl. Not even a simple DeCSS program (obufuscated, of course).

2000 1

Microsoft dumps Java

Microsoft dumps Java. Doesn’t worry me to much. I’ve never had much use for Java as a user. They’ve ‘adopted’ Perl, though. And I was always a Perl fan.

1999 1

CGI.pm

I was playing around with CGI and wrote a script to determine when somebody last logged in. Read about CGI.pm.