Fact Checking

Single Entry, Single Exit

Intro

A common piece of programming advice is only have a single return statement. This is sometimes called the ‘Single Return Law’. It is even codified in some coding standards such as MISRA C 1 2.

Ethical Baghdad

Over the last year or two I’ve been on a bit of a kick of reading the original sources for several common CS (or other) topics. You’d be surprised about how many ‘oft quoted’ concepts don’t have the origin you’d expect.

There is an old joke:

It should be noted that no ethically-trained software engineer would ever consent to write a DestroyBaghdad procedure. Basic professional ethics would instead require him to write a DestroyCity procedure, to which Baghdad could be given as a parameter.

Which I found at the above quoted ‘guppylake’ website1. However, when I found the CSCW ‘922 scan of the same article the quote itself is missing (and the text differs in other slight ways as well). All other references to the quote drastically postdate both of the previous references.