Leo's Blog

Hi, my name is Leo. I like machines, code, books and music. This is my personal space and I write about stuff that interests me. Click here for more about me or start reading.

Why I gave up on ORMs

My day job is working on backends and that usually includes lots of SQL. Many people are familiar with the idea of an ORM library that maps runtime objects to database objects. (An ORM library is much more than that, of course, but that’s not what this is going to be about) Before coming to go, I made heavy use of ORMs in C# (namely Entity Framework). As one does, I looked for an ORM in go and found GORM, probably the most popular go ORM.

No-Bullshit Beancount Introduction

Inspired by a Hacker News thread on GnuCash, a piece of software I used extensively for my personal finances, I had a look at beancount. It’s a plaintext accounting software with a CLI and a web interface. However, the beancount docs are maintained as Google Docs and are relatively long. I thought I’d share my experience setting up a beancount file and the basic usage so that it’s easy to dive in.

Hello World

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
package main

import (
	"fmt"
)

// print Hello, world
func main() {
	fmt.Println("Hello, world")
}
← Newer Older →