Is it easy for a bad programmer to write overly complicated code? (was: Re: Normal For Loop)

So that no-one has to scroll back here are those characteristics again:

  • write ‘tight’ code. They think that fewer keystrokes = good
  • think their problem is ‘complex’ (never ‘complicated’) and thus must
    have a complex solution – they don’t try to simplify.
  • deliberately try out as many new features as they can, in live code,
    to improve their own knowledge and to show off
  • choose the difficult,complicated (but of course ‘more comprehensive’
    or ‘more elegant’)way over the easy, simple way of doing anything.

I am not talking about relatively inexperienced people open to
correction, but people who do this stuff habitually and defend it as
good practice.

i’ve just across a ruby gem called flog
Category: Code Metrics - The Ruby Toolbox which tests for
complexity of code. The higher the score, the more complex the code and
therefore the harder it is to test it.

This might be helpful.

On Fri, Oct 25, 2013 at 7:38 PM, Roy G. [email protected]
wrote:

I am not talking about relatively inexperienced people open to
correction, but people who do this stuff habitually and defend it as
good practice.

I am not sure I still understand what point you are trying to make or
what opinions you want to gather. In what ways would a programming
language make it harder or easier for people to write overly
complicated code who “do this stuff habitually and defend it as good
practice”? I mean, you seem to diagnose a certain intend here and as
all programming languages must be Turing complete to be useful I
cannot see what feature could there be to prevent or curtail this kind
of behavior.

Kind regards

robert