CodeSOD: Idtoic Mistakes
by Remy Porter from The Daily WTF on (#6RC8R)
Working at a company where the leadership started as technical people has its advantages, but it can also carry costs. Arthur is in one such environment, and while it means that management and labor have a common vocabulary, the company leadership forgets that they're not in a technical role anymore. So they still like to commit code to the project. And that's how things like this happen:
if( this.idtoservice != null ){ sOwner = this.idtoservice.Common.Security.Owner;}else if( this.idtoservice != null ){ sOwner = this.idtoservice.Common.Security.Owner;}else if( this.idtoservice != null ){ sOwner = this.idtoservice.Common.Security.Owner;}
This isn't one commit from the CEO, it's 4 different commits. It seems like the CEO, perhaps, doesn't understand merge conflicts?
This particular bit of bad code is at least absolutely harmless and likely gets compiled out, but it doesn't mean that Arthur doesn't feel the urge to drink every time his CEO makes a new commit.
[Advertisement] Keep the plebs out of prod. Restrict NuGet feed privileges with ProGet. Learn more.