Simplify Code Coverage With One Simple Trick

In the last two-ish months, I've been converting a library and its plugins from being in separate projects into a monorepo. This was done to be able to maintain all of the assets in one place. One of the efforts involved was adding code coverage tracking for all packages, to ensure tests cover all the code that's written. Now code coverage can be a pain, but I discovered one simple trick to simplify code coverage.

Read more

Avoid Default Exports

It's the start of a new sprint. Another opportunity to refactor a huge swathe of undesirable code, update dependencies, break and unbreak builds, that sort of thing. The idea of refactoring incorporated into the daily run is a good thing to do, keeps technical debt at bay. This time around, I had to remove default exports from ALL of my modules.

Read more

Your App As One Big State Machine

Back in college, and in my early years of work, there was a meme about the approach computer engineering students took when solving problems. The meme states that whatever the problem, they would always resort to using state machines as their solution of choice. It's like the hammer-nail situation where a state machine approach is their hammer, and every problem basically becomes nail-like. But did you know Redux, one of the famous design patterns for the web, essentially turns your app into a big state machine?

Read more

Invalid State

Christmas season is a fun time for programmers. You become the de facto tech support person in the family. You do a lot of googling, a lot of reading, a lot of configuring, a lot of troubleshooting and of course, a lot restarting. But ever wonder why you need to restart systems when they malfunction? Believe it or not, it is all because of bad programming and invalid state.

Read more
View All Articles