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?
And I also do this going backward as I’m understanding the recipe so that when I get to the end of a certain type of composition, I have a good understanding of how to make whatever it is.
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
But in order that people may master these disciplines — and this is a responsibility of the older generations — it must be understood that working on the disciplines is fun. And this is the task of all good teachers. All good, really gifted, and great teachers are people who never have to resort, in their classes, to artificial methods of imposing discipline. They need no proctors. They need no punishments. They need no bribes. Because the good teacher is the person who makes the work of learning the discipline so completely fascinating that the student is embroiled. The reason being that learning a discipline is not a matter of forcing yourself. And here, the English language leaves a little bit to be desired. We have a paucity of words for “effort,” for “application,” for “concentration.” We can talk about — when we’re talking with children — “you must apply yourself.” Now, it’s perfectly true: nothing in the way of a skill will be achieved without practice. But if practice is strained, still nothing will be achieved by it — except resentment. Many a little boy learns to hate the violin or the piano because it was drummed into him, “This is what you’ve got to do. You’ve got to apply yourself to it.” Za-cha-cha-cha-cha, driving it home. But on the other hand, if there is a way of fascinating a child with the discipline of any musical instrument, or what have you, then they can apply themselves day after day after day after day, and be fascinated with the discipline. So this is the skill of the teacher. This is upāya — I (Text sourced from https://www.organism.earth/library/document/individual-and-the-world) used this Sanskrit word this morning; “skillful means” — to get the student to love the art. Because — remember this principle — if your student does not learn to love the discipline, he will never be any good at what you’re teaching him.
— Alan Watts