Jan 5, 2018Functors: An ExplanationYou can think of a functor as a box which is based around some value. Because this particular value is covered by our box, we can’t treat the value inside like the value that it is. Thankfully functors allow a certain behavior to get around the box. …Functional Programming4 min read
Aug 17, 2017Http in ElmTo keep the post short and helpful, I’m assuming you’re already familiar with the Elm Architecture and a few of the language concepts. Every major code sample has a link to the full, working example on Ellie. Any modern technology that is looking to conquer the JavaScript world must provide…Elm7 min read
Jul 26, 2017“Don’t call us, we’ll call you”Over the past half year, I’ve had the SOLID principles of Object-oriented programming (OOP) drilled into my brain as I worked on honing my overall design sense in the quest to achieve software enlightenment. One design pattern that I’ve always been favorable towards is Dependency Injection. In OOP, Dependency Injection…Programming6 min read
May 30, 2017Thinking Recursively: An Experience ReportWhen I first started learning Clojure a little over a month ago, I was encouraged to try and tackle as many of the problems on 4Clojure.com as I could in order to familiarize myself with all the new concepts that the language was going to introduce. So every time I…Functional Programming12 min read
May 16, 2017Laziness in ClojureAs you probably already know, Clojure employs a call by value parameter passing mechanism and is, in most cases, eagerly evaluated. So where does lazy evaluation fit into the language? The answer is in lazy sequences. …Clojure9 min read
Apr 24, 2017Optionals in Swift: Unwrapping SyntaxThe syntax for Swift Optionals can be pretty intimidating at first, so I’ll break down what the different syntaxes mean. To start, let’s say that we want to get the first thing out of an array Notice that the return from this first property has a type of String…Swift3 min read
Apr 8, 2017A Strategy for Testing the UntestableI’ve recently been working on a Swift app deals with a fair amount of file I/O functionality. File I/O is difficult to test because it involves reading and writing files that may or may not be available in different environments. …Swift3 min read
Mar 25, 2017Interface is not InheritanceFor a long time I got Liskov Substitution Principle confused because I didn’t understand the context which the principle was referring to. Being a relatively new programmer, I didn’t know the difference between an interface and inheritance, and had assumed that the principle itself was referring to interface. Coming from…Programming4 min read
Mar 19, 2017Optionals in Swift Part I: The MotivationSwift Optionals can be intimidating for beginners and those new to the language. This is part 1 of a multi-part mini-series all about Optionals in Swift 3. Optionals can be tricky for beginners because they contain a boat load of concepts that can be unfamiliar to beginners and for those…Swift5 min read
Mar 6, 2017Test Driving a Kata (in Swift!)A kata is a small exercise designed to improve a developer’s skills. The Prime Factors kata wants a program that can take any number, and return all of the prime factors of that number. I’m going to do this exercise in Swift, but the language itself isn’t important. The high…Tdd4 min read