Ponderings on Odoriferous Syntactical Constructifications

(AKA: “Thoughts on code smells” and how “high brow” they have become)

We have a habit of talking about “code smells” to indicate patterns and practices that our experience has shown can be problematic. Many of these “smells” are backed by a lot of data and really are legitimate problems to avoid. These are constructs and tools that often have few legitimate uses. But many so called “smells” really aren’t significantly bad. Let’s dive into some of the nuance here and talk a bit about why our word choice matters.

Beyond Object Oriented Programming

In the last post Beyond Inheritance, we talked about looking past “types” and reasoning about objects differently. The conclusion was that inheritance wasn’t necessary for OOP, and often results in more problems than it solves. Well, let’s go beyond that and explore more of what will come from treating objects as containers of behavior. Let’s look at what this means for various kinds of classes:

Taking Monads to OOP PHP

Lately I’ve been playing around with some functional languages and concepts. I have found that some of these concepts are directly applicable in the OOP code that I’ve been writing. One of those concepts that I think is worth talking about is the Monad. This is something that every functional developer tries to write a tutorial on, because it’s such a cool but hard to grasp concept. This post is not really going to be a Monad tutorial per se, but more of a post about bringing the general concept to OOP, and what that looks like.