A Visual Explanation of SQL Joins

November 15, 2018 Leave a comment

I thought Ligaya Turmelle’s post on SQL joins was a great primer for novice developers. Since SQL joins appear to be set-based, the use of Venn diagrams to explain them seems, at first blush, to be a natural fit. However, like the commenters to her post, I found that the Venn diagrams didn’t quite match the SQL join syntax reality in my testing.


Categories: Interesting

Brett Slatkin – How to Be More Effective with Functions – PyCon 2015

November 8, 2018 Leave a comment

Functions improve readability, encourage reuse, and facilitate refactoring. Python has many unique features that make functions significantly more powerful. This talk will show you the best ways to use functions in Python: when *args is helpful and when it’ll crash your programs; how to use generators for arguments and return values; the value of keyword vs. keyword-only arguments; and more!

Categories: Interesting, python

Kubernetes The Hard Way – Kelsey Hightower

November 5, 2018 Leave a comment

Kubernetes The Hard Way

This tutorial walks you through setting up Kubernetes the hard way. This guide is not for people looking for a fully automated command to bring up a Kubernetes cluster. If that’s you then check out Google Kubernetes Engine, or the Getting Started Guides.

Kubernetes The Hard Way is optimized for learning, which means taking the long route to ensure you understand each task required to bootstrap a Kubernetes cluster.

The results of this tutorial should not be viewed as production ready, and may receive limited support from the community, but don’t let that stop you from learning!


Categories: Interesting Tags:

Trying out code completion in vim

November 3, 2018 Leave a comment

Trying out code completion in vim. Installed `Youcompleteme`.

1. The version of vim on macosx that I had did not have +python3 or +conceal that was needed with some of the completion engines that were installed.

# To check if vim has the needed versions
$ vim --version
+python3 # Supported
-python3 # Not supported

2. Install macvim

$ brew install macvim

Create an alias (Save this to .bashrc or .zshrc)

alias vim='mvim -v'

3. Install cmake

$ brew install cmake

4. Download YouCompleteMe and install using Pathogen

$ cd ~.vim/bundle
$ git clone https://github.com/Valloric/YouCompleteMe.git
$ git submodule update --init --recursive
$ cd YouCompleteMe
$ ./install.py --all

5. Edit some code


Categories: vim Tags:

Hynek Schlawack – How to Write Deployment-friendly Applications – PyCon 2018

October 26, 2018 Leave a comment

Speaker: Hynek Schlawack

The DevOps movement gave us many ways to put Python applications into production. But should your *application* care? Should it need to know whether it’s running on your notebook, on a server, in a Docker container, or in some cloud platform as a service?

It should not, because environment-agnostic applications are easier to **test**, easier to **deploy**, easier to **handle**, and easier to **scale**.

But how can you *practically* structure and configure your applications to make them indifferent to the environment they run in? How do secrets fit into the picture? And where do you put that log file?

By the end of this talk you’ll know the tools and techniques that enable you to write such Python applications and you’ll be ready for the next big change.

Categories: Interesting

An Introduction to Helm, the Package Manager for Kubernetes

October 24, 2018 Leave a comment


Deploying applications to Kubernetes – the powerful and popular container-orchestration system – can be complex. Setting up a single application can involve creating multiple interdependent Kubernetes resources – such as pods, services, deployments, and replicasets – each requiring you to write a detailed YAML manifest file.

Helm is a package manager for Kubernetes that allows developers and operators to more easily package, configure, and deploy applications and services onto Kubernetes clusters.

Helm is now an official Kubernetes project and is part of the Cloud Native Computing Foundation, a non-profit that supports open source projects in and around the Kubernetes ecosystem.

In this article we will give an overview of Helm and the various abstractions it uses to simplify deploying applications to Kubernetes. If you are new to Kubernetes, it may be helpful to read An Introduction to Kubernetes first to familiarize yourself with the basics concepts.


Categories: Interesting Tags: ,

How To Back Up and Restore a Kubernetes Cluster on DigitalOcean Using Heptio Ark

October 23, 2018 Leave a comment


Heptio Ark is a convenient backup tool for Kubernetes clusters that compresses and backs up Kubernetes objects to object storage. It also takes snapshots of your cluster’s Persistent Volumes using your cloud provider’s block storage snapshot features, and can then restore your cluster’s objects and Persistent Volumes to a previous state.

StackPointCloud’s DigitalOcean Ark Plugin allows you to use DigitalOcean block storage to snapshot your Persistent Volumes, and Spaces to back up your Kubernetes objects. When running a Kubernetes cluster on DigitalOcean, this allows you to quickly back up your cluster’s state and restore it should disaster strike.

In this tutorial we’ll set up and configure the Ark client on a local machine, and deploy the Ark server into our Kubernetes cluster. We’ll then deploy a sample Nginx app that uses a Persistent Volume for logging, and simulate a disaster recovery scenario.


Categories: Interesting Tags: ,