The story of probably the most low-level bug I’ve ever had the chance to root-cause. Most of the time debugging isn’t really much to write about, especially in C# land. In a language executing on a VM, with a managed memory model, most bugs are relatively shallow and easy to fix, except for the occasional race if you’re doing multi-threading - so when suddenly...
In this video, we're going look at struct devirtualization and how this feature works in the runtime today. We're going to look at some ways we can (ab)use this feature and what are the problems with the current implementation.
Sztuka programowania 1558 dni, 6 godzin, 28 minut temu 28 źrodło rozwiń
Smart Enum Gdyby enumy miały metody Typy wyliczeniowe w C# są przydatne i przeważnie z jeden czy dwa przewijają się w każdym projekcie. Niestety prawie zawsze idą w parze z instrukcją switch, a to z kolei może wiązać się z łamaniem zasady otwarte-zamknięte z SOLID. Pomocny może być tu samoopisujący się enum, ale do tego musielibyśmy mieć możliwość definiowania w nim metod. Jest to możliwe w Javie, a w C# jeszcze nie, chyba że użyjemy biblioteki Smart Enum. Załóżmy, że istnieją u nas w k...
In this video, we're going look at how JIT folds constants and optimizes functions buy inlining and then folding them. We shall also see a couple of examples where the compiler will refuse to fold code that would seem to be easy to fold. Note: At (8:30) I've made an editing error and the music gets very loud for ~10s and then it goes back down to normal volume, sorry about that. ♦ link to shift trick video: https://youtu.be/VxiZ7tV-XkM
Sztuka programowania 1566 dni, 5 godzin, 32 minuty temu 12 źrodło rozwiń
Omówienie ogólnych zasad jak powinno używać się wyjątków w C#.
Sztuka programowania 1571 dni, 5 godzin, 50 minut temu 213 źrodło rozwiń
This video is the start of a brand-new video series about JIT compilation in C# called: "What the JIT". This time we're going to look at simple integer arithmetic like division and multiplication and how JIT is able to optimize that.
Sztuka programowania 1572 dni, 5 godzin, 54 minuty temu 27 źrodło rozwiń
LukaszPosted on This is a short interview with Vladimir Khorikov. Vlad is the Author of Unit Testing Principles, Practices, and Patterns book. He’s running https://enterprisecraftsmanship.com/ blog since 2014 The blog is focused on Domain-Driven Design, functional programming, enterprise software development patterns, and best practices. Vlad is also the author of Pluralsight courses, such as CQRS in Practice, Domain-Driven Design in Legacy Projects, Functional Programming in C#, and many more. In t...
Sztuka programowania 1573 dni, 7 godzin, 25 minut temu 30 źrodło rozwiń
This video talks about a very cool concept called "value delegates." We will learn what they are, how to apply it to LINQ to decrease allocations to zero, and inline the delegate itself.
Sztuka programowania 1579 dni, 5 godzin, 41 minut temu 34 źrodło rozwiń
This video talks about the "Skip" method, and differences in implementation between dotnet frameworks. Also, we will try to implement a less flexible but faster version of the "Skip" method. Enjoy. 🙂
Sztuka programowania 1580 dni, 6 godzin, 1 minutę temu 33 źrodło rozwiń
Sztuka programowania 1584 dni, 5 godzin, 49 minut temu 54 źrodło rozwiń
We are already in the second half of 2020 and a lot of books related to .NET technology have been published. I decided to collect these positions in one place for you. I will mention here some of them that get the best reviews and seem worth reading in my opinion.
This video corrects a couple of mistakes that were made in my previous video called "C# LINQ Performance Tips #1". We're talking about structs vs classes in LINQ and why losing concrete type information is bad, there's also a bit of VSD but it's very vague and generic so the more specific video is needed, I just wanted to tell you that it exists :) and it's important. Enjoy.
Sztuka programowania 1587 dni, 3 godziny, 56 minut temu 37 źrodło rozwiń
This video will show you some of the performance and allocation problems that you might encounter when writing LINQ expressions and offer a couple of solutions on how to solve them. LINQ Links: ♦ https://github.com/NetFabric/LinqBenchmarks ♦ https://github.com/NetFabric/NetFabric.Hyperlinq
Sztuka programowania 1594 dni, 5 godzin, 31 minut temu 57 źrodło rozwiń
[EN] This video will show you some of the hidden keywords and undocumented features in dotnet C#, like the mysterious "__makeref" keyword as well as other features that are less known like array initializers, etc. [PL] Film pokazujący ukryte słowa kluczowe, które znajdują się z języku C# oraz kilka innych mało znanych funkcjonalności takich jak inicjalizatory kolekcji etc.
Sztuka programowania 1594 dni, 18 minut temu 87 źrodło rozwiń
Asynchroniczny C# : ThreadPool, IAsyncResult, Task API i Async
Sztuka programowania 1606 dni, 5 godzin, 48 minut temu 193 źrodło rozwiń
Creating music app using azure functions
This video is an introduction to bit hacks; we're going to visualize bit hack expressions and learn how to construct and apply them. This video is a direct response to a previous video about bit hacks (https://youtu.be/OPFJUpdCq0I) that was too complicated to an introduction, so this video is here to fill this need. I also have an article about the same topic that goes into more detail about the examples presented here, plus it contains a more bit hacks. https://leveluppp.ghost.io/bit-hacks-in-c/ Enj...
Sztuka programowania 1636 dni, 6 godzin, 2 minuty temu 24 źrodło rozwiń
Bit hacks are an incredibly powerful tool in every developer's toolbox. When used correctly, they can bring simplicity, performance, scalability, and even be used for compact data representation in probabilistic Data Structures. The downside is that they are hard to understand, need a lot of testing, and in a lot of cases, they aren't portable since these operations will have different outcomes on different hardware architectures. Don't worry. I'm here to help. In this article, we will be discussing t...
Sztuka programowania 1641 dni, 5 godzin, 43 minuty temu 131 źrodło rozwiń
This is a lecture about data and instruction level dependencies in high level languages like C#, Java etc. There's a lot of knowledge on the internet about this very topic but this is mostly reserved for ASM, C/C++ and hidden in CPU manuals.This is my attempt to introduce this subject to a broader audience. Sources: https://github.com/badamczewski/DataOrientedDesign/blob/master/DoDSamples/Samples/InstructionLevelDependency.cs Link to Branch Prediction lecture that's mentioned in the video: https://www....
Sztuka programowania 1642 dni, 5 godzin, 31 minut temu 22 źrodło rozwiń
How to keep two different types in synchronization using roslyn analyzers.