My case against software productivity measurements

Let me begin by saying that this posts comes from a place of extreme hate. I’m going to just say this: I HATE PRODUCTIVITY MEASUREMENTS, not only in software but in anything that is not repeatable. It just doesn’t make sense to me. Why would you want to compare two completely different processes? Creative processes that is. After all productivity numbers are mere comparative metrics. Did you do better today than yesterday? The real problem is not that we want to measure it. I couldn’t care less about that. Trust me I don’t care about the number of tasks I completed in a given amount of time. The quality of my work has nothing to do with how fast I’m able to cook the next big feature. No, the problem is with the use of the metric. The label that you have to carry around with you, that number that really doesn’t mean a thing in the professional world. It only matters in your organisation and for the purpose of improving or speeding things up which by the way seldom happens.

We have gone through various forms of productivity measurements in software development, each one of them getting a bit smarter than the last but still not smart enough. It looks like we also took some hits in this evolutionary trail when function points came to be but it’s something that people have apologised for. So we started with LOCs/hr, then came function points, then came user stories, then comes the great next thing. The problem with all of those is that they really don’t measure productivity at all. They measure only the amount of work done. By now you are thinking I’m the stupid one here because if you already have the amount of work being done is just a matter of dividing it by the time it took you to perform those tasks and voilá: a productivity measure. So to defend myself from those ill accusations lets go back to the basics. Productivity is just the ratio of outputs to inputs in production and what we want is to maximize the output while minimizing the input. And where is the time you might ask. Well when you add time as an input while also taking into account labor you get something people like to call labor productivity which can be roughly defined as the value of goods produced over a period of time. And I can live with that definition if we leave it at that but people don’t. We like to mess with perfection and make everything just a little less perfect. Remember that I said we want to minimize the inputs while maximizing the outputs. In software that means more programs in less time. And that’s where the problem lies. The conflict that arises from the definition of productivity and the nature of every good programmer. We don’t care about writing more programs, there are enough programs out there. We don’t want more. Developers care about writing better, more efficient and more elegant code. We want to do it quickly but we understand that great things take time. We also know that undignifying code happens very fast.

In the past (I hear some people still do) productivity was measured by the use of a very stupid tool called the Source Line of Code (LOC or SLOC). Meaning that the more lines of code you wrote the more productive you were. Even as I write it it just sounds stupid. Those were some dark, dark times. Developers being the smart people that they are caught up with the metric and found ways to trick it. And they did wonders at that. There is some merit in this and it might have made sense back when there weren’t as many programmers out there. Or even when the tools that were used to develop software weren’t as many as they are today. Let me exemplify:

#include<stdio.h>
int main(){
   printf("Hello world");
   return 0;
}

This is the classic hello world written in C. It took me about 30 seconds to write it. It has 5 lines of code. So that would mean that my productivity was around 600 LOCs/hr. WOW! I must be good. But I know I can do better than that. Lets give it a try.

#include<stdio.h>
int main()
{
   printf("Hello world");
   return 0;
}

Now I’ve added an extra line of code with no penalty to my time, still 30 seconds. So my productivity is now 720 LOCs/hr. That’s what I call an improvement in productivity. Ok, this doesn’t really count but it’s just an example of what can be done to trick the system.

Some people go as far as comparing different languages when it comes to measuring productivity in LOCs. That same program in Java looks like this:

public class Hello
{
   public static void main(String[] args)
   {
      System.out.println("Hello world");
   }
}

It took me the same 30 seconds to write it (I’m getting better and better each time). My productivity for that program was 840 LOCs/hr. I’m so getting a bonus. Now lets try ruby:

puts 'Hello world'

A second to write it. 1 second for one line adds up to a productivity of 3600 LOCs/hr.

So by now you see why this is just a stupid method. If a developer is measured with this system trust me that he’ll find a way to do the job in more lines of code. So instead of wanting to maximize the amount of work done we are now maximizing the number of lines of code while minimizing the time. Most of the time more lines of code equate to more difficult maintenance (don’t quote me on this one, it’s just my gut feel mixed with my personal experience). And since the maintenance of software products is where most of the time is expended we should want to make this as easy as possible. And all of this applies to whatever measure you pick. It just doesn’t make sense!

