top | item 36188002

(no title)

gusmd | 2 years ago

The best gem in all of it is this:

> You can make classes, but you can only ever make one instance of them. This shouldn't affect how most object-oriented programmers work.

This describes my experience with most OOP code very well.

discuss

order

layer8|2 years ago

I think the best gem is the ability to delete paradigms.

As for OOP, a bit more realistic would have been to restrict interfaces to at most one implementation.

osigurdson|2 years ago

One real implementation and many implementations for testing that do whatever the consumer wants them to do.

phendrenad2|2 years ago

I've seen this called "bulldozer code". As in "Hey, all of those plain functions need to be OOP! Get a big earth moving machine and gently push them inside the curly braces of a class! Which class? Any class!"

_the_inflator|2 years ago

I love Singletons and God Classes. ;)

keyle|2 years ago

Factories and Managers. Don't forget Decorators!

HeavyStorm|2 years ago

This thread slice is making me feel really bad.

BulgarianIdiot|2 years ago

Sturgeon's Law: "90 of everything is crap".

It's no surprise that when you make virtually all mainstream programming languages OOP, then there will be a vast amount of bad OOP code out there (as by definition mainstream code then becomes "OOP code").

underdeserver|2 years ago

I like how you forget the % after 90.

DreamBerd probably allows this.

scns|2 years ago

Ouch, that is a harsh view. Black & white thinking leads to depression in people with a disposition. Questioning these thoughts helps.

I'm more inclined to follow the bell curve. 10% crap, 40% mediocre but rather bad, 40% mediocre but rather good and 10% great.