Susan Potter

Software development, engineering, technical leadership

software: Created / Updated

A Haskell view of functional programming ("effectful")

This article explores Haskell’s techniques for isolating side effects, starting with the IO monad, which encapsulates impure code to enable reasoning about pure portions. It explains IO’s benefits like sequencing effects and isolating them from infecting other code. The article then provides a high-level overview of more advanced Haskell effect …

software: Created / Updated

A Haskell view of functional programming (well-typedness)

Dive into an educational journey exploring the power of strong static typing, enforcing domain-specific constraints, and ensuring the validity of values. Uncover how well-typedness enhances code reliability, maintainability, and understandability, while enabling robust composability and scalability.

software: Created / Updated

TypeScript's Mapped Types

In this in-depth exploration we discover the power of mapped types in TypeScript through numerous examples. At the end working through the article you will be able to transform properties with ease, and master best practices when adopting mapped types.

software: Created / Updated

Cross-runtime TypeScript Library Development: A Deno-Node Workflow

Are you a TypeScript developer who loves Deno’s safe and sandboxed environment and its out-of-the-box TypeScript, LSP, linting, formatting, stdlib testing and benchmarking support? Join me as I walk you through a possible workflow that combines the best of Deno tooling with Node.js compatibility.

software: Created / Updated

Rapid Data Exploration with DuckDB: An In-Depth Tutorial

A comprehensive guide that explores the power of DuckDB for efficient and effective data exploration. The tutorial covers the entire process, from setting up DuckDB and loading data to advanced querying, visualization, and optimization techniques. It highlights the capabilities of DuckDB in performing advanced analytics and statistical functions, as well as …

software: Created / Updated

Using Conditional Types in TypeScript

Dive into TypeScript's conditional types and discover how they empower developers to create flexible type mappings and enhance type safety. This article explores the mechanics of conditional types, demonstrates their application through practical examples, and showcases their ability to eliminate runtime bugs and improve code resilience. Embrace the …

software: Created / Updated

Discombobulated thoughts on generative artificial intelligence

Brace yourself for a wild expedition through the tangled maze of generative artificial intelligence (AI) in this engaging and thought-provoking article. Dive into the misconceptions surrounding generative AI, explore its potential impact on the workplace and the life of a consumer, and unravel the shadows and challenges that lie ahead. Join the author on a …

software: Created / Updated

The Pitfalls of Serverless Hosting

Join us as we dive into the world of serverless hosting and uncover the hidden challenges that come with this revolutionary approach. While serverless architectures promise scalability, cost-efficiency, and ease of deployment, they also present a range of obstacles that developers need to be aware of. From cold start latency to vendor lock-in, debugging woes …

software: Created / Updated

Extracting Your Twitter Archive into DuckDB

Discover how to extract and analyze your Twitter archive using DuckDB, a lightweight and fast embeddable SQL database. This article provides step-by-step instructions for extracting data from your Twitter archive, converting it into a CSV file, and importing it into a duckdb database. By leveraging the power of DuckDB, you can query your tweets based on …

software: Created / Updated

