News for hackers. Stuff that matters.
Re:The Shapes of Code by Thorrez on Tuesday January 28, 2020 @01:40AM (#22167002)
Microsoft's docs have an interesting idea of what good nesting looks like:

https://docs.microsoft.com/en-us/previous-versions/windows/d...

Apparently 13 different indentation levels is good.

Re:The Shapes of Code by jpz on Tuesday January 28, 2020 @03:11AM (#22167436)
I actually find that surprisingly readable, probably because of the indent size which clearly allows the eye to see the blocks - and the size of my very large monitor - but this code seems to indicate a religious dogma about avoiding early returns, which would otherwise straighten it up.
Re:The Shapes of Code by a_t48 on Tuesday January 28, 2020 @03:24AM (#22167508)
Refactoring it effectively needs some sort of scope guard, too, to run `pfd->Release();` and the like. It's just as much dogma to write C++ like C, avoiding RAII.
Re:The Shapes of Code by reilly3000 on Tuesday January 28, 2020 @02:43AM (#22167260)
wow.