Code smears: code smells that spread across your codebase
The term "code smells" gives us a handy shorthand for signs that our code might not be especially clean. In my experience, the worst sort of code smell are "code smears": those smells that tend to...
View ArticleNope: a statically-typed subset of Python that compiles to JS and C#
Nope is a statically-typed subset of Python that uses comments as type annotations. For instance, here's the definition of a Fibonacci function: #:: int -> int def fib(n): seq = [0, 1] for i in...
View ArticlePower à la Carte: fine-grained control of power in programming languages
Proposal: general purpose programming languages should provide fine-grained control of the power that a particular module can use. "Power" includes language features, or what modules it is allowed to...
View ArticleGraphJoiner: Implementing GraphQL with joins
I've had the chance to play around with GraphQL recently, and so far have found it all quite pleasant. Compared to fixed REST endpoints, being able to describe the data you need has resulted in less...
View ArticleGraphQL composition can radically simplify data query maintenance
Using GraphQL has plenty of well-documented benefits, avoiding under- and over-fetching, strong typing, and tooling support among them. However, I think the value of the composability of GraphQL tends...
View ArticleAdventures in WebAssembly object files and linking
I've been tinkering with a toy compiler, and recently added support for compiling to WebAssembly (aka Wasm). At first, I compiled to the text format (aka .wat), and also wrote the runtime using the...
View ArticleMy tiny side project has had more impact than my decade in the software industry
Way back in 2013, I started mammoth.js, a library that converts Word documents into HTML. It's not a large project - roughly 3,000 lines - nor is it particularly exciting.I have a strong suspicion,...
View ArticleWhat's the value of company values?
Integrity, communication, respect, and excellence. These were the values of a company that, in 2001, Fortune magazine named "America's Most Innovative Company" for the sixth time in a row. In that same...
View ArticleReflections on "Testing Without Mocks"
James Shore has written a new draft of his "Testing Without Mocks: A Pattern Language" article which I thoroughly recommend reading, or at least the accompanying Mastodon thread.To help me understand...
View ArticleThe particular awkwardness of testing predicates
Predicates are awkward to test.Or, to be more precise, predicates are awkward to test such that the test will reliably fail if the behaviour under test stops working.To see why, let's look at an...
View Article