# New posts live here now

I've been writing on Medium at [bluepnume.medium.com](https://bluepnume.medium.com) since 2015. Mostly JavaScript and TypeScript, a lot about cross-domain iframes from my years on PayPal Checkout, a run of Bitcoin posts, and more recently commerce and SMS from building [OneText](https://www.onetext.com).

From now on, new posts will live here, at [blog.danielbrain.ai](https://blog.danielbrain.ai).

At some point I'll move the old articles over too. Until then they stay on Medium, and every one of them is linked below, so if you're looking for something I wrote, it's here.

## Everything on Medium so far (56 articles)

### 2026

- [TypeScript’s number type is a lie](https://bluepnume.medium.com/typescripts-number-type-is-a-lie-6b3b10dd8f54) (May 27)

### 2025

- [A slightly better useState](https://bluepnume.medium.com/a-slightly-better-usestate-cac0e27fddd4) (Jun 10)

### 2024

- [The shortest, strangest engineering interview I’ve ever done.](https://bluepnume.medium.com/the-shortest-strangest-engineering-interview-ive-ever-done-950e8fa95f4e) (Aug 16)

### 2022

- [Nine terrible ways to use TypeScript enums, and one good way.](https://bluepnume.medium.com/nine-terrible-ways-to-use-typescript-enums-and-one-good-way-f9c7ec68bf15) (Dec 15)
- [The only kind of test I write](https://bluepnume.medium.com/the-only-kind-of-test-i-write-6bc550622ac3) (Dec 2)
- [I’m interviewing a little differently this time round.](https://bluepnume.medium.com/im-interviewing-a-little-differently-this-time-round-2382ff295329) (Oct 19)
- [It’s not actually supposed to be difficult.](https://bluepnume.medium.com/its-not-actually-supposed-to-be-difficult-23800e59e97f) (Oct 8)
- [DTC brands have a huge blind spot: vaulting](https://bluepnume.medium.com/dtc-brands-have-a-huge-blind-spot-vaulting-13ea7ef5b2f) (Sep 12)
- [Subscriptions are out, refills are in.](https://bluepnume.medium.com/subscriptions-are-out-refills-are-in-311fd6e41e5e) (Aug 25)
- [You don’t know jack about SMS](https://bluepnume.medium.com/you-dont-know-jack-about-sms-ce68304c3d5c) (Aug 5)

### 2021

- [The Magic of Serializing Functions](https://bluepnume.medium.com/serializing-functions-589bf37a3a2) (Sep 19)
- [Fooled by Certainty](https://bluepnume.medium.com/fooled-by-certainty-27bd9d02300c) (Jun 21)
- [Bitcoin: cutting through the bullshit](https://bluepnume.medium.com/bitcoin-cutting-through-the-bullshit-8a969852ed44) (Jun 13)
- [Building Bitcoin in JavaScript](https://bluepnume.medium.com/building-bitcoin-in-javascript-1a82534765ec) (May 20)
- [A follow up on Bitcoin’s S2F model](https://bluepnume.medium.com/a-follow-up-on-bitcoins-s2f-model-e759b95ea1d) (Apr 30)
- [You don’t need S2F to value Bitcoin](https://bluepnume.medium.com/you-dont-need-s2f-to-value-bitcoin-9027edef2ebe) (Apr 24)
- [Why Bitcoin?](https://bluepnume.medium.com/why-bitcoin-5710a57e391a) (Mar 31)
- [Big questions I have about NFTs](https://bluepnume.medium.com/big-questions-i-have-about-nfts-a3dfc73709a3) (Mar 15)
- [Trading Crypto, and being able to sleep at night](https://bluepnume.medium.com/trading-crypto-and-being-able-to-sleep-at-night-1e978dbbfdb0) (Feb 15)
- [The next chapter of BrainBlocks: Open Source](https://bluepnume.medium.com/the-next-chapter-of-brainblocks-open-source-2a6c62c50b2c) (Feb 1)

### 2020

- [Writing Regex in JSX, without releasing Zalgo](https://bluepnume.medium.com/writing-regex-in-jsx-without-releasing-zalgo-f1f2f91e764d) (Aug 7)
- [JavaScript tree shaking, like a pro](https://bluepnume.medium.com/javascript-tree-shaking-like-a-pro-7bf96e139eb7) (Jan 19)

### 2019

- [Iframes are just terrible. Here’s how they could be better.](https://bluepnume.medium.com/iframes-are-just-terrible-heres-how-they-could-be-better-974b731f0fb4) (Aug 18)
- [Functional-ish JavaScript](https://bluepnume.medium.com/functional-ish-javascript-205c05d0ed08) (May 15)
- [Google Chrome’s Portals: like iframes, but better, and worse.](https://bluepnume.medium.com/google-chromes-portals-like-iframes-but-better-and-worse-29e0bbb3f78e) (May 9)
- [How many keywords can you place in a row in javascript?](https://bluepnume.medium.com/how-many-keywords-can-you-place-in-a-row-in-javascript-fa9046b4c1ff) (Feb 7)

### 2018

- [IE Intranet and Trusted Modes](https://bluepnume.medium.com/ie-intranet-and-trusted-modes-a852d3a0bd47) (Dec 4)
- [JSX is a stellar invention, even with React out of the picture.](https://bluepnume.medium.com/jsx-is-a-stellar-invention-even-with-react-out-of-the-picture-c597187134b7) (Nov 8)
- [Blockchain is revolutionary. But could it be effortless?](https://bluepnume.medium.com/blockchain-is-revolutionary-but-could-it-be-effortless-1bc85f58667e) (Nov 4)
- [Building a React-esque component using vanilla javascript.](https://bluepnume.medium.com/building-a-react-esque-component-using-vanilla-javascript-ddc99e76b867) (Sep 16)
- [xcomponent, PayPal’s open-source cross-domain-component library, is now zoid!](https://bluepnume.medium.com/xcomponent-is-now-zoid-78625334bbac) (May 31)
- [BrainBlocks and Nano, two months on!](https://bluepnume.medium.com/brainblocks-and-nano-two-months-on-cfd69afadf36) (Mar 24)
- [Introducing BrainBlocks — my weekend hack project to build a simple checkout app for RaiBlocks](https://bluepnume.medium.com/introducing-brainblocks-my-weekend-hack-project-to-build-a-simple-checkout-app-for-raiblocks-5f5770c06c14) (Jan 12)

### 2017

- [Hacking Chrome’s Payment Request Api into PayPal’s iframe buttons](https://bluepnume.medium.com/hacking-chromes-payment-request-api-into-paypal-s-iframe-buttons-617e3d806be9) (Oct 28)
- [Introducing PayPal’s open-source cross-domain javascript suite](https://bluepnume.medium.com/introducing-paypals-open-source-cross-domain-javascript-suite-95f991b2731d) (Oct 15)
- [Reinventing cross-origin requests, without CORS](https://bluepnume.medium.com/reinventing-cross-origin-requests-without-cors-b9c4cb645376) (Sep 6)
- [Safari’s new third party tracking rules, and enabling cross-domain data storage](https://bluepnume.medium.com/safaris-new-tracking-rules-and-enabling-cross-domain-data-storage-85241eea7483) (Aug 30)
- [Intentionally unleashing Zalgo with synchronous promises](https://bluepnume.medium.com/intentionally-unleashing-zalgo-with-promises-ab3f63ead2fd) (Jun 15)
- [Introducing support for cross-domain Glimmer components, with zoid](https://bluepnume.medium.com/introducing-support-for-cross-domain-glimmer-components-with-xcomponent-21287c9f91f1) (Apr 6)
- [Turn your web-app into a cross-domain component with five lines of code](https://bluepnume.medium.com/turn-your-web-app-into-a-cross-domain-component-with-5-lines-of-code-ced01e6795f9) (Mar 27)
- [Creating a cross-domain React component, with zoid](https://bluepnume.medium.com/creating-a-cross-domain-react-component-with-xcomponent-fbcccc4778fd) (Mar 20)
- [Less is more: reducing thousands of PayPal buttons into a single iframe, using zoid](https://bluepnume.medium.com/less-is-more-reducing-thousands-of-paypal-buttons-into-a-single-iframe-using-xcomponent-d902d71d8875) (Mar 17)
- [Allowing multiple domains to render your app in an iframe, using X-FRAME-OPTIONS](https://bluepnume.medium.com/allowing-multiple-domains-to-render-your-app-in-an-iframe-using-x-frame-options-da3b0a7949ca) (Mar 14)
- [Even with async/await, raw promises are still key to writing optimal concurrent javascript](https://bluepnume.medium.com/even-with-async-await-you-probably-still-need-promises-9b259854c161) (Feb 21)
- [Every known way to get references to windows, in javascript](https://bluepnume.medium.com/every-known-way-to-get-references-to-windows-in-javascript-223778bede2d) (Feb 3)
- [There’s no need to declare all javascript vars once at the top of a function, and there hasn’t been…](https://bluepnume.medium.com/theres-no-need-to-define-all-javascript-vars-once-at-the-top-of-a-function-and-there-hasn-t-been-a66b31f21822) (Jan 27)
- [Configuration files, npm modules and lost sleep — why publishing front-end modules is painful, and…](https://bluepnume.medium.com/introducing-grumbler-an-opinionated-javascript-module-template-612245e06d00) (Jan 18)

### 2016

- [Introducing zoid — cross-domain, React-like components using iframes](https://bluepnume.medium.com/introducing-xcomponent-seamless-cross-domain-web-components-from-paypal-c0144f3e82bf) (Nov 28)
- [Introducing post-robot — smart cross-domain messaging, from PayPal](https://bluepnume.medium.com/introducing-post-robot-smart-cross-domain-messaging-from-paypal-bebf27c8619e) (Sep 30)
- [Open Source javascript offerings from PayPal Checkout! #krakenjs](https://bluepnume.medium.com/open-source-from-paypal-checkout-krakenjs-385c80926581) (Jun 1)
- [Dependency injection in Angular isn’t worth it. More lessons learned from scaling PayPal Checkout.](https://bluepnume.medium.com/dependency-injection-in-angular-isn-t-worth-it-more-lessons-learned-from-scaling-paypal-checkout-2189ec9c21a0) (Apr 3)
- [Auto-shrink-wrapping in PayPal Checkout, and how it’s saved us more than once](https://bluepnume.medium.com/how-we-manage-sane-tagging-releasing-and-shrink-wrapping-for-paypal-checkout-d1e37f20533a) (Feb 10)
- [Understand promises before you start using async/await](https://bluepnume.medium.com/learn-about-promises-before-you-start-using-async-await-eb148164a9c8) (Jan 19)
- [Async javascript is much more fun when you memoize.](https://bluepnume.medium.com/async-javascript-is-much-more-fun-when-you-spend-less-time-thinking-about-control-flow-8580ce9f73fc) (Jan 9)

### 2015

- [Fighting technical debt and feature creep, with data](https://bluepnume.medium.com/fighting-technical-debt-and-feature-creep-with-data-7de6370c2b58) (Oct 18)
- [Sane, scalable Angular apps are tricky, but not impossible. Lessons learned from PayPal Checkout.](https://bluepnume.medium.com/sane-scalable-angular-apps-are-tricky-but-not-impossible-lessons-learned-from-paypal-checkout-c5320558d4ef) (Sep 26)

You can also find everything else I've worked on at [danielbrain.ai](https://danielbrain.ai).
