An Intro to Docker Compose

What is Docker Compose?

Docker Compose is a tool that allows you to configure, build and run multiple containers. It's incredibly useful for building and deploying apps that use multiple services, each with their own container.

For example, let's say you have an app that uses 3 services:
- site: An ecommerce site that lets users browse and shop for items.
- database: A database that stores user, product, and order information.
- notifier: A script that monitors your database and sends email notifications to users when their orders have shipped.

Your app directory structure would look like this:

├── database
│   └── Dockerfile
│   └── ...
├── notifier
│   └── Dockerfile
│   └── ...
└── site
    └── Dockerfile
    └── ...

Normally, you'd have to start 3 containers yourself, either by running docker run for each image or by writing a custom script to launch them all. But with Docker Compose, you can launch all 3 containers with a single file AND configure them to

An Intro to Flask

In my last post, I presented a high level overview of what a web application is. In this post, we'll take a look at how how you can use Flask (a python based app framework) to build applications by breaking down a series of examples, culminating with the app from this official flask tutorial. I won't dive deeply into the code for that example here, as the tutorial above already does that. Instead, I will build up to it with two of my own examples, and provide a visual representation of it.

NOTE: I highly recommend the tutorial if you want a deeper dive into Flask.

What is Flask?

Flask is a Python based micro-framework for building web applications. It's "micro" simply because it's minimalist, meaning it has fewer built-in features than other frameworks.

How is an app constructed using Flask?

Consider a basic app - one that has a

An Intro to Web Apps

A quick note: this post is designed for true beginners - those who have little to no knowledge of software and web development. That disclaimer aside - let's dive in!

What is a Web Application?

A Web Application is a software application that is accessed and used via the internet, typically via a web browser. However, before we dive into what a Web Application is, we must first answer two prerequisite questions:

How does the Internet Work?

The internet is simply a network of computers that can communicate with each other. Computers communicate over the internet via the "Client-Server Model", in which a one computer (the "client") asks another computer (the "server") for some data via a request. The server then replies to this request with a response.

The specifics behind how internet communications work and are structured are vast and complex, and I won't dive into them here. For

An Intro to Ignorance

Have you ever heard of the Dunning-Kruger effect? It's a well-known phenomenon in Psychology in which individuals with limited experience or knowledge in a domain overestimate their level of expertise. It is often visualized as a curve:

Dunning-Kruger Curve

In other words: as you learn more about a domain, the more you realize how little you actually know about it.

I write about this effect because I've realized that I am a victim of it. A friend recently approached me and asked for help building a web application. As I've helped build and deploy production level apps, I confidently agreed and set about writing a tech spec and architecting a solution. However, my engineering knowledge is largely self-taught and piecemeal, and the more I've worked on his app the more I've realized the gaps in my understanding.

Thus, I find myself on the left end of the curve above. Which, as a

An Introduction to Docker

I've been learning about Docker for use in my personal and professional projects. Though I've used it before, I've always had a vague understanding of what's actually going on behind the scenes. And so I decided to go back to the basics and build a better high-level understanding before diving into the weeds. Let's dive in:

What is Docker?

Docker is a tool for creating and running containers.

What is a container?

A container is a unit of software that packages up code and all its dependencies (code, system tools, system libraries and settings). When a container is running, you can consider it to be an isolated environment (separate from your local machine, or host) in which your code can run.

A container is similar to a virtual machine, but instead of requiring a separate operating system and a hypervisor program to divy up the host's resources between the host