Before going into specific application logging techniques I want to stress most (if not all) of them can cause some trade-off. Never forget that for everything in software "It Depends". Adding a logging library or technique requires others to get familiar with it. The log package from Go standard library may be good enough. I … Continue reading Logging #2: It Depends
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 v1.0.0
After a week I have released logrusutil v1.0.0. What took me at least 80% of the time? Writing GoDocs, example application and readme files.Setting up continuous integration with GitHub Actions and GolangCI.Testing the library consumption via Go Modules, go get and dep.
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
“It Depends” and Trade-offs
Most programmers know principles and rules like SOLID, YAGNI, KISS, DRY. However we should always keep in mind that we should consider that "It Depends" almost everywhere. In software development there is no silver bullet and each pattern, practice and tool come with some trade-off. Below I am going to try to give some examples … Continue reading “It Depends” and Trade-offs
Importance of justification
What should be included in a requirement, user story, issue, bug etc? Obviously things like acceptance criteria, priority, cost estimation (e.g. in story points), mock-ups. However from my perspective justification is the most important element. Why do we need anything? What is the problem? What is the context? What would be the benefits for the … Continue reading Importance of justification
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