Live data from Hacker News

Solid Relevance

blog.cleancoder.com

11–20 of 55 posts

Re: Solid Relevance

#11
Uncle Bob sounds like someone trying to tutor a young golfer by talking about how his shoulders are aligned, how wide apart his feet are, how he's gripping the handle, etc. Dan North sounds like he's objecting to that style and prefers just yelling "JUST HIT THE BALL FAR" at his students over and over.

Re: Solid Relevance

#12
post #9

Earlier quoted context omitted.

> But the best is just to understand everything that happens. Agreed, but unless you have written all the code yourself then this is hard to do. We have to be able to black-box things in order to manage complexity and make progress quickly. For this SOLID helps but if it is applied a too fine a granularity then it can make things worse (and I think micro testing things with mocks etc can cause this) "There is no theo…

I disagree with Martin very much. Programs can be made easy to change without introducing complex OOP abstractions. There is a simple rule that Martin fails to ever mention. Use combinators as much as possible and segregate as much logic as possible from IO. That's it.

[deleted]

Re: Solid Relevance

#13
post #7

Software is still if statements, while loops, and assignment statements — Sequence, Selection, and Iteration. That seems an extremely narrow view of modern programming. But then isn't this the same man who made the claim about there not being any new programming languages left to find?

Curious, what new has been found?

There's a style of programming with no concept of loops or jumps. It's called functional programming. There's other styles that are drastically different as well.

Most of these styles aren't new though.

Re: Solid Relevance

#14
I'll be honest I almost never find myself agreeing with what I understand Bob Martin is advocating but this whole post makes sense to me. I may have to re-read some of his other stuff. I don't do much OOP but all of these principals make sense in a FP context as well and I think he does a good job of untangling accidental associations with specific OOP features/patterns in this article.

Re: Solid Relevance

#15
post #2

There's 2 approaches to programming: - make it easy to extend (lets's call it SOLID in this context) - make it easy to rewrite (let's call it KISS) OO developers think that the first approach is The Only Way but both can be right, especially with high-level declarative languages and with tasks small enough (relative to the language expressive power). SOLID makes it easier to modify programs (in predetermined directio…

> SOLID makes it easier to modify programs (in predetermined directions) without understanding the whole. In my experience, in predetermined directions is almost never the direction the piece of code needs to evolve. Maybe I'm bad at reasoning about the future changes, but I'd guess that most people are utterly bad about this. This makes OCP more like an ideal to be aspired to, and beaten with when one inevitably fai…

If you look at it objectively. There's a very clear reason why OOP inevitably fails.

Maybe a better way to put it is that SOLID is an ideal that OOP aspires to be but fails.

Either way SOLID is a bad set of axiomatic design principles. It's sort of an arbitrary group of rule of thumb principles picked to spell out SOLID.

Re: Solid Relevance

#16
post #7

Earlier quoted context omitted.

Curious, what new has been found?

There's a style of programming with no concept of loops or jumps. It's called functional programming. There's other styles that are drastically different as well. Most of these styles aren't new though.

Well, at the risk of being pedantic, I think you're being pedantic: at the machine-code level, all those function calls resolve to jumps and their recursive base-cases are terminating cases of loops. Functional programming is a great way of organizing loops and jumps, but they're still loops and jumps.

Re: Solid Relevance

#17

Software is still if statements, while loops, and assignment statements — Sequence, Selection, and Iteration. That seems an extremely narrow view of modern programming. But then isn't this the same man who made the claim about there not being any new programming languages left to find?

I believe you're referring to his statement that essentially no new programming paradigms have been discovered since the 60s? Are you saying you disagree? Basically every major programming paradigm had been discovered by the 60s. I'd be happy to hear otherwise.

Re: Solid Relevance

#18

Earlier quoted context omitted.

There's a style of programming with no concept of loops or jumps. It's called functional programming. There's other styles that are drastically different as well. Most of these styles aren't new though.

Well, at the risk of being pedantic, I think you're being pedantic: at the machine-code level, all those function calls resolve to jumps and their recursive base-cases are terminating cases of loops. Functional programming is a great way of organizing loops and jumps, but they're still loops and jumps.

At the machine code level there's no Iteration just GOTO :)

Re: Solid Relevance

#19
post #7

Software is still if statements, while loops, and assignment statements — Sequence, Selection, and Iteration. That seems an extremely narrow view of modern programming. But then isn't this the same man who made the claim about there not being any new programming languages left to find?

Curious, what new has been found?

I'd say one of the biggest trends in the industry in recent times has been away from mutability -- and with it ubiquitous assignment and the kind of stateful everything environment that OOP tends to foster -- and towards much more controlled state management, often immutability by default, and generally a more declarative programming style.

I think the emphasis on traditional structural programming is also a very dated view. I mean, sure, at machine code level, you're ultimately doing sequences and conditional jumps one way or another, and most imperative languages do still provide general sequence, selection and iteration structures. But in the mainstream languages, numerous other control structures from exceptions to pattern matching on algebraic data types are in fairly widespread use, and tools like concurrency, asynchronicity and using higher order functions are also widely relevant.

Re: Solid Relevance

#20
post #8

SOLID is just a random arbitrary acronym about some principles that are somewhat obvious. However most people don't fully understand these principles deeply. What happens is if you are using OOP you are not using SOLID to its full extent. Ironic that SOLID comes from OOP. Either way SOLID are arbitrary rules of thumb. Grouped together arbitrarily to spell out SOLID and kind of maybe sort of right depending on your op…

> All things should be ungrouped as much as possible.

Why?

Post reply on HN