Tuesday, January 27, 2009

The "Any Competent Programmer" BS

An Embedded.com columnist wrote an article asking "Why aren't developers interested in Ada", which was pretty good, but the first comment on the article kinda got me going.

Scottish Martin's comments do absolutely make some good points, and I had no quibble with them. He ends his comment, though, with one of my pet peeves: "A professional team can develop quality software whatever the chosen implementation language and toolset." (And that just set me off--though Martin's just in the wrong place at the wrong time. :-)

That statement is analogous to the "Any competent programmer can write good code in any language" trope.

The advocated language could be Ada, Lisp, Haskell, or any of many others that face an uphill struggle for acceptance. The advocacy is dismissed with the claim that programming language choice just doesn't make much difference, and after all, a competent programmer can write quality software in any language.

While this claim about the ability to create good code may be true, it's irrelevant, and is usually thrown in the face of a developer who is advocating the use of a programming language that differs from the corporate herd selection, in order to shut them up, which it too often does. The claim, though, begs the question of how much it costs, in time and money, to develop that quality software using a chosen language and toolset. And whether a different choice could lead to quality software being developed faster and more cheaply, thereby encouraging the creation of even more quality software.

I've argued about this before. Programming language choice does matter, programming toolsets do matter. Programming language and development tools are where the bits hit the hardware, and if you want quality work from a developer, you need to use quality tools.

Seriously, do Indy and Formula One racing mechanics get their tools at WalMart and Harbor Freight? Because "a professional mechanic ..."


Bill the Lizard said...

I mostly agree. There are definitely a few languages in which I'm much more comfortable and productive than others. My boss should be discouraged from thinking that I can program any thing in any language just because I'm a competent programmer in these few.

However, I do believe that if you are a competent enough programmer in one language, given enough time, you should be able to become equally competent in any other language. Unfortunately, "given enough time" is ambiguous enough to include a monkey pounding on a keyboard for eternity, eventually producing the complete works of Shakespeare.

Anonymous said...

...goes both ways. You're correct; a team that can't use the tools it needs based on the "any competent programmer" statement will probably fail.

On the contrary, a team full of jackasses trying to argue about whether to use Erlang versus Python versus Lisp probably isn't going to make it past 30% completion.

PA huge percentage of development efforts are on existing code. Just because some jackass before you got to choose his tools doesn't mean replacement of the crappy code is a slam dunk...sometimes replacing an entire source tree with the glorious Ruby would cost way more than fixing the damn code and moving on...and yes..."any competent programmer" should be able to work on the existing code without incessantly bitching about how much easier it would be with another language.

Another point: the analogy about Indy and tools doesn't really hold water. It's trite and simple, but if a Formula 1 team gets a sponsorship from Sears, you can bet your ass, they'll be using and proudly displaying their new craftsman tools. You think Tiger Woods plays Nike because they're the best golf clubs? He never played Nike clubs in his life before he got the first million dollar check. Now he plays Nike and doesn't sit around bitching and moaning because the other guys are working with Haskell.

Harold Fowler said...

Wow, talking about hitting it on the head! Well done!


Robby Slaughter said...

Let's be clear: the comment "Any competent programmer can write good code in any language" omits a few key qualifiers for the sake of brevity. It should be written as:

"Any competent programmer can, with practice, write good code in any language, because for programmers, the word 'competence' also means 'resourceful and fearless', and because 'with practice' can be interpreted to mean an infinite amount of time."

For most other professions, these extra words would make the statement meaningless. But really, programmers use phrases like the above because 99% of people who call themselves programmers can't actually program.

The statement becomes especially dangerous in the hands of managers. However, there are not many maxims about software development which do not result in either tragedy or bewilderment in when considered by those outside the field.

Anonymous said...

Your professional mechanic analogy is deconstructive to your thesis since a good mechanic can do wonders with cheap tools while a crap mechanic can ruin your engine regardless of what you spend on tools.

Cheap tools wear out quicker than quality tools, but I'm not sure the same applies to programming languages.

Eric Lavigne said...

Your link to the Ada article is broken by an extra "http//".

Anonymous said...

The analogy that is more correct to this situation is that a mechanic who works on Fords would likely quickly be able to work on Chevys.

Hans said...

hm, i would have been interested to hear you present some examples and arguments to back your assertions.

Jeff said...

"Competent" programmer doesn't really mean much. Many are terrible and can't program at all, and once in awhile there exist ones who are 20 times more productive than the average programmer.

The ones who are good will not put up with jobs coding in miserable environments, and will go work places that treat them like they deserve to be treated.

