Friday, May 7, 2010

Yonder employer

Working remotely is definitely an enormous adjustment to the regular office grind. I'm not talking about just being in a remote office, I mean going solo and working by yourself, with only electronic communication at your disposal.

Working solo deprives one (to a certain extent) of the ability to bounce ideas off other people. There is undeniable benefit in getting other opinions on a matter, even if they are dead wrong*.

When you are physically separated from your colleagues (in my case a 2hr flight), you tend to depend a lot more on other resources and your own judgment.

Conveying a technical idea verbally takes a few minutes. Doing it over a tool like gchat is arduous and often leads to frustration and misunderstandings. Nowadays, rather than quickly running an idea past a co-worker, I would now Google it, see if anyone else has had a similar thought. Or I would simply just dive in and do it, see how it turns out and then either keep it or chuck it.

I think there are two key ingredients to making a success of telecommuting: discipline and communication.

You have to constantly check yourself. Have I wasted time investigating this idea? Is this taking longer than it should ? Am I understanding this correctly? There is the ever present danger of just buggering off on a tangent, never to be heard from again.

Having people on the far side who are available and reachable and (more importantly approachable) is critical. I can't imagine my work day without at least a few quick checks like "hey, is this what you had in mind?" or "what the hell are you talking about in that bug report?". You need people on the other end of the line you can converse with over an instant messenger. Email also works, but the hassle of writing and email to just fire of a short question is not justified.

The last thing you want is your communication to always be rigid and formal. You need an easy way to interact with people immediately, the same as shouting across the room or darkening their door for a quick chat. Remeber, you are in the office, your just not in the office.

Also, keep people in the loop. I fire regular short progress update emails during the day. It gives people a handle on what happening, helps them manage their own expectations.

Tools of the trade
My instant messaging is overwhelmingly done in gchat, with a tiny portion on MSN. Most of my clients hosts their email with Google (something I heartily recommend, I do it for ShuntYard also), so everyone in the office is mostly available through gchat.

My email is exclusively done through GMail (private and work), so I have a central place to keep tabs on everything.

*I guess this relates to always running your plans for world domination past a 5 year old.

Thursday, May 6, 2010

Small change is a big change

From time to time I scream myself to sleep.

People around me are presented with two questions.
The first: How can I just sleep at my desk like that.
The second(and more relevant): What makes me scream so ?

The screaming today was triggered by a very simple concept I try and live by (as a developer), that is release early, release often*, or rather the breach thereof.

Following this simple edict lets you stay the course in long projects, it lets you develop the right product, it lets you identify practical problems early, it even makes you appear too fast for love** when it comes to client delivery expectations.

Todays mess and the source of my aggravation was me breaking my own rule. I had waited too long to deploy to production. Sure, I have been deploying to my test and staging environments regularly, but production was about 5 versions behind staging...

The result was that the database on production had missed a couple of upgrades along the way and the data no longer loaded into the more recent schema from staging.

It took a mysqldump of the schema on either side, a diff and some manual vim'ing to get a schema migration script going. Not pleasant. I vastly prefer to do nothing, over doing things as a stupidity tax.

So, from now on, small steps, deploy early deploy often, deploy to production also.

*double entendre alert
**Basil Koufus - every time he gets a chance

Wednesday, May 5, 2010

Testing the waters

From time to time I apply for jobs I have no interest in taking.

I do this to keep my interviewing skills from atrophying, and to meet interesting people.

My latest foray into the world of the job-seeker was with a Stellenbosch tech incubator.

I went through the initial email stage, on to a phone interview where the do the obligatory questions about AND and XOR and all sorts of rubbish no-one cares about, not even them (I asked).

From there it was the face-to-face interview. They booked a 5 hour chunk of my time which I found quite amusing to start with. At least the saw to lunch.

I postponed the meeting by a week, to see how interested they were. They accommodated me and it was full steam ahead.

I was interviewed by 4 different people, one after the other. They could have interviewed me together and got it done in 1 hour.

Their offices were nice, very "we got VC and spent it on beanbags". The people were nice but all drones.

In the end I did not get a job offer. They were very kind to send me a rejection email with a few reasons: apparently I respond to strongly when challenged...

Hmm.. do I have a bad attitude? Surely not! I think rejection was in the mail when I told the development manager that I have no respect for authority (by that time he had started to bore me with silly questions and was contradicting himself).

Why is it that managers think they need to be respected? Surely respect is something you earn, and when it comes to technical ability, even more so.

I find I cant be a drone anymore... been there and done that. I need choice/control over who I work with, I've grown to jaded to work with people who "just dont get it".

Grails, GORM database migration

Yesterday I ran into an interesting problem on a Grails application deploy.

I am writing a financial system in grails. It's a work in progress and so far it's been ticking along ok. Early on, I defined my amounts as 'float' in the domains.

A few days ago we started testing huge amounts for transactions, and realised that they get rounded past 6 digits. So, 1234567.89 would turn out as 1234570.00

The problem: floats in java are not very large, and doubles would have been a better choice. Fair enough, I'm not a java person, so I dont even feel bad about this. underpinning all this is that Grails then magically creates a database table using the mysql float type to match. It has the same limitation.

So, change all the domains where this is of importance and redeploy right ? Wrong. Grails is to addled to tell that I have changed my type from float to double, and does nothing to automagically update my table definition.

So, I ran a schema-only dump in my fresh (correct) dev database, and a data-only dump in my production environment. I then recreated the database with the new schema and overlaid the old data onto it. Dumb luck is that the change was just from float to double and the data could insert fine.

This all got me looking into decent db migration tools for grails. Of which there are none. Liquibase and associated Autobase for grails are just silly with a cludgy DSL. Grails simply has nothing that compares to the ease and elegance of Rails migrations.

When I started this project, the hair on the backk of my neck went up because DB control was left with the framework... seems me foreboding was not misplaced.