Thomas Smith
  • Home
  • About
Subscribe
Expectations in Go Unit Tests
go

Expectations in Go Unit Tests

Or: how to make table tests clearer and more developer-friendly.

  • Thomas Smith
Thomas Smith Apr 22, 2022 • 3 min read
Links

“Do not remove a fence until you know why it was put up in the first place.”

Chesterton’s Fence is not an admonishment of anyone who tries to make improvements; it is a call to be aware of second-order thinking before intervening. It reminds us that we don’t always know better than those who made decisions before us, and we can’t see all the

  • Thomas Smith
Thomas Smith Feb 25, 2022 • 1 min read
Go Should Allow Implicit Typing on Funcs
go

Go Should Allow Implicit Typing on Funcs

I’d love to see Go implement implicit typing for function arguments.

  • Thomas Smith
Thomas Smith Jan 18, 2022 • 1 min read
Template Literals in TypeScript
typescript

Template Literals in TypeScript

A new feature in TypeScript 4.1 is the ability to create Template Literal Types. This feature allows you to use string interpolation to create types: type World = "world"; type HelloWorld = `Hello ${World}`; // type HelloWorld = "Hello world" Looks interesting, right? This feature gets even more powerful when you combine it

  • Thomas Smith
Thomas Smith Sep 14, 2021 • 1 min read
Pipelines in TypeScript with Generics
typescript

Pipelines in TypeScript with Generics

I first encountered a "Pipeline" in code when working with Laravel a few jobs ago. Not long afterwards, I started learning Elixir in my spare time, which had a similar concept with its Pipe Operator. And of course, if you're familiar with Bash you'll know about piping output into other

  • Thomas Smith
Thomas Smith Apr 20, 2021 • 4 min read
Thomas Smith © 2022
Powered by Ghost