So, if you decide to do your project in something miserable like Ada, the only programmers you'll have are the ones who aren't good enough to care, and are just scraping by, and well, that's no way to run a project.

Mark said...

Theoretically, any language that is Turning complete can do anything any other turning complete language can.

Practically, the reason we're not coding in assembly is that different languages work better for different tasks, and people are inventing new languages all the time to make tasks easier.

If you want to use a better language for the problem you're tackling, explaining it in terms of "programming this in Matlab will take one fifth the time it would take in C++" will probably sound better to a manager then "I can do this in any language, and so can any other good programmer."

Anonymous said...

I disagree with one thing. The claim does not beg the question. It merely raises it.

Anonymous said...

Jeff above wrote: "The ones who are good will not put up with jobs coding in miserable environments, and will go work places that treat them like they deserve to be treated."

Dude, you sound like the guy from Office Space. Michael Bolton, waxing apopleptic about what's going to happen to this place if they don't "start treating their software people better".

Right on. Just don't forget to put the decimal point in the right place.

leef said...

How can anyone with a desire for efficiency say that? The quirks of syntax between most languages vary just enough to slow development down VERY significantly in my experience. Jump from Perl, to PHP, to AS3, to applescript, and watch all the time lost. Especially when you consider the extension libraries you've picked up and know like the back of your hand, that aren't universal.

It's a silly notion.

David said...

Modulo the issue of dealing with enormous legacy codebases (ref Anonymous), it's all about keeping your moneymakers happy and your customers rolling in new software.
If you're fortunate enough to have one or more über-developers on your team, and are reasonably assured that they're not going to fly off to greener (or newer) pastures leaving you with a codebase unmaintainable by "average" competent developers, have a conversation as to what he/she/they *want* to use, and what the pros and cons are for the various options.

Note that as far as I'm concerned, the prima donna programmer who is content to issue unsupported statements as to language or tool superiority and goes off in a huff when asked to discuss details is not in a set that overlaps with the set of "über-developers."

Kevin said...

Look, do me a favor. Forget about the stupid languages. It's not important. Well it is, but just don't bother worrying about it.

Things like Boost, Rails, Django, Swing, Java Class Library, WPF, .NET, Qt. These things are important. This is what you worry about. It's the framework! If you want to argue about anything argue about who has the best framework, not the languages. Get greedy about how much pre-written code you want available to you and the language will probably select itself.

Here's a simple example. If Rails solves your problem then what language are you using? What if Django solves it better? Swing or WPF? If it's WPF then what language are you going to use? If you needed to write a program for an Android phone then what language? How about a Flash applet? What about Silverlight? What if you're cracking RSA? What if you're maintaining an app that was already written in C++? Would you just switch to another language? No of course not.

See how easy that was? You probably didn't even have to think about the answers, but you didn't get to pick the language either. The problem picked it for you or at least narrowed it down. Too many people are doing it wrong. They pick the language first. Then they try to find good pre-written code. Maybe they find it. Maybe they find bindings to their language. Maybe they don't find it at all. Don't do it that way unless you have to or you are in fact writing your own framework or libraries.

Here's a little more proof. What if you had to do all projects up there, but you only got to use one language for all of them? Won't work will it? Don’t bother having a single favorite language or arguing the merits of it because it's not important. What is important are the frameworks that will actually solve your problems.

If you really want to see then use .NET. Write a small Winforms application in two or three .NET languages like C#, VB, and maybe even Jscript.NET which uses prototypes. Should be completely different right? Write the same program three times in all three languages. Don't use a form designer. Code it all. You'll see that they all have the same structure. Just the keywords are different. By the time you strap a framework on the language you're really just choosing your syntax.

Lucretia9 said...

Unfortunately, these statements come from idiot managers who aren't programmers or who've messed with programming but don't know a lot.

Basically, if you've got an idiot manager on your back asking every 5 minutes where something is, or how long it'll take, it's gets you stressed and you make mistakes, by using a language like Ada, the compiler won't let you.

Martin Krischik said...

>Formula 1 team gets a sponsorship from
>Sears, you can bet your ass, they'll be
>using and proudly displaying their
>new craftsman tools.

… from the brand new «Sears Professional Plus» line of tools.

> Cheap tools wear out quicker than
> quality tools

A bad spanner will also damager and wear out your bolds and nuts while a good spanner will grip more precisely and do less damage.

> but I'm not sure the same applies to
> programming languages.

It applies again once you get into maintenance phase and you have to work with what bad tools left you to work with.

> miserable like Ada

Actually Ada is an excellent language. You got that wrong. The languages with the curly brackets are the bad guys.