logoalt Hacker News

normie3000today at 6:19 AM1 replyview on HN

> I have strong opinions about good software design, some of them unconventional

I'm jealous of your undergrads - can you share some of the unconventional opinions?


Replies

jkhdigitaltoday at 8:52 AM

I’m required to teach DSA in Java, so I lay down a couple rules early in the course that prohibit 95% of the nonsense garbage that unconstrained OOP allows. Granted, neither of these rules is original or novel, but they are rarely acknowledged in educational settings:

1. All public methods must implement an interface, no exceptions. 2. The super implementation must be called if overriding a non-abstract method.

The end result of strict adherence to these rules is basically that every feature will look like a GoF design pattern. True creative freedom emerges through constraints, because the only allowable designs are the ones that are proven to be maximally extensible and composable.

show 1 reply