What named principles (e.g., information hiding, DRY, etc.) in software development do you find are often referred to but are commonly misunderstood (or are actually flawed)? I have a talk, Principle Misunderstandings, where I cover a few, but I'm planning to extend this to half- and full-day formats, so I'd be interested in what you find is commonly misunderstood.
@kevlin
Single Entry Single Exit (SESE). A college tried to tell me once it means you can not have multiple return statements per function.
@xris Interesting, I was just contemplating whether or not to tackle that one this morning! Thanks for the reinforcement.

@kevlin @xris this has been encouraged by MISRA C. *Much* auto code is marred by it.

@PeterSommerlad took a deep dive on this. IIRC, conclusion was it dates back to pre-structural era: don't jmp into/out of the middle of a procedure. It was then adapted by MISRA as a rule for ensuring mid-function `free`s never got skipped.

@JSAMcFarlane @kevlin @xris

SESE stems from a time as a principle of structured programming. all current languages with call-return semantics follow it. so a procedure is already following SESE. That safety guidelines translated SESE to a single return statement is BS from people not knowing its origins. We filed a change request for against one of the ISO safety standards and abandoned single return requirements for MISRA-C++

@PeterSommerlad
@JSAMcFarlane
Wow. Did not know this BS got into MISRA. Thanks for the elaboration.

@xris @JSAMcFarlane

the source is not MISRA but IEC/EN 61508-3 and ISO 26262 safety standards that mutated SESE to "single return statement per function" without understanding the implications of either. IMHO single return statement makes code more complex and thus more error prone. Therefore we fought to get rid of it.

@PeterSommerlad @xris @JSAMcFarlane and the real fun thing about single return statement is that you almost always have to introduce a goto. I'm not Dijkstra, but I still avoid goto like the plague, it can introduce all kinds of stupid side-effects (and yes, a "finally" or "defer" is just a goto in disguise).