|Jack Ganssle's Blog
This is Jack's outlet for thoughts about designing and programming embedded systems. It's a complement to my bi-weekly newsletter The Embedded Muse. Contact me at email@example.com. I'm an old-timer engineer who still finds the field endlessly fascinating (bio).
For novel ideas about building embedded systems (both hardware and firmware), join the 28,000+ engineers who subscribe to The Embedded Muse, a free biweekly newsletter. The Muse has no hype and no vendor PR. Click here to subscribe.
Goto Considered Necessary
February 25, 2019
Edsger Dijkstra has recanted his 1968 paper "Go To Considered Harmful." (Communications of the ACM, Vol. 11, No. 3, March 1968, pp. 147-148). That work was considered seminal at the time and spawned a wave of structured languages like C and Ada.
Recently, though, the National Enquirer quoted Dijkstra as saying "at the time most software was infested with gotos. Hell, look at Dartmouth Basic. The tiniest bit of code requires dozens of gotos. And FORTRAN! Did you ever see such convoluted mess? Yeah, they eventually tidied that language up, but look what's happened since.
"C, C++, Python, they're all the same. I need a bleedin' 62 inch HDTV monitor to see the code pushed a yard to the right by all those indentations! Remember when 'white space' was used to illustrate structure? Well now all we've got is white space. The code in a deeply-nested construct starts on column 1823! And it reads "while while while while while' like some perseverating autistic kid. You see 'ifs' nested so deep I need a bloody periscope to find the closing braces.
"And they call this stuff structured?
"I dunno what I was smoking when I wrote that paper. It was the 60s, after all. Somehow I figured the love and peace thing would translate into beautiful snippets of structure, bits of poetry crafted by long-haired programmers. Ha! Now we're all part of a machine, adding patch after patch to a rickety structure to get yet another product out the door.
"So now I'm thinking FORTRAN got it right in 1957.
"My new approach is called Outrageously Obfuscated Programming Slang, or OOPS. Structured programming often disguises code which is in fact a convoluted muddle. Looks good at first glance but when you dive into the stuff you realize the developer had tied himself up into a Gordian knot of do-while loops. With OOPS we embrace gotos; our special editor draws lines between each goto and its target. The spaghetti mess fairly screams at you off the page, making it easy to figure out what to refactor."
I visited Professor Dijkstra's lab for more background information on this story, but his assistant told me "goto" someplace as hot as a marketing guy when told there's been yet another schedule slip.
Feel free to email me with comments.
Back to Jack's blog index page.
If you'd like to post a comment without logging in, click in the "Name" box under "Or sign up with Disqus" and click on "I'd rather post as a guest."
Recent blog postings:
- Married To The Team - Working in a team is a lot like marriage.
- Will We Ever Get Quantum Computers - Despite the hype, some feel quantum computing may never be practical.
- Apollo 11, The Movie - A review of a great new movie.
- Goto Considered Necessary - Edsger Dijkstra recants on his seminal paper
- GPS Will Fail - In April GPS will have its own Y2K problem. Unbelievable.
- LIDAR in Cars - Really? - Maybe there are better ideas.
- Why Did You Become an Engineer? - This is the best career ever.
- Software Process Improvement for Firmware - What goes on in an SPI audit?
- 50 Years of Ham Radio - 2019 marks 50 years of ham radio for me.
- Medical Device Lawsuits - They're on the rise, and firmware is part of the problem.
- A retrospective on 2018 - My marketing data for 2018, including web traffic and TEM information.
- Remembering Circuit Theory - Electronics is fun, and reviewing a textbook is pretty interesting.
- R vs D - Too many of us conflate research and development
- Engineer or Scientist? - Which are you? John Q. Public has a hard time telling the difference.
- A New, Low-Tech, Use for Computers - I never would have imagined this use for computers.
- NASA's Lost Software Engineering Lessons - Lessons learned, lessons lost.
- The Cost of Firmware - A Scary Story! - A hallowean story to terrify.
- A Review of First Man, the Movie - The book was great. The movie? Nope.
- A Review of The Overstory - One of the most remarkable novels I've read in a long time.
- What I Learned About Successful Consulting - Lessons learned about successful consulting.
- Low Power Mischief - Ultra-low power systems are trickier to design than most realize.
- Thoughts on Firmware Seminars - Better Firmware Faster resonates with a lot of people.
- On Evil - The Internet has brought the worst out in many.
- My Toothbrush has Modes - What! A lousy toothbrush has a UI?
- Review of SUNBURST and LUMINARY: An Apollo Memoir - A good book about the LM's code.
- Fun With Transmission Lines - Generating a step with no electronics.
- On N-Version Programming - Can we improve reliability through redundancy? Maybe not.
- On USB v. Bench Scopes - USB scopes are nice, but I'll stick with bench models.