Frustrations of Learning Code

In a week and a half, I will be starting the UC Davis Extension coding bootcamp to become a full-stack web developer. I have been preparing for coding bootcamp for about two months now. I have been warned that the experience is going to be intensive so I have taken calculated steps in preparing. I aim to be thoroughly versed in HTML, CSS, and basic JavaScript prior to class start. But in trying to be highly prepared, I have come across some frustrations of learning code. I will discuss them to help beginner web developers, and maybe even those who develop online tutorials and other coding resources.

Photo of Falon typing on laptop

When teaching myself HTML and CSS, the most rewarding process was building a tribute page. I challenged myself to add components that would familiarize me with many of the languages’ abilities. I did not realize what Bootstrap was until I had been working with HTML and CSS for several weeks. Previously, I thought that Bootstrap was something I was probably already using, like a limp of CSS. So I didn’t bother looking it up, and didn’t really understand what people were saying when they suggested I “learn it.”

To the experienced web developer this may seem silly, but an absolute beginner has no basis on which to gauge what is worth learning as a fundamental and what is supplementary. Bootstrap was easy to learn after I realized how powerful it is. I got excited and created a web page from scratch by following the Bootstrap Documentation. It is excellently written and going straight to the source saved me unnecessary outside commentary and confusion.

When learning JavaScript, I had a lot more trepidation with the sources I found online. One of my frustrations of learning code was that it was difficult to find practical examples that didn’t involve looping through my favorite foods or listing my all-time favorite colors. Most of the material I came across used overly playful examples that do not do justice to JavaScript. Nor did they illustrate the actual purpose of the different components of the language. For example, one of the more infuriating exercises I encountered is as follows:

Form an array with two colors in it. Create a function and title it favoriteColor. Use Math.random to choose at random a favorite color. The function should return either of the two colors in your array depending on the result of Math.random. (modified to protect the culprit)

My immediate thought was to create a simple if/else statement. Since there are only two items in the array, there is really no need to create a lengthy function. The exercise did three things:

  1. Overcomplicated a rather simple problem
  2. Did not accurately represent the purpose of functions
  3. Potentially helped learners come to the conclusion that coding is too hard

Exercises like these continue to perpetuate the idea that web development is difficult. Rather than using scenarios representative of practical function usage, some tutorials opt to use nonsensical and confusing language and problems.

Another odd exercise that I encountered in learning JavaScript came from a highly reputable series of books available on GitHub. In the problem, the author has you create a loop with a counter and decrementing balance from a bank account. He has you create a variable for your “mental spending threshold.” While mentioning the concept earlier in the chapter, I was still a bit uneasy about what he actually meant by this terminology.

Actually I was downright frustrated, having a hard enough time creating a program to calculate the other items he was requesting. So I Googled the phrase. This man is the only man who has used this exact verbiage. The author came up with an uncommon (and generally unheard of) concept for a variable that the learner was meant to interpret and understand.

The following is a recap of my general frustrations of learning code. These were encountered while researching and practicing the fundamentals of HTML, CSS, and JavaScript over the past couple months. Although, I did have some of these frustrations previously when I tried learning to code. I have included lessons that will hopefully help some people patch gaps in their learning. While there are more web development resources available than ever, there are also often details that can throw off the beginner. My aim is to make the discipline less intimidating. Anyone can learn to code with effort and time.

Frustrations of Learning Code

The following are the most frustrating aspects of learning the basics of web development that I encountered.

  1. Where do I write the code?
  2. Is this wrong or outdated?
  3. There’s an easier and more practical way!

Where do I write the code?

This should not be one of the frustrations of learning code. Yet, it inevitably is. For the seasoned web developed or designer, this seems like a stupid-simple question. I have attempted to learn web development many times of the past few years, and I was always stumped by this question. I was familiar with the interfaces used on online learning platforms (like freeCodeCamp), but knew that these were capsulated and could not be used to really build something. At one point, I asked a few web developers I knew where to write the code, and they introduced me to CodePen. But after playing around with it, I realized it was meant for smaller projects and front-end developers.

Where do I put the code? This insanely rudimentary question is being totally mishandled by online tutorials because it’s hardly ever addressed. One day, I finally stumbled on a tutorial that told me to download Sublime Text. I downloaded it immediately and felt elated at the breakthrough. Shortly after, I found another tutorial that introduced me to Chrome console (control+command+j on mac). This was another breakthrough. I have been using it frequently since to tinker with JavaScript loops. Before finding out about console, I was familiar with inspect. However, I was unaware that it was a tool used by developers to play around with breakpoints, styling, and more.

Lesson: Many online resources assume what you know, even if you are a very beginner asking where do I write the code? If you think something is wrong or missing, you may well be right. Don’t settle for the first tutorial you find, or even the fifth. Continue browsing until you find a tutorial that is walking you through all the steps you need to really understand the material.

Is this wrong or outdated?

When you spend enough time looking for good online learning resources, you come across a wide range of discrepancies. Many of these are attributable to newer versions of technologies, like Bootstrap 4 and ECMAScript 6. However, there are also many ways to write code in general. This threw me off at first. Being a writer, I am used to following grammatical and spelling parameters set out by the American English language and MLA. However, much like writing, no two coders write code in exactly the same way. Spaces, cases, and naming conventions vary among the community. So beginners are called to be especially alert to differences, and recognize that web development is not as exact as it is made out to be.

One of my big concerns was writing clean code. This is probably one of the preemptive frustrations of learning code, a sort of shield I put on to keep the bad code away. I have heard friends speak time and again about the differences between good and bad web developers. And I have heard horror stories about nightmare code, woven with dependencies, improper comments, and lacking documentation. While I have still not determined for myself what good and bad code looks like, I can at least be aware of the varying styles. In this, I can do my independent research on each new piece of information that I learn. Though this process, I encounter repeat information, which actually helps me learn. The more times I go over concepts, especially from different sources, the more familiar and less threatening code seems.

Lesson: I question each and every online resource that I use. It’s in my nature to be inquisitive and ask questions. Through my general skepticism, I am confident that I will be able to detect inefficiencies and form my own style of writing code. My suggestion for avoiding wrong and outdated information is generally being vigilant and open to new methods. I also suggest consulting direct sources. You can find a wealth of fundamental information in documentation.

There’s an easier and more practical way!

For many years, I got caught up in the “web development is hard” hype. In fact, it’s probably one of the top frustrations of learning code. This hype really helps those making money off of teaching code. If you say something is hard, you are elevating the status of what you do and hence the value of your product. But what if we just thought and believed that things are easy? Merely changing my attitude towards web development has allowed me to go a lot farther with it. If I continue the narrative in my mind that web development is easy, then I am helping myself align with the learning process. Adversely, reminding myself of how hard web development is only dissuades me from even trying.

If coding is easy, then I can learning it. If I can learn it, I can continue to improve. Removing that mental barrier was the most important part of this process for me. I suspect the same is true for others who have dabbled in code. The easier, more practical way is understanding that finding the right resources and counting on the right books and material is part of the time you spend learning to code. Ideally, there would be a centralized location you could go where no assumptions would be made about what you know already (hem, seriously where does the code go?).

So yes, I listed “there’s an easier way” as a frustration. This is because when we make assumptions about a learner or we use non-practical examples, we contribute to the frustrations of learning code. Rather than keeping it simple, elegant, and practical, many of these resources alienate and dissuade learners.

I have a lot yet to learn and anticipate that web development will keep me interested for a long time. Please let me know in the comments if you have encountered any of these frustrations while learning.

Additionally, feel free to connect with me on LinkedIn.