Thursday, June 24, 2010

Motivation

I'm analysing some things happening in my life and wondering how... well, subjective and isolated from environment certain things could be.

A good example is a car. You buy a new car and you start adjusting it the way you like: you buy wheels, suspension, maybe audio etc etc, you have a long list of things you want to install like silicon hoses, gauges, consider buying some new wheels and so on. There are of course a lot of cars better then yours and you surely can afford some of them, but you don't think about that. But one day a simple thought kicks you in a head: "I NEED this car". So you decide to sell your car and buy a new one; probably not now, probably not even this month, but you're sure you'll do it soon. So... nothing has changed in the environment. Just a simple idea in your head kills your passion in a second without any obvious changes in the environment and you cannot do anything about that.

It scares me a little when I think about it and subconsciously I apply these thought to my programming job: what if my attitude to the certain projects or people are caused more by some ideas in my head than the environment? Well, there is nothing new in this thoughts and this subject is covered in a psychology, but despite of that it's really hard to find own base sometimes.

Monday, June 14, 2010

About commit messages

I noticed that top 3 commit messages on a project I'm currently working on are following:

1. fixes / fix bug / fix bugs
2. typo
3. changes (hey, 2pac)

Every time I spot such a commit message I literally see how the $EDITOR arises between the poor developer wanting to commit his changes and the repository like the magic door in front of Ali Baba and how the developer has to say 'Open sesame' to make this annoying thing go away.

Anyway, I know how to fix that! If you're using git, add the following alias to your ~/.gitconfig:

ci = commit -a -m "changes"

and you're all settled up! Just use git ci to commit your stuff.

For a reasonable price I can consult you how to exorcise the $EDITOR from other scms.

Thursday, June 3, 2010

libcloud's GoGrid driver

We have to work quite often with GoGrid quite frequently and about a year ago I wrote gg-tools -- a set of CLI tools and a library in Python. We've used it for a while but later decided to switch to libcloud to have a better portability if we decide to move to other cloud provider.

However I found that some things in GoGrid driver could be improved. Specifically, there is quite annoying thing that gogrid doesn't assign an id to a node immediately after creation, but libcloud always expects to get an id for the image. As per discussion in libcloud maillist, create_node() was patched to block until the node gets ip assigned. Also, ex_create_node_nowait() method was added which simply adds node right away and returns id == None.

While the patches are being reviewed, I created a fork on github: http://github.com/novel/libcloud
with these changes applied. Feel free to check it out, GoGrid driver should be in a working state here as we use it on a daily basis and even if some error raises up it will be fixed quickly.