For inquiries on bringing one of these (or another) workshop to your company or event, please contact workshops@jeremybytes.com.
Awesome C#: Asynchronous Programming
Asynchronous programming is a critical skill to take full advantage of today's multi-core systems. 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 consuming 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 "asyc void".
Throughout the day, we'll go hands-on with lab exercises to put these skills into practice.
Objectives
- Consume asynchronous methods with Task and await
- Create asynchronous methods and libraries
- Handle exceptions and cancellation
- Prepare code for asynchronous operations
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.
Public Workshops
None at this time
Awesome C#: Interfaces & Dependency Injection
Loosely coupled code is easier to maintain, extend, and test. Interfaces and Dependency Injection (DI) help us get there. In this workshop, we'll see what interfaces are and how they 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.
If you're a C# developer who wants to get better with higher-level concepts like abstraction, loose coupling, and extensibility, then this is the workshop for you. We'll start by laying a good foundation and then ramp up throughout the day.
Objectives
- Mechanics of Interfaces
- Dependency Injection patterns, including Constructor Injection and Property Injection
- The "why" of Interfaces and DI, including extensibility, maintainability, and testability
- How to manage the pitfalls of added complexity to make sure we get maximum benefits
Basic understanding of object-oriented programming (classes, inheritance, methods, and properties). No prior experience with interfaces, DI, or unit testing is necessary.
Public Workshops
None at this time
Awesome C#: Unit Testing
Unit testing can make you a faster developer. Good tests let us move forward more confidently, give us instant feedback when checking regression, and help us pinpoint bugs when things go wrong. In this workshop, we'll look at the qualities of good tests, including isolation, repeatability, runnability, and more. And we'll look at specific techniques that make our tests easy to ready, easy to write, and easy to run.
We'll go hands-on with TDD (Test-Driven Development) to see the red-green-refactor cycle in action. Some code is tricky to test: we'll look at how to test for exceptions and error states, and we'll use a mocking framework to create mocks and stubs. Tools include MSTest and NUnit (for testing) and Moq (for mocking), but the skills easily translate to other frameworks.
Objectives
- Why Unit Test? Getting the actual benefits
- Characteristics of a good unit test and how to implement them (including isolation, repeatability, runnability, and more)
- Basics of TDD
- Parameterizing tests
- Techniques for testing exceptions
- Using a mocking framework to isolate dependencies
Basic understanding of C# and object-oriented programming (classes, inheritance, methods, and properties). In addition, experience with interfaces and other forms of abstraction is very helpful. No prior experience with unit testing is necessary; we'll take care of that as we go.
Public Workshops
None at this time
More Information
For inquiries on bringing one of these (or another) workshop to your company or event, please contact workshops@jeremybytes.com.