Welcome, fellow developer. Today we embark on a [hopefully] helpful journey into the world of conditional types via TypeScript! I hope to impress upon you how we can levereage conditional types to offer improved type safety especially in cases where the type of an associated peice of data can be computed from the type of the original data that is polymorphic …
Welcome to the twisted realm of my junkyard thoughts on generative artificial intelligence (AI). Here, amidst the chaotic debris of ideas, I toss aside any pretense of constructing a meticulously woven think piece. Oh no, dear reader, you can expect a wild ride filled with internal contradictions, where my opinions and predictions clash like deranged bumper …
It has been a hot minute since I wrote about my experiences delivering applications using serverless stacks so I wanted to recount them in one place with the most critical pitfalls, so I don't need to rewrite this over and over again. In the world of software development, trends come and go, promising revolutionary advancements that will transform the …
Since I heard a number of people interested in extracting the data from their Twitter archive, I thought it would be beneficial to describe the steps. Assumptions you have already requested your account's Twitter archive via the Twitter site your Twitter archive is currently available for download you have jq and duckdb command-line tools …
It was a cold and blustery day, and Susan sat huddled in front of her recent birthday present to herself - a ThinkPad running NixOS - her fingers numb with cold. She had been struggling for hours - well, at least 3 minutes which felt like hours - to establish a connection with the server, and she was starting to lose hope. But Susan was a determined young …
This part 0 post should work for any developer who wants to get started with Flix. Flix is a programming language that supports constructs native to functional programming languages like Scala and Haskell while supporting row polymorphic extensible records like PureScript and also provides first-class support for Datalog constraints. There is even more, but …
One common question I see from developers using Git is how they can review the history of one function, method, or class over time through Git's history of the project. In codebases that have evolved over years, a developer just wants to know how one particular semantic scope of code has changed over time rather than on a file or directory basis. We …
Originally published as a Twitter thread starting here. Anyone who has spent any time in either a technical or people management leadership position in software development knows that you need to make seemingly difficult decisions frequently. This week I coached a coworker through making a difficult decision by walking through the following process with …
Today I found that there is a difference between enum and const enum in TypeScript in the generated JavaScript. Namely: with a non-const enum the compiler generates an object with key-value pairs. with a const enum the definition alone doesn't generate any code, only usage of the enum does. Note: all generated JavaScript code is generated from the …
It recently came to my attention that not everyone overrides the default merge.conflictStyle git-config setting. So in case anyone here wanted to try something new out that would provide more context during a Git conflict resolution scenario here you go. I use diff3 which you can set like this to override the default: git config --global merge.conflictStyle …
Note: the code for the TypeScript (to help you follow along) is available here: Encoding Algebraic Data Types in TypeScript code Background Recently I've been reviewing TypeScript code at work. A common pattern I've observed in pull requests and some open source projects is a type that looks like the following: type FooTag = 'Bar' | …
This was initially published as a section of one of my substack posts. You might be wondering why the term algebraic data types has the word algebra in it. Don’t sweat it if you hated algebra in high school, I will not call on you to solve simultaneous equations or prove by induction on the board in front of the class. The basic idea is that through a …
/images/car-dashboard-small.webp Photo by Dawid Zawiła on Unsplash This was adapted from a tweet thread on June 3rd, 2020. Notes: all references to $ (dollars) is in reference to US Dollars (USD) latencies are quoted in milliseconds (ms) unless otherwise noted this serverless application was deployed using the AWS primitives API Gateway (REST) and …
This is an adaptation of a Slack chat explanation from work (slightly reworded to read better for the audience) from work in 2017. Random notes on unikernels Introducing unikernels You might have heard terms like unikernel, nanokernel, or library operating systems. These aren't always used in exactly the same way, but they are highly related terms. …
Introduction This post introduces concepts and principles used to design DynamoDB tables as I have been learning how to leverage this technology in a new project. This introduction will compare and contrast the core concepts and ideas with those found in relational database management systems (RDBMS). Key takeaways While using DynamoDB the last couple …
One of my favorite subjects as a layperson is economics. I have found many useful applications of methods and concepts to my work in software development, technical leadership, and reliability engineering roles. This is a post to share some of these. A few ideas from economics: an overview Below is an overview of ideas from economics that have resonated …
Originally published as a Gist here: https://gist.github.com/mbbx6spp/60577af8dc4106d6e710cd804292ce20 Minor modifications in formatting and an extra line of no-judgement was added to this text from the original Gist. Purpose, Disclaimer and Confessions This is the (mostly) no nonesense guide to studies and research that measures and/or compares a variety …
Introduction What software developer likes surprises, especially in production? Not me. At least not when I am on call. ;) Wouldn't it be great if we were able to reason about our code to make our lives as simple as possible when debugging or eliminate debugging altogether? The big idea of parametricity is that from parametric (or generic) …
An algebraic data type can take many forms: Sum type Product type Hybrid Sum/Product type Recursive type (not covered in this post) Sum Types (aka Tagged Unions) A sum type is a type that has a known and exhaustive list of constructors where a value of that type must be constructed by exactly one of the constructors.
I am sure most developers (whether Java, Ruby, Python, or other) have used Subversion, Perforce or CVS to manage and control their projects' source, but have you used darcs or git? I'm sure most of you would have heard of git it hosts the Linux kernel code currently. Less of you have probably heard of darcs before. Prior to this evening, the most …