About Monorepositories

It would seems a new fashion has come to the world of software engineering, which anyone is expected to have an oppion about. The so called mono-repo talk.

As with so many other cases there seems to be multiple definitions flying around and not asserted definition of when you have a mono-repo, but let me try to share some thoughts.

  • A repository is a place, where sourcecode (and potentially other stuff) is associated with software development is stored.
  • A mono-repository is when all the sourcecode produced in a company is manged in a single repository.
  • A Single-server respository (strategy) os whenn all sourcecode is manged in a single (git) server, but every project has its own repository.

On the multi (git)server, multi repository setup…

I don’t like it.

Git for other stuff

Git is often refered to as a source control tool. It’s useful both for teams working on a shared source code as well as individuals how wants a log of the changes in their sourcecode over time. While sourcecode handling is the most common use case, Git itself isn’t per say limited to just managing sourcecode and using Git repositories for non-sourcecode may also have value in your daily work. This post is a small apetizer of some of the cases I’ve been using Git for non-sourcecode.

Emphemeral and immutable

When storing data, most data have a lifecycle - it created, managed and eventually deleted through operation of the application or script that use it. There are however to kinds of data storage which is slightly different, which developers should know about as they may be nice patterns to know and use when applicable.

Emphemeral data

The first data storage is emphemeral data. This kind of data will eventually automatically be deleted. In most cases the data is stored shortly - an hour, a day or a week - but there isn’t any fixed rule which define when the data disappear - just that it does by itself without any explicit cleanup or pruning from the developer (or user).

Best of breed or best of suite

In (domain or enterprise software) architecture, there are to generic patterns you’ll likely come across often, yet many developers does not seem to be familiar with them and knowing a bit about them may help understand why some choices are made when building a complete software stack across a company or enterprise.

These are:

  • Best of suite
  • Best of Breed.

When adopting the “best of suite” strategy, the Enterprise Architecture will seek to find big software suites, which can over a large domains. One of the most often picked suites is often Microsoft OFfice, where Word, Excel, Powerpoint and the other applications included in Microsoft office comes a single package - a suite.

Advent of code 2021

I’ve once again had fun with Advent of code. I’m still using it as a motivation to learn and be better at programming Go(lang).

Here are some observations from the challenge rund this year:

  • The hardest challenges was more often in understanding the task and make sure all rules was understood correctly.
  • Despite Go (1.17) being a small language, it has all needed to solve any of the challenges.
  • While I may not write Idiomatic Go - I do write readable code - even for people who don’t know Golang.
  • Imposing a self-imposed rule of “not imports” (beyond standard library) makes it harder to solve, but I learn more.

I’ve uploaded most of the solutions to Github, but still needed to clean and rewrite the code from the last days before they are “shareable” :-)

Sharing photos

I’m not usually playing too much around on Windows apart from using office and teams - and other software bound to windows which company work require. A small event on an ongoing project however did require some small exploration into Windows and what could be done to solve a simple task.

  • We had an all-day event, where multiple photos were taken on mobile phones througout the day.
  • I needed to collect the photos, sort them and share them.

I realize that Google Photos, Flickr and multiple other solutions may work for such an occation, but we really didn’t want to share the photos outside the company and nor force anyone to create an account anywhere - neither to see the photos nor to contribute with their own.

Looping thorugh the Alphabet in GoLang

In a recent Go programming task I needed to loop through the letters from a to z. I also needed the capital letter from A to Z. For-looping thorugh the letters in Go is luckily a breeze.

The easiest way is just using a Rune. A Rune is an int32 which represent a unicode character. As a rune (the variable r below) is a Unicode character, it allows me to use the ToUpper() from the unicode package to find the Uppercase version of the letter.

Github activity fail

Github is quite a fantastic service for source code management and hosts a suite of wonderful tools which can help you manage the development, tracking issues and much more.

One of the fun things is the github activity dashboard located on your personal frontpage which shows how much you’ve done.

I’m sure it’s mostly a fun thing and it allows you to sort of get an idea of it the account is dead or alive. Some seem to have pride in having a green carpet showing long periods of continuous activity.

Let's Encrypt and IPv6

I’m using Let’s Encrypt as Certificate Authority on this and many other sites. I like it, as it allows me to automate certificate creation and renewals, however I also have some monitoring making sure everything works as expected.

I recently got a few alerts as some certificates weren’t renewed as expected. I figured nothing had changed on the server setup and there was renewal happening for a few days, I started looking into it and found the issue why the renewal was failing, so here’s the story.

Cronjob: Basics and reboot

One of Linux five star things is the cronjobs. They allow you to automatically run stuf (scripts, applications, etc.) at quite specific times.

The crontab is the place controlling when the stuff is run and you can list the crontab using the commaand crontab -l for the current user.

If you want to edit the crontab, just use the command crontab -e and it launches the crontab in the default editor (set EDITOR env variable to change the editor used). The format is basically like this: