Jeremy Bytes

byte-sized chunks of .NET

Skip Navigation Links
 

Full-day workshops give a fast-moving start into various topics. The workshops start out with the basics and then quickly move into intermediate and advanced topics. Hands-on labs throughout the day let you put these skills into practice.

For inquiries on bringing one of these (or another) workshop to your company or event, please contact workshops@jeremybytes.com.



Take Your C# Skills to the Next Level

Full-Day Workshop
Level: Intermediate

Public Workshops

Software Design & Development
May 13-17, 2024
London, England
Registration: https://sddconf.com/register

Description

Are you a C# developer eager to create software that is easy to maintain, has minimal bugs, and makes your users happy? This workshop is for you.

Through lectures, code samples, and hands-on labs, you will learn how interfaces, delegates, dependency injection, and unit testing can help you write applications that are easy to extend, change, and debug. Along the way you will also encounter modern C# topics such as nullability, switch expressions, and asynchronous code. In the end, you will take away practical experience that you can immediately apply to your own projects.

Workshop Topics

  • Interfaces: Explore the art of writing clean, modular code through interfaces. Learn how interfaces facilitate code extension, make your applications more testable, and lead to fewer bugs.
  • Delegates: Gain a deep understanding of delegates and learn how to use them to build flexible and extensible code.
  • Dependency Injection: Discover the magic of dependency injection and how it promotes loose coupling, making your codebase more flexible, testable, and maintainable.
  • Unit Testing: Write tests that ensure your code functions as expected, enabling you to catch bugs early in the development process.

Key Benefits

  • Easier Maintenance: Explore practices for writing clean, maintainable code that's a breeze to work with, whether you're collaborating with a team or revisiting your own projects down the road.
  • Fewer Bugs: Learn the art of writing robust code that is easy to test. Find bugs before your users do, and be confident that code changes do not break existing functionality.
  • Happier Users: The point of writing software is to meet your user's needs. With these tools in hand, you can create applications that not only meet but exceed user expectations.

Pre-Requisites

Basic understanding of C# and object-oriented programming (classes, inheritance, methods, and properties). No prior experience with the primary topics is necessary; we'll take care of that as we go.

Take your C# development skills to the next level and build software that not only satisfies your users, but also simplifies your life as a developer. Say goodbye to frustrating bugs, hello to happier users, and welcome to the world of painless maintenance.

Attendee Requirements

  • You must provide your own laptop computer (Windows or Mac) for this hands-on lab.
  • You need to have the .NET 6 SDK or .NET 8 SDK installed as well as the code editor of your choice (Visual Studio 2022 Community Edition or Visual Studio Code are both good (free) choices).
  • Interactive labs, web application samples, and console samples will work with Windows, macOS, and Linux (anywhere .NET 6/8 will run).
  • WPF desktop samples will only work on Windows machines. There are equivalent web and console examples for these projects.

Links



Asynchronous and Parallel Programming in C#

Full-Day Workshop
Level: Intermediate

Public Workshops

Visual Studio LIVE! Microsoft HQ
Aug 5-9, 2024
Redmond, WA
Workshop Information: VM02 Hands-on Lab: Asynchronous and Parallel Programming in C#
Event Information: Visual Studio LIVE! Microsoft HQ

Description

Asynchronous programming is a critical skill in C#, especially since so many of the built-in libraries are asynchronous. But async programming brings its own set of issues. In this workshop, we'll work through some of those issues and get comfortable using parts of the .NET Task Parallel Library (TPL).

We'll start by calling asynchronous methods using the Task Asynchronous Pattern (TAP), including how to handle exceptions and cancellation. With this in hand, we'll look at creating our own asynchronous methods and methods that use asynchronous libraries. Along the way, we'll see how to avoid deadlocks, how to isolate our code for easier async, and why it's important to stay away from "async void".

In addition, we'll look at some patterns for running code in parallel, including using Parallel.ForEachAsync, channels, and other techniques. We'll see pros and cons so that we can use the right pattern for a particular problem.

