Learning to Code

Ole Ersoy
4 min readSep 7, 2024

--

Image by Ray Shrewsberry • from Pixabay

This is a general thing I ask myself whenver I’m reviewing lines of code.

Where are you? When are you? What are you? Where did you come from?

Because creating I really want to feel that “I am the code” after having read it and I want to keep a clear representation of it so that that representation is available on command at any instant and that is a “Tricky” thing to do.

I also put my monitor screen to sleep and visualize the code snippets I’m examining so a can get a fuller view of context as I’m mentally exploring snippets.

Human “Spotlight” consciousness can usually only comprehend 2–3 variables at a time, so doing this allows me to focus on a few details at at time while my mind paints in the rest of the context for those details.

I have a friend who told me when he was a kid his dad would give him and his brothers cement and bricks and they had to build a perfect brick wall, and then at the end tear it down and next weekend they would build it again.

And these days have the luxury of taking your own time and doing something as perfectly as it can be done to your own liking is rare, because our educational system, especially Engineering and Computer science programs rarely give us the luxury of having the time to fully complete a wall.

We naturally do this when we are reading fiction. We immerse ourselves in the words and allow our minds to paint in whatever details it wants to associate with the words.

And in reading code, and also structuring it, I find it particularly useful in keeping myself stimulated.

I find the question Where did I come from to be particularly helpful in alleviating “Blocking” when it comes to reading code.

Because it may be that the line that I’m focusing on at the moment could be really easy to understand, however my mind “Feels” blocked from understanding because I’m missing something about where the “Overall” context came from. And I have not thoroughly focused on that yet.

Take these lines of code.

      tabButton.addEventListener("click", function () {
let clickedTabButton = this;

In this case on the first line I am inside the event handler for the tab button ( First line) and on the second line (let clickedTabButton = this ) I am the clicked tab button ( and that is the same thing as being this in the event handler context ). And if I keep asking myself the questions it’s possible to paint in a great deal more, depending on how much of a “Conceptual Background” we want to associate with it.

Because when reading code, the context of what is going on can change very rapidly from one line to the next and putting this in the context of the “Whole” of all that is going on ( App, API, or whatever) as well as the immediate context does pull a great deal on our mental strings.

So we can do our mind a great favor here by putting our imagination to use here so that we make it easy for our mind to paint in and track details easily in the background as we are moving through the lines of code.

Related Concepts

So you see what’s happening? What you have to do: you have inspiration, but then you have to have technique to incarnate — to express — your inspiration, that is to say, to bring heaven down to Earth and to express heaven in terms of Earth. Of course they are really one behind the scenes, but there’s no way of pointing it out unless you do something skillful. You see, we’re all at the moment absolutely in the midst of the beatific vision. We’re all one with the divine. Although… I don’t like that sort of wishy-washy language, but… we’re all there. But we’re so much there that we’re like fish in water: they don’t know they’re in water. Like the birds don’t know they’re in the air because it’s all around them. And in the same way we don’t know what the color of our eyes is. I don’t mean whether you’ve got blue or brown eyes, but the color of the lens of your (Text sourced from https://www.organism.earth/library/document/being-far-out) eye. You call that transparent; no color, see, because you can’t see it. But it’s basic to being able to see anything. So in order to find out where you are there has to be some way of drawing attention to it, and that involves skill. Upāya, in Sanskrit: “skillful means.”

— Alan Watts

--

--