5 great refactoring tips to clean up your code

5 great refactoring tips to clean up your code

HomeMilan Jovanović5 great refactoring tips to clean up your code
5 great refactoring tips to clean up your code
ChannelPublish DateThumbnail & View CountDownload Video
Channel Avatar Milan Jovanović2024-01-02 12:00:00 Thumbnail
18,248 Views
Get the source code for this video for FREE https://the-dotnet-weekly.ck.page/refactoring
️ Master the modular monolith architecture: https://bit.ly/3SXlzSt
Accelerate your Clean Architecture knowledge: https://bit.ly/3PupkOJ
Support me on Patreon to access the source code: https://www.patreon.com/milanjovanovic

Check out my courses: https://bit.ly/3PupkOJ

Refactoring is a technique for restructuring existing code without changing its behavior. You can think of refactoring as a series of small code transformations. One change (refactoring) does little. However, a series of refactorings leads to a significant transformation. There is no better way to learn refactoring than to practice. That's why I've prepared a refactoring exercise for you. Today I'm going to refactor poorly written code. And I'll show you 5 great refactoring techniques along the way:
– Extract method
– Extract interface
– Extract class
– Function code
– Push logic down

5 great C# refactoring tips
https://www.milanjovanovic.tech/blog/5-awesome-csharp-refactoring-tips

Subscribe to my weekly .NET newsletter:
https://www.milanjovanovic.tech

Read my blog here:
https://www.milanjovanovic.tech/blog

Chapter
0:00 Start point
2:52 Refactoring the validation logic
6:15 Refactoring towards dependency injection
8:01 Refactoring the calculation logic
15:57 Completion of refactoring
16:51 Running the tests after refactoring
18:07 A few more points for improvement

Please take the opportunity to connect with your friends and family and share this video with them if you find it useful.