Thursday, November 17, 2011

Beware: Mobile Safari's phone detection changes the DOM and can mess your CSS styles

This is just a quick tip which hopefully can make someone save a few hours of pain: If you have a webpage which works perfectly on every decent browser on the earth (that excludes IE6, of course) but, which has some CSS issue on the iPhone and iPad, and only on the devices running iOS5, the likely reason behind the issue is that Mobile Safari is changing your DOM

Long story short: Remember that nifty iOS feature in which you simple tap a phone number inside a web page and your iPhone immediately calls such number? Well, Safari does that by modifying your DOM. In my particular case, it messed a float style in a web page I'm maintaining. Ironically, by messing with that little float, the phone numbers presented in our webpage became totally messed up, so you couldn't tap nor read them. There you have another evidence that we are still a long way from having real artificial intelligence ;)

Anyway, if you don't want Safari to mess with your DOM, simply put the following meta tag in your HTML:

<meta name="format-detection" value="telephone=no">
And well, if you still want your users to tap on phone numbers, simply do the markup explicitly in your code, like this:
<a href="tel:1-404-123-45-67">123-45-67<a/>

Saturday, June 18, 2011

Certifications should die. Do your part.

Until two days ago my reaction to developer certifications was simple. I didn't care. I agreed with the general idea that certifications were mostly useless, but that was all.

Now I think different. I think they are evil.

Certifications have failed to be a good proxy to find good developers. But naive companies still use them for hiring. So what's the big deal?

Problem is, some good developers will fall intro the trap of doing the damn certification because all they see in the surrounding market is that it is required. In other words, there are some good developers that won't have access to a decent company, will give up and will become certificated.

By doing this, they have just validated the certification. Someone will hire them and think "See? There you have a smart developer! And we found him because we looked for certificated people".

So there you have the positive reinforcement for requiring the certification. Of course manager will overlook the cases where the certificated developer was an ineffective one. It's just the way things work.

At this point, the certification has commoditized the developer. Once they got the positive reinforcement, all they will look for is a developer with certifications X and Y. Great for the Human Resources department, but we know that it isn't good at all for the software development department.

Stop a second and think who benefits from this. The crappy developers! As long as they pay some money and pass a test, they can easily get a job. Even if their company eventually realizes they are not good and fires them, they will quickly find another job. And they will keep writing that ugly code you have to refactor or rewrite later.

But this isn't how things have to be. Let's do some backtracking here. Imagine the good developer who felt he needed to have the damn certification refuses to do it. Imagine that he stands by his principles and says:

“Hey!, I know this is crap. I know that there are much better ways to show that I'm a good developer, like participating in open source projects


Then the magic happens. There is no way a positive reinforcement will happen inside companies requiring the certification. By requiring it, they will stop hiring good developers, because good developers will refuse to participate on this stupid game. Eventually they will notice that. Companies that survive for decades are, at the end of the day, not as dumb as they seem.

Great idea, huh? Well, not really! I guess that what I described on the last paragraph is what already happens in markets with good concentration and appreciation of talent like Silicon Valley. I bet certifications don't work there.

And I guess that in the markets where certifications do work, they will continue to work. All these nice theories work great in paper, but go against human nature: If you someone has to cooperate to get a collective benefit (in this case, stop the certification non-sense) by risking what he considers an important individual benefit (an actual job, with actual money at the end of the month), you know what most people will choose.

But here is the interesting corollary: If the market in which you participate as a developer is one where certifications have too much importance, it means you are working in a crappy market. It's a freaking symptom!

Once you realize that, you can do two things:

  1. Move to another market . Which means: move to another city, or move to another technology (Shameless plug: you might be interested on working at Continuum as a Ruby developer in Santiago).

  2. Change your market. It sounds idealist, but it can work and might have very good rewards. Start a company. Compete against the other companies in your market. Show them that they were wrong when requiring those certifications!


That's how you can kill the useless certifications. It is in both your personal interest (participate in a healthy market, work with an interesting technology, become rich founding the right company in the right moment) and our collective interest as a group.

I hope I'm right. What do you think?

PS: Note how all of the above applies to process certifications for companies. If you run or are part of a great company, you should think twice before entering the certification circus.

Read this post in Spanish

Friday, June 10, 2011

Speaking at "Java Day", sponsored by INACAP Osorno

What!? Didn't I hate Java?

Well. not exactly. I do think that it is used for a lot of tasks in which a more powerful language should be used instead. For example, I think that doing web development in Java on 2011 is similar to have been doing web development in C on 1997. But I still think it's a good language for system programming, and has an awesome platform in the form of the JVM.

So, it's not weird to have me speaking tomorrow at the Java Day Osorno. I'll be doing two talks, one of them titled "The cool side of Java" in which I'll show the modern features of Java that every modern Java project should use but, as far as I can see, are not used because people are not aware of it. Or perhaps because they are stuck in a old version of Java. But still, knowing about Java 6 is good (and may help on putting pressure on those developers stuck in the past to catch up the present).

The other talk will be a Ruby introductory talk. Yeah, it may sound weird to talk about Ruby in a Java event, but it's some of the benefits of being a speaker ;). I do think though that by doing it, I might be saving the world from some lines of Java that ought to be implemented on a more expressive language. And throwing JRuby to the mix will make it all perfectly justified :)

Read this post in Spanish

Wednesday, June 8, 2011

Passion

Last night I came back at home late after attending to a Ruby metup organized by Continuum and made possible by many people passionate enough to attend, participate and later share a couple of beers while talking about many interesting topics.

I should be tired. It was a pretty eventful and somewhat stressful day. But I don't feel tired at all.

On the contrary: I feel energized. That's the trick with passionate people: whether they want or not, they exude energy. It's damn contagious.

Passion is what differentiates an awesome experience from a "meh" experience. Think about it. It obviously applies to personal life, sports, and sex, among obvious examples.

Well, it also should be obvious that it applies to work and professional career. Passion makes all the difference between an awesome job and a "meh" job. Passion makes worthwhile to spend about a third of your life working. Actually, passion makes work to not seem like work!

Passion makes us humans, after all.

Read this post in Spanish BlogBooster-The most productive way for mobile blogging. BlogBooster is a multi-service blog editor for iPhone, Android, WebOs and your desktop

Monday, June 6, 2011

Double posting

From now on, most of my blog entries will also be posted in spanish on Continuum's blog. Some reasons:

  • One of the things I didn't do very well while working full time at Continuum was to contribute to our blog. Better late than never

  • I also need to practice my spanish writing. Otherwise you start making silly mistakes like writing "govierno" instead of "gobierno", or "mobil", instead of "móvil".


Read this post in spanish