Stop Using Static Data in Tests

At some point in the software development lifecycle you’re going to find yourself writing tests (we’re gonna gloss over the TDD debate) and these tests almost always need test data of some sort. Most developers that I’ve worked with tend to go for the tried and true method of just hard coding the data that they need either right in the test code itself or in a separate data file that gets included or read in during the test.

Visual Studio Code Profiles

Edit (2023-003-12) This is now a feature that is built into VS Code: Recently I decided I wanted to try and split up my Visual Studio Code environment between how I want to write code for work and how I want to write code for pleasure. Examples of why this is useful are: I can enable features that wouldn’t be safe for work (like Github Copilot) I can have my work configuration synced to a different location than my personal settings I can experiment and be willing to break my personal code environment without impairing my work environment What’s the game plan?

Handling Data Fetching in React Components

This is a pretty simple blog post tackling a problem I’ve seen a few times on React projects. There are quite a few ways of tackling it (Redux for example) but this is a simple, no dependency option. I’m also going to point out what should be obvious, the code here is just example code and is missing lots of things production code would have. All that aside, on to what the problem actually is!