Live data from Hacker News

Solid and Clean Code never felt solid or clean to me

devz.cl

61–70 of 82 posts

Re: Solid and Clean Code never felt solid or clean to me

#61

I guess by now it's pretty settled down and unanimous that SOLID is an extremely bad way to organize your code, and that Clean isn't very good and has about the same odds of helping or harming you. But extending the complaint to all acronyms isn't helpful. ACID, OLAP, EBITDA, etc are perfectly good names with clear meanings that can be easily discovered.

"Extremely bad"? What are the actual material consequences of the decision? Relate it to business outcomes

Re: Solid and Clean Code never felt solid or clean to me

#62

Uncle Bob is a snake oil salesman. Not sure he realizes it himself though. The whole SOLID, OOP design patterns era was one of the worst things to have happened to programming. I always thought I was the one that sucked but now I'm absolutely certain that whole zeitgeist was total crap.

What do you prefer?

KISS, YAGNI, Program with intent, functional style.

Re: Solid and Clean Code never felt solid or clean to me

#63

For some actual code and comparison of principles behind Clean Code see: https://github.com/johnousterhout/aposd-vs-clean-code

Uncle Bob is awesome, maybe some of his ideas aren’t iron clad but he embodies a great engineer and person. Every time I’ve listened to (https://youtu.be/UBXXw2JSloo) or (now) read interviews the guy is humble, listening, and it would seem extremely genuine.

A definite Uncle!

Re: Solid and Clean Code never felt solid or clean to me

#64

Earlier quoted context omitted.

Also, DRY, WET, YAGNI are useful ideas.

Yep. That's what they are. Useful ideas. The issue is treating them as rules or excuses for early/unnecesary abstractions.

We've been fighting this war since Design Patterns at least. Remember those? Engineers who Get Things Done treat them like TV Tropes—useful vocabulary for talking about recurring ideas in software development. Suits in the 2000s treated them like immutable laws.

Re: Solid and Clean Code never felt solid or clean to me

#65
post #39

Earlier quoted context omitted.

Oh please don't confuse it with an aversion to formalism. It's quite the opposite. ACID, CAP and others were fantastic research when they came up. But now they are outdated and reductive of the real implications of running databases and distributed systems. That's why I mentioned PACELC being one of my favorite design principles in this matter: https://en.wikipedia.org/wiki/PACELC_design_principle My criticism of thi…

Humans like acronyms. You see them all over. If it seems like programmers like them more than others it is only because you are in that field and don't think about other fields. (did you know that Radar, and Scuba are acronyms? probably most readers do as soon as I pointed it out but if asked to come up with a non-programming acronym would have used others)

>Humans like acronyms.

Americans, mostly. I don't really know why but acronyms are a very american thing.

Re: Solid and Clean Code never felt solid or clean to me

#67
post #62

Earlier quoted context omitted.

What do you prefer?

KISS, YAGNI, Program with intent, functional style.

I would add, simple data in / data out functions. Composable functions. Value types > reference types. Keep your state in order! Consolidate your state, dont shatter your state around a bunch of "objects"

Re: Solid and Clean Code never felt solid or clean to me

#68
This sort of object oriented programming was doomed to fail because it requires thoughtful world building and not a direct assault on the ticket you were assigned.

It you look at most of SOLID it is about building little pieces that eventually will fit together and rules to avoid incompatibilities when the world you built comes together.

Re: Solid and Clean Code never felt solid or clean to me

#69

This sort of object oriented programming was doomed to fail because it requires thoughtful world building and not a direct assault on the ticket you were assigned. It you look at most of SOLID it is about building little pieces that eventually will fit together and rules to avoid incompatibilities when the world you built comes together.

What is most of SOLID?

Re: Solid and Clean Code never felt solid or clean to me

#70
post #69

This sort of object oriented programming was doomed to fail because it requires thoughtful world building and not a direct assault on the ticket you were assigned. It you look at most of SOLID it is about building little pieces that eventually will fit together and rules to avoid incompatibilities when the world you built comes together.

What is most of SOLID?

Pretty much every item besides the Open Closed Principle which deals with deals with future changes touch on being able to snap pieces that know as little as possible about each other together to create the final product while being robust to change in the underlying pieces.

This comes out in the practical world in being able to make Java libraries that don't need to be recompiled or redistributed because of changes to other parts.

Post reply on HN