Allan Deutsch

Learning to think & build in public. Excited about tools for thinking and augmenting human capabilities.

Currently head of product & engineering @GrabbitNFT. Previously product at Microsoft PlayFab, Xbox Live, and Xbox.

Recent notes

Dynamically generate TypeScript Playground links

TypeScript playground has a URL param to specify the code content. This makes it possible to always have up-to-date playground links for example code!

Add a demo link to TypeScript code blocks

Seeing example code with syntax highlighting is great, but sometimes you've just gotta run the code and see what happens...

Make example code interactive

Whenever possible, make code interactive. Interaction is the single most effective way to teach anything, including code!

Branded Types

TypeScript is a structurally typed language, but can have nominal typing semantics using a technique called type branding

Theory and practice

Theory and practice are often at tension with each other, but they shouldn't be. Each benefits from a health dose of the other.

Beautifully render code in Svelte

How I transform the code in my markdown files into beautifully rendered snippets on this site.

Linting and formatting a svelte project

Pulling together a bunch of language tools can be a bother, but I find automated formatting & code review tools are worth the hassle.

Type branding removes structural type compatibility

A structural type can be "branded" to add context to values by using the type system for annotations as is done with nominal types. Doing so makes them incompatible with structurally equivalent types.

Resolving CORS errors in SvelteKit

Cross-origin resource sharing requests let a user access resources on one site from another, but only if the server performs the secret CORS handshake with the browser.

Total Typescript notes

I've learned a lot from this course, and use this note to record bits I want to remember and riff on some of my observations.

Pasta Arabica

An improvised pasta dish made to drawn inspiration from the flavors and sounds of the Middle East. It is hearty and surprisingly bright.

TypeScript assertion functions increase type safety

Assertion functions let the programmer narrow types using a named function, making type narrowing much more readable.