Saturday, March 15, 2014

Acquisitions

Today I wanted to talk about two acquisitions.

  • On one side, Facebook and Whatsapp. $19 billion. There are many different opinions. Craziness. Logic. IMO the money paid is crazy, but the deal has a lot of logic for Facebook. Because for many people around me (including teens), Whatsapp is THE social network. They(we?) share things like images and videos, status. We use it almost everyday. Food for thought: when was the last time you got to know anything reading it on Facebook? 
  • On the other side, Simple and BBVA. Simple wants to be the new bank. And it has been bought by a well known international Spanish bank. $117 million. I worked for one of the banks that end up being BBVA in 1999. Very interesting project by the way (Data Warehouse). At that time, BBVA launched a pure online bank called Uno-e. It was supposed to be the way to go. Very appealing technology. Santander, another international Spanish bank bought something called Patagon. 15 years later Patagon does not exist (it is called Openbank). But both Openbank and Uno-e languish in the Spanish local market. I would be surprised if Simple does not follow a similar path.

I know there will be lots of different perspectives. But don't think about the amount. Think about the whole picture.


Thursday, March 13, 2014

Optimizing

A few days ago I went to a meeting and we were discussing (among lots of different topics) various optimizing mechanisms for a web application.

After the meeting had ended, I came to the conclusion that, implicit in all the conversation, I was not fully aware of the most obvious step previous to any optimization:

Measure

You cannot optimize if you don't know what do you need to optimize. Is it a database problem? A web problem?

The guy interviewing had tried to push me further.  What to measure? Memory, CPU and request time I vaguely remember replying. What tools to use? At that point I probably screwed up the meeting, but that worth a post on its own.

I was thinking along these terms while preparing for a different interview. And I suddenly realized that "what to measure" is also important and the answer I provided can be valid but is not the only one. Yes, I knew it from courses. But now I've learnt it.

Good thing about selection processes is that you learn a lot from the processes themselves.

Wednesday, March 12, 2014

Tipping point

I'm happy. 

I was developing a feature that allows to export from my showcase project Whendoigo to TripIt

I was using a gem from TripIt. A gem is kind of a library for Ruby (sort of jar for Java). The gem simply encapsulated the API from TripIt. But it was failing and apparently everything on my project was correct. So this time it didn't took me too long to start debugging the actual gem's code.

The exception had traces with ActiveRecord references. ActiveRecord is an ORM, (think Hibernate or iBatis for Java). It's part of Rails. And the gem shouldn't have any dealing with ActiveRecord

The code that was failing was a bit difficult to understand. It uses one of the more powerful features in Ruby called meta-programming, but not with the more typical ways. Trying to put into words, it was creating a class with a dynamic name on the fly, and then instantiating an object of that class. 

What happens when the name it is trying to use is already being used in a different part of the application? To avoid that issue, the gem was creating the names with a namespace. 

And that should have been all.

But it wasn't. Lots of debugging and some restructuring later I found the problem. 

The names were being cached and when asking for the names it was asking for the names with the namespace... or without it. 

Two lines of code. A pull request. It took me a while. 

Not many people would appreciate the reason. 

But I'm really happy.