Lafest Website Creation

Wednesday, September 27, 2006

Tags:

Comments (1) | Permalink

Delhi. Well, how is it?

Thursday, September 21, 2006

:-) A question that I’ve been asked by every one of my friends back home. Two(+) months is long enough for an answer, don’t you think? So, well, here goes my attempt at a reply.

A quick background: first time I’ve been out of home, first time living alone, and my first job. Many of these impressions about Delhi might be colored by those firsts, and they probably are. Witness my to-do list for the first week I was here [reproduced verbatim, and thoughts that come to mind soon after] (as promised):

  1. Paper, and notebooks to write. A daily diary, as is my habit.
  2. Waste paper basket.
  3. Detergent. Clothes need ‘a washing.
  4. Old newspapers. Borrowing a trick first learnt from my dad, this makes for a quick after-meal cleanup.
  5. Paper plates.
  6. Arrange for washing clothes (+ironing). In the months past, with the exception of a weekly washing of my unmentionables (some of which will soon be relegated to toxic waste), I’ve only washed proper clothes twice, both times when a maid that’s supposed to come absconded. As an aside, paid help in Delhi is very cheap (imagine paying somebody 150 bucks[$4] a month to clean your room and wash your clothes), and equally unreliable.
  7. L.C.D. Monitor. The one I’m seeing this stuff on.
  8. Hair brush. Eventually bought two, and never used either one. Rue my fashion sense :-)
  9. Plastic covers. To put stuff in, very useful.
  10. Bathroom slippers.
  11. Small mirror. Which my flatmates promptly broke. I shaved without a mirror twice (kind of easy to do actually) before they replaced it with a life sized one.
  12. Scissors, stapler and blade.
  13. Cellotape.
  14. Tissues.

Which makes for a proper pedestrian todo list. Enlightening then, is the fact that the only thing that I thought of buying before I came to Delhi was the monitor. That and get an internet connection as soon as possible. Real Life does make you get your priorities straight.

Delhi is fun. It’s big, traffic signals are kilometres apart, and “close by” has a new definition altogether. Ashok, for example, lives close by. So does Vivek (a la Torque fame), but to reach either of em, I have to travel around 10-20 mins by auto. I haven’t traveled around much, but to the places I have: near ones like Priya’s and Saket (both of em malls and PVRs with ze Bangalore-ish trendiness), farther away ones like the Parliament House and India Gate and CP (and the inside of an MP’s flat courtesy Anil), and even farther places like Nizamuddin, it’s been a really cool experience. There is a lot to condense in one post, so you’ll have to take my word for it, Delhi is a good place to be. And also, surprisingly unpolluted.

There is a lot that interests me about Delhi. I’ve started reading newspapers (mostly because my usual Google News updates don’t work with my schedule right now) and the local supplements always mention tons of cool stuff to do. Like plays, shows in art galleries, fashion shows, pop performances, foreign dance scenes, film festivals and so on. It doesn’t do much for the techie in me, but I’d love to frequent places like this. Especially art & design shows. Unfortunately, work eats into around 90% of my time, and the rest I happily sleep. In other news, my plans to go to the gym and become Hrithik Roshan is also arrested coz of this very reason. =)

There’s a good 90% of my time then that I haven’t talked about. The work that I do at Uzanto. There’s a lot to tell there too, and I’ll take that up later. We’re working on something really interesting. I’m not allowed to tell more, but invites will soon become available to people who clobber me with affection. ;-)

Tags:

Comments (3) | Permalink

Vysnu Rev 2

Saturday, September 16, 2006

As part of my ongoing efforts to revamp this site, I’ve moved Vysnu over to a Slicehost 256slice running Gentoo Linux. Unlike previous iterations of the site, it’s a pure clean box without any junk on it. While I would’ve prefered a BSD slice and its just-works package management, Gentoo is good enough. I’ve set up a fast Wordpress install on the box. It’s Lighttpd/PHP 5/APC/MySQL 4 that now clocks in at 0.1-0.2 sec/page instead of the earlier 0.4 to 0.6. And thanks to a textdrive hack, I’ve got rewrite urls working fine.

Here’s how to adapt that hack in lighttpd.conf if you’ve got multiple sites running on your box:

$HTTP["host"] =~ "vysnu" {
        server.error-handler-404 = "/index.php?error=404" }

Next up on the list: upgrade Wordpress.

Tags:

Comments (2) | Permalink

Ruby Magic: Metaprogramming

Tuesday, September 5, 2006

Rails, if you’ve used it, has a rather elegant way of manipulating time. Stuff like 1.hours and 2.minutes.from_now just work. Let’s see how Ruby modules can be extended really really easily:

#! /usr/bin/env ruby

class Integer
  def seconds
    self
  end
  
  def minutes
    seconds * 60
  end
  
  def hours
    minutes * 60
  end
  
  def days
    hours * 24
  end
  
  def months
    days * 30
  end
  
  def years
    months * 12
  end
  
  def from_now
    Time.now + self
  end
  
  def before
    Time.now - self
  end
end

class String
  def palindrome?
    self == self.reverse
  end
end

class Time
  def leap_year?
    (year % 4).zero? and ((not (year % 100).zero?) or (year % 1000).zero?)
  end
end

class TrueClass
  def say
    "is"
  end
end

class FalseClass
  def say
    "is not"
  end
end

#2 is an Integer
puts 2.minutes.from_now

#"vishnu" is a String
puts "vishnu".palindrome?
puts "malayalam".palindrome?

puts 2.years.from_now.leap_year?

#Check if n years before is a leap year
puts "How many years before?"
year = Integer(readline)
puts "#{Time.now.year - year} #{year.years.before.leap_year?.say} a leap year." 

The interesting thing about Ruby is not that metaprogramming is possible, but Ruby makes it really easy to do it.

Tags:

Comments (1) | Permalink

Elvesbane

Monday, September 4, 2006

Elvesbane. My bro’s new blog.

Tags:

Comment! | Permalink