Easy way to understand Big O notation

Many beginners struggle with understanding the Big O notation. I’ll show you a simple way to understand it with examples. It’s not mathematical, professional or academic, but hopefully it will help you understand it. What is Big O You’re writing your code and suddenly you come up with a problem which you can solve using several different algorithms. You have to pick one and you’re interested in the fastest one. How would you determine which one is the best in this case? Technically you could just run your app and track execution time, but that would be dependand on hardware or compiler version (etc), so performance can differ on different computers. You need a way to describe algorithm performance in relative units, that’s why we have Big O. ...

February 23, 2018 · 5 min · Zbigniew

ASP.NET Core: Global exception handler middleware

Middleware is a piece of software that handles requests and responses in the middle of application pipeline. An example of built-in ASP.NET Core middleware is authentication component and response caching component. In this article I’ll show you how to create global exception handler using custom middleware component. This article will teach you how to create global exception handler which will save each uncaught exception into file. Later on, you can also use it to send exceptions to 3-rd party service like Raygun (but it is not included in this how-to) or to do anything else you want with that exception. ...

February 16, 2018 · 3 min · Zbigniew

ASP.NET Core: extending built-in tag helpers

In this post I’ll show you how you can extend built-in tag helpers. What are tag helpers? Basically tag helpers are classes which take part in processing (or creating) HTML elements inside Razor views. You can create C# code which will target desired HTML and produce desired output. For more throughtout explanation see Introduction to Tag Helpers in ASP.NET Core Setup Before we begin, make sure that your setup is correct. If your custom tag helpers are in Solution assembly then you need to add this line to your View/_ViewImports.cshtml file: ...

February 9, 2018 · 3 min · Zbigniew

Feynman, programming, blogging

You’ve probably heard about Richard Feynman physicst and a Nobel price winner. Are you wondering what does he have to do with programming or blogging? I’ll explain it in a moment, but let’s start with one of the more interesting skills he had. He was nicknamed “The Great Explainer” because he could explain complex and difficult subjects to almost anyone. Feynman developed this skill in order to identify his own gaps in knowledge and understanding. He believed that you only truly know something only when you can lay it out in simple terms. ...

February 2, 2018 · 3 min · Zbigniew