The symptoms of bad code - Robert C. Martin (Uncle Bob)

แชร์
ฝัง
  • เผยแพร่เมื่อ 31 ม.ค. 2025

ความคิดเห็น •

  • @MichałT-e3r
    @MichałT-e3r 2 หลายเดือนก่อน +89

    Seems you do not have rights to the original videos as the voice is modulated and video is interrupted with some random code images...

    • @divinecomedian2
      @divinecomedian2 หลายเดือนก่อน +3

      It's fine

    • @rhoharane
      @rhoharane 20 วันที่ผ่านมา +2

      They sped up the video and that's why sounds weird.
      but yeah they just stole the clips from another video and added random extra stuff

  • @margue27
    @margue27 2 หลายเดือนก่อน +37

    So you took content that doesn't belong to you, distorted the audio, and added noisy background music, unrelated screenshots of code, and super annoying subscribe animations?

    • @i-am-the-slime
      @i-am-the-slime 2 หลายเดือนก่อน +1

      It's uncle Bob so it's only fitting

    • @divinecomedian2
      @divinecomedian2 หลายเดือนก่อน +2

      It's fine. I wouldn't have watched this video otherwise.

  • @GordonRoland
    @GordonRoland 2 หลายเดือนก่อน +8

    Classes should be thought of as "types" not "containers." Define a new "type" (if you need it). Don't try to "bundle" code.

  • @dk6024
    @dk6024 2 หลายเดือนก่อน +37

    Ditch the music.

    • @mikef17
      @mikef17 2 หลายเดือนก่อน +3

      this is how they steal the original video. The YT algorithm won't be able to match it with the original material

    • @incursion45
      @incursion45 2 หลายเดือนก่อน

      Haters music is fine

  • @stolenlaptop
    @stolenlaptop 2 หลายเดือนก่อน

    You have to out of your way to make code that dependant on itself. I can unstand changing a structure or class causing some issues as the functions using them are dependent on their structure but still.

  • @rollinOnCode
    @rollinOnCode 11 วันที่ผ่านมา +1

    What is difference between coupling and fragility?

  • @ygstuff4898
    @ygstuff4898 2 หลายเดือนก่อน +3

    The curse of highly-coupled code, inter-connected code, or highly-dependent code.
    When I first learned coding (on my own?) in highschool, there was a lot of "spaghetti" and cowboy coding (if it works, good enough).
    It took my instructors my first year of programming courses in university to get that out of my system, and teach me how to design code properly. They focused on code design, and not specifically specific languages.
    So now I'm amazed when I see my old, terrible techniques being used by my peers, or "examples" they find on the internet, and wonder if they ever took a programming course that taught code design.

  • @olejemedickson
    @olejemedickson 2 หลายเดือนก่อน

    I love this video! 😂 learning with humour

  • @programata666
    @programata666 2 หลายเดือนก่อน +8

    Bad code is code that is hard to modify, it's that simple.

    • @jacekjacenty
      @jacekjacenty หลายเดือนก่อน

      If the bad code is the only code you can have in the current circumstances, it is not a bad code, it's the only code you can have. Simply, stop touching it.

  • @Waldemar_la_Tendresse
    @Waldemar_la_Tendresse 2 หลายเดือนก่อน

    You can very simply avoid all of that using a fine grained suite of tests before you even start to write a single line of code. But of course, this will take time, so people will rather not do it. At least not until their first spaghetti code project goes live. Some wi learn from the latter experience some won't.

    • @pdgiddie
      @pdgiddie หลายเดือนก่อน

      I think this is flirting with overengineering 😅 I love writing tests as I go too, but trying to write them all up front sounds like a return to Waterfall.

    • @Waldemar_la_Tendresse
      @Waldemar_la_Tendresse หลายเดือนก่อน

      @pdgiddie
      It may seem that way at first, if you don't want to think about it any further. But no, that is by no means what it means. It means moving into a digital world in which people are not held back by bugs purely for cost reasons. Because every bug means a thousandfold loss of human working time and, above all, life time. Every bug means pointless patches, pointless pondering about why it doesn't actually work now, and, as already mentioned, thousands of times over (if that number isn't far too low). Is the developer world already so indoctrinated by spreadsheets that it no longer wants to perceive the true effects of its actions?

    • @pdgiddie
      @pdgiddie หลายเดือนก่อน +1

      @@Waldemar_la_Tendresse Yeah, I agree tests are essential. I just don't think they can _all_ be written up-front. Maybe one or two to start getting the desired API drafted, but a lot of discovery happens whilst the code is being written, so there's generally a dance between the code and the tests, with both evolving side-by-side.

    • @Waldemar_la_Tendresse
      @Waldemar_la_Tendresse หลายเดือนก่อน

      @pdgiddie
      Even if it was exaggerated in my first statement, that's exactly what I'm talking about. I'm even leaning towards an initial throwaway version without testing and great bug fixing to get a better understanding of the issues up front. The second version is always the best. So specifically:
      1. quick and dirty throwaway version for problem detection
      2. tests per component
      3. component
      4. back to 2, sometimes with another 1 in between

  • @juanherbst9259
    @juanherbst9259 หลายเดือนก่อน

    I was waiting for the immobility and viscosity discussion…

  • @adibemaxwell6111
    @adibemaxwell6111 หลายเดือนก่อน +1

    Rust devs in Linux.

  • @danieltkach2330
    @danieltkach2330 2 หลายเดือนก่อน +5

    Horrible. Reported

    • @pdgiddie
      @pdgiddie หลายเดือนก่อน +1

      Huh?

  • @Unimatrix69
    @Unimatrix69 27 วันที่ผ่านมา

    Funny thing is, everything that UB us talking about is currently the common experience with all code that is 'borrowing' FOS libraries from public repos - All code today is fragile, very fragile.

  • @RichardOles
    @RichardOles 3 วันที่ผ่านมา

    You seriously need to stop with fucking up the audio on these videos

  • @tjdewolff5104
    @tjdewolff5104 2 หลายเดือนก่อน

    Bad code is code containing "Egyptian Dancers" all along. Kill that phenomenon by placing your matching braces in the same column: your code becomes readable...
    Ah, and of cource application of the NEUTiC-rule: Never Ever Use Tabs in Code! Never ever...

    • @Knightfall21
      @Knightfall21 2 หลายเดือนก่อน +2

      What if you're coding in Python?

    • @peternimmo74
      @peternimmo74 หลายเดือนก่อน

      Everyone seems to love K&R braces,I hate it, so much harder to see where blocks start and end.

    • @divinecomedian2
      @divinecomedian2 หลายเดือนก่อน +1

      Tabs are great. Still not sure why some folks don't like them.

    • @tjdewolff5104
      @tjdewolff5104 หลายเดือนก่อน

      @@divinecomedian2 Simple reason: there's still a debate going on whether tabs sould cover 8 spaces ("THE SACRED STANDARD") or 4 or whatever. Even a great mind mentioned 3.14 in this respect.
      The worst is a combination of both tabs AND spaces.
      No, to me its just spaces: they're unambiguous.

  • @LaloHao
    @LaloHao 2 หลายเดือนก่อน

    1. Made in Java

    • @Waldemar_la_Tendresse
      @Waldemar_la_Tendresse 2 หลายเดือนก่อน +1

      Java stands for an island and a dead horse.