Learning as a senior developer

"Things I already know eventually bore me, and things I don't know stress me out. It feels like the line between the two gets thinner with each year." Dan Abramov

Learning is stressful

Everyone keeps saying that you should learn a new programming language every year.

But how exactly do you learn a language? When can you say that you have learned a language? I remember that when I learned my first languages, I was excited about everything. Usually, I just practiced the syntax, the keywords, the OOP features. And it would make me happy about myself.

Years later, I know that besides syntax, keywords, operators, and OOP / FP features, "knowing a language" includes:

  • 1-2 popular frameworks and libraries;
  • package managers;
  • adjacent technologies and tools;
  • building and deploying what you have written;
  • writing tests and knowing test frameworks.

Learning a new language is more frustrating when you already have programming experience. You realize just how much you don't know yet. In your primary language, you are fluent and quick, you are so used to comfy old shoes. With the new language, every other line of code requires searching or reading documentation. It is just the sheer amount of things to learn that is overwhelming. Every gained piece of information seems like a grain of sand in the desert of knowledge.

Mixing in some familiar things

How to make the learning process less stressful for a tired senior developer? The idea is to use current skills as much as possible. That way, I can intake the new knowledge in small portions while still getting some noticeable progress.

I want to learn Go, so I reuse:

  • Deploying with a docker container;
  • Designing a REST API in OpenAPI format. Firstly, it is nice to have a layer of abstraction between the frontend and the backend code. Secondly, the echo framework has a code generator oapi-codegen - I can read the generated code and learn from it.
  • Using PostgreSQL as the database - I am familiar SQL databases, PostgreSQL is a popular choice, and there is a also popular ORM library gorm;
  • Using something familiar for the frontend, like Vue.

Where I started

These decisions already simplified my life - I don't need to choose frameworks, I know that I'll use echo and gorm.

Instead of reading golang documentation, I started with echo's "Hello world" deployed in a docker container. It immediately gave me the feeling of something real that I do.

The next step was designing a simple REST API in the OpenAPI editor, with just one type of resource and basic CRUD operations. First, I generated and ran the classic PetStore example from OpenAPI and then replaced it with my own.

Finally, after making it work, I added the basic code for PostgreSQL connection with gorm and tried writing and reading from the database.

I wrote very little code yet, I even didn't write any loops or switches. I have a very vague understanding of Go so far. But I have a server with an API that can write and read the DB. I can also deploy it in the docker container. How much of the language did I learn? How well do I know the language now?

Photo by Tim De Pauw on Unsplash

29