7 Main Mistakes I Made While Learning to Code

Written by srba87 | Published 2020/06/18
Tech Story Tags: startup | self-taught-developer | mistakes | programming | software-engineering | learning-to-code | online-learning | microverse

TLDR It has been two months since I started my transition to a more tech-related career. I thought that in 3 months I would have enough knowledge to build a digital product. Learning to code is a lifetime commitment; it never stops. So far, I’ve made 7 big mistakes. You can read over these mistakes so you can avoid them in your own journey to learn to code. You can also learn how to use tools that will check out specific style rules throughout your code.via the TL;DR App

So it has been two months since I started my transition to a more tech-related career. I thought that in 3 months I would have enough knowledge to actually build a digital product. I couldn’t be more wrong. My main lesson learned is: learning to code is a lifetime commitment; it never stops.
So far, I’ve made 7 big mistakes. You can read over these mistakes so you can avoid them in your own journey.
1. Not being patient with myself.
What happened?
So I wanted to start learning right away and move forward as fast as possible. I started working on a Bootcamp on Udemy and a Web Development course on Codecademy. I was too eager and never took the time to reflect on the concepts I was learning because I wanted to finish the courses ASAP. I thought speed meant I was doing well.
What was wrong?
Speed is not the metric if you’re not retaining concepts. As I moved to a personal project, I realized I didn’t remember how to write HTML or CSS code properly. As hard as I tried to cram new concepts into my brain, my brain was not retaining the core concepts I had learned before. Instead, it learned a few things I needed to complete tasks. Concepts were not stored in my long-term memory.
What did I learn?
My brain is a brilliant machine that adapts to the information I feed it. Thus, if I want it to learn and understand the concepts I must take my time and think about the long term. It’s not a matter of hours or days, it’s a matter of decades. Thinking about the long term enables me to be more patient with myself.

2. My attention to detail was bad, very bad.

What happened?
I have had a couple of bugs because of typos inside my code.
What was wrong?
As people commonly say, the devil’s in the details. I was not paying any attention to detail, so I kept writing typos and bugs kept creeping up. I lost a lot of time because of this. I kept scrolling up and down through my code trying to find out what was wrong, only to find it was a simple typo.
What did I learn?
Well, it turns out that I can use automated tools that will check out specific style rules throughout your code. I used stylelints and Stickler CI connected to my GitHub account. So each time you make a pull request, it will automatically run tests and let you know if there are any problems. This helped me keep things organized each time I worked on a new feature or each time I finished a piece of code. Also, it made my code look professional and more organized.

3. I want to work with the newest developer tools and languages.

What happened?
I started reading a lot about CSS frameworks and Bootstrap popped up everywhere. Yet, I kept reading about how there are much cooler and newer frameworks. However, Bootstrap is part of the Microverse program because of its popularity, so, I had to learn it.
What was wrong?
I was arrogant enough to disregard Bootstrap because it was not cool enough for me. So, as I started working on a project in which I needed to use Bootstrap, I didn’t take the time to understand the framework.
What did I learn?
Bootstrap can be helpful, especially for managing responsive layouts in a very quick and easy way. I actually stopped and read the documentation and took notes on the type of classes I could use. As I kept learning more about the framework, I actually refactored my CSS code with Bootstrap. Even better, my code was much leaner. I understood how this works and now it has become easier for me to learn new frameworks. It was good to start with Bootstrap because of its popularity. There is educational content available online.

4. Let the command line scare me

What happened?
Let’s face it, the command line is scary. It is full of words that are hard to pronounce and it feels like you’re talking to the soul of your operating system. You feel that you are going to break things or get hacked at any moment. When pushing my content all the way to my Github repository I was using an SSH key and starting to learn git-flow. Everything looked scary and many of the commands I was writing didn’t make any sense to me. So I changed to a friendlier UI. It is nicer, simpler and you don’t have to deal with the command line.
What was wrong?
If you want to learn something, you must dive into its core concepts. Make an effort to understand how it works even if you feel stupid 99% of the time. Why? Because when you use tools without understanding what is happening, you are just learning to use the tool, but not learning the core concept behind it.
What did I learn?
I’ve purposely used the command line much more for the last projects. It still frightens me but I’ve tried to use it more often. I guess I don’t like feeling stupid. Through practice, I have better understood what is going under the hood. I will conquer this fear in the future.
5. Writing CSS for every HTML line of code
What happened?
CSS was not easy for me to understand. The specificity rule and the way components are displayed on the screen are not very simple. You have different rules that work for different HTML elements. This can be very confusing especially at the beginning when you’re trying to learn HTML elements.
What was wrong?
I wanted to use every specific rule, so I used “id” instead of “class” for my HTML elements. This meant I had repeated id names (which is not allowed) and my CSS code files were extremely large because I repeated rules over and over again.
What did I learn?
If you’re copy-pasting your code, you’re doing it completely wrong. Good developers write clean and lean code that is simple, elegant, and easily readable by others. Thus, when you copy-paste you’re going against these main principles.
Enter DRY CSS, as in Don’t Repeat Yourself CSS. Loved it. I started implementing this to my CSS files while finding ways to make it leaner by searching for similar rules. The result was a more structured, shorter, and more organized file that I can share with others. Moreover, others can understand it fast enough.

6. I let my ego drive my learning experience

What happened?
In my head, I started having constant conversations about if what I’m doing is going to be good enough. My ego started demanding I become the best developer in the world. If I did not achieve perfection, then it certainly means I’m not good enough.
What was wrong?
My ego kept demanding that I make absolutely no mistakes and that everything should be perfect. Thus, it took the fun out of coding. This happens often when I get code reviews and feedback from my work. I felt bad. It hurt.
What did I learn?
My ego can suck it. Leaving my ego at the door every time I enter my office can be useful. I would rather approach learning with a childish curiosity. Enjoy the opportunity to learn something new without judgment. After all, I’m blessed to have this opportunity to learn to code, it is amazing.
So there it is. 7 mistakes. 7 lessons-learned. Learning is a unique experience that changes from person to person. As I said at the beginning this is a long term commitment. Each day that goes by, I learn how to be more patient with myself and understand the concepts I’m learning. If I feel stupid or stuck I reach out to my childish curiosity and remember myself to enjoy the ride. After all, learning is a good purpose to live by.
Until next time, stay happy, stay safe.
(On April 2020, I started a personal journey to learn to code. This post is part of that journey)

Published by HackerNoon on 2020/06/18