Object-oriented programming’s goal is on creating objects, entities with fields and methods. In terms of parts of speech, you may think of objects as nouns, fields as adjectives, and methods as verbs. With the noun being the focus, adjectives will describe the noun, and the verbs are actions that the noun is capable of. In the same vein of this comparison, objects are good at emulating real-life things: with a Dog object, it may have fields for name and age, and methods for eating and barking. …


This reminds me of a puzzle!

I was working on a Codewars problem not too long ago, and I wanted to write about my solution to it. Partly because it was an interesting problem, but also because it reminded me of a puzzle I once did in a Professor Layton game.

Here’s the original prompt:


The Open Systems Interconnection model, or OSI model, breaks down how information and requests are sent from one computer to another, starting at the user making a request and ending at that information traveling over some transmission medium. Each layer’s duty is to make sure that information is being passed correctly between the layers above and below it, and if all the layers are doing their jobs, you computer will be able to communicate with others.

Application Layer

When looking over the model, it’s best to start with the Application layer, as this is where requests will start, and where…


I recently did my first contribution to an open source project, and I wanted to share some of the resources and sites I used. I had looked into doing this before, but all the resources and things I wanted to know all seemed too spread out, it was hard to make sense of what I needed to do, or I didn’t feel confident I wasn’t going to end up making a totally bogus pull request in the end. This time around, I seemed to have lucked out and found everything I wanted to know.

First off, finding https://www.firsttimersonly.com/ helped a…


Unless you’re doing something awfully specialized, I’d bet most of your code doesn’t explicitly use binary in it. Most of what you’re writing is probably closer to human languages, and if there’s any binary involved, it’s beneath layers of abstraction. But I think it’s still a useful topic to cover as it lets you learn a bit more about numerical systems, and a bit about boolean logic.

Binary is the name we use for the base-2 numeral system, and it has only two symbols: 0 and 1. …


I’ve written a few articles on abstract data types, and there was a sort of natural flow from one topic to the next: start with nodes, then linked lists, then queues and stacks, and then trees and graphs. Each of these structures have some sort order to their elements, and you can expect them to stay in that order. But there are data structures that don’t care about the order of their elements, and the most basic of these is the set.

What are Sets?

If queues are like a line at a movie theater, and stacks are like a pile of pancakes…


I’m not a psychologist, but I have played modern free-to-play and mobile games, so I know what it’s like to be in a psychology experiment. Surely having had hundreds (read: thousands) of hours of the experiment conducted on me should give me some grounds to speak on the topic. Whether it’s grinding and farming for some piece of equipment in an RPG, scavenging for a better weapon in a battle royale, or trying to pull a new character in a mobile gacha game, many games are using operant conditioning to keep players in games longer and more regularly. …


The Internet has two major systems organizing it, domain names and internet protocol (IP) addresses. IP addresses are the meat and bones of how connections are made and how information will be transported, while domain names provide easy to remember names for these addresses. Although this example is getting dated rather quickly, this system acts like a phone book for the Internet: You could memorize your friend’s street address, or you could look up their name in a phone book, and find the address associated with them. …


It occurred to me the other day that I was quite comfortable converting numbers from decimal to and from binary. But then I was trying to recall how you convert decimal numbers to and from hexadecimal, or simply “hex”, and then it occurred to me that I had totally forgotten how to do that. So, this article is going to be a refresher for myself, but hopefully it can help you too!

First, I want to establish this table, because I’m going to refer back to it a lot:


Repeating a task is quite common in programs. Maybe something needs to be repeated a certain number of times, or an action needs to be performed for each item in a group, or something needs to keep happening while some condition is true. You’re flush with choices! But these are all considered iterative loops, and sometimes they’re not the best solution.

Your other choice would be recursion. If a function is recursive, this means that it calls itself. Which if it was left at that, this would just lead to an infinite loop of the recursive function calling itself forever…

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