The first 200 students can use code LAUNCH20 to get 20% off our new 4 courses Deep Dive: Blazor, From Zero to Hero: Event-Driven Architecture, Getting Started: ASP.NET Core and Getting Started: Event Sourcing

From Zero to Hero: Refactoring for C# Developers

Learn how to refactor C# code using the best refactoring techniques

Are you a C# developer keen on enhancing code quality and maintainability? If yes, this "From Zero to Hero" course called "Refactoring for C# Developers" is tailor-made for you! This course will equip you with practical skills and the latest practices to refactor any C# codebase. Starting with an overview of refactoring, its importance, and when it's needed, the course delves into various modern and clean refactoring techniques. The best part? The course uses real-world examples to demonstrate how to transform a codebase to make it more efficient, readable, and extendable. With a focus on hands-on learning, guided examples are provided to demonstrate the refactoring process. But that's not all! The course also covers the implications of refactoring on team collaboration and project scalability. By the end of this course, you'll have a solid grasp of refactoring practices, which you can apply directly to your C# development projects. This course is delivered by Nick Cosentino, a Principal Software Engineering Manager at Microsoft, and is based on years of hands-on experience in the field.

Curriculum

Welcome (4:42)

What will you learn in this course? (4:34)

Who is the course for and prerequisites (4:14)

Teaching style (3:29)

What is refactoring? (8:30)

What are the general goals of refactoring? (13:00)

Introduction (2:34)

Renaming private members (7:05)

Renaming public members (7:25)

Extract method (6:14)

Inline method (6:57)

Section recap (1:59)

Introduction (2:05)

Decompose conditional (18:31)

Replace with temp query (9:11)

Return early / reduce nesting (10:52)

Section recap (1:03)

Introduction (1:28)

Wrap/isolate dependencies (23:51)

Extract and inject (19:39)

Section recap (2:12)

Introduction (1:43)

Parameters to parameter object (9:19)

Replace conditional with polymorphism and composition (17:52)

Introduction (1:26)

Rule of 3 and DRY (11:36)

Pull up method (10:54)

Form template method (7:26)

What is a rewrite vs refactor? (19:41)

What are the pros of rewriting? (12:09)

What are the cons of rewriting? (16:48)

Mitigating risks in large refactors (11:16)

Introducing the example (2:03)

Conversion routes (3:04)

Weather web response (2:24)

Rule of three + DRY on DTOs (3:36)

Strangler fig + repository facade (11:15)

Summary of example (1:28)

Summary & Thank You (2:28)

Course Info

Level:
From Zero to Hero
Duration:
5h 6m
Rating (2K+):
star

Lifetime access

Add to Cart
Dometrain Pro

Want access to all of our courses? Subscribe to Dometrain Pro!

Try it for free!

About the Author

author_img

Nick Cosentino

Nick Cosentino is a Principal Software Engineering Manager at Microsoft and a .NET content creator. He manages the teams responsible for deploying the hundreds of services supporting the Microsoft365 suite of products to serve users across the planet. Nick brings his unique experiences to the Big Tech world having worked at a startup that scaled from a handful of employees to hundreds before it went public.

Nick runs a software engineering and dotnet-focused blog as well as a YouTube channel called Dev Leader. While he enjoys solving complex problems with software solutions, Nick is passionate about reducing barriers for people to get started on their software engineering journey.

More courses by Nick Cosentino