One of Vavr’s users hit a peculiar bug recently: a serialized map containing enum keys, deserialized in another process, appeared to hold the right entries but the map… just could not find them. The root cause turns out to be a subtle property of Java enums that most Java developers are not aware...
Daily Docker loop involves a bunch of operations used over and over again, and everything usually starts with docker ps. You scan the output, find the container you are interested in, copy its ID, and then use one of most popular commands: docker logs -f abc123 docker exec -it abc123 sh docker...
A long time ago, when applying to one of the unicorns, they gave me a take-home exercise that I remember to this day. The task was about writing a controller for a remotely-controlled drone, and its controls were accessible over gRPC. I remember it not just because it was fun, but because I had an...
If you maintain a Java library, you’ve probably felt the disconnect between supporting Java 8 and providing support for the Java Platform Module System. A common trade-off is adding an Automatic-Module-Name entry to a manifest. While convenient, it’s inferior to a proper JPMS setup (automatic...
Gatherers is the missing piece of the Stream API. So far, if we were missing a terminal method, we could always implement one ourselves by leveraging the Collectors API. This made parallel-collectors happen, which extend the capabilities of parallel streams. However, what if someone wanted to...
Using fakes in tests instead of mocks has great advantages – it enables behaviour verification, which enables a true TDD, where you start with capturing desired behaviour in tests. This is impossible if you rely on mocks that verify whether some implementation details were called or not. Mocks...
Sometimes, bugs are obvious, trivial, and punch you right in the face. Sometimes, they are so subtle that you start questioning your sanity. This is a story about one of the latter, involving accidental time travel. Wiremock and Practical Time Stubbing A common integration testing pattern involves...
The impedance mismatch between Project Reactor’s thread hopping and thread-local model is still hard to grasp for many teams – context propagation has consistently been a key part of every Project Reactor workshop I’ve delivered since… ~2016. Naturally, the approach has evolved significantly over...
I have mixed feelings about social media and the value it provides, but I've recently joined Bluesky in hopes of regaining the value that I used to get out of Twitter/X from a developer's perspective.
Life as a software engineer can sometimes feel hectic, so it's important to have processes that keep us grounded and focused on the things that matter. Recently I've adopted a habit of keeping a work log to do just that. My goal for this post is to share the benefits I've noticed since keeping a...
Your JVM application “broke” and stopped logging exception stack traces? Everything is fine. Follow me! Exception Throwing Overhead Exceptions are not ordinary POJOs. I mean, they mostly are, but with one extra tiny detail: public synchronized Throwable fillInStackTrace() { // ... } This...
If you're a developer and work with video, there's a chance that you may need to trim or cut parts of the video for your users. In this post, I'll be going through the commands needed to do this in FFmpeg along with some details to consider when trimming video. Let's dive in!
While Neovim may not be my daily editor, I still prefer it to modify files quickly. Often I find myself in Neovim when I need to make small changes to JSON or YAML files. A common action that I perform is a simple "find and replace" which is supported by most editors. As with most things, the...
If you've been a developer for any amount of time you've undoubtedly reached for external dependencies to solve specific problems. Whether the problem is as small as padding the left side of a string or as large as a component library, external packages are inevitable. In this post, I'll be going...
Video has become an integral part of our digital lives. We rely on video streaming services like YouTube, Netflix, and Hulu to consume all kinds of content from sports to Movies and TV. If you've ever wondered what kind of technology might be powering these streaming services, you've landed in the...
Git is a nearly ubiquitous tool for version control these days and it serves its purpose dutifully. As great as Git is, there are still sharp edges and chances for mistakes to happen. In this post, I'll be sharing information about a lesser-known feature in Git that can fix those mistakes and help...
I’ve heard of others experiencing feelings of burnout in relation to free time or side projects, but I had never experienced it for myself. While I’m sure it’s different for everyone, I recently started to feel burned out with the time I spent outside of work on things that felt like work. In this...
At the beginning of the year, I created a roadmap to plan the development of my blog itself. In this post, I'll talk through the improvements for this quarter that involved the blog post search experience. Let's dive in!
Writing code that always behaves as expected when run in parallel is HARD. I'll be the first to admit that I'm NOT an expert in this field, but I do my best to generally understand the principles that make parallel programming possible. This post attempts to unpack the "thread-safe" term for...
Extension methods have been around in .NET for a long time and most developers use them daily without even realizing it. In this post, we're going to take a closer look at extension methods and how they work. Let's dive in!
As I've grown in my software engineering career I've learned that time isn't always easy to manage. Learning to deal with writing code, context shifting, collaborating, and all of the other aspects that go into being an effective engineer can be challenging. In this post, I'm going to try to flesh...
For the past several years podcasts have been an integral part of my personal development process. Each year I like to share the podcasts that I'm subscribed to with the goal of spreading the word and explaining why I find them worth listening to. Here's my list for 2023!
Historically I've held an opinion that reaching for more uncommon parts of a programming language to solve a problem meant that there was likely a better, less complicated solution. I'd put the use of semaphores in this category, but I recently had to reach for SemaphoreSlim to solve a problem. In...
Over the past ten months I've been working on a custom font for me to use in programming environments. The font is called Monocode and in this post I'm going to talk about how I created it, why I created it, and what makes it unique. Let's dive in!
Over the years I've found it helpful to listen to music while doing work that requires some amount of focus or concentration. Recently I've started to listen to binaural beats during these periods of work and have found them to be very helpful. In this post, I'm going to share some of the benefits...
As developers, we are constantly exposed to new tools and technologies, but the most recent wave of AI advancements feels different. In this post, I'm going to share my thoughts on whether or not the hype around generative AI is real.
FFmpeg can do just about anything with video and audio processing as long as you know what to ask. In this post, I will break down the different aspects of an FFmpeg command to better understand how FFmpeg processes them.
The introduction of WebAssembly (Wasm) has enabled developers to create experiences on the web that rival native performance. In this post, I'll provide an introduction to WebAssembly and also share an example of how it is leveraged to run FFmpeg directly in the browser.
In this post, I'll present my case for using conventional comments in code reviews. I've been an advocate of conventional comments for about a year and have enjoyed using them. I'm hoping to share the benefits so others can adopt their own standards for code review. Let's dive in!
We use collections in our code daily, but do we ever step back and consider how they perform in the context of Big O Notation benchmarks? In this post, we'll examine the different collection types in .NET to see how their behaviors relate to well-known Big O notation functions. Let's dive in!
I've been using enums in C# since the beginning of my development career. In this post, we are going to dive into how the Flags attribute can be applied to enums and also the different kinds of operations that come into play when an enum is defined as a bit flag. Let's dive in!
These days software developers are categorized into two common buckets, generalists and specialists. Neither category has an inherent advantage over the other and often times the pros and cons of a categories are contextual. In this post, I'm going to share my current thoughts on these categories...
Debugging is a vital aspect of most developer workflows. An easy-to-use debugger within an editor can speed up development by providing immediate feedback on a running application. In this post, we will be covering the debugging functionality in VS Code in the context of .NET applications. Let's...
Visual Studio is and probably always will be the defacto IDE for .NET development, but that doesn't mean there aren't other options out there. In this post, we're going to learn about several extensions available for VS Code that make writing .NET a productive and enjoyable experience. Let's dive...
As software development evolves and adopts asynchronous paradigms, the need for cancellation support in applications has become more prevalent. In this post, we will learn about the core concepts in regards to cancellation in .NET code. This post will provide a solid foundation for continued...
Up to this point, there has been no way to interact with the posts that I publish on this blog. The most recent release changes that. Readers can now like posts after reading them. In this post, we'll be discussing the feature, the high-level implementation, and how it could evolve in the future....
Over the years podcasts have become integral to my daily routine. In this post, I'll provide an update on my current (2022) podcast lineup along with some details about why I find each podcast interesting or useful. Let's dive in!
Retrieving data is typically a straightforward task. Retrieving data in the most efficient manner can be more complex. This post will dive into how SWR can simplify the process of fetching data while also solving potentially complex problems like performance, caching, data store mutation, and...
The ability to effectively manage our time as software engineers can feel like a superpower. In this post, I am going to share my current time management strategy and go into a bit of depth on how I think it has benefited me throughout my career. My hope is to provide some insight into ideas you...
Boolean functions and logic gates are at the heart of everything we do as software engineers. While it may not always be obvious or apparent, boolean expressions or the result of combining them form the building blocks for much of what we see and use today in technology. In this post, we'll be...
SQL Server has a feature called extended properties which can be used to add metadata to databases, schemas, tables, and columns. In this post, we are going to see how to use the extended property metadata to automatically generate corresponding XML comments on our scaffolded entities in EF Core 6.
In this post, we're going to explore the concept of a daily init script. The goal of this script is to open all of the necessary applications and tools that we use on a daily basis. This allows us to be productive by default instead of having to make separate decisions about what tools we need to...
While learning about TypeScript I came across function overloading. The way it works in TypeScript seemed different than what I was used to in languages like C# and Java. In this post, we'll be learning about overloading functions in TypeScript and potential alternatives that are better suited to...
The introduction of hooks a couple of years ago (version 16.8) introduced a massive paradigm shift in the world of React. Hooks allow developers to "hook" into state and component lifecycles without the use of classes! In this post, we're going to look at the useRef hook, how it works, and why we...
One of the things that I've enjoyed the most while learning TypeScript is the language's flexibility when working with types. I think that Utility Types are great examples of that flexibility. In this post, we'll be looking at the main kinds of utility types available and also how we can use them...
In this post, we'll be looking at literal types, what they are, and how we can potentially use them in our code day to day. Coming from a language like C# where there isn't really an equivalent to literal types I find them to be quite interesting and I hope you will too. Let's dive in!
Prior to C# 9 classes were the defacto option for creating reference types in C#, but now we have records. In this post, we'll be going over a few details about C# records and also the benefits that I believe they can provide over using classes (in some scenarios).
SQL indexes are an important part of every database, but they don't come without requiring some regular maintenance. In this post, we'll be looking at SQL index fragmentation in the context of Microsoft's SQL Server and how it can affect our database performance.
Conditional Types in TypeScript may not be a language feature used day to day by most developers, but as I was reading the TypeScript Handbook I found the concept interesting and decided to dig a little deeper. In this post, we'll take a high-level look at the concept of conditional types and how...
Often times the TypeScript compiler knows more about our own code than we do. However, there are occasions when that's not the case, which is where type narrowing comes in. In this post, we'll take a look at the different options available for narrowing types in our TypeScript code.