3 things I would tell the me from the past to expand my coding brain
Published: 2020-10-15 11:34:16

Like many people on this platform, I am a self-taught developer. I do not have a degree in computer science, nor any kind of formal technical education. When I wrote my first line of C#, I had no preconceptions about computation and programming. "How computer know what do? Why is function? What interface?" were the questions I had back then, when my coding brain was small and smooth.

However, once I got over this initial hurdle of learning a programming language, I was still a long way away from understanding the disciplines and routines that developers use to write better code. My brain has gotten wrinklier, but it was still way to small. I wanted to learn good practices, I just did not know where to start.

In case time travel ever becomes commercially available, I am writing this article for my past self, so that he may expand his brain.

## PLEASE start using Git already?

If there is only one thing that I could tell the smooth-brained me from the past, it would be this: make a GitHub account and start committing your code NOW.

A big part of progressing as a developer is building on the solutions you already wrote - so keeping even your earliest projects on GitHub is a smart move. Storing your projects on your hard drive is no good, you can and _will_ lose some of this data. A well-maintained GitHub account is also something that will make your life easier once you decide to look for a job in tech.

> Me from the past: But I don't intend to make programming my job...

Correction - you don't intend to make programming your job _yet_! Besides, there are other reasons to learn version control: it helps you understand development routines and keep a better discipline when working on a project.

> M.f.t.p.: Learning Git console seems like a drag though...

Suck it up - there's only a couple of commands that you need to learn to start using Git. And if you _really_ don't want to do that yet, use [GitHub Desktop](https://desktop.github.com/). But make sure to learn console as soon as possible.

> M.f.t.p.: Does it even make sense to use version control if I'm working alone?

Yes, it does. It gives you peace of mind when you make changes to your code, since previous versions of your program are saved to Git, and you can always come back to them. But, if this is not enough motivation for you, maybe you should...

## Try teaming up with other people

One thing that I wish I started doing earlier was teaming up with other devs. Teaming up with others not only makes development more fun, but is also a great way to boost your learning speed.

> M.f.t.p: But I don't have friends who code in the same language as me?

Added bonus - you can learn a new language! Go outside your comfort zone, try new design patterns and new technologies. If you get stuck, your friend/ coding partner/ someone on your team will be able to help you.

> M.f.t.p: I don't think I'm good enough to work with others yet.

And when exactly will you be? You don't need certification to start working with and learning from other devs. If you don't feel ready now, avoiding teamwork will not make you feel any more ready in the future.

It's teaming up with other people that will force you to improve the quality of your code. You will need to agree with your teammates on common practices that will make your teamwork easier. You'll need to stick to certain naming conventions, make sure your code is readable to others, that it's refactored and has useful comments. And if your teammates are quality-oriented, they might suggest other good practices such as to...

## Start testing your code

> M.f.t.p: But I always test my code? I run the program and...

...run the program and see if something breaks? Yeah, yeah. Listen, that's cute - but I mean a different kind of testing. What you are referring to is known as _manual_ testing. It means that somebody has to manually build and start the app, and then check if any errors or bugs occur while the code is executed. What I was referring to, though, is _automated_ testing.

Automated testing means quite simply writing code that will automatically test your application or some segment of it when executed.

> M.f.t.p: So, you write code to test your code?

I don't need your snark. And yes, that's what you do. It makes sense in the long run.

You see during the course of development, you are more than likely to come back and modify/ refactor certain parts of your code several times. Each time you do that, you risk that something in your application will break. This means that sometimes you will have to manually test and fix a certain bug multiple times, which is known as _regression_. If you write an automated test for this piece of code, each time you modify it you can just run the relevant _test suite_ and it will tell you whether the code is still working as you intended or not. Cool, right?

> M.f.t.p: But I thought automated tests are written by testers?

Yes and no. Yeah, some teams have testers who handle automated tests. But that doesn't mean you should think about testing the code as "someone else's job". If you get into testing, you'll see various ways in which automated tests improve the quality of code you're writing. If you don't believe me, here's a link to a great video that explains the [benefits of testing your code](https://www.youtube.com/watch?v=1Lfv5tUGsn8). You will have to wait until 2017 when they upload it, though.

Also one last piece of advice - please start exercising and taking care of your back now? You'll need it to support your _massive galaxy brain_ after it absorbs all the new coding knowledge.