What is DRY code?

Поделиться
HTML-код
  • Опубликовано: 25 ноя 2024

Комментарии • 28

  • @wCupOfTea
    @wCupOfTea 8 месяцев назад +12

    Great video. I feel like a lot of other videos on the same topic do not properly examine different cases where this principle may or may not apply.

  • @fireninja8250
    @fireninja8250 8 месяцев назад +6

    I feel this video could've a little more examples in code specifically, but this is by far one of the most enjoyable videos I've seen on coding practices! I love the illustrations, the examples, and how (mostly) DRY the video was! Good job, be proud.

  • @honkhonk8009
    @honkhonk8009 8 месяцев назад +1

    We live in the era of AI assisted code. Readability is more useful than DRY. They are not the same thing.
    Its honestly just easier to write the code as verbose or as concise as you want it, as long as its easy to understand.
    This is why C is so easy to code in. Its very consistent in how things are done, to the point that once you get a hold of it, it becomes second nature.

  • @tortugaescarlata4430
    @tortugaescarlata4430 8 месяцев назад +2

    nice video man! There is a phrase from Sandi Metz that I love and live by:
    Having duplicate code is far better than a bad abstraction.

  • @vasiliigulevich9202
    @vasiliigulevich9202 8 месяцев назад +15

    If all these acronyms can't be followed blindly, why don't we replace them all with just common sense?

    • @weeb3277
      @weeb3277 8 месяцев назад +2

      try it

    • @plaintext7288
      @plaintext7288 8 месяцев назад +5

      IMO it's about the ease of remembering the acronyms as links to principles of common sense, and to make it easy to remind someone of them

    • @oserodal2702
      @oserodal2702 8 месяцев назад

      "Common sense" is a fallacy. You don't blindly trust common sense, as it can be subject to your own prejudices and biases.

    • @Excalibaard
      @Excalibaard 8 месяцев назад +3

      It's not the acronyms that should be replaced with common sense. It's the 'follow blindly'.
      Know good principles and when (not) to apply them. Acronyms help to convey a principle (or set of principles) quickly.

    • @vasiliigulevich9202
      @vasiliigulevich9202 8 месяцев назад +1

      @@Excalibaard do they really help? Check RUclips or literature. Most of the text, time and effort is spent explaining when NOT to use these principles.

  • @francois-joubert
    @francois-joubert 8 месяцев назад

    5 stars for this one. I also know it as don't repeat behavior, but I like don't repeat knowledge also!

  • @fabricehategekimana5350
    @fabricehategekimana5350 8 месяцев назад

    Thanks for this high quality content (I just suscribed) 👏👏👏

  • @AmCanTech
    @AmCanTech 8 месяцев назад

    Nice video, looking forward to more SE content

  • @propanal
    @propanal 8 месяцев назад +2

    loved it ♥♥

  • @TayambaMwanza
    @TayambaMwanza 8 месяцев назад

    I really enjoy your format

  • @yousafwazir286
    @yousafwazir286 8 месяцев назад +1

    Great video

  • @juliocesar-fc1nm
    @juliocesar-fc1nm 8 месяцев назад

    Pretty cool video which software did you use to create the animations in it?

    • @ScottABailey
      @ScottABailey  8 месяцев назад +2

      I create the animations with Motion Canvas (motioncanvas.io). You write the animations in Typescript then export as an mp4.

  • @Susul-lj2wm
    @Susul-lj2wm 8 месяцев назад

    id say abstraction isnt generally a tradeoff. but also i am a functional programmer so maybe i am the wrong person to ask when applying DRY to other paradigms

  • @skeleton_craftGaming
    @skeleton_craftGaming 8 месяцев назад

    That's not what the rule of three is, but that's generally what you should probably do.

  • @weeb3277
    @weeb3277 8 месяцев назад +1

    unfortunately you'er right 😔

  • @KyraKrassenburg
    @KyraKrassenburg 8 месяцев назад

    this is WRONG 😡 writing DRY code means you take great care to not get it WET 😡

  • @manq
    @manq 8 месяцев назад

    Cringe takes