I guess what I’m saying is we the developers will adapt to whatever form of measurement you apply to us. Want us to be waves we’ll behave like waves, measure us like particles and you’ll get particles. In the end we will always be very very productive even though we couldn’t care less about your number.

I couldn’t have said it better

One of the best scenes ever:

“Um, thank you. I’m not much for public speaking. Or much for speaking. Or, come to think of it, much for the public. And I’m not very good at lying. So let me just say that, in my experience, high school sucks. If I had to do it all over again, I’d have started advanced placement classes in preschool so I could go from eighth grade straight to college. However, given the unalterable fact that high school sucks, I’d like to add that if you’re lucky enough to have a good friend and a family that cares it doesn’t have to suck quite as much. Otherwise my advice is; Stand firm for what you believe in, until and unless experience proves you wrong. Remember, when the emperor looks naked, the emperor *is* naked. The truth and a lie are not sort of the same thing. And there is no aspect, no facet, no moment of life that can’t be improved with pizza. Thank you.”

2 sugars and a little cream

It was a not so fine morning today. I wasn’t feeling all that well and all of a sudden my best friend in the whole wide world decided to question our bonding process. After all this time it is still very hard to determine why we are still so close… Our story is really a rather boring one I think. Nothing extraordinary with how we met, at least not to my knowledge. We were just two teenagers trying to get away from our boring-ass town. It was a on Xmas night, I was bored and had too much to eat and I was just passing in front of her house so I decided to stop by. That was the point were it all started. One stop on a night drive and I was hooked and even after all this time the question still remains “what made us that special that even after all this time we are still best friends?” I have given this a lot of thought and I came to a simple conclusion. It’s all about the coffee and how you take it. We know exactly how the other takes his/her coffee, what he/she likes and what one would prefer to avoid.

There are two things I say make us work. The first one being that we hold a very very deep admiration for one another (at least I do for her). It really impresses me whenever she gets into a conversation about what she does. I really don’t know that much about her professional world for that matter but I sense passion for the subject in her and that’s what you really want to find in someone, passion. It’s like whenever I hear her I know something mind blowing is about to be said. She has the capacity to make her world so simple even though it’s not. Make connections where you thought no connections could ever be made. You just want to go an read everything about the subject just so can participate in those conversations. She also has this Socratic way to her which makes talking with her all the more interesting.

The second thing is that we managed to grow our friendship from the school yard to the real world. We went from talking about expectations to talk about realities. Back when we first met we focused on what we wanted to do, all the places we would like to visit and the places we wanted to drink coffee at. We talked about how it would be great to end up in the same city and just be completely awesome in it. Neither “Friends” nor “Will and Grace” would have anything on our life experience. It turned out that we ended up in the same city and we were indeed awesome but in a not so sitcom kind of way. I started noticing how our conversations shifted. It was no longer about what we were going to do when we grew up but rather about how the real world can be very sucky. The conversation grew up with us. It was all about what would happen if we actually failed. What would happen if we didn’t finish college, what happens once we graduated. And even to this day we are still intrigued with those kinds of subjects.

I can summarize the two previous points into one very simple and cryptic phrase: we are such good friends because we know how we like our coffee. It goes without saying that we go the extra mile just to make it perfect and I’m very happy with that.

Queens of the clockwork

A couple of weeks ago I decided to give Queens of the Stone Age another chance. I’ve always liked their sound. “Go with the flow” is an awesome song and every time I listen to it I really want to go with the flow, and something similar happens when I listen to “No one knows”. Then I try to get the fact that I thought “Little sister” was about incest but in fact was about being in love/dating a prostitute. Anyway I like them I just don’t love them… or I didn’t know I loved them.

Back to the story, I was pretty much getting fed up with my repeating playlist returning from the gym so I decided to turn on the radio, the old FM. And boom that’s when I heard “Smooth Sailing” for the first time and not just that, the first phrase that came through my ears was: “I blow my load over the status quo”… That’s some rock and roll, that’s the most badass thing you can probably sing about on the radio. At first I didn’t recognize the voice but then it dawned on me, it’s Josh Homme. I was a bit skeptical because it didn’t sound a lot like Queens of the Stone Age, well not like the Queens I remember, I never cared for “Era Vulgaris” and the only song that I really liked from “Lullabies to Paralyze” was “Little sister” but “Song for the deaf” was a solid record, granted I couldn’t listen to it in a single sitting but it was good. It arrived in my hands when I needed some soft hard rock and now this was happening again. So I’m in my car thinking that the song is awesome and that was probably going to be it, but then the next song on the radio was “Kalopsia”. The DJ was going through the whole new album

