Ruby on Rails Jobs

I entered the Ruby on Rails world soon after the Agile Web Development with Rails manual came out, in 2005. Both Rails and its manual are now (2013) at the 4th installment.

Agile Web Development with Rails
The Book

Up to then and for about half a year more, I had been programming in Lotus Notes. It was a wonderful environment for many different applications, based on few, simple and powerful concepts, but for web development it was always far behind what true web environments like LAMP allowed.

I got tired of it and I’d been willing to return to my passion, web development, since I left Italy. In 1995, together with my then best italian friend, Fulvio, we started our first web development business in Rome: Energymedia (webzines publisher). A little later I went to Barcelona as an Erasmus student and right after getting my IT Engineering Diploma, I found a Lotus Notes job in Spain.

At the beginning of 2006 Rails was getting more and more hype so I decided to study it. I was immediately fascinated by its right way of doing. Everything that I knew about web development, and was cumbersome and painful in PHP (I had studied the WordPress code), had been thought of and a nice and easy and coherent solution had been provided.

Unfortunately no one was doing Rails in Barcelona at that time, so there were no possibilities to find Rails jobs. I decided to improve my PHP education and bought the Advanced PHP Programming manual, which was exactly what I needed. It taught me how to do the right things in PHP. Then I got hired by a dynamic but very old-fashioned PHP intranets developing firm.

Advanced PHP Programming
The Other Book

There I mixed up what I had learnt from both books and built my own pseudo PHP framework, with a pretty useful ActiveRecord implementation. I had programmed it for a big office automation project I was leading. Codenamed SIGOV, it was an intranet for the Parliament of Catalonia, used to make laws, from inception to discussion, to approval, to publication. My first commercial PHP project (see my CV).

For five years more I continued working in PHP, but in the summer of 2012 I finally landed a Senior Ruby on Rails Backend Engineer role. It was something really great for me, to be able to work in my beloved environment, but the only way I was able to do it was as a contractor for a USA company, MusicXray.

It’s not only that Rails jobs in Barcelona are still scarce nowadays, but they are also underpaid. Well, all programming jobs and really all jobs at large are underpaid in Spain. That’s the reason why very good programmers have to work abroad. A best friend of mine, which is a very good PHP programmer with whom I worked, had to go to Tromsø, Norway, to raise its salary by about a third.

During my quest for the next Rails job, I had an interesting interview in Barcelona, a couple of months ago. 3scale is one of the very few web companies that at the same time work with Ruby and Rails, have international relevance, and are based in Barcelona. A big chunk of interest in the interview came from the salary they offered, fifty thousands euros gross a year.

In general it is quite hard to compare salary figures between different locations, so I do it with a simple method that gives me at least a rough approximation. The biggest unknown is the amount of taxes a state is gonna take, so I just compare gross salaries per year. This is not as bad an approximation as it may appear at first sight, because we really do (or should) work everywhere for ourselves and for the place we live in. Taxes are the means by which such a social collaboration is done, and to higher taxes usually correspond higher service levels.

Then all I do is a simple proportion like this:

from which I get this formula:

Now, here / there is a factor that takes into account differences in cost of living between those locations, so I usually go to http://www.numbeo.com/cost-of-living/ and use the percentage on the line that reads “Consumer Prices Including Rent”. Sometimes that info is not available, and it gets complicated.

As an example of how this would work in practice, let’s see how much they will be really paying me in San Francisco, California, for a Senior Rails Developer position. According to indeed.com, offered salaries in San Francisco for such a job are about 124000 USD gross a year, and according to numbeo.com, Consumer Prices Including Rent in San Francisco, CA are 44.62% higher than in Barcelona. Thus

3scale offered me a salary which is 22% lower than the average in San Francisco. Instead my last Rails job was eighty thousands dollars gross a year, working as a contractor. That converted to a salary of sixty thousands euros gross a year, and they were really that much because I worked remotely from Barcelona. Still 3scale’s offer was quite interesting, because in Barcelona only a fourth of all programmers seems to get a salary of more than thirty three thousands euros gross a year.

Kids playing Lego
Pair programming in Rails (once in a lifetime chance to do it with a girl)

