1
vote
5answers
496 views

Lots of classes with only one single static method with same name as class - Code smell? [duplicate]

I'm trying to follow the single responsibility principle (SRP) in my applications. I have lots of CRUD classes I just name xxxxxManager. Following the SRP, I made 4 classes for each one : ...
1
vote
2answers
143 views

Code Duplication in Multi-Module Project

I've about seven modules arranged like so: Service Processing Common Account Email Scheduling I try to make it my policy to restrict code to the module that actually uses it. Code that is shared ...
7
votes
5answers
988 views

Is having 'Util' classes a cause for concern? [closed]

I sometimes create 'Util' classes which primarily serve to hold methods and values that don't really seem to belong elsewhere. But every time I create one of these classes, I think "uh-oh, I'm gonna ...
1
vote
4answers
392 views

Is extensive documentation a code smell? [closed]

Every library, open-source project, and SDK/API I've ever come across has come packaged with a (usually large) documentation file, and this seems contradictory to the wide-spread belief that good code ...
17
votes
5answers
1k views

Is it OK for a function to modify a parameter

We have a data layer that wraps Linq To SQL. In this datalayer we have this method (simplified) int InsertReport(Report report) { db.Reports.InsertOnSubmit(report); db.SubmitChanges(); ...
1
vote
2answers
72 views

Should Multiple Data Items be in Multi Unit Test Methods?

I often want to have the same unit test applied to data multiple items that are roughly equivalent (two non-empty strings). Currently I implement these in multiple unit test methods, with names like ...
0
votes
2answers
471 views

Is this bad design for a Shape interface?

I'm creating a vector editing program in C++, and I need a Shape interface which other concrete classes will implement. There is a requirement that no implementation inheritance is allowed. The design ...
9
votes
5answers
611 views

Writing Testable Code vs Avoiding Speculative Generality

I was reading some blog posts this morning, and stumbled across this one: If the only class that ever implements the Customer interface is CustomerImpl, you don't really have polymorphism and ...
2
votes
1answer
222 views

How should I design a correct OO design in case of a Business-logic wide operation

EDIT: Maybe I should ask the question in a different way. in light of ammoQ's comment, I realize that I've done something like suggested which is kind of a fix and it is fine by me. But I still want ...
2
votes
2answers
245 views

Does this pattern disregard the DRY principle, and can I modify the pattern to fit?

I just started working at a company and we're currently in a fairly intensive (full-days most work days) training program to bring us up to speed on the way the company does things, and train us in ...
7
votes
4answers
827 views

Are iframes a design smell?

We have some pretty old, clunky .Net 1.1 apps in our business that - rather than be forcably upgraded - just get an iFrame added so that new functions can be dropped in. It's become such a well-known ...
6
votes
3answers
543 views

Why it is not recommended to have set-only property?

Today at work one of my colleague reviewed my code, and suggested me to remove set-only property and use method insted. As we both were busy with other stuffs, he told me to look at Property Design ...