CodeSOD: On Deep Background

This post was originally published on this site

The Daily WTF

Andrew worked with Stuart. Stuart was one of those developers who didn’t talk to anyone except to complain about how stupid management was, or how stupid the other developers were. Stuart was also the kind of person who would suddenly go on a tear, write three thousand lines of code in an evening, and then submit an pull request. He wouldn’t respond to PR comments, however, and just wait until management needed the feature merged badly enough that someone said, “just approve it so we can move on.”

int iDisplayFlags = objectProps.DisplayInfo.BackgroundPrintFlags; bool bForceBackgroundOn = false; bool bForceBackgroundOff = false; // Can’t use _displayTypeID because it will always be 21 since text displays as image if (_fileTypeID == 11) // TEXT { if ((iDisplayFlags & 0x1008) != 0) // Text Background is required { bForceBackgroundOn = true; } else if ((iDisplayFlags & 0x1001) != 0) // Text Background is not

To read the full article click on the 'post' link at the top.