Colors coming at your in lines like warp speed in space, source Unsplash

Updating documentation as an exercise in gaining new insights while giving new developers warp ๐Ÿš€ speed from day one

We had the joyous occasion of having a new developer join VIBBIO this week ๐ŸŽ‰๐Ÿ”ฅ
Some people choose to see this as something that “slows the team down” short term as someone needs to point the new developer in the right direction to get the development environment up and running. When viewing this as a distraction and a loss of productivity you are missing out on a great learning opportunity of seeing your codebase from a different perspective than what you normally have. If you treat it as an opportunity for learning you will learn more about your own code and you will help those reading the documentation for the first time. Wins all around ๐Ÿ’ฏ๐Ÿ’ช๐Ÿผ

One year, one goal

The past year we have been working on making our platform more robust and less complex (there might be a separate blog post about this later) in terms of infrastructure. In short we have transformed a micro service architecture into a monolithic one. A side effect of doing this was that we simplified the developer experience quite a bit (not saying this will always be the case whenever you do this, only that it was in this case). Having a new person join our team was the perfect opportunity to see if we were heading in the right direction ๐Ÿ”ฎ.

Three key points to succeed in creating a good first experience for your developers

In order to make it easy for new developers to join your team there are three things which make all the difference.

Location – where is the documentation stored?
Structure – how is the documentation structured?
Automation – how is the process of setting up required software?

๐Ÿก Location, location, location ๐Ÿ–

a beach with clear blue water and a sunset
https://unsplash.com/photos/KMn4VEeEPR8

Real estate brokers will tell you “it is all about the location”, the same thing goes for documentation. If all your documentation reside in some wiki or are scattered randomly around in a folders structure you have given people coming in a rough start. You have also set yourself up for having a lot of outdated documentation.

Developer documentation should reside next to the code of a module. In many cases these days this would mean a Readme.md file residing in your source control repository of choice. When doing this you will have:

Increased the chances of the documentation being updated if some major part of the module changes.

Increased the likelihood of someone finding the documentation.

There are cases when you should / need to split up the documentation into more pieces. Let’s say it is a module which requires some software to already be installed or similar, then you can create a /docs folder and put the documentation in there. It is essential to make sure this documentation is also linked up from the Readme.md, otherwise it will be an orphaned document that is not read nor updated by anyone.

“A good bone structure will get you far” said my dad ๐Ÿฆด

The developer documentation should have a structure which is common across modules (at least it should be similar for somewhat similar modules). This makes it easier for old and new developers to find the content they are looking for and makes for a predictable experience.
This also comes with the great side-benefit of not having to re-invent the wheel every time you add a module. You adopt a habit of creating great documentation with little effort.

Introduction
A short description of the intention of the module

Getting started
A step by step instruction on how to get started with contributing to the module. This should include any prerequisites that the module depends on (like a database, message queue, cloud account setup or whatever).

Deployment
How do you get your contributions out, or in short how to get ๐Ÿ’ฉ ๐Ÿšข into production.

Other stuff
This is whatever other information which might be useful. It could be troubleshooting documentation, additional information about monitoring or similar. This section will vary greatly depending on what type of module it is.

The goal should be that a new developer can read the documentation from top to bottom and is able to ship the module to wherever its destination may be ๐Ÿ’ช๐Ÿผ.

Boring stuff gets sent to the boring robots ๐Ÿค–

An old looking mechanical robot looking at you
https://unsplash.com/photos/R4WCbazrD1g

The VIBBIO platform consists of modules written in Javascript running on Node JS or in the browser. Therefore a goal for all our modules is that there should never be more than three commands to get thing setup and running.

git clone <some repository>
npm install
npm start

Regardless of complexity of the module, these three commands should be all it takes to have a module installed and get it running (if the module is a daemon type module or if it is a code library it would be only require the first two commands).
โš ๏ธ There could be some prerequisites for some modules, like installation of a database of similar. That is somethings not worth automating and would be required in addition to the steps above. โš ๏ธ

Automate all the things (that make sense)

When joining a new company and contributing to a new code base it is always a bit intimidating to ship your first contribution. In order to make this experience better, it is important to automate as many aspects of this process as possible.

Our previous developer experience relied heavily on bot commands, which is a kind of automation. But we have taken this a step further and ensured that deployments to all environments other than production are fully automated. Fully automating it means there is no room for human error and it reduces the fear of messing something up.

Currently we have one human step, because we choose to, in order to get code into production. It is a command which promotes the Docker image in staging to production.

If your documentation smells like ๐Ÿ’ฉ, then I am sure your some of your code does too

Red sign in the night which says "free smells"
https://unsplash.com/photos/oFWjD41CLxs

There are people who view writing, reviewing and updating documentation as something which is not important and does not effect the overall health of a computer system. I would strongly disagree with this view point and I would even go as far as to say that if your documentation smells then there is an increased chance of your code and architecture having the same smell.

How are we currently doing with on-boardingโ“

When Eva joined us, she was able to have our user facing application up and running without anyone’s help in no time. She had her first production deployment the next day ๐Ÿ”ฅ๐Ÿ’ช๐Ÿผ.
This was without having the backend setup, as we decided we’d spare her the pains of setting up a Java development environment. All of our Java code will soon be gone ๐ŸŽ‰, therefore getting started with the platform development will be similar to the experience of getting started with the user facing application.

There are still some manual steps when it comes to setting up the backend services, like databases etc. However we are down to that being merely installations and not procedures requiring installation, running scripts, etc.

๐Ÿ‘€A change of perspective gives you improved insights๐Ÿ’ก

Having gone through our old documentation and removing and updating it was also an eye opener in how far we have come and how close we are to reaching the goals we set for ourselves almost one year ago.
Seeing how we have simplified and automated some things we were complaining about way back when is a good feeling. It also gives the us an improved sense of accomplishment for having gotten so much done behind the scenes while continuing to ship customer value regularly ๐Ÿ’ช๐Ÿผ.

Originally posted on the VIBBIO Developer blog.