All posts

Go Basics #6 Structs and Methods
7 min read

Go Basics #6 Structs and Methods

Defining user types with struct and attaching methods, value vs pointer receivers, and the embedding pattern.

Go Basics #5 Collections — array, slice, map
7 min read

Go Basics #5 Collections — array, slice, map

Go's three collections — fixed-length array, growable slice, key-value map. How they work and the gotchas you'll meet.

Go Basics #4 Functions, Multiple Return, error Type
7 min read

Go Basics #4 Functions, Multiple Return, error Type

The various forms of function definition, Go's signature multiple-return pattern, and the error type with the if err != nil idiom you'll meet most.

Go Basics #3 Control Flow — if, for, switch
3 min read

Go Basics #3 Control Flow — if, for, switch

Branching and looping in Go — if with short statements, for as the only loop, switch with no implicit fallthrough.

Go Basics #2 Variables, Types, Constants
3 min read

Go Basics #2 Variables, Types, Constants

Go's basic types, two ways to declare variables, and the const and iota patterns.

Go Basics #1 Getting Started and Your First Program
6 min read

Go Basics #1 Getting Started and Your First Program

Why Go, setting it up, and compiling and running your first program — the starting line of the Go track.

Go GORM 1:N (One To Many) relationship modeling and queries
4 min read

Go GORM 1:N (One To Many) relationship modeling and queries

In this post we'll cover how to model a one-to-many relationship and how to query it using GORM.

How to use innerHTML and DomSanitizer in Angular templates
2 min read

How to use innerHTML and DomSanitizer in Angular templates

Content edited with plugins such as tinymce is stored in the database as HTML. This post explains how to render that HTML safely back into an Angular template.

Linux hardware clock time sync
2 min read

Linux hardware clock time sync

When operating a Linux system, you sometimes need to manually sync the clock because the hardware clock and the OS clock are out of sync. In that case, first check the sync state with the `timedatectl` command.

Python — OOP Part 6: Magic Methods
4 min read

Python — OOP Part 6: Magic Methods

Today we'll look at magic methods — things we use all the time but don't always have a clear concept of, and sometimes don't even realize we're using.

Python — OOP Part 5: Inheritance and Subclass
12 min read

Python — OOP Part 5: Inheritance and Subclass

In this lesson we cover class inheritance and subclasses.

Python — OOP Part 4: Class Method and Static Method
7 min read

Python — OOP Part 4: Class Method and Static Method

An instance method takes the instance (self) as its first argument and creates, modifies, or references data scoped to a single instance — like an instance variable. A class method takes the class (cls) as its first argument and creates, modifies, or references data shared across all instances — like a class variable.