October 4th, 2018

Cool Python Data Structures


Data Structures

In my time spent researching Python this week I stumbled across some really interesting data structures. Python has a vast standard library, with many data structures that specialize in certain tasks. It reminds me of Java’s standard library, except that Python data structures either have their own literal syntax or a built-in function for construction! This discovery post looks at three data structures that I found especially interesting.


Tuples are a commonly used data structure in Python. They hold immutable records, and are often used as immutable lists. One thing I didn't know is that tuples support 'tuple unpacking', which spreads their contents across multiple variables.


December 14th, 2018

Features of Python Classes


Object Oriented Programming

In this discovery post, I'm exploring some interesting features of Python classes. Python fully supports the object oriented paradigm, and I wrote about object oriented features such as the data model in past articles. Learning all the object oriented features of a language assists in creating APIs. Hopefully this knowledge helps me create better Python objects.

Investigating Python Methods


September 24th, 2018

Python's Data Model


Meta-Object Protocol

This summer I started a trend of picking a different programming language each season to explore. The language of the summer was Groovy, which was selected because I used Groovy at work. For the fall I’ve decided to deep dive into Python. Python was the first language I learned, beginning with CS101 my freshman year of college.

Python is well documented as a beginner friendly language. It is taught at most colleges to introduce programming. The ease of learning Python does come at a price. Very few master the language since they feel there is no need to1. The goal of dissecting Python this fall is to truly understand everything the core language has to offer. To begin, I will explore Python’s data model.


December 15th, 2018

From Protocols to ABCs in Python



+2 More

Python provides many different techniques for declaring interfaces. Some are informal such as protocols, while some are strict such as ABCs. The lack of an interface keyword makes learning all the different techniques a bit more difficult. This discovery post explores different options for creating interfaces in Python.

Protocols & Duck Typing


October 28th, 2019

Unit Testing AWS Infrastructure with Python



+2 More

From October 2018 to May 2019, I moved the infrastructure for both my websites to AWS. The process for building and tearing down this infrastructure is automated with IaC, specifically Terraform. I've had a lot of fun working with Terraform and learning the different design patterns for infrastructure in the cloud.

After my infrastructure was built, I realized I needed a way to test that my IaC was behaving as expected. The obvious solution to this requirement was a unit test suite. I implemented this unit test suite in Python with the help of the AWS SDK. This article explains why I took the time to write unit tests and walks through of the basics of testing AWS infrastructure in Python.


November 25th, 2017

Exploring Generators


ECMAScript 6

+2 More

When I first heard about generators in the ES6 version of JavaScript, I wasn't quite sure how useful they would be. In this post I will look at the basics of generators in JavaScript and other languages. In a future post I'll explore how to combine Generators and Promises.

The following code uses generators to create a fibonacci sequence.


December 22nd, 2018

How Languages Enforce Multiple Inheritance


Object Oriented Programming

+7 More

I recently read a book discussing multiple inheritance in Python. Python is one of the few object oriented languages that permits multiple inheritance of classes. Many other languages include workarounds for multiple inheritance. For example, Java allows for classes to implement multiple interfaces. On the other hand, PHP allows for classes to use multiple traits. This article looks at programming languages I use and how they enforce multiple inheritance or available workarounds.

What is Multiple Inheritance?


November 14th, 2017

Sorting Lists with Comparison Functions


Java 8

+6 More

In this discovery I look at sorting lists in different programming languages for non-trivial objects. The languages I use are my core languages: Java, JavaScript, Swift, Python, PHP, and C. I've used all these languages in larger projects and wish to stay proficient in them. Throughout this article I show snippets of code in each language, but you can also check out the full code on GitHub. Let's get started!



January 24th, 2018

First Look at RabbitMQ


Message Broker


Recently I looked at RabbitMQ, a message broker used to communicate between different parts of an application. An analogy I really liked is that RabbitMQ puts a post office in an application, where producers put messages in a post office box, which are then routed to consumers1.

RabbitMQ configuration can be written in any language with a RabbitMQ library (which consists of most languages you know). This is extremely powerful since different pieces of the RabbitMQ channel can be implemented in different languages. For example, let's say a RabbitMQ server has one producer and three consumers. The single producer might be written in Java, while the three consumers might be written in JavaScript, Python, and PHP. Imagine all the different possibilities of sending RabbitMQ messages across applications!


July 29th, 2018

Method Overloading Across Languages


Method Overloading

+6 More

While working with the object oriented paradigm, methods often need to be overridden or overloaded. These similar concepts are often confused by new developers - in my early days of software development it took a long time to remember the differences. Both overriding and overloading consist of creating multiple methods of the same name. The difference between the two is the scope and situation in which these methods are used.

Method Overloading vs. Overriding


Overloading is creating multiple methods or functions in the same scope with the same name. For overloaded methods the scope is a class definition. The difference between overloaded methods is the number of parameters - or for a language with explicit type definitions the parameter types. A programming language is tasked with choosing between the different overloaded methods when they are invoked. Invocation processes differ across programming languages.


Overriding methods occurs in object oriented programming when a subclass implements a method already defined in the superclass. Everything about the method signature stays the same - including the number of parameters and the return type of the method. When the method is called from a subclass instance, the overridden method is invoked instead of the superclass method.

Languages such as JavaScript use a similar technique to overriding with prototypal inheritance. The JavaScript technique is called shadowing, in which an object lower on the prototype chain has a method that shares the same name as a method higher up the chain. Methods lower on the prototype chain will block - or shadow - methods with the same signature higher on the chain. Shadowing results in methods lower on the chain being invoked.


October 9th, 2018

How Languages Handle Unicode



+4 More

I often think that processing strings of characters in an application is a simple process. The reasoning behind this line of thought is that string APIs provided by programming languages are usually very simple. However, processing characters is only straightforward when edge cases are avoided. With the growth of Unicode and use of special characters (for localization, emojis, etc.), edge cases are increasingly common. This post explores the complexities of Unicode and how programming languages support its edge cases.

What is Unicode?

Unicode is a standard for creating character encodings and handling characters in a consistent manner1. Unicode was built upon older character encodings such as ISO 8859 and its subset ASCII. These old encodings have limited scope (ASCII has just 128 characters), making them inapt for international applications. While ASCII often works fine for applications used by English speakers in the United States (ASCII contains the characters A-Z, numbers 0-9, punctuation, and common symbols), anyone else is out of luck. Unicode fixes these limitations, implementing characters from languages across the world, and even creating fun symbols and emojis. As of Unicode 11.0 over 137,000 characters exist.


July 11th, 2018

How Do Regular Expressions in Groovy Stack Up?



+5 More

Using regular expressions for pattern matching is a task software developers perform on a regular basis. Although regular expressions still differ a bit across languages, they are standardized to the point where they are language agnostic. However, interacting with these regular expressions differs greatly across different programming languages. In my recent ventures into Groovy, I saw a very unique approach to handling regular expressions. I decided to compare the approach in Groovy to approaches in other languages I often use. This article shares my findings.

Language Agnostic

A concept that is independent from any single programming language implementation. Skills that are language agnostic can be applied throughout the software development ecosystem.