Logging #1: Demo Application

This is the first installment of the blog post series describing application logging. The posts are going to be short. I use Go, but most of the concepts is should be language agnostic. I will try to list good supplemental references. First, I want to present a demo application go-structured-logging-demo, which I will use to … Continue reading Logging #1: Demo Application

Logrusutil = Contextual Logging + Error Fields for Logrus

In past two days I have created logrusutil which is a small utility library for logrus. Currently it contains two packages. I encourage to look at the GoDoc examples: logctxerrfield Feedback highly appreciated. You can write a comment here, create an issue on GitHub, write to me on LinkedIn/Facebook or even send an email. In … Continue reading Logrusutil = Contextual Logging + Error Fields for Logrus

Parsing Configuration

Most of the software needs some kind of configuration, which is dynamically loaded during runtime. Application Configuration For applications, usually the best place where to parse the application configuration is Composition Root, preferably close to the program entry. package main import ( "log" "github.com/caarlos0/env/v6" ) func main() { var cfg struct { URL string `env:"URL,required"` … Continue reading Parsing Configuration

Git snippet: Cleaning and migrating a repo

Below is a snippet which I used when I was migrating some legacy code to GitHub. SRC_URL= DEST_URL= FOLDER_NAME= # deep clone (mirror) git clone --mirror $SRC_URL $FOLDER_NAME # backup tar cvzf ${FOLDER_NAME}.tar.gz $FOLDER_NAME # see if there are any big or unnecessary files in whole repoe history cd $FOLDER_NAME git rev-list --all | xargs … Continue reading Git snippet: Cleaning and migrating a repo

Conducting a recruitment interview

So far I have been interviewing dozens (~30?) of programmers and occasionally testers. Below I am going to present some practices that according to my colleagues and interviewees are very good. Disclaimer: I am working in a rather big software development company. We have a lot of clients and products. Therefore maintainability of the software … Continue reading Conducting a recruitment interview

Do not believe any documentation

TL;DR; Do not believe any documentation. It might be incorrect or you may not understand it. Test everything. MSDN lies A few months ago I was writing some code in C# to get executable paths for all running processes. Generally, I tried the most common approach using BCL: string executablePath = process.MainModule.FileName; However, for some … Continue reading Do not believe any documentation