Use Incremental Coding Technique and Make No Bugs in Complex Features

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ธ.ค. 2024

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

  • @L0wPressure
    @L0wPressure ปีที่แล้ว +8

    I don't use C# but all you're saying can be generally applied to any language, and i enjoy your explanations and way of thinking. Thanks for the content!

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

    Awesome explanation! The incremental coding technique is a game-changer for tackling complex features with fewer bugs. Super practical tips-thanks for sharing!

  • @eugene-the-duckovich
    @eugene-the-duckovich 4 หลายเดือนก่อน +3

    Damn, watching this felt like a big revelation

  • @nickbarton3191
    @nickbarton3191 ปีที่แล้ว +1

    That first step was beautiful, all the other files turned from red to green in an instant.

  • @rustamhajiyev
    @rustamhajiyev ปีที่แล้ว +5

    Really like that you demonstrate multiple techniques/solutions using the same code but approaching to the problem from different angles. Love your "intro"s 👍😂

  • @loupiz
    @loupiz ปีที่แล้ว +20

    Finally someone who fills the gap between C# and domain design on TH-cam. @Zoran Horvat I'have started watching your videos they are great, thank you. I'm definitely not an expert of Blazor but it would be nice to use a pattern to prevent modifying the _CitationPartial.cshtml file each time a new segment type is added to the application (perhaps having a list of views where you can add new ones whenever segment types are added).

    • @zoran-horvat
      @zoran-horvat  ปีที่แล้ว +1

      If you watched my video on discriminated unions, then you will see that the problem you have outlined is the signature of functional modeling - adding a new type to the set of related types is a breaking change to all the consumers, UI included. I think that trying to fix that is a lost cause, for many practical reasons.

    • @loupiz
      @loupiz ปีที่แล้ว +1

      @@zoran-horvat I get a bit confused with discriminated unions I must say. To me they tend to violate the open/closed principle. I would be interested to hear your thoughts on that.

    • @zoran-horvat
      @zoran-horvat  ปีที่แล้ว +3

      @@loupiz OCP does not apply to DU - it is a concept from object-oriented programming, while discriminated unions are the modeling tool from functional programming. Actually, they achieve their greatest power by breaking OCP - the ability to define behavior where it belongs, rather than where the types are defined. You can watch the video on discriminated unions to get a better grasp of how they help in design: th-cam.com/video/q_tH3njpAFc/w-d-xo.html

    • @amarsha4
      @amarsha4 ปีที่แล้ว +1

      @loupiz I thought the same thing. I'm from a purely OOP background so this seemed suboptimal to me. I'll have to watch some of Zoran's functional programming videos.

    • @davidghydeable
      @davidghydeable ปีที่แล้ว +3

      You can actually do this. In you view you call . Then you create partial views corresponding to the class names of each segment type. You will also need to create a partial view for the base type even though this will never actually be used. .NET seems to need it to be there.

  • @XXnickles
    @XXnickles ปีที่แล้ว +4

    Used to watch your courses in Pluralsight; glad to see you are around and keep expanding in these functional principles using the newer language features. I also use the record inherence as a replacement of discriminated unions (the wait will be long for what it seems) Subscribing!

  • @ivandrofly
    @ivandrofly ปีที่แล้ว +1

    Video-mark:
    2:45 - string

  • @ivandrofly
    @ivandrofly ปีที่แล้ว +1

    Nothing to say other than thank you :D - you are the missing person I was looking for on TH-cam :D

  • @noopcode
    @noopcode ปีที่แล้ว +1

    So The Vision decided to retire from being an Avenger and became a programming guru instead? Excelent video Mr Horvat

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

    I have a question... Every video breaks my head. Is there a way to learn C# your way? Does Patreon have a section where we can start from the beginning to relearn programming?

    • @zoran-horvat
      @zoran-horvat  2 หลายเดือนก่อน

      @@handlez411 No, but I have the course on Udemy called Beginning Object-Oriented Programing with C#.

  • @temp50
    @temp50 ปีที่แล้ว +1

    I have a feeling that you either didn't see soo much ugly (a.k.a. very smart) code or just elegantly skipped this little potential problem. :P
    Just an example: You said that just by exchanging the string to an other type wont'be a breaking change. The reality is that every time someone expecting that property to be a string via Reflection / lazy loading by exact type matching, or via any other type of magic.. , it could be a breaking change at runtime!
    So, step 0: Reverse engineer the whole application and try to find all of these things before changing anything.

    • @zoran-horvat
      @zoran-horvat  ปีที่แล้ว +2

      You are advocating precisely the mistake I have tried to expose in this video. There is no problem in identifying all the places that depend on string, but attempting to do anything with that would be a catastrophic error in a large project.
      If you ever sent a PR with 100 changed files, I would reject your work as a certainty, because you would not be able to explain what makes the resulting code correct.
      Now back to the beginning: Can you introduce a seam in code so that only a few files change, and each in only a few lines? If you can, then you have my attention.

  • @AK-vx4dy
    @AK-vx4dy 4 หลายเดือนก่อน

    Almost Smalltalk 😉

  • @aprobinda
    @aprobinda ปีที่แล้ว

    13:57 This runtime type information looks like a violation of LSP:
    `if (segment is BookTitleSegment book)`
    because foreach references the base class CitationSegment but has to know about its subtype. What do you think about this @zoran-horvat?
    Excellent video with useful content, by the way, I enjoyed watching it. Thank you for the time you invested into it.

    • @zoran-horvat
      @zoran-horvat  ปีที่แล้ว +1

      The portion of code you are referring to is a pattern matching expression typical of functional code. The types pertaining to CitationSegment are effectively functional types, rather than object-oriented classes.
      I would strongly advise you to watch the videos where I have addressed that technique, primarily this one: th-cam.com/video/q_tH3njpAFc/w-d-xo.html

    • @aprobinda
      @aprobinda ปีที่แล้ว +1

      @@zoran-horvat thank you for clarifying. Having watched the recommended video, I see why LSP does not apply, but more importantly, I learned about a new approach.

  • @jonny.rubber
    @jonny.rubber ปีที่แล้ว

    And put all strings into Const.c 😂