• Classes vs. Structs. How not to teach about performance!

    It’s been a while since my last blog post, but I believe it’s better to post late than never, so here I am!

  • Dissecting Interpolated Strings Improvements in C# 10

    There are many interesting features coming into C# 10 and my favorite one is the improvements of interpolated strings. It may sound weird that the #1 feature for me is not a new one but an improvement of an existing one. That’s because I do care a lot about performance and the interpolated string improvements in C# 10 will make my code faster without any changes from my side. But that’s not it. The new design is not only allows creating strings faster, but it also allows skipping the string creation altogether!

  • Shooting Yourself in the Foot with Concurrent Use of FileStream.Position

    Let’s explore the following scenario: you have a service that copies files between machines. And to track the progress there is a special “copy watcher” thread (or task) that logs a current position of the target stream by accessing a FileStream.Position property.

  • The Dangers of Task.Factory.StartNew

    I’ve faced a very interesting problem recently with one of our production services: the service partially stopped responding to new requests even though some other parts of the service were still working.

subscribe via RSS