Gimli, son of Gloin, on software development

How to measure the productivity of a software developer has been an ongoing debate for years.

They studied professional programmers with an average of 7 years’ experience and found that the ratio of initial coding time between the best and worst programmers was about 20 to 1; the ratio of debugging times over 25 to 1; of program size 5 to 1; and of program execution speed about 10 to 1. They found no relationship between a programmer’s amount of experience and code quality or productivity. (Steve McConnell, Rapid Development)

Imagen de Legolas y Gimli en la peli de 1978

Gimli le explica a Legolas la vida del programador

From the number of lines of code written to assigning function points to each part of the code depending on complexity, there is a whole set of proposals out there.

Consider both points above together – your coworker codes 25 function points in one day, but they’re all simple validations (if text box “a” is not a date, throw an error…)

In the same day, you stared at the screen for six hours, whiteboarded a lot, then rewrote one line and deleted fifteen other lines, making a major part of the data processing engine faster by two orders of magnitude.

So he wrote 650 lines and 25 function points, you wrote *negative* fourteen lines of code and no new function points.

Who’s “better” ? (Joel On Software Forum)

J.R.R. Tolkien, in The Lord of the Rings,  was so kind as to take some time to explain, through the words of Gimli the dwarf, the most complex and marvellous part of a software developer’s work.

We would tend these glades of flowering stone, not quarry them. With cautious skill, tap by tap – a small chip of rock and no more, perhaps, in a whole anxious day – so we could work, and as the years went by, we should open up new ways, and display far chambers that are still dark, glimpsed only as a void beyond fissures in the rock.

Why are you doing what you are doing (2)?

Matlab, the computing environment, had quite a nice sense of humor while presenting examples of applications to do with it. From drawing a penny to simulate the flushing flux of a toilet, a list of hidden commands will give you some interesting hints about how to use the environment.

But my favorite was always the why funcion. I could imagine a pair of mathematicians implementing the environment, reaching a dead-end on a development or failing to find the origin of a bug on the software. They both ask why the system is failing. Why they can’t find the error. Why do they need to implement this part of the system in the first place. Why. Why! WHYYYY!!!

And then, one told the other, “Wouldn’t it be awesome if there where an automatic way for finding it out?”. And the other one smiled. “Let’s work on it”.

Matlab’s why function is just a random generator of answers to this typical question. Things like “Because she asked some system manager” or “Because Bill wanted it this way”.

The funny idea and the random answers don’t hide the fact that we need to know why. Besides, we need to ask why. We need to know if we’re doing what we should be doing.

If you’re not doing it because of this, maybe you should stop doing it. And start doing the right thing you only can do.

In fact, one of the randomly-generated answers to Matlab’s why function is “Don’t you have something better to do?”

Finding Focus, and Pride, and Satisfaction

For a knowledge worker, being able to focus is the most efficient productivity tool he can ever achieve.

Here’s the trouble. We all know that knowledge workers work best by getting into “flow”, also known as being “in the zone”, where they are fully concentrated on their work and fully tuned out of their environment. They lose track of time and produce great stuff through absolute concentration. (Joel Spolsky)

Interruptions are productivity serial killers.

Programmers cannot work effectively in an interrupt-driven environment. Make sure your working environment protects your programmers’ flow state, otherwise they’ll waste most of their time bouncing back and forth between distractions. (Jeff Attwood, The Programmers Bill of Rights)

Being productive at work requires focus. By definition, you can’t focus on more than one thing at a time.

This mental juggling act is one of the most difficult aspects of programming and is the reason programming requires more concentration than other activities. It’s the reason programmers get upset about ‘ quick interruptions’ – such interruptions are tantamount to asking a juggler to keep three balls in the air and hold your groceries at the same time. (Steve McConnel, Code Complete)

But focusing is not privative for programmers or IT workers and it’s not a recent invention. Tolstoi’s novel Anna Karenina, tells us about Constantine Levin, who decides helping his peasants laboring his fields. His lack of practice doesn’t let him work well, nor enjoy the task.

The grass was short close to the road, and Levin, who had not done any mowing for a long while, and was disconcerted by the eyes fastened upon him, cut badly for the first moments, though he swung his scythe vigorously. […]He felt as he swung his scythe that he was at the very end of his strength, and was making up his mind to ask Tit to stop.

After the firsts clumsy efforts, Levi doesn’t give up, and keeps mowing and thinking how to make his technique get better.

His pleasure was only disturbed by his row not being well cut. “I will swing less with my arm and more with my whole body,” he thought.

Finally, he suddenly starts working well, he is fully focused. He doesn’t care about no other thing than his scythe, the field in front of him and himself.

He thought of nothing, wished for nothing, but not to be left behind the peasants, and to do his work as well as possible. He heard nothing but the swish of scythes, and saw before him Tit’s upright figure mowing away, the crescent-shaped curve of the cut grass, the grass and flower heads slowly and rhythmically falling before the blade of his scythe, and ahead of him the end of the row, where would come the rest.

He has reached “the flow”. He is working “in the zone”. This is important because his work is better. But also for a more important reason.

Another row, and yet another row, followed–long rows and short rows, with good grass and with poor grass. Levin lost all sense of time, and could not have told whether it was late or early now. A change began to come over his work, which gave him immense satisfaction.
Anna Karenina (vol I, 3rd part, chapter 4)

Reach the flow. Get into the zone. Work better. Enjoy your work.


Related: Interruption, communication and rubber ducks


Why are you doing what you are doing?

Batman: It’s just something I have to do.
Vicky Vale: Why?
Batman: Because nobody else can.

Bruce Wayne: People are dying, Alfred. What would you have me do?
Alfred: Endure, Master Wayne. […] that’s the point of Batman, he can be the outcast. He can make the choice that no one else can make, the right choice.

Why are you doing what you are doing?

  • You aren’t doing it because they told you to do it.
  • You aren’t doing it because you think you should.
  • You aren’t doing it because they’re paying you to do it.
  • You aren’t doing it because you think it needs to be done.

You are doing it because you know it’s the right thing to do, and because if you didn’t do it, nobody else would.

If you’re not doing it because of that, maybe you should stop doing it. And start doing the right thing you only can do.

Focus and The Fellowship of the Ring

“I wish it need not have happened in my time,” said Frodo.
“So do I,” said Gandalf, “and so do all who live to see such times. But that is not for them to decide. All we have to decide is what to do with the time that is given us.”
(The Fellowship of the Ring, Tolkien)

So remember:

  • Bad happens
  • Bad happens even to you
  • You must embrace what has already happened, learn from it, master it and then focus on doing your best to improve it