DEV Community

Cover image for Getting Good at Coding
TaQtiQ
TaQtiQ

Posted on Originally published at taqtiq.tech

Getting Good at Coding

All programming languages contain two things:

  • Abstract concepts (ideas).
  • Tokens (sensory data).

Abstract concepts:

Here is an example of a common thing that you will see in programming tutorials and documentation:

What Web Dev Cody is explaining in the image that I included above, is how some of the internal architecture of the backend service Convex works. He uses a diagram to describe how two different ideas:

  • Mutations
  • Queries

relate to users of a Convex integrated platform and Convex itself.

Understanding the ideas that exist in the technology that you are learning is essential. Without a backbone of understanding in the concepts that exist and how they relate to one another, your knowledge will feel incomplete.

You will get the sense that mysterious forces outside of your purview and control are governing how your application behaves. This leads to a persistent, low-level anxiety about hidden or invisible forces interacting with your application. A "ghost in the machine".

Whatever service you are using will normally explain these concepts in the documentation. There will also typically be tutorials on YouTube explaining them. The quantity of available tutorials depends on how popular the particular technologies you are using are. There's normally high quality official documentation available, however, that will go through the ideas.

Identifying ideas

Ideas are typically communicated through long-form sentences in a conversational format.

Here is an example from the Convex documentation:

Ideas also lean heavily on diagrams or visuals to explain. This is because the idea that is being communicated is often challenging to do so with words alone. The idea is based on experiences and visual observations of the world that would have to be translated into plain English for the listener to understand.

Sometimes, the best way to communicate information that you have gathered from an experience is to simply give the other person that same experience that you had. Diagrams and visuals are an attempt at giving the viewer the same experience that the creator had.

When trying to understand any given idea, its always good to consider what the words actually mean, in terms of their literal definition and also the themes that they bring up in popular culture. Since we are on the topic, lets look at the word "mutation".

What is a mutation?

Here is the literal definition of the word from Google:

A mutation is a change in an organism's DNA sequence, or more broadly, a basic alteration or change in something's form or structure.

The underlying concept that is being communicated here is one of change or alteration.

To mutate is to change.

If we consider mutants in popular culture (e.g., the mutants from the TV show Futurama, "supermutants" in the Fallout franchise, teenage mutant ninja turtles, etc) - they were once something but then changed into something else (most often through exposure to nuclear radiation that scrambled their DNA).

What this tells us is that the idea of "mutation" in our culture means to change.

This helps us a lot to understand what mutation is in programming. When we mutate data, we are changing it.

The same idea is applied in the context of Convex mutations; they allow us to change data that exists in our tables.

Let's pause for a moment to clear up any misconceptions. What I am explaining here is not a pun. It's not a clever play on words or a funny joke. I am identifying a very critical underlying truth about the word "mutate". That, in our culture, the underlying meaning being communicated through the word "mutate" is one of change or alteration.

I am not bringing up teenage mutant ninja turtles or Fallout supermutants or Futurama mutants for some comic relief in this article. I'm bringing them up because these are outward manifestations of our cultural understanding of the concept of mutation. Pointing to these examples helps us to identify how we as a society think about what mutation is.

If we can understand our shared cultural perspective on the idea of mutation, then we can make some inferences about what mutation might be in the context of programming.

Ideas can differ in their meaning dependant on context. But there is typically some underlying pattern or truth that is common regardless of the context. When Computer Scientists came up with the idea of mutation; they were not pulling it out of the air. They were modelling it on an existing understanding of the world that had been built up long before computers even existed.

To solidify the point, lets look at another example: queries.

What is a query?

Here is the literal definition from Google:

A query is a question or request for information, or—as a verb—the act of asking a question to check something or get an answer.

The underlying idea being communicated here is that a query is a question. Or that a query is a request for information.

This same concept is exists in programming. When we query an API, we are requesting information from it. When we send a query to a database, we are sending a request for information.

This idea is then applied to Convex. When we make a Convex query, we are making a request for information from our Convex tables.

So:

  • Convex mutations allow us to change information.
  • Convex queries allow us to make requests for information.

Learning ideas

Your mind can absorb ideas passively. If you are trying to learn a new programming language, then its often a good idea to passively listen to tutorials on that content, even if you are not watching visually. This allows you to immerse yourself in that content throughout the day. When travelling, running errands, etc - you can listen to coding tutorials through your headphones. Many programming tutorials will spend large amounts of time where the instructor is talking but the screen is static. In this case, there is nothing you are missing out on visually by only listening to the audio.

Tokens

Programming languages also contain massive amounts of immediate sensory data that you need to gather if you want to become good at them. Each programming language contains tokens. These are the actual individual words and symbols that you will be typing out when coding an application.

While you might understand concepts like functions, object-oriented programming, conditional statements, asynchronous programming and so on; if you have not memorised the actual tokens and the order they are meant to appear in to actualise these patterns in your code, you will remain ineffective.

There will also be gaps in your understanding. Each programming language implements concepts like object-oriented programming differently. Knowing the specifics of how they are implemented and deployed in your code really requires gathering enough sensory data.

Identifying tokens

Most official documentation for any given programming language or technology has a heavy focus on the tokens. Sources like MDN for instance, go into painstaking detail documenting every token in JavaScript with each of their methods and properties.

Knowing what tokens to type, the order that they go in, when to use a particular token over another and so on, typically comes down to experience with actually using those tokens. The best thing you can do it actually just code in that programming language. Do not copy code. Do not use AI. Just use the official documentation and a code editor. At first it will be tedious but your understanding quickly gets better.

Conclusion

For lots of people, the bottleneck in their coding ability is that they just haven't gathered enough information - ideas or sensory data about that programming language. If you want to get better, just identify what your bottleneck is and target it.

Top comments (0)