…Like clockwork is the sixth studio album by Queens of the Stone Age and, SPOILER ALERT, it is awesome. The sound, the lyrics, the riffs, the drums everything is a great experience. It’s an album that’s meant to be listen to as an album not a set of songs but rather a whole story of ups and downs. So go ahead an listen to what I consider the best record in 2013.

Take up a masters they said, it’ll be fun they said

Well this is awkward, just mere two years after my graduation from University I’m back at the same school. Well, virtually the same school and I’m not talking about the changes that the buildings my have suffered but rather the fact that my masters program is a virtual one. Yes, I get to go to school on my computer, so if I thought I couldn’t be any geekier I just proved myself VERY wrong. At first I thought: “well this is going to be rather easy, I just need to make sure that I do all my work like before and I’ll do just fine” and then reality came barging in with a can of whoopass just for me. As it turns out it is a bit harder than just reading and doing my homework.

I really like studying, if I could get paid to do it I wouldn’t think twice about it. But this is very different. “Attending” a virtual comes with its own set of bugs/features, pardon my geek:

Collaborating with people you don’t even know
One of the things that come with being able to go to class on your computer is that there are no geographical constraints any more. Anybody just about anywhere could end up being your classmate which is awesome but at the same time not so much. The main problem is that even at this level of education people don’t seem to be studying because they want to better themselves and you can tell by the lack of commitment. One of the great things of everyday physical interaction with your classmates is that you develop a sense of responsibility towards them when it comes to team work. The fact that you will see them and be working with them the rest of the period makes you think twice about not delivering that piece of work the team is expecting you to do. This face to face interaction is nowhere present in virtual courses, your classmate is reduced to an email address which in my case is just their student number (not very helpful!). When it comes to grading group work it makes it rather difficult to be objective about what grade each member deserves, though a good collaboration tool really helps this part of the issue (more on the issue later).

When is this effing paper due?
This is not a problem with the platform but rather with myself (well the platform does make it very damn hard). A little more background on this: there’s this little ugly platform called Blackboard and everyone seems to love it, I on the other hand have nothing but utter disgust mixed with true and untainted hate for it. Being completely objective is not that bad, but it isn’t good either… ok parts of it really don’t work with my way of life. The calendar module for example has no way of exporting your tasks which in turn makes it really difficult to plan your work ahead. You can either plan your whole semester out front at the beginning of it or you can go back every week and check if there’s anything due, that added to the fact that there’s no real professor reminding you that you have to do your homework leads to me not turning in my mid term paper in time (not me, I always turn my mid term papers in time). It’s hard to think that even today there’s no way to export it to your mobile calendar, or even to Outlook or Google Calendar. Bad, bad, bad!

Where can I buy the freaking book?
At the beginning of the course you get a list of the materials you are going to be needing throughout the duration of the course, and that’s fine. But it’s very hard to find where to buy the books. Most of them are English editions (which they don’t sell in Mexico thank you very much). You can buy them from Amazon and get them 5 weeks later, just in time to study for finals which is in no way a solution. Some of the books have kindle editions or other mobile solutions but not all of them. I really think for this kind of courses professors should make sure that the material for the course is easily accessible.

On and on the experience has been great. Team work while hard is fulfilling (I just threw up a bit). So if you are thinking of going back to study to get a masters me recommendation is to do it. At the end of the day an extra diploma in your office looks awesome!

Apparently the night moves!

Yesterday a friend of mine and I went to a concert. It wasn’t the kind of concert I usually go. No slam, no people smoking hell I didn’t even have to wait standing for the concert to begin. That’s right we had assigned seats which to tell you the truth is a first for me, don’t get me wrong the seats were awesome but I still think I need the thrill of the fight to get to the front line. Okey so we were there waiting for the concert to begin, we bought a couple of beers. We thought we really needed them because to tell you the truth we were embarrassed to be there. So why would we pay money to go to a concert that we were embarrassed to go to in the first place? It’s all about nostalgia, and that feeling you get when you remember how it used to be back when it was easy, back when the only thing that matter was not losing your “tazos” to your friends. That time when you were 8 years old which is when we used to listen to Fey, there I said it. I went to a Fey concert and I actually enjoyed it. Being there made me realize something, I like to remember how things used to be, I like to remember how I imagined myself as a grownup and most of all I love the fact that I’m not anything that I imagine myself to be.

