Kategori: Performance

  • C++ Spaceship operator usage

    C++20 introduced a new three-way comparison operator, also known as the spaceship operator. Here I explain how it works and show some simple examples. First, let’s take a look at some code, which I soon will explain: This code shows a simple three-way comparison of two integers. Since comparing the integers can have three different […]

  • Introducing The WIB Limit

    If you and your development team are using a Kanban board then you are familiar with the term WIP limit. WIP is short for Work In Progress and the idea is that putting a limit on the amount of ongoing work will help the team focus on the most important work and getting more work […]

  • Is it possible to automate too much?

    One goal that seems to be common among most organizations is to automate as many repetative manual tasks as possible. Automation has many advantages, it removes the risk of human mistakes, it reduces the time it takes to get things done, it frees up human resources, and hopefully saves the business quite a lot of […]

  • Book review: Designing Data-Intensive Applications

    I just finished reading Martin Kleppmann’s book ”Designing Data-Intensive Applications”. Reading it cover to cover takes time, a lot of time, but it is definitely worth it. It is not a book for anybody, it is a book for software developers and designers who work with systems that handle a lot of data and have […]

  • When to NOT use interpolated strings

    I am currently reading the newest edition of Jon Skeet’s book ”C# in depth” (https://csharpindepth.com/) which is a quite interesting read so far. There is however one thing in the book that made me feel really bad about myself. You see, I really think interpolated strings helps improve readability quite a lot, and therefore I […]

  • C# alternatives to returning null

    What is problematic with returning null? A common pattern, both in the code I am used to work with, and in parts of the .NET Framework, is to return null in methods if for some reason a valid return value is not available. One example of this is the Find method of List<T>: So, why […]

  • Blazor – first impressions

    What is Blazor? To quote the official Blazor homepage ”Blazor is a single-page web app framework built on .NET that runs in the browser with WebAssembly.” The natural follow-up question is then ”What is WebAssembly?”. From the official WebAssembly homepage we can read that ”WebAssembly (abbreviated Wasm) is a binary instruction format for a stack-based […]

  • How to design a Priority Queue in C#

    What is a Priority Queue? To be a bit formal, a priority queue is an abstract data type (ADT), similar to a regular queue, but where each element has a priority associated to it. An element with high priority is served before an element with a low priority. Elements which have the same priority are […]

  • C# Threading Gotchas

    Introduction Threading and concurrency is a big topic and there are plenty of resources out there that covers the hows and whats related to starting new threads and avoiding locking up your UI and so on. I will not go into those details but rather try to focus on things that are good to know, […]

  • C# Pitfalls of returning IEnumerable

    Generic and specific return types It is often preferred to work with as generic types as possible. Doing that opens up for more flexibility and being able to modify parts of the code without effecting any other parts. One example of this is IEnumerable<T> which is implemented by several generic collection types, such as HashSet<T>, […]