Welcome to Joe’s blog 馃憢

Joe is a dedicated full stack developer, specializing in Go, MySQL and Groovy.


FreeBSD Development GNOME VMWare

In this tutorial I will proceed to explain how to setup a full developer environment in a VMWare virtual machine. This will help you test more closely to the production environments, and will allow you to develop directly in Jails, and run databases / other services in a containerised and controlled manner, without compromising you base system. We will install a GUI on FreeBSD so you can run the IDE of your choice and have a full blown capable system....

March 28, 2021 路 3 min 路 Josep Jesus Bigorra Algaba

Go SSR Wins over JavaScript

In this day and age, server side rendering proves it is stable and more effective than the JavaScript bloat we are growing used to. Any simple page, with perhaps at most 3 KB of actual text content will download over 2 MB of JavaScript in order to simply function. Besides that fact, SPA and API situations, where you have a decoupled frontend from the backend, still do not justify the fact of using JavaScript, or even worse, any of its frameworks....

January 31, 2021 路 5 min 路 Josep Jesus Bigorra Algaba

Go Style Guide

This serves as a supplement to Effective Go, based on years of experience and inspiration/ideas from conference talks. Add context to errors Don鈥檛: file, err := os.Open("foo.txt") if err != nil { return err } Using the approach above can lead to unclear error messages because of missing context. Do: file, err := os.Open("foo.txt") if err != nil { return fmt.Errorf("open foo.txt failed: %w", err) } Wrapping errors with a custom message provides context as it gets propagated up the stack....

January 26, 2021 路 11 min 路 Josep Jesus Bigorra Algaba

Jenkins Shared Library with Unit tests

Writing a Jenkins Shared Library pipeline A good read to get started understanding about why and how we are doing this, is the Jenkins official documentation, which gives a good explanation about this, but quite incomplete when it comes an actual example implementation. I have taken most of the ideas and the article from Adrian Kuper, thank him and me for this tutorial. In this blog post I will try to explain how to setup and develop a shared pipeline library for Jenkins, that is easy to work on and can be unit tested with JUnit5 and Mockito....

January 16, 2021 路 17 min 路 Josep Jesus Bigorra Algaba

FreeBSD Jails Loopback IP

In order to keep all of the jails behind a single public IP address, you鈥檒l need to set up a loopback interface and direct the incoming and outgoing traffic of your Jails with a proper firewall like pf. Learn how to get started on an amazing setup. There are multiple ways to manage your jails, but iocage is one of the more popular ones. In terms of jail managers it鈥檚 a fairly new player in the game of jail management and is being very actively developed....

November 19, 2020 路 8 min 路 Josep Jesus Bigorra Algaba

FreeBSD Root on ZFS - Partitions

It is important to have a clean separation of concerns, both in your code, as in your machine鈥檚 setup. If you are looking for information on how to get a ZFS FreeBSD setup on one hard-drive with multiple partitions, this is what you want. This guide assumes you want to install FreeBSD and manually create the ZFS pool, to change default settings, or to not use the entire disk. If you just want to setup ZFS on the entire disk, use the 鈥榋FS鈥 option in the bsdinstall partitioning menu....

November 19, 2020 路 5 min 路 Josep Jesus Bigorra Algaba

Go File Descriptors

Ever heard of dangling pointers? Have you ever left your database connections without closing them properly? One must pay special attention to this specially when dealing with lower level languages like Go, C, and C++. Resource leaks really are a do or die in many applications, something very often and very easily overlooked. I personally have had applications catastrophically crash due to this. Read this to understand useful patterns and practices avoiding these problems in Go鈥...

November 13, 2020 路 5 min 路 Josep Jesus Bigorra Algaba

FreeBSD over Linux

While I believe some of the 鈥減olitical鈥 problems that have been going on with GNU/Linux are important and reasons to consider migrating from GNU/Linux to BSD, there also exist technical reasons to consider. Clean separation Because of the way FreeBSD has been designed, and how the different components have been put together, and how you deal with configuration and tuning, and all the tools that has been developed and improved over the cause of many years, working with FreeBSD is something special....

October 22, 2020 路 26 min 路 Josep Jesus Bigorra Algaba

Zen of Go

Something that I鈥檝e been thinking about a lot recently, when reflecting on the body of my own work, is a common subtitle, how should I write good code? Given nobody actively seeks to write bad code, this leads to the question; how do you know when you鈥檝e written good Go code? If there鈥檚 a continuum between good and bad, how to do we know what the good parts are? What are its properties, its attributes, its hallmarks, its patterns, and its idioms?...

October 4, 2020 路 4 min 路 Josep Jesus Bigorra Algaba
Go logo

Clean Go - Part I

Why Write Clean Code? This document is a reference for the Go community that aims to help developers write cleaner code. Whether you鈥檙e working on a personal project or as part of a larger team, writing clean code is an important skill to have. Establishing good paradigms and consistent, accessible standards for writing clean code can help prevent developers from wasting many meaningless hours on trying to understand their own (or others') work....

October 2, 2020 路 24 min 路 Josep Jesus Bigorra Algaba