Sign in

Sergiy Teplyakov

@steplyakov.bsky.social
318 followers 49 following 92 posts

Software Engineer at MSFT. Opinions are my own.

PostsRepliesMedia
Sergiy Teplyakov @steplyakov.bsky.social · 03/07/2026
Here is the link to the course with a 30% discount automatically applied: dometrain.com/course/maste... And happy learning to you all!
dometrain.com
Mastering: C# - Dometrain
Learn how C# features work under the hood, from the memory layout of types to the performance of lambdas, pattern matching, and LINQ.
020
Sergiy Teplyakov @steplyakov.bsky.social · 03/07/2026
I'm super happy to announce that, after 4 months working on it, my course Mastering C# is now live on Dometrain! The internals of records, structs, classes, union types, pattern matching, LINQ and much more: all covered in 3+ hours of advanced content. #dotnet #csharp
172
Sergiy Teplyakov @steplyakov.bsky.social · 02/04/2026
New video on Dissecting the Code YouTube Channel: "How LINQ works?" - youtu.be/hFKCOeUfZaA?... To understand LINQ we should understand iterator blocks. And this is what I'm covering for almost 20 minutes! :)
youtu.be
How LINQ works
YouTube video by Dissecting The Code
031
Reposted by Sergiy Teplyakov
Kirill Osenkov @kirillosenkov.com · 21/02/2026
PerfView can record all managed exceptions in all processes system-wide thanks to the .NET ETW provider, with callstacks. I built a viewer for these .etl files:
Tree view with the processes on the left, timeline of exceptions in processes up top, data grid with the exception details in the center and current exception call stack at the bottom
3398
Sergiy Teplyakov @steplyakov.bsky.social · 20/02/2026
And I would appreciate spreading the word and sharing the video. And if you have recommendations on what I can cover next, I'll be happy to hear that!
000
Sergiy Teplyakov @steplyakov.bsky.social · 20/02/2026
Next video on Dissecting the Code channel. This time I cover .NET 10 performance improvements around de-abstracting the delegates. In .NET 10, the LINQ Any method can easily outperform a manual loop over a list! Awesome job, .NET team! youtu.be/-h5251IWv-Y?... And, as always, thanks for watching!
youtu.be
NET 10 Delegate De Abstraction
YouTube video by Dissecting The Code
110
Sergiy Teplyakov @steplyakov.bsky.social · 04/02/2026
And, as always, thanks for sharing. /cc: @davidfowl.com, @scott.hanselman.com, @migueldeicaza.bsky.social
000
Sergiy Teplyakov @steplyakov.bsky.social · 04/02/2026
I've seen cases when the application code was filled with it "to improve performance" or "to avoid deadlocks". And it was very hard to convince that this is not how ConfigureAwait should be used. In this video I'm covering why we have ConfigureAwait in the first place and how to use it correctly.
100
Sergiy Teplyakov @steplyakov.bsky.social · 04/02/2026
Another video on Dissecting the Code YouTube channel: "ConfigureAwait best practices". I feel we have a cargo cult on using ConfigureAwait without thinking too much. youtu.be/bUHQeY-DlBc?...
youtu.be
Stop using ConfigureAwait(false) incorrectly!
YouTube video by Dissecting The Code
122
Sergiy Teplyakov @steplyakov.bsky.social · 02/02/2026
Do you know that just changing the C# langversion might affect performance? The code generation for method group conversion has changed in C# 11 to avoid allocations in certain cases.
020
Sergiy Teplyakov @steplyakov.bsky.social · 20/01/2026
And, as always, I would really appreciate the repost! /cc: @kirillosenkov.com, @davidfowl.com, @jaredpar.bsky.social, @migueldeicaza.bsky.social, @scott.hanselman.com, @damianedwards.com
000
Sergiy Teplyakov @steplyakov.bsky.social · 20/01/2026
Link to the video: youtu.be/Ysg85IR6rMc?...
youtu.be
.NET 10 De-Abstraction in Action
YouTube video by Dissecting The Code
120
Sergiy Teplyakov @steplyakov.bsky.social · 20/01/2026
New video on Dissecting the Code YouTube channel: ".NET 10 De-Abstraction in Action", that covers how .NET 10 almost completely eliminates the abstraction penalty when iterating over interfaces. #dotnet10, #performance
173
Sergiy Teplyakov @steplyakov.bsky.social · 08/01/2026
And big thanks to Egor from the JIT team for showing his awesome bot!
010
Sergiy Teplyakov @steplyakov.bsky.social · 08/01/2026
Here is a link to my PR: github.com/dotnet/runti... And once this is merged we should have way fewer allocations when using LazyInitializer.EnusreInitialized by stack-allocating a delegate passed as Func<T>
github.com
Add AggressiveInlining to EnsureInitializedCore method to allow delegates stack alloc by SergeyTeplyakov · Pull Request #122983 · dotnet/runtime
Currently stack allocation (and overall de-abstraction) works only when JIT can has a full understanding of the code. And due to lack of cross-prodcedural analysis it means that for the optimizatio...
130
Sergiy Teplyakov @steplyakov.bsky.social · 08/01/2026
TIL that dotnet/runtime github repo has an awesome bot for running the benchmarks to compare the before and after! Here is an example:
140
Sergiy Teplyakov @steplyakov.bsky.social · 08/01/2026
Ah! I get the issue. The clients won’t be able to use the lib if it has extension members! Sigh!
000
Sergiy Teplyakov @steplyakov.bsky.social · 08/01/2026
I’m curious what’s the issue with manually specifying lang version as 14 when targeting older frameworks? I constantly relying on this even using latest C# when targeting Full Framework (yes some features won’t work, but the vast majority will work).
100
Sergiy Teplyakov @steplyakov.bsky.social · 05/01/2026
Do you know that .NET 10 massively reduces the overhead of using any built-in collections via interfaces (yes, not only for arrays)? Iterating a list via IList<T>, or dictionary via 'IDictionary<K,V>', etc., now has almost zero abstraction penalty!
081
Reposted by Sergiy Teplyakov
Eric Lippert @ericlippert.com · 30/10/2025
I'm writing another book, and the first few chapters are available through Manning Early Access now! For 50% off! hubs.la/Q03Q9PGP0 More details, and the story of how I came to write it, are on my blog at ericlippert.com/2025/10/30/i... It feels great to be writing again after a long break. :)
hubs.la
Fabulous Adventures in Data Structures and Algorithms - Eric Lippert
Author Eric Lippert introduces fabulous solutions using uncommon algorithms and data structures. There’s a lot more to algorithms than the useful-but-boring recipes you recite for every interview. Th...
54817
Sergiy Teplyakov @steplyakov.bsky.social · 23/10/2025
Yep. But this is something that I've figured out just earlier today. Was hoping for something in .editorconfig: `dotnet_diagnostics.category-Compiler.severity = error'. But I don't think that's available. The point is that its a roundabout way to achieving this. And not easy to find.
110
Sergiy Teplyakov @steplyakov.bsky.social · 23/10/2025
its a bit too much :). I would definitely prefer one liner. My option is two liners which is ok, but requires directory.build.props. I'm surprised that it's seems impossible to do that in one line in .editorconfig.
100
Sergiy Teplyakov @steplyakov.bsky.social · 23/10/2025
Correction: I want to keep static analysis warnings as warnings.
100
Sergiy Teplyakov @steplyakov.bsky.social · 23/10/2025
I want to fail the build on compiler warnings, but keep the diagnostics warnings as warnings. One option that I've found is to set 'TreatWarningsAsErrors' to true, and set 'CodeAnalysisTreatWarningsAsErrors' to false. Is there a better way? /cc: @jaredpar.bsky.social, @terrajobst.net
130
Reposted by Sergiy Teplyakov
Bruce "86 47" Dawson @randomascii.bsky.social · 09/10/2025
New blog post: In 2021 I found an invisible memory leak in a tool (VS Code) that I have never used. Impossible? Easy: randomascii.wordpress.com/2025/10/09/f...
randomascii.wordpress.com
Finding a VS Code Memory Leak
In 2021 I found a huge memory leak in VS code, totalling around 64 GB when I first saw it, but with no actual limit on how high it could go. I found this leak despite two obstacles that should have…
15315
Sergiy Teplyakov @steplyakov.bsky.social · 08/10/2025
As always, I'll appreciate the feedback and I would love if you share the video with your network! It means a lot to me! /cc: @visualstudio.com, @migueldeicaza.bsky.social, @rephuffman.bsky.social, @scott.hanselman.com, @davidfowl.com
000
Sergiy Teplyakov @steplyakov.bsky.social · 08/10/2025
New video on Dissecting the Code YouTube Channel. This time, it's about Parallel Stacks - my very favorite @visualstudio.com feature that you probably are not using enough! I can't even count how many times it helped me production incidents investigations! youtu.be/Z5mN0VCB-KA?...
youtu.be
Parallel Stacks: The best Visual Studio feature for asynchronous and parallel code
YouTube video by Dissecting The Code
122
Sergiy Teplyakov @steplyakov.bsky.social · 06/10/2025
And if by any chance you haven't subscribed yet, here is the link to the channel ;) www.youtube.com/@DissectingT...
youtube.com
Dissecting The Code
Dissecting the Code is a channel for developers who want to master .NET from the inside out. If you're tired of surface-level tutorials and want to truly understand what’s happening under the hood, y...
020
Sergiy Teplyakov @steplyakov.bsky.social · 06/10/2025
Hey #dotnet people. First milestone for Dissecting the Code YouTube channel - 1k subscribers! Thanks a lot everyone for your support and warm feedback that I'm getting!
130
Sergiy Teplyakov @steplyakov.bsky.social · 02/10/2025
Oh! They use a custom taskscheduler for that. Interesting!
110
Sergiy Teplyakov @steplyakov.bsky.social · 02/10/2025
/cc: @migueldeicaza.bsky.social, @terrajobst.net, @scott.hanselman.com, @visualstudio.com, @damianedwards.com and other. I would really appreciate if you'll share the link!
000
Sergiy Teplyakov @steplyakov.bsky.social · 02/10/2025
After a short break I'm back with the new video on Dissecting the Code YouTube channel. This time its all about ConfigureAwait, why we ended up having it and how it works under the hood! #dotnet folks, please share! I'll really appreciate it! youtu.be/RZsLA_R8i9s?...
youtu.be
Dissecting ConfigureAwait in C#
YouTube video by Dissecting The Code
2115
Reposted by Sergiy Teplyakov
Alexandre Mutel @xoofx.mastodon.social.ap.brid.gy · 19/09/2025
Egor landed yesterday a great document about C# "Unsafe code best practices" github.com/dotnet/docs/blob/main/do… 📜 Even if you think you know them, it is a good read as a reminder! 😎 #dotnet #csharp
github.com
docs/docs/standard/unsafe-code/best-practices.md at main · dotnet/docs
This repository contains .NET Documentation. Contribute to dotnet/docs development by creating an account on GitHub.
086
Sergiy Teplyakov @steplyakov.bsky.social · 23/07/2025
Hey #dotnet folks! Please share latest deep-dive video to spread the knowledge about async internals and tips&tricks on debugging .NET code! Your support means the world! /cc: @scott.hanselman.com, @ardalis.com, @terrajobst.net, @migueldeicaza.bsky.social and every other member of .net community!
010
Sergiy Teplyakov @steplyakov.bsky.social · 23/07/2025
Hey guys. Async methods might be scary for some, but they're not that complicated if you can debug the async machinery to understand how they work! This is exactly what I did in the last video - "Let's debug async/await in C#". youtu.be/oHKyzgGjKHQ?...
youtu.be
Let's debug async/await in C#!
YouTube video by Dissecting The Code
0123
Sergiy Teplyakov @steplyakov.bsky.social · 11/07/2025
Hey #dotnet community! Please share and let's simplify the way we deal with resources in .NET! /cc: @migueldeicaza.bsky.social, @scott.hanselman.com and other folks, I love to discuss this topic! You might disagree with my take! But its time to reconsider some old patterns.
030
Sergiy Teplyakov @steplyakov.bsky.social · 11/07/2025
Posted another episode on YouTube: "The way Dispose Pattern Should Be Implemented". It’s time to reconsider the Dispose Pattern and abandon Dispose(bool disposing) nonsense. Let’s move to a simpler approach and never mix managed and native resources. youtu.be/E6tQDczhrUM?...
youtu.be
The way Dispose Pattern should be implemented
YouTube video by Dissecting The Code
051
Sergiy Teplyakov @steplyakov.bsky.social · 03/07/2025
Hey @davidfowl.com, @scott.hanselman.com, @jaredpar.bsky.social, @terrajobst.net and other #dotnet community members! Could you please share this tweet about how to unlock most of the C# productivity features even targeting .NET Framework or .netstandard2.0. Appreciate your support!
072
Sergiy Teplyakov @steplyakov.bsky.social · 03/07/2025
Posted another episode on YouTube: "Unlocking Modern C# Features Targeting .NET Framework". Quite a few devs limit themselves with C# 7.3 when they target full framework or .netstandard2.0. You still can leverage most of the latest C# features in this case. youtu.be/5eNtdj68qW4?...
youtu.be
Unlocking Modern C# Features Targeting .NET Framework
YouTube video by Dissecting The Code
195
Reposted by Sergiy Teplyakov
Gérald Barré @meziantou.net · 01/07/2025
How to Find Public Symbols That Can Be Internal Using Roslyn #dotnet #roslyn www.meziantou.net/how-to-find-publi…
meziantou.net
How to Find Public Symbols That Can Be Internal Using Roslyn - Gérald Barré
Learn how to use Roslyn to analyze your .NET solution and identify public symbols that are only used internally and can be safely changed to internal.
142
Sergiy Teplyakov @steplyakov.bsky.social · 26/06/2025
The link to the video: youtu.be/mAPKDtnpRBU?... It was fun and easy using .NET Aspire for orchestration and visualization! /cc: @migueldeicaza.bsky.social, @davidfowl.com, @scott.hanselman.com
youtu.be
How Google Broke The Internet and Why It took 3 hours to recover? (feat. .NET Aspire)
YouTube video by Dissecting The Code
020
Sergiy Teplyakov @steplyakov.bsky.social · 26/06/2025
Hey #dotnet people! Just published another episode on Dissecting the Code channel: How Google Broken the Internet and Why It Took 3 Hours to Recover? It's about null pointer bugs, retry logic and a bit of .NET Aspire used for visualizing the metrics. Please share and sub!
131
Reposted by Sergiy Teplyakov
Kirill Osenkov @kirillosenkov.com · 21/06/2025
New in MSBuild Structured Log Viewer: Project Reference Graph New tab that shows the project graph layered by project "height". Each project only references projects above it. Clicking a project highlights all directly referenced projects above, and all projects below it that reference this one.
many rows of multiple rectangles per row, each rectangle is the project name, some rectangles are bigger and bluer (they are referenced more). One rectangle is selected and green, it has outgoing arrows above it that point to other rectangles, with purple border. Those are the referenced projects. Arrows also go down, to rectangles with green borders. Those are projects that reference the selected one.
1338
Reposted by Sergiy Teplyakov
Kirill Osenkov @kirillosenkov.com · 21/06/2025
try ref12.io/net472
172
Sergiy Teplyakov @steplyakov.bsky.social · 21/06/2025
True
000
Reposted by Sergiy Teplyakov
Immo Landwerth @terrajobst.net · 20/06/2025
Name all the ways this line can cause a NullReferenceException: if (x == null) { ... }
883
Sergiy Teplyakov @steplyakov.bsky.social · 21/06/2025
X is a field and ‘this’ pointer is null. Operator == is overloaded and throws.
100
Reposted by Sergiy Teplyakov
Scott Hanselman 🌮 @scott.hanselman.com · 20/06/2025
Hey friends, my YouTube channel is 18 YEARS OLD today! Please like and subscribe ;) youtube.com/shanselman
youtube.com
Scott Hanselman
I'm a teacher. I speak all over to whomever will listen. I have written code that you've likely used. I've been blogging for over a decade and podcasting for about half that. I speak, code, write, emp...
816811
Sergiy Teplyakov @steplyakov.bsky.social · 20/06/2025
Thanks a lot, Tomasz!
000
Sergiy Teplyakov @steplyakov.bsky.social · 20/06/2025
True:). But this is a “beauty” of backward compatibility and existing constraints.
010