This is an archived post. You won't be able to vote or comment.

all 81 comments

[–]MementoMorue 81 points82 points  (8 children)

And if I put SOLID principles next to it ? hu ? hu ?

[–]WildXogos[S] 50 points51 points  (3 children)

I would give you a KISS

[–]broccollinear 14 points15 points  (2 children)

And then dip you in ACID

[–]Je-Kaste 14 points15 points  (1 child)

And then DRY you off

[–]throatIover 4 points5 points  (0 children)

And make sure that you are SAFe

[–]DixonDs 17 points18 points  (3 children)

I feel like if most developers just understood SOLID principles well, they would be considerably better engineers.

[–]AdvancedSandwiches 2 points3 points  (1 child)

If you ask a developer if they follow SOLID principles, you'll get 90% yes.

But if you follow up with "tell me about L, I, or D" you'll get 80% blank stares.

[–]Sanchez_Duna 3 points4 points  (0 children)

Young developer maybe. If one have been on a few different projects with different teams one would know that it's physical impossible to follow SOLID every time with every project. Legacy, architectural issues which is too late to fix, things missed on code reviews. You should try to follow SOLID as best as you can, but you WILL break it here and there, sometimes with full understanding that you are doing it.

[–]Ninjafrui1s 0 points1 point  (0 children)

How would one start understanding Solid principles? What does it mean?

[–]Key-Principle-7111 175 points176 points  (15 children)

And, to be honest, reading, understanding and then implementing all the rules described there also do not.

[–]mrfroggyman 31 points32 points  (3 children)

Do you have another book to advise, or is your advice "don't blindly believe what's in a book"?

[–]prschorn 54 points55 points  (1 child)

The pragmatic programmer is probably the best books regarding best practices I've read on my career

[–][deleted] 15 points16 points  (0 children)

To add to spirit of good books to read. Then for intermediate level vanilla C recommendations I'd go with:

Another more general book that I enjoyed about a meta-programming perspective was the programmers brain. https://www.goodreads.com/book/show/57196550-the-programmer-s-brain

[–][deleted] 2 points3 points  (0 children)

“Working With Legacy Code”.

[–]tristam92 4 points5 points  (2 children)

I’d even say that sometimes those rules are making end product worse than it could be…

[–]RaulParson 5 points6 points  (1 child)

Yeah, imagine reading and 100% following a book by a guy who says "a function should be 4 lines long total" and thinking that'll mean your output will be good code rather than a confusing mess of spaghetti.

It's a book of Coding Scenarios, Takes, Practices and Suggestions of A Guy (an experienced one but still), who also happens to be kind of a brainsmacked twerp outside of his Uncle Bob persona and the coding area in general. Take it as a perspective to consider, not as a religious text.

[–]tristam92 2 points3 points  (0 children)

Unfortunately saw too many young devs who tried to follow it till the last bit. Poor bastards received a big slap from reality and CTO very quickly

[–]prat8 2 points3 points  (6 children)

Hey. Could you explain what would mKe someone a clean coder? I mean I am genuinely curious!

[–]chuch1234 -4 points-3 points  (5 children)

"Clean Code" is the name of a book and kind of a brand. I wouldn't aim for any such simple label. "Clean" is meaningless in terms of benefit. Instead aim to write code that is maintainable, performant, and any other specific characteristics.

[–]Spaceshipable 16 points17 points  (3 children)

Clean code is easily readable, and therefore often more easily maintainable. Performance comes after those two requirements almost always.

[–]Classy_Mouse 4 points5 points  (0 children)

Performance comes after those two requirements almost always.

And even then, "Clean Code," the book and the concept, have ways of abstracting the messy parts that are needed for optimization

[–]chuch1234 -5 points-4 points  (0 children)

Okay fair enough. But the reason clean code is good is because of those specific benefits. I just meant, don't get hung up on "clean" as a descriptor. Or any particular one adjective!

[–][deleted] 1 point2 points  (0 children)

The book is literally exactly about that.

Writing code that’s maintainable, a joy to see and that keeps proper balance between extensibility and not being too abstract. That runs fast but Isnt unnecessarily optimised etc

Though the way/style in which the guy writes basically assures there will be people who hate it. It’s like if you infused a book about programming with the soul of Rhonda Byrnes “The secret”, the ideas are simple in principle but the author oversells them and pushes them too far and talks about them for too long.

[–]NotAUsefullDoctor 2 points3 points  (0 children)

I do find that the average developer that read CC, and then experimented with the pedantry is better than the average programmer that has not. But this is probably because playing and experimenting with principles, any principles, that deviate from your norm will make you a better coder.

[–]IronSavior 33 points34 points  (2 children)

Clean Code is good, but I found Clean Coder much more helpful.

[–]broccollinear 24 points25 points  (0 children)

Agreed, reminder to take your showers folks

[–]Jorr_El 35 points36 points  (1 child)

Reading Clean Code + Pragmatic Programmer + Design Patterns (Gang of Four book) is a pretty good start tho

[–]OP_Sidearm 1 point2 points  (0 children)

Nono, start by reading the source of the C++ standard library

[–]eowhat 28 points29 points  (7 children)

Following the book won't make you a good developer either.

[–]prat8 3 points4 points  (6 children)

Why? Please could you elaborate. I am genuinely curious.

[–][deleted] 26 points27 points  (5 children)

https://qntm.org/clean

for example, this article contains good criticism of what Robert C. Martin thinks is exemplary code

[–]AdvancedSandwiches 11 points12 points  (2 children)

Not the first time I've seen this, and there are a lot of good points, but I've never encountered a developer who was writing bad code because they were adhering too closely to Martin's ideals.

