Tuesday, February 5, 2013

On programmers and programming languages. Your opinion?

This is a small article in which I want to talk about a couple of issues that I sometimes talk about with my colleagues at work, but most of the time keep to myself. These are two subjects that I would like to know the general software community’s opinion about.

The first thing is regarding the role of software developer and using different programming languages in your work.

The second is regarding what makes a good programmer.


Let’s start with the first one:

I consider myself a software developer, more than a Java developer, Ruby developer or any other language specific developer. I think this is a very important thing in this field of work. To be able to produce results in any language that you work with, without having prejudices against them.

I am not saying here that you need to like all programming languages, but what I am saying is that you need to consider that most programming languages have good characteristics and advantages over other languages, no matter if those other languages are your favorite ones.

I am not saying either that you should be an expert on every language out there, but I do think that you should try to be good in at least two languages that are different enough between them to involve certain change of thinking going from one to the other.

It is also fine to be an expert in a particular language, specializing in it. But this doesn’t mean disregard the other ones as useless. I’m talking about this for two main reasons. First because in my current job and in my current position we were very recently looking for Java and Ruby developers. Not Java developers and Ruby developers. But a Java/Ruby developer to work in both languages at the same time. The other reason is that I usually write in this blog about different things in technology and mainly about Ruby and Java as they are the languages I know better.

In both scenarios (interviews and blog writing) the majority of the people that works in one of this languages disregard the other one as complete horrible. The Ruby people say that they will never work with Java as it is cumbersome, full of boilerplate, full of XML, horrible syntax, too many frameworks to care about, boring typing, and a big etc. The Java people say that Ruby is a toy language, some people say working with it is not even programming, they say is just too slow to do anything useful, that everything is a mess without types, that metaprogramming is magic that you just don’t know what is happening and another big list of etc.

So it is really hard to find developers that work and enjoy working with this two different languages (and probably between any two different languages). Sometimes it feels like they don’t even want to give the opportunity to the other language to prove its worthiness and is simply discarded from the beginning. Sometimes I really think it might be a case of laziness to actually try and learn something new and different when you are in the comfort of what you already know. I, on the other hand find this learning really interesting and definitely worth my time as I think it makes me better as an overall developer and help me understand the goods and bads of every language, because I can tell you, both Java and Ruby are very good languages in their own way.


The second point I wanted to talk about is regarding on what makes a good programmer.

What brings me to this particular subject is the way I see myself and the way I see all developers I work with or the ones I interview or even the ones whose code I look on different open source projects.

I can’t really answer what a good programmer is as I think it can be different things to different people. As an example, I try to use good programming practices a lot in my day to day work, I try to use and enforce the use and benefits of TDD on my colleagues. I try to enforce the use of simple principles like DRY, SRP, and also the readability and conciseness of the code that I and my colleagues write. I also think that I find good solutions to the day to day tasks that I have, and I try to think of the best possible ways to solve the problems at hand. So in that sense, I consider myself a good programmer.

However, from a different perspective I would say I am not really good at all. This perspective comes into place in let’s say, for example, an environment where I need to develop really super efficient algorithms using mathematical efficient formulas to solve problems. It comes to mind maybe things like 3D gaming, Artificial intelligence and the like.

As an example, I was recently solving a couple of problems in TopCoder. One of the problems took me like 1 hour to solve I would say. It was an implementation that if I don’t remember wrong had a couple of for loops (one nested inside the other) and 3 or 4 if statements. I remember it also had a HashMap structure for storing some middle results of the final computation. I was happy that I solved, but I knew it didn’t look great (not the code itself, which was OK, but the solution as a whole), so I went on to see other people’s solutions. One of the solutions I found was 2 lines of code with a couple of mathematical formulas that really didn’t make sense to me at that point, and that I had no idea how that small thing could do all that my 30 line algorithm did. So from that point of view, I would say that the other guy is definitely a better programmer than me.

So sometimes when I am interviewing people at my job, asking my questions (What is Dependency Injection, What is AOP useful for, Explain how you use Strategy pattern, etc etc...) if they don’t have any idea of this I always wonder if they might be amazing at this other programming skills that I maybe don’t have. But I guess I can’t really know, as we are looking for a particular profile, and if it doesn’t have the skills we require, we say he is not a good programmer and he doesn’t get hired.
That happened very recently, some colleague was interviewing this Computer Science PhD who didn’t answer any of this questions, and so he was rejected as he was no good at all. But I ended up wondering. If he’s got a PhD he needs to be good right?. Maybe he is just good at different things and not at what we are looking for.

1 comment:

Carlo on Data/Software engineering said...

Dan Talpau has left a new comment on your post

"

I think good programmers are less concerned about programming languages and more focused on getting things done. A programming language is only a tool, like data structures, algorithms, etc.

All the good programmers I've seen (the ones highly productive) are using the best tool for the job. And they care less about arguing which language is better. It really depends what problem you're trying to resolve. C, Java, Ruby, Scala, Go, Clojure, JavaScript, etc... they're all great, but not for all the tasks. Each language has "blind spots" and one should not try implementing all the solutions using a single language.

You know, follow the KISS principle - Keep it simple, stupid.

I think Java/Ruby is a great combo, because these 2 languages don't overlap too much. Java/Groovy less so.
Go/Java/Ruby/Clojure is even a better combo because each language will teach you something really different.

However, languages are not everything. I'd rather work with someone good at algorithms and data structures, even if the only language he knows is python. I consider algorithms and data structures to be more fundamental. One can master all programming languages for nothing if one knows how to use only a HashMap or an ArrayList.

The idea is that we are still using most of the algorithms and data structures invented 50-70 years ago; there has been progress in this area, but things are moving slowly. Whereas when you look at frameworks and libraries, these things become deprecated with the speed of light. You know maven today, good luck tomorrow. You know graph theory today, that will be mostly the same tomorrow.

Regarding your interview process, if someone can prove you that he's a good problem solver (logical puzzles), knows data structures and algorithms, then I guess that person can learn any framework/library quickly enough. Ask them to come for a full day interview, where you'll pair for the whole day. Should give you enough insight to see if he has potential.

"