Brian Drennan's Blog

Exploring curiosities in software.

Tag "Opinion"

2 posts

Understanding the Strategy Pattern

A colleague of mine is currently trying to study and learn Design Patterns. For the uninitiated, the term Design Pattern often refers to a set of well-known patterns used to solve problems that often present themselves in software. The primary work was originally written by Gamma et. al in Design Patterns: Elements of Reusable Object-Oriented Software. My colleague was reading an article on the internet on the Strategy Pattern, and voiced frustration at how contrived the examples were in the article, and how this seems to be a recurring pattern (no pun intended) when we create content around Design Patterns for one another.

This post is my attempt to clarify information about the Strategy Pattern for my colleague, and my hope is that this effort will benefit a large audience of developers experiencing the same frustrations. Let’s get started.

code design patterns opinion

Writing Good Comments

I’ve been a software developer for nearly ten years now. I’ve read comments in nearly every language and code-base I’ve worked in, and written them in most. Over time, my opinion has shifted quite a bit on what makes a comment useful. This post is a reflection on that collective experience, and I hope will influence you in the comments you write.

code comments opinion