Misc.Dec 16, 2018
BoseJustMeHa

Which design principles do you actually use ?

Please comment on which design principles do you use in your code or enforce via code reviews

Add a comment
Uber (Admin) Dec 16, 2018

SOLID

Google DontKnowML Dec 16, 2018

Composition over inheritance (it's a really simple idea that some people might use naturally without realizing) Is dependency injection a design pattern? I've used the builder pattern and singleton (cue debate) in my previous Java life

Tableau Zero Cool Dec 16, 2018

Plus factories

Apple vAAA81 Dec 16, 2018

Dependency injection is a type of IOC, which in general is an awesome pattern to use for OOP.

Microsoft thanker Dec 16, 2018

None

Medallia hFEH36 Dec 16, 2018

Common sense design pattern

Tableau Zero Cool Dec 16, 2018

That's extraordinarily rare

Uber (Admin) Dec 16, 2018

That means "whatever I've picked up, without studying to improve myself or learn why some designs are better than others".

Amazon dBpX76 Dec 16, 2018

I make sure to utilize as many interfaces, facades, adapters and just design patterns in general as possible. All code should be obfuscated behind as many java classes as possible. This is what it means to code well

New
roku789 Dec 16, 2018

Don’t you think that creates unnecessary complexity. I see many times people make interfaces with just one impl. That never makes sense to me.

Microsoft glams Dec 16, 2018

Umm... I think you missed Amazon's implicit /s tag

Apple vAAA81 Dec 16, 2018

I’ve used pretty much all patterns out there. Whatever fits the need of what I’m building. However patterns are something that appear after really studying a problem. Often times people make noob mistakes by forcing their code into a design pattern for the sake of a pattern when the KISS/POLA principle would lead to something far simpler.

New
behooman Dec 16, 2018

Strategy is most common because most of the time people don’t know what they are doing or we have a hack it now fix it later mentality. Composition over inheritance, when it makes sense like it has a vs is a relationship. Interfaces through delegation. Any other patterns are largely used for library development