Live data from Hacker News

Clean Code vs. A Philosophy Of Software Design

github.com

451–460 of 554 posts

Re: Clean Code vs. A Philosophy Of Software Design

#452

Earlier quoted context omitted.

> idiots who froth at the mouth That seems like an unnecessarily harsh way to refer to people.

Clean Code zealots are consistently some of the least likable, least productive, least pragmatic people I have ever worked with. I've had multiple clients where the whole team is threatening to quit unless the CC zealot is fired. And when they are fired guess what - bugs go down, shipped features go up, and meetings become productive. "Idiots who froth at the mouth" is an understatement IMO

I’ve seen someone take a glance at a codebase, declare it too complex, and suggest reading Clean Code.

The entirety of the complexity was essential and dictated by an external data model used nation-wide for interoperability.

Based on my experience and the OP dialogue, Uncle Bob is a vanity-driven narcissist and an infectious fraud.

Re: Clean Code vs. A Philosophy Of Software Design

#453

IMO the "PrimeGenerator" example from Clean Code is horrendous and completely unreadable! This would be so much better as a single method/function with a few interspersed comments that explain the algorithm. I mean, just look at this abomination: private static boolean isMultipleOfNthPrimeFactor(int candidate, int n) { return candidate == smallestOddNthMultipleNotLessThanCandidate(candidate, n); } Not only is the met…

> This would be so much better as a single method/function with a few interspersed comments that explain the algorithm.

I haven't read the whole article when I wrote that comment. Turns out that Ousterhout provides a rewritten version of "PrimeGenerator" that does exactly this. At least UB concedes that this version is indeed much better.

Re: Clean Code vs. A Philosophy Of Software Design

#454
I'm surprised that Ousterhout doesn't point out the huge problem introduced with the PrimeGenerator3 refactor: It stores state in static (!) fields, so it's completely unusable in the presence of threads, unless you add a global lock.

Even if Uncle Bob thinks tiny methods are great, why would he introduce the pseudo-constructor "initializeTheGenerator" and make everything static if he needs state? If the helper methods were instance methods instead, the static "generateFirstNPrimes" method could simply construct a new instance to store the state.

Re: Clean Code vs. A Philosophy Of Software Design

#455
post #405
post #208

Earlier quoted context omitted.

You guys really hated that I found the discussion interesting?

It seemed like a content-free comment. I was no better informed after reading it than before, and it was of no artistic or cultural value. It did not induce me to question any of my assumptions or investigate anything. It expressed your experience, but your experience was not unusual or surprising in any way, except perhaps that you did not know that "Uncle" Bob Martin was an incompetent charlatan. Possibly those wer…

Fair points! Thank you.

Re: Clean Code vs. A Philosophy Of Software Design

#457
post #208

Earlier quoted context omitted.

You guys really hated that I found the discussion interesting?

FWIW, me too comments are usually downvoted.

Makes sense now, they don't add much, or anything. We already have the upvote button for this.

Re: Clean Code vs. A Philosophy Of Software Design

#458
post #444

Earlier quoted context omitted.

>This is essentially using your own belief as proof that your belief is correct. You say I haven't been around the smartest people because I say the smartest people don't do what you claim. You are saying "I'm right therefore you are wrong". Maybe you haven't been around the smartest people. I have quantitative evidence of this. There IQs were above 150. >Complex is easy. Simple is hard. And yes, some things are inhe…

[flagged]

It came up because we talked about Mensa and he was part of it. I asked his iq and he told me. He claimed it and I believe him. Then the other guy also said he was offered to join Mensa but didn’t. Take from that what you will.

Re: Clean Code vs. A Philosophy Of Software Design

#459

Earlier quoted context omitted.

"It's not object oriented programming" is only a good case to make if you think object oriented programming is synonomous with good. I don't think that's true. It's sometimes good, often not good. Why would focusing on OO be a goal? The goal is to write good software that can be easily maintained. Nobody outside of book writers are shipping UML charts

Why would you not focus on writing OO code in an OO language for example? Would you start writing OO code in a functional langugage? No you wouldn't, because it would be pointless. There are programming paradigms for a reason

> Why would you not focus on writing OO code in an OO language for example? Would you start writing OO code in a functional language? No you wouldn't, because it would be pointless. There are programming paradigms for a reason

I'm paid for efficiently solving business problems with software, not using a particular paradigm. If an FP solution is more appropriate and the team can support it, then that's what I'll use.

Post reply on HN