DEV Community

Discussion on: JavaScript, stuff you've never heard of (probably): labeled loops?

Collapse
 
mjstelly profile image
Michael Stelly

A foundational concept in software engineering is to translate business rules into code in the clearest, most maintainable way possible. I’ve developed mobile apps using JavaScript for over 10 years. Rarely have I ever revisited the same code after delivery, but I guarantee some else has. And there’s the rub.

Think of your typical day. You’re billing a hefty hourly rate. You’re new to a project and inherit a code base which makes extensive use of this feature. What’s the first thing you do apart from muttering expletives under your breath? You have to stop and ask someone or google it. Time that is usually not billable if it takes more than a few minutes.

My point isn’t to berate or cast aspersions. Quite the contrary. It’s to remind us that we as devs should choose clarity over cleverness whenever possible. Keep up the contributions.

Collapse
 
adam_cyclones profile image
Adam Crockett 🌀 • Edited

There was no advocation of this technique from me, (it's a light hearted post) nor did you state if what you saw was good or bad, I don't know what you define as clever code, but as I have already stated elsewhere, clever code is a terrible idea, this post is designed to expose a strange syntax nothing more.