Things to do before I die

Here I am again talking about my imminent death, but hey I really want to know that by the time I’m done my list of TO DOs y finished and the only way I tend to do things is when I write them down. So here it is as of the year 2012:

  • Learn how to use a bow and arrow
  • Go to a Green Day concert
  • Go to a SXSW festival
  • Go to a ACL
  • Buy a house in the city
  • Buy a house on the beach
  • Buy a Mustang
  • Get a masters degree in computer science or something of the sort
  • Get married
  • Buy a house with a basement and turn it into a theater room
  • Attend a ruby conference
  • Live in a house, a very big house in the country
  • Have 4 children and name them after the Teenage Mutant Ninja Turtles (not likely but dare to dream)
  • Learn to cook
  • Taste a salad

This list will continue to grow I know, but for the time being I have a lot of stuff to keep me busy for a while.

Just try!

I was reading the other day a post on “What’s new” with Rails and I came across a clever little method that is added to the Object class: Object#try. It works in a very simple way, it checks to see if an object responds to a method if it doesn’t well it fails misserably and does nothing but no errors are thrown. For those of you that love exceptions you are not going to like this.

I tried a very simple and probably is not the way that Rails implemented it but it does the job, a very small job since it doesn’t handle blocks or anything of the sort. Keep in mind that I came up with this in 0.005 seconds so it’s probably wrong in some very serious ways.

class Object
  def try method
   if respond_to? method
      send method
   else
     self
   end
  end
end

"hello".try(:hello) #=> "hello"
"hello".hello #=> NoMethodError
"1".try(:hello).try(:to_i) #=> 1

I’m sure Rails version is more complete than mine. I would expect it to handle arguments and blocks. If it doesn’t then what are they thinking!

And as Ben Parker once said, with great power comes great responsibility. I do see some places where this is going to cause more pain than relief

Things to do when I die

While I was walking to the gym yesterday it suddenly hit me “I am going to die”, someday in the near future I will no longer be on this earth. And I’m sorry but all this fatalists ideas got me to thinking how I would like my funeral to be. I’m not really talking about what flowes I would like the funeral home to be decorated with, or where I would like my friends and family to cry for my untimely death, I can take care of that and I will… soon.

I’ve only been to one funeral and it wasn’t very exciting or fun. Don’t get me wrong, the lose of a loved one is a kick to the balls, but you have the rest of your life to deal with that. I really don’t want my funeral to be anything like that. I don’t want people to celebrate that I finally died either, but I want my friends and family to get together with my ashes, NOT BODY, and hang out like we used to do back when I was alive.

So with that said I do have a request for my funeral and if for whatever reason it’s not granted I will come back from the other world and hunt your asses for eternity. It’s a simple wish I want the following list of songs to be played on the background, and this is because if something really defines me is my incapacity to be in complete silence. SOOOOO HERE IT IS:

  • Good Riddance (Time of your life) – Green Day
  • Save The Population – Red Hot Chili Peppers
  • Sex Type Thing – Stone Temple Pilots
  • Read My Mind – The Killers
  • My Immortal – Evanescence [OHH THE IRONY!!!]
  • María – Café Tacuva
  • On The Wagon – Green Day
  • Holidays – Miami Horror (feat. Alan Palomo)
  • Interstate Love Song – Stone Temple Pilots
  • Friends – Travis
  • Before You Were Young – Travis
  • Safe – Travis
  • The Distance – Travis
  • Schism – Tool
  • I Wanna Be Sedated – The Ramones
  • London Calling – The Clash
  • Die, All Right! – The Hives
  • Two Princes – Spin Doctors
  • Chocolate – Snow Patrol
  • Before I Forget – Slipknot
  • Crash The Party – Ok Go
  • Puente – Gustavo Cerati
  • Somebody That I Used To Know – Gotye
  • Waste – Foster The People
  • Country House – Blur
  • Revolución Sin Manos – Fobia
  • Knowledge – Green Day
  • Flowers In The Window – Travis