Throughout the day, we'll go hands-on with lab exercises to put these skills into practice.

Objectives

  • Use asynchronous methods with Task and await
  • Create asynchronous methods and libraries
  • Avoid deadlocks and other pitfalls
  • Understand different parallel programming techniques

Pre-Requisites

Basic understanding of C# and object-oriented programming (classes, inheritance, methods, and properties). No prior experience with asynchronous programming is necessary; we'll take care of that as we go.

Attendee Requirements

  • You must provide your own laptop computer (Windows or Mac) for this hands-on lab.
  • You need to have the .NET 6 SDK or .NET 8 SDK installed as well as the code editor of your choice (Visual Studio 2022 Community Edition or Visual Studio Code are both good (free) choices).
  • Interactive labs, web application samples, and console samples will work with Windows, macOS, and Linux (anywhere .NET 6/8 will run).
  • WPF desktop samples will only work on Windows machines. There are equivalent web and console examples for these projects.

Links



Understading Asynchronous Programming in C#

Half-Day Workshop
Level: Intermediate

Public Workshops

None scheduled at this time

Description

Asynchronous code is everywhere. In our C# code, we "await" method calls to services and databases; and more and more packages that we use every day have asynchronous methods. But do you really understand what this does?

Understanding is critical. When done correctly, we can make our applications more responsive, faster, and reliable. When done incorrectly, we can block threads or even hang the application entirely.

In this 4-hour workshop, we'll start at the beginning to see how "await" relates to "Task". We'll do this by calling an asynchronous method, getting a result, and handling errors that come up. We will create our own "awaitable" methods to see how Task and return types work together. With our own methods, we'll also better understand why we may (or may not) care about getting back to the original calling thread. We'll also cover some dangers, such as using "async void" or misusing ".Result". Finally, we'll use Task to run multiple operations in parallel to make things faster. With all of these skills, we can write more effective asynchronous code.

Note: Lab time is not included in this half-day workshop; however, lab exercises are available upon request.

Pre-Requisites

For this workshop, it is assumed that you have experience with C#, but no specific asynchronous programming experience is needed. To run the samples code, you will need .NET 8.0 installed. Jeremy will be using Visual Studio 2022, but the code samples will run using Visual Studio Code or the editor of your choice.



Dependency Injection in C#

Full-Day Workshop
Level: Intermediate

Public Workshops

None scheduled at this time

Description

Loosely coupled code is easier to maintain, extend, and test. Dependency Injection (DI) help us get there. In this workshop, we'll see how interfaces can add "seams" to our code that makes it more flexible and maintainable. From there, we'll dig into loose coupling with Dependency Injection. DI doesn't have to be complicated. With just a few simple changes to our constructors or properties, we can have code that is easy to extend and test.

After laying a good foundation, we'll take a closer look by diving into various DI patterns (such as constructor injection and property injection) as well as other patterns that help us handle interception and optional dependencies. Along the way, we'll see how DI helps us adhere to the SOLID principles in our code. We'll also we'll look at common stumbling blocks like dealing with constructor over-injection, managing static dependencies, and handling disposable dependencies.

Throughout the day, we'll go hands-on with labs to give you a chance to put the concepts into action.

If you're a C# developer who wants to get better with concepts like abstraction, loose coupling, extensibility, and unit testing, then this is the workshop for you.

Attendee Requirements

  • You must provide your own laptop computer (Windows or Mac) for this hands-on lab.
  • You need to have the .NET 6 SDK or .NET 8 SDK installed as well as the code editor of your choice (Visual Studio 2022 Community Edition or Visual Studio Code are both good (free) choices).
  • Interactive labs, web application samples, and console samples will work with Windows, macOS, and Linux (anywhere .NET 6/8 will run).
  • WPF desktop samples will only work on Windows machines. There are equivalent web and console examples for these projects.

Links