16
votes
11answers
1k views

Why are we supposed to use short functions to sectionalize our code? [duplicate]

I've seen an increasing trend in the programming world saying that it is good practice to separate code blocks into their own functions. Obviously, if that code block is reusable, you should do that. ...
2
votes
1answer
216 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 ...
7
votes
4answers
396 views

What “code smells” are there that are a symptom that an event listener model is required?

What are the symptoms in a code base that indicate that an event-listener approach is required? It seems to me that when there are classes that need to be called by multiple, not defined at ...