Elegant code and Go

Writing elegant or readable code is a driving force for some programmers that have been around long enough to know that less code is usually better than more. We also know that less code is usually also less efficient than more, for various reasons. Depending on how you like your cat skinned, there are several ways to do things.

Read more

Things to know about HTTP in Go

Go has a very strong standard library, and one of the most used parts of it is the net/http package, which provides structures that make development of HTTP servers and clients very straightforward. There are a few edge cases, where a deeper understanding of the http and related packages is very welcome.

Read more

Parsing strings with Go

Parsing strings would arguably be one of the more basic operations that one can do in any language. Sometimes, this may mean comma separated values from an user input on a web page, it may mean parsing application arguments from os.Args, or parse some line based input like lines from an IRC chat, Slack, Discord or some other chat system for a bot.

Read more

The thing about dates

Last week I started to challenge myself with #100DaysOfCode. During the week I wrote a Twitch Bot that connects to a list of twitch channels and monitors channel followers and provides some statistics like time watched. Common enough, the follower API provides the time when the user followed the channel and in order to store it to the database with Go, I wanted first to convert it to a time.Time.

Read more