CodeSOD: Conventional Events

This post was originally published on this site

The Daily WTF

Now, I would argue that the event-driven lifecycle of ASP .Net WebForms is a bad way to design web applications. And it’s telling that the model is basically dead; it seems my take is at best lukewarm, if not downright cold.

Pete inherited code from Bob, and Bob wrote an ASP .Net WebForm many many ages ago, and it’s still the company’s main application. Bob may not be with the company, but his presence lingers, both in the code he wrote and the fact that he commented frequently with // bob was here

Bob liked to reinvent wheels. Maybe that’s why most methods he wrote were at least 500 lines long. He wrote his own localization engine, which doesn’t work terribly well. What code he did write, he copy/pasted multiple times.

He was fond of this pattern:

if (SomeMethodReturningBoolean()) { return true; } else { return false; }

Now,

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