C# Developers: Learn the Art of Writing Clean Code

A Hands-on Guide on Common Code Smells in C# and How to Refactor Them using ReSharper
4.6 (244 ratings) Instead of using a simple lifetime average, Udemy calculates a
course's star rating by considering a number of different factors
such as the number of ratings, the age of ratings, and the
likelihood of fraudulent ratings.
2,408 students enrolled
$50
Take This Course
  • Lectures 21
  • Contents Video: 3.5 hours
    Other: 2 mins
  • Skill Level All Levels
  • Languages English
  • Includes Lifetime access
    30 day money back guarantee!
    Available on iOS and Android
    Certificate of Completion
Wishlisted Wishlist

How taking a course works

Discover

Find online courses made by experts from around the world.

Learn

Take your courses with you and learn anywhere, anytime.

Master

Learn and practice real-world skills and achieve your goals.

About This Course

Published 4/2015 English

Course Description

"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." - Martin Fowler

Poorly written code is hard to understand, maintain and test. But what separates poorly written code (aka code that smells) from beautiful code that talks? In this course, Mosh walks you through common code smells found in C# programs and how to refactor them using ReSharper. Refactoring is changing the design of the existing code without changing its external behaviour.


In every lecture, you'll see an example of a popular code smell with Mosh's explanations about what is wrong about that code and why. You'll then learn how to change the code in a safe and step-by-step fashion while minimising breaking changes. All the source codes presented in the lectures are available for download so you can practice these techniques on your own.


This course is packed with techniques and is a must for any C# developer who wants to improve the quality of their code.


By the end of this course, you'll be able to

  • Spot the smells in your code
  • Refactor your code using safe and fast refactoring techniques with ReSharper
  • Write clean code that is more readable and maintainable



In particular, you'll learn how to

  • Break long methods into smaller, more maintainable ones
  • Simplify nested / complex conditional blocks
  • Design the proper signature for your methods
  • Remove duplicated code
  • Refactor switch statements into an object-oriented design using polymorphism
  • Write C# code using the standard naming convention
  • And more...



What are the requirements?

  • C# (at any level)

What am I going to get from this course?

  • Tell the difference between good and bad good
  • Identify the smells in your code
  • Refactor your code in a safe and fast way using ReSharper
  • Write clean code that reveals the intent
  • Decompose long methods into smaller, more maintainable ones
  • Refactor lengthy switch statements into an object-oriented design
  • Simplify nested / complex conditional blocks
  • Remove duplicated code
  • Design the proper signature for your methods

What is the target audience?

  • Any C# developer who has an interest in improving the quality of their code

What you get with this course?

Not for you? No problem.
30 day money back guarantee.

Forever yours.
Lifetime access.

Learn on the go.
Desktop, iOS and Android.

Get rewarded.
Certificate of completion.

Curriculum

Section 1: Introduction
About the Course
Preview
02:20
About Your Instructor
Preview
01:27
Source Codes
1 page
Asking Questions
02:58
Section 2: Common Code Smells
Poor Names
Preview
08:08
Poor Naming Conventions
02:08
Poor Method Signatures
12:26
Long Parameter List
11:33
Output Parameters
Preview
10:14
Variable Declarations on the Top
05:14
Magic Numbers
08:38
Nested Conditionals
23:49
Switch Statements
23:04
Duplicated Code
14:28
Comments
09:43
Long Methods
30:32
Section 3: Complete Refactoring Examples
WebForms Example - Part 1
17:10
WebForms Example - Part 2
17:20
Section 4: Additional Resources
Final Words
01:01
Get My Other Courses with a Discount
Article
Stay in Touch
1 page

Students Who Viewed This Course Also Viewed

  • Loading
  • Loading
  • Loading

Instructor Biography

Mosh Hamedani, Passionate Software Engineer and Best-selling Author

Moshfegh Hamedani is a passionate and creative software engineer with a strong focus on pragmatism and simplicity. He started programming at the age of seven on a Commodore 64. Later, during his high school years, he started learning C and C++ . In 2002, along with the first release of .NET, he shifted his focus to C#. Since then he has been involved in the design and implementation of numerous software projects, including modern web applications, mobile apps, desktop applications and frameworks.

Aside from his career as a software engineer, he truly enjoys sharing his knowledge with others. Since his early twenties, he has been teaching courses and running workshops on C#, ASP. NET, object-oriented programming and clean coding. He is author of 6 best-selling courses on Udemy and more will be coming soon.

Mosh has a Master of Science in Network Systems and a Bachelor of Science in Software Engineering. He is also a Microsoft Certified Application Developer, Technology Specialist (Web Applications) and Professional.

Outside the software world, Mosh is a photographer, a pianist and a passionate Latin dancer.

Ready to start learning?
Take This Course