DEV Community

Cover image for We Write Code and We Don't Judge
KingsDevMedia
KingsDevMedia

Posted on

We Write Code and We Don't Judge

Photo by Nubelson Fernandes on Unsplash

The Past

It has been 4 years since I touched code, and when I opened VS Code after that long I felt like someone starting elementary school again. I have forgotten what extensions I have to install, even the how-to include a simple HTML boilerplate snippet (which by the way it is just three keys - SHIFT + ! then ENTER).

Back then I was learning Front-end development and had started with JavaScript when I got discouraged by the lack of understanding what coding really meant. I felt that I was not good enough if I have to google syntax time-again and again. I would watch videos of guys stating that when learning to code one needs to be patient and that googling was part of development.

Then I would look at them code some project, and they just flowed without having the need to look at documentation, Stack Overflow nor the mighty Google. I thought to myself they are just saying that "googling was part of development" for us beginners whereas they already mastered syntax memorization. But boy was I wrong, not in what was conveyed but also how I learned.

You see in order to create an hour or more of a tutorial they have to research the subject and code it in full from start to finish. Handle any errors and fix them along the way. Document and structure what they will be talking about. When they press record, they have their notes ready and the finished project on the side as reference. These behind-the-scenes moments were something I didn't take into consideration at the time. The reality is that all developers google, irrespective of years of experience or specialization.

Yes I did follow the tutorial in my editor, but the focus was getting the same results as the instructor. If it is correct, it must match the code on screen. I didn't worry myself about what did the code did and why was it behaving that way. When I tried to create my own project, I got stuck on coming up with the how-to. I found myself googling a lot, to the point of exasperation.

So I quit. I told myself that this is not for me, it is for those who have been chosen from birth. But I had missed one crucial matter!

Why Write?

About late last year, I began to re-examine why I wanted to do coding in the first place. The fascination came about how websites were created, then I built my first HTML code, which was a wonder of a kid with big twinkling eyes. I know what you are thinking, "big deal, HTML ain't that hard." At that time I was Hyped To the Max with this Language for that's what I had known.

The one crucial point that I had neglected was 'how-I-learned-anything'. Back in school I would summarize what the teacher was saying or when reading by writing down my thoughts. This way it provided an opportunity to see what I understood and what needed more time to grasp. You see, I have a good problem of being bored easily, and writing engages my brain to be active at the moment. This also helps with longer retention of whatever the subject of interest.

So I started to apply this approach in coding. Watching video and coding along is not enough, I have to document what I am learning then code it in order for me to both understand and enjoy the process. I will be documenting the things I am learning and some projects that I am working on.

Doing this publicly will grant me an opportunity to receive feedback from you and those who are willing to lend a hand in any way they deem necessary. It is also a motivation to be accountable even if at times I might find it boring or just plain difficult.

Content Engagement

Two things, first, understanding that coding at its basic purpose is to take a human idea and turn it into a computer readable language through code. Human beings are born with the natural ability of understanding human languages by just listening. That is why a child can say "mama" or "daddy" without knowing how to write those words. But when it comes to learning code, one cannot simply learn by audio sensory. Because of that, secondly an effort has been made to convert code to human terms that are familiar to us.

What does this mean? When learning to code I try to understand what does this code mean and what will it logically do. A code will do exactly what you wrote it to do. For instance if you write a for (let i = 1; i < 5; i++) { console.log(i);} it will iterate according to the conditions given within the context of the program not according to what I think it should do.

There are three major formats of learning to code, namely: Videos, Webpages (these include interactive sites and documentation of the language), and books. The medium of learning might be in a classroom, such as at college or bootcamp, or being self-taught via interactive sites, YouTube or even books. Based on your preferences, circumstances and how you learn, whichever format you use remember to engage with the content. It should not be just a passive experience.

Use the hands-on approach and get your 'hands dirty' as it were. Here are some tips:

  1. What are the structural components?
    1. Think of a house, it has bricks; cement; building sand; timber; steel frames, glass and other materials as the building components. Ask yourself, what are the 'building' components commonly known as fundamentals of this language or framework that I am learning?
    2. Like building a house, you wouldn't start with building a roof before having a structure, therefore know the logical format that those fundamentals follow.
  2. Recreate the concepts:
    1. After following parts of the tutorial, recreate those concepts using different content. Do this until you finish the entire tutorial.
    2. Close the tutorial and try creating a similar project. Use only the documentation and other resources with exclusion of the tutorial.
  3. Build components:
    1. Build specific components and create different versions of them. For instance, if you were building a website, create different versions of login forms and data inputs.
  4. SAI (Ship As Is) and Iterate:
    1. Do not chain yourself to perfection by trying to have the most neat, perfect product before shipping it out. The code might be messy but functional, commit it to a public repo as it is.
    2. As you gain experience, revisit your projects and make necessary changes whether it is refactoring or optimizing for a better functionality.
  5. Teach/Mentor or Contribute:
    1. From what you know, teach someone else your perspective. This could be a video or text-based tutorial.
    2. Give a personalized mentorship to an individual or a group. You can provide structure for them to follow.
    3. Based on your level of experience, to contribute to open source projects, whether it is documentation, admin, money, or code.

Doing these things will solidify your learning and enjoy this awesome, frustrating coding journey.

As the saying goes, "there are many ways to kill a cat" (I don't know why we are killing cats), this is just one method of learning to code. Therefore, we write code and we don't judge.

Oh, by the way, welcome to KingsDevMedia musings.

Top comments (0)