What Will I Learn?

✓ Design and Implement Immutable Types

✓ Implement Useful Extension Methods

✓ Write Pure Functions (avoiding side effects)

✓ Handle Errors in a Functional Style

✓ Tackle with the Problem of Null-values in a Functional Style

Available Licences

Personal: watch online on udemy.com.
Download: watch on any device.

Requirements

  • You should already be familiar with the basics of C#

Description

Learn how to write C# code in a functional style. The “Functional Programming in C#” is for you if you want to improve your code, design and architecture. It means you are going to learn how to write code of the high quality: readable, understandable and reliable.

Teaching Approach

No fluff, no ranting, no beating the air. I esteem your time. The course material is succinct, yet comprehensive. All important concepts are covered. Particularly important topics are covered in-depth. For absolute beginners I offer my help on Skype absolutely free, if requested.

Take this course and you will be satisfied.

Learn Functional Programming in the context of clean coding and building types of high quality.

  • Get Deep Understanding of what is Functional Programming
  • Learn how to design Immutable types in C#
  • Apply new C# 6 and C# 7 features to write better code in a functional style
  • Learn how to Extend and Compose any Types
  • Handle Errors and Exceptions in a functional programming style
  • Tackle the Problem of Null-Values by the means of functional programming

Foundations of Functional Programming

Despite the fact that C# is primarily an object-oriented language, it is very powerful on features which enable functional programming style. In fact, C# is one of the richest on features language among object-oriented languages in the world nowadays. But with great power comes great responsibility. It’s challenging to use all those features in a right way.

You probably have already heard the following well-known statement: most code sucks. Well, this course is all about how to produce code which doesn’t suck.

Owning skills of producing well-designed and well-implemented types with regards to functional programming principles.

Content and Overview

This course is aimed at all the C# developers, from beginners to seniors. Topics which are covered in the course are relevant for all kinds of C# developers since all developers design and implement types. The topics complexity is very different. There are plenty of very simple topics, and at the same time, there are topics which require from you a solid C# background. There are plenty of code examples throughout this course, so you will learn both theoretical and practical material.

  • We’re going to start with the theoretical foundations of the functional programming paradigm. You’ll learn what is Functional Programming and what are the benefits of applying that paradigm.
  • In the second section, we’re going to elaborate the core concepts of the functional programming. You’ll learn more about immutability, purity, side effects and expressions.
  • To write modern code in a functional style, you need to learn modern C# features appeared in C# 6 and C# 7.
  • We’re going to learn more about immutability in a separate section. This is a very important topic.
  • We’re going to learn how to extend types. You’ll see practical cases, you’ll learn about general extensions needed for functional programming.
  • After mastering the topic of types extending you will face the great problem of exceptions handling. Yep, it’s a hard nut to crack. We will start from discussing a question of why we use exceptions as a mechanism of errors handling. And why C# team didn’t invent any other mechanisms?
  • In the end, we will look at how to fight with null values. As you may know, Tony Hoar said that the invention of a null value was his billion-dollar mistake.

To sum up, the course covers the following topics:

  • Theoretical Foundations of Functional Programming
  • Core Concepts of Functional Programming
  • Functional Features in C#
  • Immutability in C#
  • Extendibility in C#
  • Dealing with Errors
  • Dealing with Nulls

————————————————————

Keywords related to the course:

  • C# Clean Code
  • C# Best Practices
  • Functional Programming in C#
  • C# Functional Programming
  • Clean Code in C# tutorial

Who is the target audience?

  • Anyone who wants to write better code
  • Anyone who’s not familiar with Functional Programming

Curriculum

  • Outline
  • Programming Paradigms
  • Defining Functional Programming
  • Functions are Everywhere
  • Why Functional Programming
  • Conclusion
  • Outline
  • Immutability
  • Temporal Coupling and Immutability
  • Purity and Side Effects
  • Side Effects and Architecture
  • CQS and Side Effects
  • Declarative Programming Style
  • Expressions with Operators
  • Conclusion
  • Outline
  • Extension Methods
  • Autoproperties and Immutability
  • Expression-Bodied Members
  • Pattern Matching
  • Tuples and Deconstruction
  • Local Functions
  • Conclusion
  • Outline
  • A Mutable Type
  • External Immutability
  • Internal Immutability
  • Shallow and Popsicle Immutability
  • Builder Design Pattern. Immutability and Testability
  • Immutability of Structures
  • Immutability and Memory Pressure
  • Conclusion
  • Outline
  • Pipelining
  • Extending IDisposable
  • Extending StringBuilder
  • General Extensions
  • Abusing Extension Methods
  • Conclusion
  • Outline
  • What does an “Error” Mean?
  • Problems with Exceptions
  • Practical Considerations Regarding Exceptions
  • Exception Handling Strategies
  • CQS Principle
  • Tester-Doer Pattern
  • Errors and Functional Programming
  • Pipelining by Method Chaining
  • Conclusion on Errors Handling
  • BCL Exception Types
  • Custom Exception Types
  • Conclusion
  • Outline
  • Problems with Nulls
  • Null Object Pattern
  • Maybe (Option)
  • Automating Null Checks
  • Static Analysis
  • Returning IEnumerables
  • Conclusion