cody-dot-js / codyaprice.com-legacy

Personal website
https://codyaprice.com
MIT License
1 stars 0 forks source link

[blog post] On the Rule of Three and Cute Code #81

Open cody-dot-js opened 4 years ago

cody-dot-js commented 4 years ago

Write less code

Dan Abramov post Goodbye, Clean Code — Overreacted

@getify response, (mis)abstraction Goodbye, Clean Code - link - javascript - Reddit

Rule of Three Rule of three (computer programming) - Wikipedia

DRY Don’t repeat yourself - Wikipedia

AHA, by Kent C Dodds AHA Programming 💡

https://www.sandimetz.com/blog/2016/1/20/the-wrong-abstraction

cody-dot-js commented 4 years ago

https://twitter.com/codewisdom/status/1229465545315147782?s=21

cody-dot-js commented 4 years ago

https://github.com/dwmkerr/hacker-laws#kernighans-law

cody-dot-js commented 4 years ago

http://nomodes.com/Larry_Tesler_Consulting/Complexity_Law.html

getify commented 4 years ago

On that "complexity law", I agree with most of what's said there, except one little tiny piece. The use of "complexity" throughout is inappropriate, IMO. s/complexity/difficulty. Complexity is a different beast entirely, and doesn't hold the meaning this law is targeting.

cody-dot-js commented 4 years ago

Yeah, that one was going to be more or less "loosely interpreted". Mainly, I want to drive home the point:

Every application has an inherent amount of irreducible complexity

which, to me, implies that you should design your code "well" (here comes SRP, etc etc). A side-effect of this is that sometimes the problem space is complicated, but that doesn't mean you need to make it any more complicated by writing convoluted code.