ektologo

How we like our DX

by [Fran]

# Intro

Although we are flexible because we are acostumed to a diversity of clients, we have our preferences regarding developer experience (DX, if you tolerate buzzwords).

In this article I will try to make our guiding principles explicit, to provoke discussion and evolution.

I will be writing about what we do as a team, but keep in mind it will be my personal interpretation.

## Preliminars

# Principles

## Single source of truth

## Context

Nothing is 100% defined without its context but, sadly, by its own nature, its impossible to fully capture it.

The more explicit we are with the requirements, the better.

We can agree in the need to be explicit about which compiler we require and also in the absurdity of being explicit about how many calories the developer will need to expend building the project.

## Instructions as "living" code

If instructions are code, they can be tested. - You can write them down in a README, but they will eventually go out of sync with the code. - If instead you put them in a script and provide an example context in which to run it, developers can always test. - This also helps to maintain Environment Parity.

## Environment parity

Automated builds, tests and deploys must differ the least possible from the ones the developers run in their local environments. - Example: complex .gitlab-ci.yml are difficult to run locally. The more you factor out, the more you can reuse.

## Tooling boostraping

# The repository

This is the thing we craft. We must be conscious and explicit about what's the intended purpose and target audiences of the repo.

In version-controlled repos, many "versions" of the code exists at the same time while developers naturally fork and diverge temporally until they convene to merge again. - Everything that "happens", does it in an implicit version. - We should be as careful as possible with the mixture: - a branch may contain new code for building the project that is not compatible with the main code. - developers may have caches, dirty states, etc.

## Typical purposes

## Typical audiences

# Dependencies

There are at least 3 sets that usually differ:

We should be careful of not mixing them unnecessarily.

# OS Containers

Beside their usefulness to create a reproducible uniform local environment for all developers, containers are also useful for code-documenting build, test and deploy instructions and automatically execute them in cloud unmaned environments.

Always remember that they add complexity, so a "native run" will be preferable.

We are currently experimenting with Nix and we should investigate Landlock Make.

# Testing

## Unitary

## Integration