Saturday, March 15, 2025

COMPUTER PROGRAMMING

MINDFULNESS

Meditation is a conscious focus on the present moment. When you meditate, you clear your mind, so to speak, but you are paying attention. The word is “awareness.” When you are consciously aware, you are in a meditative state. Unlike when you are unconsciously aware.

This is the reason why a lot of mindfulness meditation practices focus on an object, like a mantra, or more commonly, the breath. During mindfulness meditational practices you sit quietly and focus on the breath. It is normal for the mind to wander and get lost in thought. This wandering happens automatically, and when you notice it, when you become aware of it, you can bring yourself back to focusing on the breath.

Meditation is a good way to de-stress the mind which is constantly in thought. Especially negative thoughts and by focusing on an object, like a mantra or the breath, you momentarily stop the monkey mind from negative thought and emotion.

WRITING

Writing can also be a means of meditation if focussed on a single topic. For example, descriptive writing that is unstructured can be useful. Take the following paragraph for example:

Brown table, glass top, indicative of thought and a fireplace filled with logs becomes light and fuelled by, lost thoughts, carpeting is not good but a floor which is on the way to doors that open and close which is the reason why reason exists if only to become the thing that once was. However, it should be noted that even while you sit and browse as soon as things become overly complicated and the words structure themselves, you can chair the objection to the ceiling in order to remove the process that was getting to be very structural. In this case, you are not noticing but following even if the path takes you to a place that you are not familiar with, as the music plays so do you also play.

For a moment you’ll notice that there was a bit of structure, and I tried my best to remove it. That’s because we are used to formal sentences and coherent and correct thinking and writing garbage is not normal. It’s difficult to write garbage and it takes practise to fall out of the obvious.

PROGRAMMING

Computer programming is the language of computers. Most of us use them for productivity purposes, like this article I’m writing. But just like writing or breathing, computer programming can be mindful. Small exercises which are defined to do small tasks and focus on a specific part of the language. In fact, some of the computer programs we use daily have built-in programming facility. Programs such as Microsoft Excel offer a platform for data science and can be used to practise mindfulness. The trick is knowing what direction to take.

Personally, I prefer the Python programming language. A simple language that is amazing for data management programs. It’s now being used for artificial intelligence applications which consume a lot of data. Artificial intelligence applications exist on top of huge data stores. The sifting, sorting, analysis or ordering and presentation of this data is quite complex and one of the features of Python is to free the programmer from the complexities of the computer language allowing them to concentrate on the problem.

So here’s an example. The following is code to open a file:

f = open(‘file.txt’, ‘r’)

Once the file is opened, we can read a line in the following manner.

line = f.readline()

Now that we have a line of text, we can see how long it is by:

line_length = len(line)

Here’s an exhausting method of counting all the letter “a’” in the line:
    
counter = 0   
for letter in line:
	if letter == ‘a’:
    	counter = counter + 1
That’s an example of a “for” loop. A loop is a very common construct in computer programs. It simply iterates over something. In this case, the instruction is to inspect each letter in the line and check to see if it’s an “a.” If it is an “a” it increments the value of the counter.

While this isn’t how professional programs are constructed it is normal to write these small pieces of code for the casual software developer. Interestingly enough, modern computers have made it possible for the novice who’s interested in computer programming to write code. The speed of modern computers compensates for the lack of optimization of the code. 

It is, in fact, optimization that causes analysis paralysis. Overthinking and wondering if what you are doing is structurally correct. As a developer that was my biggest hurdle to overcome in my job, always thinking that there was a better way and so stuck at the start and not moving until all the analysis was done. I think I’m passed that part, for what it’s worth, and the only thing I can say now is while I’m more productive, I learn a lot from constantly going back. But it’s a better position to be in than not moving at all.

On one hand it took Edison 10,000 tries to arrive at a commercially viable light bulb, so the story goes, but he’s also the same person quoted as saying he respects the person with a single idea who gets there, than a person with a thousand ideas who does nothing. Edison was really referring to getting up and getting things done rather than sitting idly thinking about doing things, that action is preferrable to inaction.

CONCLUSION

In the search for calm and meditation, a place of quiet where the mind is not constantly worrying, the act of doing something gets you a long way. If, like me, you are detail-oriented, analysis paralysis can hinder movement. But the fear that getting up and moving without planning may lead you down the wrong path is not necessarily true. You discover that all paths lead somewhere and after trekking down the wrong alleys, you soon learn to figure out how to correct your direction. Computer programming, whether it’s done in Excel, or Python, or even those complex programming languages like C can be a way to learn how to problem solve and focus the brain on writing and logic. Much like focusing on the breath or a mantra.

No comments: