The Clean Code Blog

by Robert C. Martin (Uncle Bob)

Hordes Of Novices

19 November 2013

Is the software industry trying to write the script for Hamlet by hiring a million monkeys to bang on keyboards? Perhaps we should rethink that strategy and hire one bard instead. Perhaps, instead of hordes of novices, we need a small team of professionals.


Do we need more software developers? The answer to that would seem to be obvious. The demand for software continues to rise at an exponential pace. We need software for our laptops, for our smart phones, for our tablets, for our thermostats, automobiles, televisions, toasters, watches, and even our doorbells. We need software to handle the clerical burden of massive government programs. We need software to sell our products, to buy our goods, to auction our junk. We need software to book our travel, to sort our music, to manage our inventories, to pay our employees, to keep our accounts, to guide us to the store, and to alert us to a fire.

We use software every day of our lives – every hour – every minute – probably every second. We’ve come to depend upon it. We need software. We need lots of software. Indeed, software has become so critical to our society that it may well be that our continued survival as a civilization depends upon it.

So, then, clearly we need more software developers. Right? I mean who’s going to write all this code if we don’t get more and more and more programmers to write it? It seems obvious. And so companies continue to hire, more and more developers. Entrepreneurs keep thinking up new and interesting applications and need more and more developers. Governments keep on thinking up new massive policies that need websites and backend systems, and so they hire more and more contractors that hire more and more developers. More and more and more and more and more.

In response to this demand we see the foundations of our university system beginning to crumble. Colleges can’t supply enough developers. What’s more, the software industry has developed a healthy distrust in the competence of college graduates. Interviewing bachelor trained computer science graduates can be a disheartening experience. When it’s possible to get a degree in computer science without writing any code, the quality of the graduates is questionable at best.

So up have sprung the code academies, the programming boot camps, the on-line programming courses. There are more of them every year. It’s a growth industry. And they promise to turn you into a competent programmer in N weeks. Some charge per lesson. Some charge a tuition. Some force you to promise a percentage of your first year’s salary. Some make deals with employers and act like recruiters. Some are even free.

These programs are attracting people to them, and employers, desperate to add developers, are hiring them. This trend can only continue to grow.

Nine Women. One month.

But is this what we need? Do we need more hordes of novices? Do you really get software built faster and better by throwing ever more barely competent bodies at it? Is the software problem really a raw manpower problem? Is coding the same as bricklaying? More bricklayers means more bricks and more coders mean more code; but is more code what we want?

Or do we want less code? Less code that does more. Much less code, written much better, doing much, much more?

If one doctor can transplant a heart in ten hours, can ten nurses transplant that heart in one hour? Can a hundred nursing assistants transplant that heart in six minutes? Can six hundred hospital receptionists transplant that heart in one minute?

Your first time.

Do you remember that first line of code you wrote when you were very young. Do you remember the thrill it gave you to see that line of code actually execute. Do you remember the feeling of power it gave you. You were the master. The machine was your slave, and you could make that machine to anything!

Many of us became programmers because of a moment like that. Many of us quickly learned a language and then started writing dozens of lines of code, even hundreds. We thought we were programmers.

I started taking flying lessons a few months ago. The first lesson was free! The instructor took me up in a lovely little Piper Warrior, and then handed me the yoke. With no instruction at all, I was flying! Whoo! Hoo! I can fly! I can do this! I’m a pilot!

See the parallel?

We landed, and I signed up for lessons. And then the instructor gave me twenty pounds of books to read. He signed me up for hours and hours of ground school lessons. I’ve been reading and studying like a college senior the day before finals ever since then. I do homework. I take quizzes. I attend lectures. And how much flying do you think I’ve done? I just checked my log. I’ve been in the air for just over three hours, including that first free flight.

I’m not allowed to just hop into the airplane and do what I want. My instructor must be with me every moment that I am near an airplane.

At first he guided me through the pre-flight inspection, over and over. He showed me how to crawl around the airplane checking the wheels, the prop, the engine, the wings, the fuel, the control surfaces, the oil, the air intake, the pitot, the stall warning, the… Then he let me do it and he watched every move I made. He corrected the slightest error and oversight. When he was satisfied that I could inspect the plane competently, he signed my log giving me permission to do the pre-flight inspection alone.

He signed my log! If at some future time there is an incident, and it is discovered that something should have been found in the preflight inspection, his name will be found on my log. He will bear some of the responsibility!

That’s Just Software

Is our industry doing the equivalent of offering free rides to hopeful software developers, calling them pilots, and throwing them by the thousands into airplanes just to watch them crash and burn? The evidence is pretty compelling. There’s a lot of crashing and burning out there. Is that because nobody is signing the log? Is that because we haven’t really been training them to be pilots.

Like the frog in boiling water, have we become so inured to the fact that software systems crash and burn that we shrug it off and say: “That’s just the way software always goes.”

Cannon Fodder

Do we really need to keep on recruiting and training cannon fodder to throw at software projects? Or should we rethink this. Perhaps, instead of throwing hordes of novices into the air to crash and burn, we just need a few good pilots who can carefully and competently complete the missions.