A WebSockets Story

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 …

    software: Created / Updated

    Flix Series Part 1: Higher-order functions & infix combinators

    This article delves into the world of functional programming with the Flix programming language with higher-order functions and user-defined infix operators.

    software: Created / Updated

    Getting Started with Flix, Part 0

    Are you ready to embark on a coding adventure with Flix? This article introduces Flix, a programming language that combines the best features of functional languages like Scala and Haskell. But that's not all—Flix also brings its own innovative additions, such as row polymorphic extensible records and first-class support for Datalog constraints.

    software: Created / Updated

    Track diffs by scoping file, range, function, method, class changes

    Discover the power of scoping change differentials in Git by focusing on specific files, line ranges, functions, methods, or classes. This article demonstrates various commands using the Ruby language repository, allowing developers to track changes in a particular semantic scope rather than at a file or directory level. Learn how to scope log diffs per …

    software: Created / Updated

    TypeScript's keyof operator and possible uses

    Discover the incredible potential of the keyof operator in TypeScript and revolutionize your code for a better development experience.

    software: Created / Updated

    How to make seemingly impossible decisions

    Originally published as a Twitter thread starting here. In the realm of technical and people management leadership, decisions loom large, often presenting themselves as formidable challenges. But fear not! Join me on a recent coaching expedition, where I guided a colleague through the treacherous terrain of decision-making. Surprisingly, what seemed …

      software: Created / Updated

      JavaScript objects to TypeScript enumerations, const enums, ambient enums

      Learn how to leverage TypeScript's enums, const enums, ambient enums and how they impact generated JavaScript code. Unveil the benefits and drawbacks of using const enums.

      software: Created / Updated

      Using three-way diffing context for merge conflict style in Git

      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 …

      software: Created / Updated

      Work-from-Home Work and Home Separation Tips

      Since 2006 I have been working from home (starting part-time) and ever since March (2020) friends have been asking me to write an article about how I separate my work from home life when working from home (WFH). Define your work space Whether it's a dedicated room or a corner, make your work space a place you can focus. Those with space constraints can …

        software: Created / Updated

        Algebraic Data Types in TypeScript

        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' | …

        software: Created / Updated

        Algebraic Data Types: For the math(s) inclined

        Unlock the mathematical elegance of algebraic data types (ADTs) and revolutionize your understanding of data modeling! Discover how algebraic principles can determine the cardinality of ADTs, allowing you to represent an astonishing number of values. Explore the power of sum types, where you can "sum up" the cardinalities of different data …

        software: Created / Updated

        Experience report deploying PureScript to AWS Serverless (Lambda)

        In this blog post, an experienced software engineer shares their successful deployment of a pure functional serverless function to AWS using PureScript. They spent around $15 per day on API Gateway and Lambda invocations without cost optimization, handling a peak load of 32k invocations per minute with low latency. The engineer highlights the need for …

        software: Created / Updated

        `any` versus `unknown` in TypeScript: When to use one over the other

        Discover the critical distinctions between `any` and `unknown` in TypeScript, and unleash the full potential of static typing. Join this TypeScript journey, where I advocate for stronger types and prefer the vigilant guardian, `unknown`, whenever possible. Say goodbye to chaotic code and runtime errors, and embrace a smoother development experience with …

          software: Created / Updated

          Random notes on Unikernels

          Explore MirageOS, Rump Kernels, and Whole Program Optimization at a very high-level. Discover the future of lightweight, secure, and efficient application deployment.

            software: Created / Updated

            DynamoDB: The Basics

            Dive into the fundamentals of DynamoDB and discover its unique data modeling concepts. This article explores the similarities and differences between DynamoDB and relational databases, highlighting the importance of data modeling in DynamoDB. Learn about primary keys, secondary indices, and the flexible attributes that make DynamoDB a powerful NoSQL …

            software: Created / Updated

            Economic concepts applied in software development and leadership

            Discover how economics concepts can change your approach to software development, technical leadership, and reliability engineering. This article explores various economic principles and their practical applications in the tech industry. Learn how concepts like opportunity cost, causal inference, comparative advantage, thinking on the margins, and the lump …

            software: Created / Updated

            To Type or not to Static Type

            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 of …

              software: Created / Updated

              Parametricity: A Practitioners Guide

              This post is a quick and handy guide that introduces the concept of parametricity and explains how it can be leveraged in software development. The article aims to target industry practitioners familiar with mainstream languages and methods, providing them with a practical understanding of parametricity and its benefits. It discusses the prerequisites and …

              software: Created / Updated

              Algebraic Data Types

              Unlock the power of algebraic data types to revolutionize your programming! Discover the flexibility of sum types, also known as tagged unions, and product types, also called record types. Dive into Scala examples and see how algebraic data types provide exhaustive and type-safe constructions. Explore the hybrid sum-product types and their applications in …

              software: Created / Updated

              Why JSON Pointer falls short (and why XPath for JSON would be great)

              Discover the limitations of JSON Pointer as a querying mechanism for JSON documents and the potential solution lying in XPath. This engaging article explores real-world scenarios, showcasing the challenges of extracting multiple values efficiently using JSON Pointer. It then introduces XPath, a powerful selector language known for its flexibility and …

                software: Created / Updated

                Erlang's "let it fail" philosophy

                Erlang, a powerful programming language designed for fault tolerance and high availability, challenges traditional error handling with its groundbreaking concept of "let it fail." Instead of obsessively anticipating and accounting for every possible error scenario, Erlang embraces failures as a natural part of the system and provides tools to …

                software: Created / Updated

                Scala versus Erlang for Managers

                The demise of Moore's Law has ushered in a new era of multi-core processors, posing challenges for software professionals. In this article, we explore the debate between Scala and Erlang as languages at the forefront of addressing the multi-core challenge, considering factors such as legacy systems, scalability, and the availability of skilled …

                software: Created / Updated

                SCM: The Next Generation

                Have you heard of Darcs or Git? Many developers are familiar with traditional version control systems like Subversion and CVS, but the next generation of source control management will be distributed version control systems (DVCS) such as Darcs and Git. Darcs, written in Haskell, offers a user-friendly alternative to Git with some powerful features. In a …