What is the difference between loose coupling and tight coupling in the object oriented paradigm?

Tight coupling is when a group of classes are highly dependent on one another. This scenario arises when a class assumes too many responsibilities, or when one concern is spread over many classes rather than having its own class. Loose coupling is achieved by means of a design that promotes single-responsibility and separation of concerns. … Read more

When to use an interface instead of an abstract class and vice versa?

I wrote an article about that: Abstract classes and interfaces Summarizing: When we talk about abstract classes we are defining characteristics of an object type; specifying what an object is. When we talk about an interface and define capabilities that we promise to provide, we are talking about establishing a contract about what the object … Read more

Functional programming vs Object Oriented programming [closed]

When do you choose functional programming over object oriented? When you anticipate a different kind of software evolution: Object-oriented languages are good when you have a fixed set of operations on things, and as your code evolves, you primarily add new things. This can be accomplished by adding new classes which implement existing methods, and … Read more

Monad in plain English? (For the OOP programmer with no FP background)

UPDATE: This question was the subject of an immensely long blog series, which you can read at Monads — thanks for the great question! In terms that an OOP programmer would understand (without any functional programming background), what is a monad? A monad is an “amplifier” of types that obeys certain rules and which has … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)