Machine Learning powers a lot of what we do. Currently there are three main categories of machine learning, supervised learning, unsupervised learning and reinforcement learning.

Let’s talk a bit about them and what differentiates them.

Machine Learning

Machine learning (ML) is the scientific study of algorithms and statistical models that computer systems use to perform a specific task without using explicit instructions.

Wikipedia

I am a professional software developer who mainly writes web apps.

When I want a computer to do something, I have to explicitly code for that. …


In my last post, we built a tic-tac-toe bot that would never lose a game! It was great, except it was really slow. It took over 30 seconds to determine the first move.

Let’s optimize that using a simple technique to prune the amount of searching we perform for each move!

Our Problem

Why is our bot slow? It’s slow because it’s dumb. There’s no intelligence to how it goes about searching boards.

Let’s take the following game board.


Searching for wins

This article builds upon last week’s minimax searching article. I won’t discuss minimax in depth here, so please check out that article if you have questions about minimax.

Games are fun! Programming computers to play games is also fun!

Today I’m going to walk you through what is takes to write a tic tac toe bot.

Tic tac toe might be a simple game, but it’s useful to teach strategies for how some computers approach playing games.

How Humans Play Tic Tac Toe

Imagine you wanted to play tic tac toe. How would you go about doing that?

You’d first learn the rules. …


Game playing is one way to learn machine learning strategies. Most game playing bots involve some searching mechanism. It’s how the bot can “see” which move can result in a favorable outcome down the line.

Let's learn about minimax, a useful technique to build an AI to compete on simple games.

Single Player Tree Searching

Let's play a little game. The object of the game is to end up with the highest number.

For a single turn, a one player game the choice is simple.


One of my Christmas presents was Principles by Ray Dalio. It’s him describing the principles that have helped make him successful.

I wanted to share some thoughts on a principle that I’ve thought a lot about recently. Specifically on how I need to grow in that principle.

Embrace Reality and Deal With It

Dalio’s first principle is “Embrace Reality and Deal With It.” He opens his chapter by saying, “There is nothing more important than understanding how reality works and how to deal with it.”

It’s important because so much of life starts by acknowledging reality. …


A little while ago I wrote an article entitled Getting Started with Elmish. It was me getting my feet wet with the language. Today I wanted to continue learning Elmish and decided to walk through the the Elmish Todo App.

If you’re new to Elmish, Elm or the MVU architecture, I recommend you read my Getting Started With Elmish article before this one. It describes the major parts of the MVU architecture, so I won’t be repeating that information here.

Running Locally

I performed the following steps to run this app locally:

  1. Clone the git repo
  2. Install yarn (not on the official…


I received a free 1-year license in exchange to use and review NDepend. Rest assured, these thoughts and opinions are my own.

Gaining visibility into your code base is hard. It’s hard for developers. It’s hard for people who have a technical background. I’ve also found it next to impossible for non technical people to understand it.

That being said, if you work in or make decisions about software, it’s critical that you understand what you’re dealing with.

Is my architecture going to scale? Are there security holes? How much technical debt is out there? …


A calm look at one of the more confusing concepts in functional programming

This is the second article of this blog discussing functional programming concepts. Here is a link to the first, Pure vs. Impure Functions.

Some time ago, I watched a talk that Scott Wlaschin gave at a conference about functional programming. He said that often times people who don’t understand functional programming get scared off by the terminology. Terms such as currying, partial application, functor, monad, etc.

It’s easy to think these are super complex concepts, when in reality, these terms are just unfamiliar.

Object-oriented programming has similar terminology, encapsulation, polymorphism, inheritance, etc. …


Pure and Impure functions is a very important distinction in functional programming. Since most of my university and early work experience was primarily in OOP languages (Java and C#) I wasn’t aware of this distinction until recently.

Today I wanted to introduce this concept and how it can help write more testable and composable software.

Function Types

Any function created is either pure or impure. Wikipedia states that a pure function has the following two properties:

  1. It’s return value is the same for the same arguments.
  2. It’s evaluation has no side effects.

So what exactly does that mean? …


Photo by Benjamin Voros on Unsplash

F# is a community driven Functional-First programming language. It’s a multi-paradigm language and interops nicely with C#, but provides a lot of the functional features that make working with it great!

Lately I’ve spent some time learning F# and through F# discovered Suave:

Suave is a simple web development F# library providing a lightweight web server and a set of combinators to manipulate route flow and task composition.

As stated, Suave is a web framework that can be used to create apis. …

Morgan Kenyon

I’m a software developer who works with the Microsoft stack. I love to program and write about what I’m doing!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store