Richard Clayton

Writing Better Apps: Dependency Injection

Dependency Injection (DI) is a pattern where the "things" a component (function, class) depend on are passed into the component instead of the component trying to instantiate (or resolve it) itself. This practice tends to make code a lot more robust by reducing a component's scope. The DI pattern also simplifies the testing . . .

Read More

April 24, 2021

Algorithm: Winner in Tic-Tac-Toe

In Rust!

There was a thread on Reddit that caught my interest the other day. A Software Engineer at Google mentioned his favorite interview question for potential candidates was to have them write an algorithm to determine if a tic-tac-toe game had a winner. Thinking about the question inspired me to solve the algorithm.

To make the task more . . .

Read More

Posted in: algorithmrust

April 03, 2021

Unified Observability

Thinking about the future of logging, metrics, and tracing in applications.

The last decade has seen exciting developments in runtime observability of services. Log aggregation and search are a requirement for operationalizing systems. Organizations are collecting real-time metrics from production systems and using that data to get insight into customer behavior. Most importantly, distributed tracing is becoming . . .

Read More

March 20, 2021

You can't just be a backend developer.

(most of the time)

Last week I came across Asko's blog post on Reddit (r/programming) about why he doesn't want to work in the front end anymore. I had similar feelings three years ago after working as a full stack developer and insisted on taking a pure backend role with my current employer. Ignoring the frontend turned out to be a colossal mistake and . . .

Read More

February 16, 2021

Writing Better Apps: Implementing Configuration

"Configuration" is the settings your application uses to change its behavior at runtime. Configuration might include simple values that adjust timeouts on requests to more complicated settings that swap out database or cloud service providers.

The process of collecting and validating configuration is critical to a stable . . .

Read More

September 30, 2020

Writing Better Apps: Initialization

Whether you are writing a script, a multicommand CLI utility, or a networked server, applications should follow the same initialization pattern:

  • Get configuration
  • Build dependencies
  • Resolve and execute the entry-point function

Get configuration

Using the environment, and possibly command line . . .

Read More

Posted in: nodejstypescript

September 19, 2020

Templatizing Github "Template Repos"

Adding the (obvious) missing feature to Github Template Repositories

tl;dr

Get better use out of Github Template Repositories by introducing your own templating mechanism. Using a combination of gomplate, tree, and bash can get you there pretty easily. This article demonstrates an example of how it's done.


Last year, Github added a new feature called Template Repositories. . . .

Read More

Posted in: cigithub

April 13, 2020

Archive

This update link alerts you to new Silvrback admin blog posts. A green bubble beside the link indicates a new post. Click the link to the admin blog and the bubble disappears.

Got It!