pattern of white and blue hexagons

SOLID – Liskov Substitution Principle


This is the first post in a series on the SOLID design principles for object oriented programming. The acronym SOLID represents five principles that are considered best practice for designing object oriented solutions. Robert Martin is credited with codifying these principles into this acronym. The five principles represented in the SOLID acronym are (1) the Single Responsibility Principle, (2) the Open-Closed Principle, (3) the Liskov Substitution Principle, (4) the Interface Segregation Principle and (5) the Dependency Inversion Principle. I have chosen to address the Liskov Substitution Principle first in this series, mainly because it is considered to be the most difficult to understand. My hope is that this post will show that it is, at its heart, a very simple concept and very useful in helping you design class hierarchies.

stressed out man with hands on his face

Code Tests – Alphanumeric Filter Sort Problem


Here is another post about a recent code test that I also struggled with. This was a timed take home test in which I had 60 minutes to solve this problem. I was unsuccessful in completing this test in the time frame in part due to some issues I had getting used to the online editor that was used for the test. Note to self for next time, I will try and familiarize myself with the editor provided before starting the actual test! Even so, the day after I took the test, I returned to the problem statement to solve it in my own development environment and am providing what I’ve come up with here in this blog post. I chose to take the test in JavaScript and have also implemented my full solution here in this post in JavaScript.

UK Adapter and EU Adapter pointing toward one another

Adapter – Using Incompatible Interfaces


This is the third post in our Software Design Pattern series. The Design Pattern that we will be looking at today is called the Adapter Pattern. It is a member of the Structural Patterns as defined in the GOF Design Pattern book. The Adapter Pattern allows a Client to use an Interface that is otherwise unavailable. Another name for the Adapter Pattern is a Wrapper.

stressed out man with hands on his face

Code Tests – Airplane Itinerary Problem


This post is about a code test that I recently encountered and struggled to solve during the interview. The problem isn’t actually that difficult but when under the pressure of a paired coding test, I sometimes freeze up. What I typically do when I struggle to solve something in an interview is go back to the problem later and figure out the solution so I have it in the back of my head for future interviews. I find that by doing this, I end up learning and growing as a Software Engineer. I encourage you to read the problem statement and try and solve it yourself before reading on to see how I solved it. I chose to implement it in JavaScript.

Code on a screen

Observer – A Tool for State Management


 This is the second in our Software Design Pattern series of posts and today we are going to take a look at the Observer pattern.  The formal intent of the Observer Pattern as defined in the GOF Design Pattern book is, “Define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.”  This pattern is actually used quite often, for example when you create a listener on an element in JavaScript for when that element is clicked.  Anytime you have a situation where one object needs to know when another object’s state changes, you can use the Observer pattern.

orange fractual

Singleton – Pattern or Anti-Pattern?


Patterns are interesting to me.  You can observe patterns almost wherever you look.  Where you see a repeated pattern it seems obvious that some sort of thinking has gone into what you’re observing.  Patterns imply design and design implies a designer.  As a Christian this has great meaning for me because the design that is observed in creation such as the Fibonacci sequence points to a designer that had purpose in the way this world was made.  This is much like software design.  A good software solution always results from a very intentional and skilled software engineer thinking about the way the software should be written and then building the solution accordingly.  Software solutions do not just happen, a designer must make choices and follow best practices to build something that solves the problem that is being addressed.

Glasses in front of a computer screen

Google Sheets as a Back-end


 Have you ever needed a quick and easy way to get data but didn’t want to hassle with getting a full blown database setup?  Well I was pleased to recently discover that you can very quickly and easily get access to and display data stored in a google sheet on your website.  What makes this really easy and thus appealing is that you do not need to gain access to this data via the Google Sheets API, rather you can get a JSON representation with a simple URL.  Today we will look at this in detail and discuss the various considerations that should be made when using such a technique.