Unintended Bugs In Demonstration Code For Intential Software

from the not-a-great-start dept

Adam Barr writes “The Seattle Post-Intelligencer yesterday had a story about Charles Simonyi leaving Microsoft, and today had a follow-up about his plans for his new company. The funny part is that the second article, trying to demonstrate how a “Hello, world!” program would be written to be bug-free, has a sample of the “old” way, a C program, which has an unintended bug in it — it loops forever (those “{lcub}” and “{rcub}” in the online version of the article appeared as “{” and “}” in the printed one). Hmmm, I guess if you can’t get “Hello, world!” correct in C, maybe it is time for something new.”

Rate this comment as insightful
Rate this comment as funny
You have rated this comment as insightful
You have rated this comment as funny
Flag this comment as abusive/trolling/spam
You have flagged this comment
The first word has already been claimed
The last word has already been claimed
Insightful Lightbulb icon Funny Laughing icon Abusive/trolling/spam Flag icon Insightful badge Lightbulb icon Funny badge Laughing icon Comments icon

Comments on “Unintended Bugs In Demonstration Code For Intential Software”

Subscribe: RSS Leave a comment
Anonymous Coward says:

The Great American Programming Language

Good to see that even seasoned billionaires aren’t immune from the desire to implement DWIM for the rest of us, and remove the need for all those pesky programmers, SEI level-5, CASE, IDEs, James Martin, the 5th generation project, functional languages, provably correct programs, and all that nonsense.

“When someone says ‘I want a programming language in which I need only
say what I wish done,’ give him a lollipop.”

??? — CMU jokes.txt, circa 1984

Adam Barr says:

just noticed the intentional

The intentional code interpreter is supposed to pick out the comment saying that the code is going to print “Hello, world!”. Unfortunately the comment is delimited wrong, */ to /* instead of the other way around. So both the intentional code example and the C example have bugs. But I guess the whiz-bang intentional code interpreter would figure that out…it’s a two step process, first figure out that the programmer *intended* to put a comment, then figure out from the comment what the code *intended* to do.

Or you could copy “Hello, world!” out of K&R, with no comments.

– adam

Add Your Comment

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

Have a Techdirt Account? Sign in now. Want one? Register here

Comment Options:

Make this the or (get credits or sign in to see balance) what's this?

What's this?

Techdirt community members with Techdirt Credits can spotlight a comment as either the "First Word" or "Last Word" on a particular comment thread. Credits can be purchased at the Techdirt Insider Shop »

Follow Techdirt

Techdirt Daily Newsletter

Techdirt Deals
Techdirt Insider Discord
The latest chatter on the Techdirt Insider Discord channel...