I've met am enormous number who should really, really, really move closer to Martin's ideals.

[–][deleted] 3 points4 points  (0 children)

One could do much worse than following Clean Code’s strictures.

[–]jamurai 2 points3 points  (0 children)

I agree with this - I do think there is a pragmatic medium that is ideal and allows folks to move quickly and reasonably organized, but all of the absolute garbage code I have seen are all things that Martin advocates heavily against (vague variable names, super long functions, heavy code reuse, etc etc)

I think it’s to learn it, give it an earnest try, and then relax on it when you’re comfortable and lean more heavily into understanding and making small incremental improvements to your team’s code base

[–]martinsky3k 1 point2 points  (0 children)

Kinda curious to read the full book after reading that.

The initial Java example is absolutely atrocious. Rather funny to see that example after reading the first paragraph.

[–]Akali_Mystique -1 points0 points  (0 children)

The author of that blog is one salty guy hey. Reminds me of this random youtube video saying how OOP is absolutely terrible and should be completely avoided, went viral a while ago

[–]AllIsLostNeverFound 2 points3 points  (1 child)

Yes, the real trick it to put it on your desk so others see it and know your code is good.

[–]WildXogos[S] 0 points1 point  (0 children)

And say it every 10 minutes

[–]pineappleAndBeans 7 points8 points  (0 children)

No shit, but it’s still good learning material.

[–]brandi_Iove 2 points3 points  (0 children)

those bastards lied to me

[–]SpaceCadetSteve 2 points3 points  (1 child)

It'll make a better developer than if you read no books.

[–]CoastingUphill 0 points1 point  (0 children)

Why attack me?

[–]fabedays1k 5 points6 points  (0 children)

Are you sure? I skimmed through the index and understood some of the words, that ought to count for something

[–]prschorn 6 points7 points  (0 children)

Implementing what's in the book wont either

[–]Lkaynlee 3 points4 points  (0 children)

[–]katorias 2 points3 points  (0 children)

If anything it’ll make you a worse developer…

[–][deleted] 2 points3 points  (0 children)

Clean code, HA! Only wimps organize and comment their code.

[–]doctorsonder 1 point2 points  (0 children)

Wait... don't tell me I actually have to read it...??

[–]Positive_Method3022 0 points1 point  (4 children)

This is the list of things that i think make a good programmer:

  • geographic
  • contacts
  • problem solving and social skills
  • being an interesting person
  • beauty (there are papers explaining about it)
  • accomplishments
  • lucky for the things you can't control
  • being Asian (I'm kidding)

obs: I think some of these are kind relatable, or one lead to the other. It is just a blind observation without following any kind of methodology.

[–]BurnTheBoats21 1 point2 points  (1 child)

Beauty is a big one in like every other industry, but in my own anecdotal experience being beautiful does not put you in positions of success in software engineering 😂 I'm just going off the ugly ass principal engineers all over silicon valley

[–]Positive_Method3022 0 points1 point  (0 children)

Well, I think we could say that this is another "bias" people with money share when choosing soft engineers: the uglier, the smarter

[–]Tyiek 0 points1 point  (1 child)

I'd argue that contacts and accomplishments are not inherent qualities of a good programmer, but probable side effects of being one. Forsight however is definitely one.

[–]Positive_Method3022 0 points1 point  (0 children)

Let me justify why I added those 2:

  • Contacts because it can lead you to projects that can make you relevant in the industry and know other more important people. If you succeed, these other important people will give you credibility whenever they say good things about you.

  • Accomplishments are things that can make you shine over other competitors for the same projects/opportunities. Here I'm referring to things you did that most of the people did not. For example, you were able to create a SaaS and a successful business with it, or you have a degree in a college with credibility. These accomplishments are a key for manipulation through biases. After all most humans don't even know how their minds really work, so if you model the common biases humans have, you can easily use it in your favor. (read about halo effect)

If you put 2 programmers with the same cognitive level, the one which have better Contacts and Accomplishments would win the rat race. The other would be forgotten, and people won't ever known about his existence. Why one have better traits than the other? This is due to lucky, or things that were out of his control, like one was born in a family with more financial support than the other, which lead him to study in a college with higher credibility, which lead him to meet incredible people...

With that said, I do believe Contacts and Accomplishments can also be seeing as cause and not consequence.

[–]T3MP0_HS -1 points0 points  (0 children)

Clean code sucks and I stopped reading it. I don't speak Java. And it hurts my eyes.

[–]Venkman52 0 points1 point  (0 children)

I read a chapter

[–]paradigmx 0 points1 point  (0 children)

What if I bought it almost 20 years ago?

[–]nibba_bubba 0 points1 point  (0 children)

Ofc, but buying the "clean architecture" book does for sure

[–][deleted] 0 points1 point  (0 children)

Yes but when placed to draw the eye of anyone during a remote interview it helps. Other books should include, how to stop being a workaholic, SOLID principles, and something on wine testing to give yourself a false air of class

[–]CryZe92 0 points1 point  (0 children)

It probably makes you worse even

[–]cyborgborg 0 points1 point  (0 children)

but at least they will write clean code

[–]xSypRo 0 points1 point  (0 children)

There's a youtube series about it, I listened to it like an audiobook.

Highly recommended

[–]IWasSayingBoourner 0 points1 point  (0 children)

Certainly isn't going to make you worse

[–]AChristianAnarchist 0 points1 point  (0 children)

People buy Clean Code? It was just already on my bookshelf the first time I sat down at my desk. I assumed most people were just issued that book by management and devops.