How often do you think, “This code is unreadable!” while trying to understand code that someone else wrote? A lot of things can contribute to unreadable code. Sometimes it’s simply a matter of what you’re used to. Other times, code can be made more readable just by rearranging its structure. Tools Ever been involved in […]
When creating a component in React, I often want it to be independent, able to maintain its own state. And at the same time, I’d like its parent to be notified when the component’s state changes, and I want to enable the parent to pass down new state at any time. Implementing this behavior in […]
Hot Chocolate is a GraphQL server that can integrate with ASP.NET Core, but it doesn’t participate in the same dependency injection you may be used to. That means it’s not immediately clear how to get at the Session or User objects. Normally, you can access these things through an HttpContext. On a controller, you read […]
The .NET framework has had several different patterns for doing asynchronous work — the Task Parallel Library (TPL), the Event-based Asynchronous Pattern (EAP), and the Asynchronous Programming Model (APM), to name a few. Since they build on each other, if you’re not familiar with all of them, it can be difficult to understand how they […]
Software developers are great at recognizing patterns. Maybe it’s an inherent skill that draws us to this profession. Or maybe it’s the process of writing software that develops this skill. Either way, “don’t repeat yourself” (DRY) is a natural application of this skill. However, repetition in itself is not the enemy that this principle makes […]
Functional programming seems to be making its way into everything these days, and you can take advantage of it even if you’re not using a strictly functional language or toolset. The key is to think declaratively rather than imperatively.
My attitude toward CSS used to be that it is simply unmaintainable. If in the course of development, you think things like: These styles are already a mess, so I can’t make it any worse. I can’t figure out why this is getting overridden, so I’ll just use !important. It seems like these styles are […]
Source control is a vital part of software development, but you don’t always want it to keep track of everything. Passwords, temporary changes, and desperate debugging edits are best kept out of version control. I’ve found four effective ways to handle this.