SOLID Principles for Solid Code

If you’ve used an object‑oriented language for a while, you’ve probably run into the SOLID acronym. It’s a mnemonic for a set of principles that aren’t magic, but they consistently lead to code that’s sturdy, flexible and scalable. It’s code that’s easier to understand and therefore easier to change.

It might be an underappreciated quality, but I’d argue that “easier to change” is the most important quality of code for many of us, because most of what we do as developers is reading and changing code.

Even in the era of AI, this holds true. AI can generate a lot of code very quickly, but volume isn’t the same as design. Just like we get “AI slop” in text, we can get slop in code too. Or we can create code that’s solid (pun intended), and easier for a both AI and humans to understand, and easier for either to change.

Good design still matters, maybe more than ever, because it’s what lets a system grow without collapsing under its own weight.

Continue reading “SOLID Principles for Solid Code” →

Common Refactors: Part 1 – Conditionals

In this series, I’ll talk about common refactors I suggest when doing code review in my day to day. I’ll start with conditionals, including severals example refactors. The goal is to help produce code that’s easier to read and understand, and thus, easier to maintain and produces fewer bugs.

These examples will be in TypeScript but the refactors are common patterns and can apply to most languages out there, such as Python, Ruby, Swift, PHP, Java, Go, JavaScript, etc.

Continue reading “Common Refactors: Part 1 – Conditionals” →

The Repository and Unit of Work Design Patterns

Most web applications we build benefit from having a separate “data access layer” (DAL) and separating business logic from database interaction.

The main advantages to this are easier testing and maintainability. Because business logic is separated from the actual implementation, you can write code in terms of higher level abstractions, rather than having to worry about specifics.

Continue reading “The Repository and Unit of Work Design Patterns” →

My favorite Data Structure: The binary search tree

Ever wondered how computers organize information? Data structures are the building blocks that store and manage data efficiently.

Like filing cabinets for your computer, they decide how you can find, add, or remove information. Understanding data structures is key for developers, as they all have pros and cons, and choosing the right one can make or break your solution!

Continue reading “My favorite Data Structure: The binary search tree” →

Modern Full-Stack Web Frameworks: When to use What and Why

When it comes to choosing web development technologies, we now have more options than ever. And while that’s a good thing, it also poses a problem. Answering the question, “What is the ideal technology for this new project?” is not as easy as it used to be. In this post, I briefly highlight the most popular full-stack web frameworks, and why you might want to choose each of them.

Continue reading “Modern Full-Stack Web Frameworks: When to use What and Why” →