Back to Browse

I Cut My Code in Half After Adding Just One Virtual Method

17.6K views
Nov 13, 2024
12:37

Learn more at Brilliant https://brilliant.org/ZoranHorvat/ This link gives you a 30-day free trial and 20% off of an annual premium subscription. Witness firsthand how introducing polymorphic methods into a previously anemic domain model can drastically reduce code complexity, turning a convoluted 20-line method into a clean, single expression. Does that sound like magic? Then, let it be! In this demonstration, we shall implement the same feature twice: Once before, and then again after introducing a single virtual method. You will learn how a well-placed abstraction, no matter how simple it is, can lead to removing a ton of previous code. Watch the entire series: 1. Fat services layer https://youtu.be/rA_4lb8UCQo 2. Combinatorial explosion of methods https://youtu.be/g63pLbUrzjI 3. Eliminating data clumps https://youtu.be/k1fIRmTsQMU * 4. Adding polymorphism https://youtu.be/jgtPwXHTdHc 5. Make Your Object Model More Object-Oriented https://youtu.be/vSrKCHukzqY 6. How Far is Your Object-Oriented Code From Functional Programming? https://youtu.be/kVEL6DWtOeM Download source code ► https://www.patreon.com/zoranhorvat Enroll course *Beginning Object-Oriented Programming with C#* ► https://codinghelmet.com/go/beginning-oop-with-csharp Join Discord server with topics on C# ► https://codinghelmet.com/go/discord Subscribe ► https://www.youtube.com/channel/UCxsWfh8LCcn55mFB6zGBT1g?sub_confirmation=1 ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ 👨 About Me 👨 Hi, I’m Zoran, I have more than 20 years of experience as a software developer, architect, team lead, and more. I have been programming in C# since its inception in the early 2000s. Since 2017 I have started publishing professional video courses at Pluralsight and Udemy and by this point, there are over 100 hours of the highest-quality videos you can watch on those platforms. On my YouTube channel, you can find shorter video forms focused on clarifying practical issues in coding, design, and architecture of .NET applications.❤️ ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ ⚡️COPYRIGHT NOTICE: The Copyright Laws of the United States recognize a “fair use” of copyrighted content. Section 107 of the U.S. Copyright Act states: “Notwithstanding the provisions of sections 106 and 106A, the fair use of a copyrighted work, including such use by reproduction in copies or phono records or by any other means specified by that section, for purposes such as criticism, comment, news reporting, teaching (including multiple copies for classroom use), scholarship, or research, is not an infringement of copyright." This video and our youtube channel, in general, may contain certain copyrighted works that were not specifically authorized to be used by the copyright holder(s), but which we believe in good faith are protected by federal law and the Fair use doctrine for one or more of the reasons noted above.

Download

1 formats

Video Formats

360pmp414.7 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

I Cut My Code in Half After Adding Just One Virtual Method | NatokHD