OOP, cohesion, coupling and heuristics


In the OOP world, we do not need big, God like, classes that do a bit of everything. On the contrary, we need small classes that have specific roles and responsibilities. At the same time, each class has to be as independent as reasonably possible from the others, no matter if they belong in the same module or not.

In the OOP world a module is a package or a namespace, depending on the programming language you are using. The S.O.L.I.D principle that is focused on creating highly cohesive classes is the Single Responsibility Principle.

Think of your codebase as a multinational company, like LexCorp or Wayne Enterprises. You would not assign too many roles to a specific person, but you would not let them go rogue too. It is not that wise. There is always a hierarchy, a structure, a system of reasoning of who does what and why! It is the same in the OOP world. Always reason on how many classes you need and why, and which the role of each class. Try to avoid to be extremely verbal, ergo, do not create classes that have little or no role in your codebase!

Cohesion indicates the classes relationships within the module, while on the other hand coupling indicates the relationships among modules. The concepts of cohesion and coupling are not new at all. They were invented by Larry Constantine, and you can read more about them in the Structured Design book.

Finally, the OO Design Heuristics are a set of guidelines for good object-oriented designs. As Bjarne Stroustrup (father of the C++ programming language) correctly pointed out many years ago, just making a design “object oriented” doesn’t always mean that the design is good.

Continue reading “OOP, cohesion, coupling and heuristics”

The software requirements bitter feelings


Not knowing the full requirements is agile“, an old boss of mine told me in the past. As soon as I heard it, I freaked out! I couldn’t believe it! I was so frustrated that I don’t know how I managed to keep my mouth shut! Lacking functional requirements is a recipe for disaster. A way straight to hell. You can’t build a system if you do not know how it works. Agile doesn’t alter the need for functional or other requirements, but it does change how you gather them. The waterfall way is to go through a long process of documents filling and revising them, till they contain all(?) the system’s requirements. The agile way to gather requirements is to specify the requirements for a small increment of the system, a minimum viable product as it is usually called, build it, then get feedback and work on the next increment. No matter the way the phrase “I don’t know” is embraced, it should never be acceptable! Without the right context anyone might understand anything!

Continue reading “The software requirements bitter feelings”

Team communication


Some people are really good in communication. They have the charisma, the talent, the skills, to communicate, to listen to others, and persuade them if needed.

Programmers are(?) not that social, at least not as much as the business or the HR people. Ιn addition to that, teams now have more than one formations. People together in a room or building, distributed, hybrid. Especially during covid era nowadays, distributed teams tend to be the standard.

Continue reading “Team communication”

Point of view*


Christmas is always a period of retrospecting. So let’s retrospect software design and development. When it’s time to design a new software system, a lot of variables must be taken under consideration. One variable is the past also. In order to paint the future, you have to look what you or others did in the past, but also what didn’t happen and why. Especially the what didn’t happen part might give you more insights.

If you take a step back, and look at similar to yours products and services, you will understand more the progress that has taken place in the domain, the growth, the risks and the failures, if they exist. The software analysis, design, and development processes, principles and tools have changed a lot in the past fifty to seventy years. But one thing is still the same. And this is people’s point of view to the goal, no matter if they are the stakeholders, the developers, the users. And the goal is to be better, faster, stronger, more successful than the competitor and keep or increase the power and domination.

Could the goal be different? Well individually yes, but in a corporate world the aforementioned explanation of the goal, is what you will hear from most of the companies, unless companies have become socialistic structures and I don’t know about it!

*Fates Warning – Point Of View (OFFICIAL VIDEO) – YouTube

Continue reading “Point of view*”

Think, don’t just execute


I believe, and this might be a bit controversial, that many people write code, but not all of them are programmers. Programming has nothing to do with tools, languages, frameworks, IDEs per se, it has to do with your way of thinking. The process you follow to analyze and decompose the problem successfully, then to pick the right tools and use them correctly, without abusing them. My math professor, at the university, used to say: “Don’t kill a fly, with a shotgun”.

Continue reading “Think, don’t just execute”

C# extension methods to save the day


Extensions methods, that are heavily used in LINQ and in fluent like interfaces, allow developers not just extend existing types but organize the code better. Especially functionalities related to those types. Also, extension methods can be used to add functionality to types we have no control upon them.

Continue reading “C# extension methods to save the day”

When the job title fits the personality and not the opposite.


So, there is your manager, your supervisor, your boss, the one higher than you in hierarchy. How was (s)he chosen? And by whom? Picking the right person for the right position is not an easy task. And there is no guarantee that the right person was picked.

Continue reading “When the job title fits the personality and not the opposite.”

When no one is in charge, and why is wrong!


It’s not a new trend, nor the norm, but it is for sure a contemporary alternative way of management, at least, in the technology domain. Leaderless teams are temporarily or intentionally without a leader, but they are self-managed.

What’s the goal of a self-managed team? According to Andy Doyle, former Head of Operations at Medium, a self-management structure “aspires to empower individual voices and avoid the bureaucracy that often accompanies traditional organizational structures.”

Continue reading “When no one is in charge, and why is wrong!”

C# and FP – episode 3 – OOP today, Inversion of Control and Dependency injection.


The problem with object-oriented languages is they’ve got all this implicit environment that they carry around with them. You wanted a banana but what you got was a gorilla holding the banana and the entire jungle.

Joe Armstrong, father of Erlang

He is right, you know! I totally agree with the quote above. The abuse of inheritance, leads to over complex systems with objects that have no clear responsibility and in general the SOLID principles go out of the window.

Continue reading “C# and FP – episode 3 – OOP today, Inversion of Control and Dependency injection.”