northwind-frostpunk

a tutorial exploring golang, the northwind database, and the post apocalypse

This tutorial is geared towards Mac users.

Day 1 Overview

  1. setup and connect to postgres
  2. learn a bit of golang
  3. connect golang to postgres
  4. explore the database and learn about CTEs
  5. play with the data & time inspired by Frostpunk!

PostgreSQL

northwind_psql is a github repo that sets up Postgres with a docker container.

In addition to its readme, I would add that the following setup:

Connection

host: localhost
username: postgres 
password: postgres 
dname: northwind 
port: 55432 

Initialy, I found it challenging to connect to the database running in its docker and this is connection details that I ended up using by trial and error.

Golang

I followed this golang getting-started tutorial as a refresher since I hadn’t touched golang in several months.

Next, after I was to output some pithy text and learned the go mod tidy command, I tackled this go and postgres tutorial.

As I already wrestled the postgres setup, the code provided in the tutorial worked right away. Now, I wanted to import my own function into my main project so I could log a pithy quote. I reviewed the go mod tutorial and converted my original hello.go script into a function that I could import.

— Sept 21/2022 —

Day 1 took me about 4 hours in 2 sessions

As I accomplished the first 3 steps in my plan, I think I’ll needed a couple more hours to put the finishing touches on this guided tutorial. I still need to:

  1. explore the database and learn about CTEs
  2. play with the data & time inspired by [Frostpunk](https://en.wikipedia.org/wiki/

Anyways, I’m happy with this progress

as the hours pass…

Day 2 Survive the night!

coming soon

GitHub

View Github