Justin du Coeur (jducoeur) wrote,
Justin du Coeur
jducoeur

The Danger of Code Completion

So here I am, spending half an hour trying to figure out why my attempt to get the "RemainingDuration" field out of this data structure is failing. It's Javascript, so I don't have strong typing to fall back on -- everything has to be exact. Which is why it takes half an hour to discover that the field is actually named "RemaingDuration".

And the hell of it is, I know exactly what happened. Someone had a typo in the field name when they created it, and didn't even notice. And ever since then, everyone has simply been using code-completion in the IDE to fill in the field name on the server side, so nobody ever noticed that it's been misspelled all this time. That is, until I try to actually use the generated version of the structure on the client side, which doesn't have the lovely code-completion crutch to kindly misspell the word for me.

The Law of Unintended Consequences applies as much in programming as in everything else. And no feature, no matter how cool, is without its tarnished lining...
Tags: programming
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 2 comments