The symptoms of bad code - Uncle Bob #cleancode

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

I’m not sure good code exists, but if it does I don’t think we’d agree on it.

Diamonddrake
Автор

This was called Lava Code, because everything it touched was turned to stone ... you couldn't change it. It was an example of an anti-pattern, the opposite of a design pattern.

UteChewb
Автор

The logical conclusion of this take is to never have any dependency at all, it's incredible some people take this guy seriously.

sebastianperez
Автор

I think actual bad code is code that is painful to use for purpose, unperformant, and either bug ridden (minor issues) or nonfunctional (major issues).
You get all of these by constant and needless change led by whimsy of suits that don't care to spend any amount of time actually thinking about what they want until after it is made "I don't know what I want, I just know what I don't like". This after-the-fact requirement changes to foundational goals of the software either means you're overengineer everything, so that each atomic piece can be swapped out for another (decreasing readability, as abstraction upon abstraction leading to code that isn't intelligible and reads like a baby's incessant cooing - just garbled gibberish) or you get the tight coupling ("rigid") code described in this video... you lose equally in both... given free reign to demand foundational changes, no matter how interchangeable each atomic piece of the code is, it will still fail when kicking out underpinnings that make up the very concept of the software, and you're going to either tape up those cracks or you got to tare it down and start over.

The problem is we don't force companies to prototype properly, we instead allow them to get away with scrum and playing with cards to appease their most dire demands of their egos to feel useful and not like a complete waste of space. I would love to see a world were you actually go quickly and painlessly with tests to actually blueprint out the final 'thing' you want, THEN AND ONLY THEN, let loose the programmers to actually build it to spec - as they are most able to know exactly how to make the software in such a way that it is NOT painful to use, PERFECTLY PERFORMANT for the aims and goals of the software as a system, and to make QUALITY SOFTWARE that isn't overengineered nor riddled with bugs.

Right now, you play with cards, and you do nonsensical sprints - as that's some form of entertainment for the product owner and stakeholders... all the while you're mired in multiple meetings each day, that not only are unproductive, but worse, stupid.

Oh, but yeah, ... tightly coupled code is to blame... and that's totally not just a side effect of indecisive direction.

anonymous
Автор

"Rigidity" suggests something is strong and not prone to breakage. A better term is "tightly coupled". Software must be interdependent at some level so that it works with other software. Loosely coupled designs tend to focus on modularity, which increases flexibility and reusability of code. This is typically desirable, but it also takes longer to plan and execute - something that academics tend to forget. Good code is code that works well enough to be used until it can be replaced by better code.

sevencardz
Автор

Is this guy actually a programmer?
A change in the code affects something else? Why that'd bad code?
Its like what, did you read that in the how to manage programmers handbook for beginners?
Ah its bad code because a change broke something. Oh wait, no its because a change broke MASSIVE amounts of other things.
Which one is it buddy.
Ok sure, you want to avoid the massive amounts of repercussions. Do your best to engineer around that special form of hell.
But this is just silly.

gavipk
Автор

It sounds like most of this would have been found before submit so long as there was adequate unit tests

TheAcademik
Автор

What if connections between code segments are business requirements?
Of course then you know exactly why it breaks but it doesn’t mean easier to fix.

HeavensLightening
Автор

I used to think I wanted to go into game design. Then I saw how daunting coding is and it turned me off so quickly. I have no interest staring at a computer screen until my eyes bleed.

shiden
welcome to shbcf.ru