The Personal Website of Ronald Huereca

It Appears We're in a Do-Loop, Sir

Non-Programmers: Be warned, as this might go over your head a little.

I’ve been in meeting after meeting where some non-programmer will say, “It appears we’re in a Do-Loop.”

Once someone says something to that effect, I just shake my head and think to myself, “Good luck in getting out of that one.”

A Do-Loop (by itself) is the same thing as doing something for an infinite amount of time. A Do-Loop is essentially doing something without evaluating a condition. Since no condition is ever evaluated to get out of the loop, the loop runs forever.

A better thing to say is, “We’re in a Do-While Loop” or “We’re in a Do-Until Loop.” At least the loop is evaluating a condition in order to get out of the loop!

A better phrase might be, “We’re in a While-Loop, sir.” A While-Loop at least evaluates a condition before executing a task within the loop. If the condition isn’t ever met, then the loop will run forever. However, at least a condition is being evaluated. In a Do-Loop, nothing is ever evaluated.

So next time someone says, “We’re in a Do-Loop, and we can’t get out of it”, why not say back to them with a smirk, “You must like stating the obvious?”

Writer and software engineer Ronald Huereca has been a developer at notable agencies like iThemes and 10up. His varied background has him working with WordPress since 2006, eventually creating his own plugin which, of course, lead to more. He spends quite a bit of his time volunteering with the WordPress project as a core and polyglot contributor. With all of his passions, writing has been the way Ronald expresses himself best. He has written both technical books as well as fiction. Some of his works include Project Mayhem, Mindefusement, and WordPress and Ajax. “You can only delay the inevitable” is his favorite quote. Ronald enjoys reading Stephen King and John Grisham. When he’s not writing, Ronald dreams of building websites filled with cats yawning, disclaimers his strong opinions, sings karaoke, and advocates for empathy surrounding mental health.

1 thought on “It Appears We're in a Do-Loop, Sir”

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top