DISCOVERY

December 22nd, 2018

How Languages Enforce Multiple Inheritance

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?

DISCOVERY

November 14th, 2017

Sorting Lists with Comparison Functions

Java

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!

Java

DISCOVERY

July 11th, 2018

How Do Regular Expressions in Groovy Stack Up?

Groovy

Java

+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.

DISCOVERY

July 29th, 2018

Method Overloading Across Languages

Java

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

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

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.

DISCOVERY

August 18th, 2019

Revisiting Type Equality

Java

JavaScript

+15 More

In this article I'm revisiting the concept of type equality. Type equality is a topic that software engineers learn early on in their careers. Similar to any other profession, it's beneficial to go back to the basics for practice. Professional basketball players practice layups before each game. Professional programmers should work at the basics as well. I spent this past week re-learning type equality in 13 different languages. In the process I've reaffirmed my knowledge and gained new insights. The rest of this article discusses my findings.

The Different Forms of Type Equality

DISCOVERY

January 31st, 2020

Exploring New Features in React 16.3

React

JavaScript

When I was interviewing for jobs in the fall, one interviewer asked me if I had React 16 experience. I said "yes", figuring I must have worked on React 16 features during my year and a half experience. I've worked with React since I created a React and Webpack seed application in March 2018. Since then I wrote jarombek.com (the website you are currently viewing) in React along with contributing to a client-facing React application for seven months at my job.

As the interview questions rolled on, it became obvious that I wasn't utilizing the latest React features. Luckily I aced the coding assignment and other technology questions, so the interview ended up going well.

DISCOVERY

January 24th, 2018

First Look at RabbitMQ

RabbitMQ

Message Broker

Python

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!

DISCOVERY

April 1st, 2019

Docker Part I - Basic Concepts

Docker

Container

Virtual Machine

When I worked on my first website saintsxctf.com during my senior year of college, it was a huge revelation that I could pay a company to host my website on their servers. The most surprising part for me was how they were hosting it. The web server was a virtual private server, which is a virtual machine (VM) sold as a service1. The VM ran a Debian Linux distribution. This means I wasn't paying for an entire bare metal server, instead provided a software program which acts like a physical server. In fact, there were likely many other virtual private servers running on the same hardware as mine.

The adaptation of virtual machines was a major milestone in software development history. Instead of needing a single physical server for each application, a single server could run a program called a hypervisor which would create one or many virtual machines. Virtual machines scaled as needed to match business needs. Eventually companies didn't need to invest in physical servers as cloud providers started offering VM IaaS (Infrastructure as a Service). An example of a VM IaaS is EC2 (Elastic Compute Cloud) on AWS.