Another interesting bit of that interview was that the recruiter (i.e. the boss) openly underrated Rails programmers. He compared them to kids playing Lego. I don’t share that point of view at all. In fact, not only I wished to play Lego as a child had I had any chance (they were so expensive), but also programming Rails is much more fun (no girls, though).

The sad thing is that Rails strives to make web building so easy that companies often hire not so good programmers and get some good results nonetheless. Of course they also unknowingly increase the technical debt of their applications. In fact, while in a Lego piece there is only its interface (plastic, color and size), both Rails magic and gems hide entire philosophies. And you should understand all of them before using them. Even if they work as expected, even if we only interface with them, in reality we should not only know what they do but also understand how they do it.

Any fool can know. The point is to understand.
― Albert Einstein

However, I must admit I have a similar prejudice with respect to Ruby. I think many Ruby programs work by chance, and that is almost inherent to the language. With PHP and JavaScript it’s not the same, because they are much more WYSIWYG than Ruby. Not only a single word in a Ruby snippet can be one of many different things (a variable, a call to a method of self, a call to a global method; a class, a module) but you also can never be really sure that the code you see into a class is all there will be into it at execution time. Don’t get me wrong: I love this powerful language, but I doubt many Ruby programmers are even aware of the blades, let alone how to shave without bleeding.

With great power comes great responsibility.
― Stan Lee

The fact that Rails programming is considered of lesser ability than other languages is maybe at the root of why Rails jobs are much less paid, at least in Europe. For example, I recently underwent a job interview for London, UK. All was fine until we got to the salary they offered: it was fifty thousands pounds.

Using the above formula, I get

And that figure is almost as much as I earned in 2007, at the beginning of my PHP commercial experience!!

 

TDD mistake

TDD:

  1. first, write a failing test
  2. then, write just enough code to make the test pass
  3. repeat from 1.

What TDD does is to focus on the interface of any code you are going to write. IMO, only very basic solutions are good candidates for TDD. By basic I mean not simple but minimal, like a REST API.

Content thieves

From time to time I google “Login Dongle” to see if there are any new reviews of my plugin.

Sometimes I find reviews stolen from others. That’s a common issue these days.

But today, I’ve found a new breed of stolen content that deserves some attention.

original content
How to Improve the Security of your WordPress Blog
published on 2012-08-07 by Amit Agarwal

 

stolen content
How to Secure of your WordPress Blog: Improving WordPress Security
published on ??? by ???

Usually, a thief steals content by (automatically) copying it from its original site to their own. You can easily find stolen content by googling a short sentence of any post, between quotes. For example, today I see that that content has been stolen 355 times !!

But in this case the thief used substitutions, thus cleanly defeating the above search check. For example, let’s compare side by side the snippets that refer to my plugin in both versions of the content: original and stolen.

Here is the original version.

This plugin takes a very unique approach to protect your WordPress. It generates a bookmarklet with a secret question that you can add to you bookmarks. While on the WordPress login page, enter you credentials and then press this bookmarklet to get into your WordPress – the button on the login screen won’t work.

Here is the stolen one.

This tool requires a very exclusive strategy to secure your WordPress. It produces a bookmarklet with a key query that you can add to you favorites. While on the WordPress sign in web page, get into you experience and then media this bookmarklet to get into your WordPress – the option on the sign in display will not perform.

As you see, the stolen version has been obtained from the original one using these blind (i.e. automatic) substitutions:

plugin tool
takes requires
unique exclusive
approach strategy
protect secure
generates produces
secret key
question query
bookmarks favorites
login sign in
page web page
enter get into
credentials experience
press media
button option
login sign in
screen display
won’t will not
work perform

I’ve used bold to highlight substitutions that don’t work in the context.

There are two interesting reasons that explain why substitutions are highly effective for a thief even if they are not perfect.

The first is that the thief’s purpose is not to publish understandable news but it is to provide fresh content for their ads. And the second is that Google search engine finds substituted content too, so their ads get the same chances to get printed as the content they steal.

For example, in the results of the Login Dongle search, the original content appears at position 30 and the stolen one at 49. Not bad.