DISCOVERY

November 10th, 2019

The Basics of Programming Language Garbage Collection

Garbage Collection

Java

C#

While reading a book on C#, I came across a section about garbage collection. I always knew that programming languages such as Java performed garbage collection, but I never researched how garbage collectors (GCs) worked. The book mentioned that C# uses a tracing GC with generations and marking. These were foreign concepts to me, so I decided to conduct additional research on the topic. This article gives a high-level overview of garbage collectors and the APIs available to interact with them in Java and C#.

RETROSPECTIVE

October 28th, 2019

Unit Testing AWS Infrastructure with Python

AWS

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.

DISCOVERY

October 18th, 2019

Writing Elasticsearch Analyzers

Elasticsearch

ELK Stack

+4 More

One of the biggest strengths of Elasticsearch is text searching. Elasticsearch holds strings for text searching in text data types. A document can contain one or more fields of type text.

When strings are placed into a field of type text they are processed by an analyzer. Elasticsearch analyzers can be viewed as a pipeline that takes text as an input, breaks it into terms, and returns the terms as output1. These terms are placed in an inverted index which makes an index searchable.

DISCOVERY

September 30th, 2019

Integrated Queries with LINQ and SQL Server

C#

SQL Server

+4 More

My previous article explored LINQ, a module that brings query syntax to C#. All the examples in that article queried local data structures. While using LINQ on local data is valuable in itself, LINQ can do much more. LINQ really shines when used to query remote data sources. Queries on remote data sources such as relational databases are known as integrated queries. In this article, I explore integrated queries with a SQL Server database. First I create the SQL Server database instance with Docker and then query it using LINQ.

SQL Server with Docker

DISCOVERY

September 17th, 2019

Using LINQ in C#

C#

.NET Core

During free time at work, I've been reading a book called C# 7.0 In a Nutshell. When I get home, I write C# programs based on what I learned. One of the really interesting topics I read about was LINQ (Language Integrated Query), which is the integration of query functions and keywords in the C# language1. LINQ can be used to query remote data sources such as an RDBMS or local data structures.

LINQ reminds me of writing PL/SQL, which is a procedural language provided for the Oracle database. PL/SQL is a superset of SQL, allowing for looping, variable declarations, conditional logic, error handling, and more. The best feature of PL/SQL is the integration of SQL queries directly into an imperative programming language. Unfortunately, PL/SQL is strictly tied to the Oracle database and has clunky syntax in my opinion. LINQ on the other hand can be used with multiple different databases along with local data structures. Also, in my opinion, C# has much nicer syntax.

DISCOVERY

September 15th, 2019

Introduction to Elasticsearch

Elasticsearch

Kibana

+7 More

Over the past few months I've read a book about the ELK stack. ELK stands for Elasticsearch, Logstash, and Kibana. Together these three technologies provide the ability to search, stream, and visualize data. In this article I discuss Elasticsearch, which is the core technology of ELK Stack. First I'll define Elasticsearch and provide details about what its used for. Second I'll create AWS infrastructure for Elasticsearch using Amazon Elasticsearch Service. Third and finally I'll populate Elasticsearch with data and show some basic queries.

What is Elasticsearch?

RETROSPECTIVE

September 5th, 2019

AWS Lambda Function for MySQL RDS Backups Part II: Building the Function

AWS Lambda

AWS RDS

+11 More

In my previous article I discussed my existing AWS infrastructure and the additional resources needed to automate backups for a RDS MySQL instance using a lambda function. In this article I'll create those additional resources and further explain my design decisions. Finally, I'll test the lambda function and show the backup file in my S3 bucket.

Building the Additional Infrastructure

RETROSPECTIVE

September 3rd, 2019

AWS Lambda Function for MySQL RDS Backups Part I: VPC Infrastructure

AWS Lambda

AWS RDS

+5 More

When working with Amazon RDS (Relational Database Service) or any other database, creating backups of your data is an important safety precaution. The data of an application is often its most important asset, and if its lost or damaged the app is rendered useless. With RDS, Amazon provides a backup mechanism called snapshots. Snapshots backup the database instance and allow users to restore their RDS instance from a snapshot1.

Internally snapshots are stored in an Amazon S3 (Simple Storage Service) bucket. However, these backups aren't accessible through S3, since the bucket is hidden from the users AWS account2. The only way to see snapshots is through the RDS service. Also, snapshots aren't downloadable and their contents can't be viewed. This poses some serious limitations when trying to test a database backup.

DISCOVERY

August 24th, 2019

Introducing Flexbox

Sass

CSS

Flexbox

Last summer, I wrote an article about CSS Grid. CSS Grid is a new web page layout module introduced in 2017. Today I'm writing about Flexbox, another new web page layout module released to new browsers in 20171. While CSS Grid is a two-dimensional system used to create rigid layouts, Flexbox is a one-dimensional system used to create flexible layouts with dynamic resizing of elements. Let's go over the basics!

What is Flexbox?

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

August 3rd, 2019

Haskell Part VII: Applicatives

Haskell

Functional Programming

In my last Haskell Article I discussed functors, which provide a generic way to map functions over values. In this article I'm exploring applicatives, which build on top of functors. After discussing applicatives in Haskell, I'll try implementing them in Java.

Applicative Basics

RETROSPECTIVE

June 17th, 2019

Creating a Reusable Terraform Module

Terraform

HCL

+2 More

When programming with Terraform, I often find myself writing the same code again and again. In order to maintain the DRY principal in Terraform configuration, modules are used to encapsulate logic and design a layer of abstraction for infrastructure code. This article explains how I created Terraform modules that are reused throughout my AWS Infrastructure as Code.

DRY Principal

DRY stands for "Do not Repeat Yourself." It's the design philosophy that similar code shouldn't exist in multiple locations. Instead, repeated code segments should be combined into a single component or function.