Strange Loops

No Matter Where You Go, There You Are

Virtualenv

| Comments

One recent change to my life has been more python. Lots of nice/bad things have been said about the language that I won't repeat here. I'm generally enjoying my time with it. One useful tool I've found is virtualenv and its bash wrapper functions.

virtualenv allows me to create an environment (python + versioned set of packages) for me to work in. For example I have two virtualenvs right now (temp and django). "temp" contains a myriad number of different libraries I want to experiment with and "django" contains (well) django and a more limited set of libraries. To use I do "activate temp" or "activate django" from my shell depending on what I want to use.

I have a similar problem with perl. I have 2 versions 5.8.9 and 5.10 that I want to use. To take care of this, I have both perls compiled into two different locations. To switch working between the both of, I borrowed some inspiration from virtualenv.

#!/bin/sh
# use-perl5.10.sh
path-to/cpanp 's program perlwrapper path-to/perl5.10/bin/cpanp-run-perl; s save'
PATH=path-to/perl5.10/bin:${PATH} PS1="(5.10) \h:\W \u\$ " /bin/bash
#!/bin/sh
# use-perl5.8.sh
cpanp 's program perlwrapper path-to/bin/cpanp-run-perl; s save'
PATH=path-to/bin:${PATH} PS1="(5.8) \h:\W \u\$ " /bin/bash

I call use-perl5.8.sh and use-perl5.10.sh as appropriate from my shell to setup a working environment from perl. This doesn't isolate the libraries like virtualenv but switching between the two perls is all I needed for now.

Rut Busting

| Comments

I've been meaning to write this post for awhile now. As the infrequent posts might not indicate, this was a year of change. I was stuck in rut for the last couple of years. This was largely my fault. I had trapped myself into a situation that I was afraid to break out of. What was I afraid of? A number of small inconsequential things that loomed much larger during that period. Now that I'm on the other side of the situation I have greater clarity about that.

Being patient through the rut did have two nice side effects. However, I'm not going to put myself through that situation again though (if I can help it).

Week 11: Running Behind

| Comments

We're at week 11 in marathon training now. I'm running behind having started late and now coming down with a cold. I have to buckle down over the next 10 weeks to get into shape for the rock and roll marathon.

Wish me luck!

Under Construction

| Comments

February came and went without a blog post. I've been playing around with various options for this blog. I've been feeling "blah" for some time and not felt like writing. Lately I've been expressing myself via twitter and tumblr. They tend to encourage sniping of thoughts. I'm not saying that's a good thing but the built in constraints have squeezed out some creative thoughts. Writing is a good exercise to prevent my skills from atropying.

Lessons Learnt

| Comments

Recently our place got broken into. One of the more important things that got taken was my personal laptop. Here are some lessons learnt from the resulting research.

1. Require a password to unlock your computer from sleep. (This would have prevented in my iTunes account from being violated.

2. If you’re extra paranoid, get a laptop lock/safe for your computer. They cost about $20-$30. The one I’ve bought has already paid itself off.

3. Local backups are good to do but doing a remote backup is handy. I used to do backups to an external hard drive. Sadly my external hard drive got stolen too. These are some solutions I’ve found for doing remote backups.

a) Mozy (mozy.com) You configure it with a set of files you want to backup. It backs up your files at pre-determined intervals. According to their documentation, the files are stored encrypted on their side. Cost: 2gig Free, Unlimited $4.95/month

b)  Dropbox (getdropbox.com) Not really a backup solution but remote storage. You store your files on a remote server. Nice interface for getting access to your files (basically shows up as a folder on your computer). Another cool feature it possesses is versioning. It versions all updates you make to it so you can go back in time and retrieve an older version of the file. Cost: 2gig Free. 50gigs $9.95/month (Interestingly the backing store is hosted on S3). Bonus points for working on Mac and Linux.

c) Good ole S3. If you go this route, google for Jungle Disk. I have a friend who really likes it. I didn't go this route.

4. Password managers are extremely useful tools (considering the number of websites I mess around with). Free multiplatform ones are PasswordGorilla and PasswordSafe. If you’re on a mac, I recommend 1password (it even comes with a nifty iPhone version). Remember to backup the password file created by the manager.

5. The other thing I’ve learnt is getting your door kicked in is pretty common. Apparently most door jambs are made from wood moldings that are broken easily. To make it tougher for burglars when installing the door strike, make sure you get long screws that go all the way through the jamb and into the studs behind them.

iPhone Blogging

| Comments

I'm typing this from my iPhone right now using the typepad client. I won't do this on a regular basis but I wanted the experience of blogging from a mobile device. It feels like Twitter is a better experience because it constrains you to a word limit. With a blog I naturally want to write to fill all that space. Ok typing this was hard and I'm unlikely to do this regularly. One nice thing with the mobile client is pictures. So how about a cat (blogs seem to do it all the time).

iPhone blogging

Tweaking the Blog

| Comments

I spent the last couple of hours tweaking my blog. I probably broke all the links coming into this blog but the old links still seem to work. Not that many people read this blog anyway. It was mostly to clean up this blog when it had some other name. Thought to self, separating logical and physical representation of data is not just a useful programming practice.

I've also been playing with FriendFeed and found it a convenient method to integrate my other content into this blog. We'll see how long this will last but that's the goal for now.

This was a fairly eventful weekend with some long term personal changes. I also had time to play around with new tools. Nothing too exciting for now but hopefully I'll write something about them in the future. Not a bad weekend at all!

New Year Resolutions

| Comments

It's a new year. I know it's like 10 days into 2009 but the year has not aged that much yet. Heck I'm still having trouble dating my checks 2009. Like all new years, I've attached some resolutions to them.

Anyway this is the first post for the 2009. With any luck I'll keep up with my resolution to keep my blog updated regularly. If anybody was curious where I was in 2008, you should check out my twitter feed or my tumbleblog. URLs are below.

http://sigsegv.tumblr.com
http://twitter.com/sigsegv

Down the Language Rabbit Hole

| Comments

Once more into the breach…. Been going down the functional languages rabbit hole again, this time I’ve been more patient with it. The thing about self learning is that you can take your time with it. I rushed through the Little Schemer the first time, this time I’m taking my time going through it and trying to understand the various nuances to programming with recursion. Here we go again.

New iPhone

| Comments

Bit the bullet and picked up the new iPhone on Friday. This thing is amazing what it can do.