Wednesday, 25 June 2008

When being a genius means you know you aren't one

I was reading this post by a fellow Googler, and I have a hunch: he is exactly the person he describes in the post. I bet he has this superhuman ability of coming on Monday and telling that the code you talked about is ready, he refactored the whole code base, and since he was bored, he made some nifty application that you needed for a presentation.
And while you are trying to understand what he has done (how is beyond mere mortals), he wants to play foosball.

Add to Technorati Favorites

Monday, 16 June 2008

Workign in a meritocracy

I find it so refreshing working in a meritocracy. The lack of turf wars has such a great impact. I started workign on my 20% in an area I am not going to disclose, but let's call it A. There are people already working in A.
In a normal company it would go like this:
I have to ask my manager if I can work in A.
My manager thinks about whether he is going to gain or lose power with that.
If he approves, I go to my project manager, who can still reject it, because he will lose someone from his project, and possibly, is afraid of losing me completely.
My project manager fights with my manager, and I may go to square 1 if the project manager wins (notice the word "win").
After all this approval, my manager will think the best way of telling the manager A that I'll be working part time in that.
The manager in A will be afraid that my manager is planning a takeover, so they will keep information away just from me.
Whatever was wrong, it will be my fault (because I am the inefficient minion of my manager who is trying to spy in A).
If everything goes well, my contribution will be ignored, since prizes, raises, etc. are for "full time staffers only".

In Google, on the other hand it goes like:
Checking that I am not in absolute crunch time, I tell my manager I'll work in A (and notice it is not ask, request, it is just tell).
I read the documentation.
Tell the team A that I am planning to work on this.
Team A will be really helpful since they can use whatever assistance they get.
If it works out, I will get a positive review, raises bonuses, etc.

Add to Technorati Favorites

Sunday, 8 June 2008

Why is it profitable to goof off?

Last Thursday my desktop was running the tests, I had read all my mail so there was nothing to do on my notebook, so I decided to grab a book I had to read for the job , a Diet Coke and go to the massage chair (OK, it was not goofing off, but the title makes a bigger hit this way). In other companies they would tell me that if I want to read, I do it in my own time, and of course, pay for the book myself.
Maybe that was not the most profitable hour that Google paid, but it meant that on Friday I really wanted to get a test suite to run in 60 seconds, no matter if I had to stay until 2 AM (which I did).

Add to Technorati Favorites

Saturday, 7 June 2008

Creation Museum

Looking around the web (hey, it is almost 1 AM and I am having fun programming and surfing the web), I came across this wonderful description of the Creation Museum (link missing not accidentally).

Add to Technorati Favorites

Tuesday, 3 June 2008

Playing board games Google style


As you can imagine, we have a board games group in Google (actually, several, one per major location). And by board games, we DON'T mean Monopoly . We mean serious games, and, this being Google, it must be large scale.
Last Saturday we played Twilight Imperium Third Edition with the Shattered Empire expansion. It lasted a mere 11 hours (from 12:40 to 23:55). I cannot recommend it enough (if you are into board games, of course), since it has a really good balance between races and the combination of long term strategy and random events works wonderfully. And to understand what I mean by large, just check the picture.

Add to Technorati Favorites

Monday, 2 June 2008

Why return isn't evil?

We know that GOTO is the root of all evil (OK, GOTO and premature optimization). However, why return is different? For instance, if you write in Java...

boolean equals(Object o) {

if (!o instanceof MyClass.class)
return false;
....
}

it is salt, and spice and everything nice, even though it is unstructured. Not only is it OK, it is recommended.
I think I have an idea. In this case you are not breaking the structure of the code. You are just shortcutting a huge else; it is the short for of "else do the rest of the stuff, clear local variables and return a value". However, this doesn't apply for continue of break; In both cases they are unstructed and mean: "continue with an unnamed block of code, but leave variables as they are", which is exactly what GOTO does.

Update Jun 4, 4:04: A colleague reminded me the amazing number of WTFs that can be produced just with returns. I have seen them and they can be as ugly as GOTOs; I mainly meant those clear returns that are nested only one or two levels deep.

Add to Technorati Favorites