Why You Should Avoid Writing Complex SQL Queries – and What to Do Instead

If you’ve worked with a piece of software that talks to a database, chances are you’ve come across a long SQL query. Slowly, your eyes glaze over as you attempt to reason through the many joins and subqueries, trying to figure out if this query is the source of the bug.

You debate between the different options. Should you hunt for the original creator of the query, or re-engineer the query yourself so you have a chance of understanding its hidden complexities? Read more on Why You Should Avoid Writing Complex SQL Queries – and What to Do Instead…

Three Things to Remember when Ramping in New Team Members

Having new team members join a project is an exciting time, but it can often be difficult. Projects can have a huge variety of things to learn: new technologies, application architecture patterns, business models, etc., so it’s good to find a balance between ramping them up quickly and overwhelming them. Read more on Three Things to Remember when Ramping in New Team Members…

Managing Data Loaders in Node.js with Shared State

When developing software, it’s always tough to work with caching. While my team appreciates the efficiencies that Data Loader can provide for applications, we still struggle with the same problems that always come up when caching queries, mainly invalidating caches when a data set has changed. Read more on Managing Data Loaders in Node.js with Shared State…

Building a Family Tree with GraphQL – Part 2: Adding New Resolvers

In my last post, I described how you can build flexible APIs with GraphQL, using a family tree API as my demonstration. The implementation of the API was fairly simple, and I was able to traverse the graph of relationships between different people in the data set.

In this post, I’ll demonstrate how we can extend the same API to solve a problem with the first version. We can create new resolvers to fix a particular problem, but due to the nature of GraphQL, the same resolver can be used across many different queries. This unlocks more potential for the API without any extra development effort. Read more on Building a Family Tree with GraphQL – Part 2: Adding New Resolvers…

Mocking in JavaScript Unit Tests Using Sinon.JS

Lately, I’ve been using Sinon.JS for mocking in my unit tests. By using mocks for dependencies inside functions, I can write unit tests that are resilient to a changing codebase. Functions with mocks can also be developed without worrying about the chain of dependencies that could affect the logic inside the functions. Read more on Mocking in JavaScript Unit Tests Using Sinon.JS…

Using State Tables for Testing

Tests can benefit a project in many different ways. For example, they help ensure that the software behaves as expected. They also help document that functionality for pieces of code that other developers may have to maintain.

Lately, I’ve been using state tables in my tests to improve both of these benefits. State tables allow for clear and comprehensive tests that are scalable during the development. Read more on Using State Tables for Testing…

Naming Things Is Hard

When making software, you have to name a lot of things. There are functions, classes, numbers, data models, etc., and they all need meaningful names to ensure better communication within a team.

Over the past few months, I’ve noticed a few things that make naming things hard in a software project. These difficulties may be stressful, but they also highlight the benefits of good naming conventions.
Read more on Naming Things Is Hard…