anti-patterns

How to convince people that a single class with 11975 lines of code is bad? (isn't it?)

I have a dejavu feeling when reading [What to do about a 11000 lines C++ source file?] post, but I don't think I can start taking action on my own since I do not have the authority to take action. So I think the first step is to convince people in the organization that big lump of code is bad. I have a similar situation where there is a...

Abuse of Closures? Violations of various principles? Or ok?

Edit: fixed several syntax and consistency issues to make the code a little more apparent and close to what I actually am doing. I've got some code that looks like this: SomeClass someClass; var finalResult = DoSomething(() => { var result = SomeThingHappensHere(); someClass = result.Data; return result; }) .DoSom...

C#: Enum anti-patterns

There has been a lot of talk of Enums in general violating Clean Code-principles, so I'm looking for people's favorite Enum anti-patterns and alternative solutions for these. For example I've seen code like this: switch(enumValue) { case myEnum.Value1: // ... break; case myEnum.Value2: // ... bre...

Explaining why dual purpose classes are bad

I have a class in a system that lists its purpose as "This can either be seconds-from midnight. Or a time with a date." I have tried to explian how bad this is but I cant get my point accross. Do anyone have any ideas on how to tackle this. http://code-slim-jim.blogspot.com/2010/10/object-anti-patterns.html ...