"It's nice to be able to put yourself in an environment where you can completely accept all the unconscious stuff that comes to you from your inner workings of your mind. There's two kinds of thoughts in your mind: there's good thoughts and evil thoughts. Both come through your mind. Some people are more loaded down with one than another. Nevertheless, they come through. And you have to be able to sort them out, if you want to be a songwriter, if you want to be a good song singer. You must get rid of all that baggage. You ought to be able to sort out those thoughts, because they don't mean anything, they're just pulling you around, too" - excerpt from a Bob Dylan interview. For those who are in the dark about Bob Dylan, he is an American song writer considered for noble prize nomination and once referred to as the 'Voice of America".
A little pondering upon Bob's explanation of song writing had me thinking - in some ways, the Software developer's muse to solve critical problems, may be not at the same creative level of song writing, whatever level it is, gets quite deep - propelling him into a world where he resides between consciousness and semi-unconsciousness (a detachment from the practical world surrounding him). I hope I am not misinterpreted as someone advocating every software development task is difficult and requires considerable amount of brain activities. Rather, my thoughts are devoted to those problems which require considerable amount of mental effort to be solved where the developer, for a few hours or so, is not in the realm of normal day to day mental activities.
This is where Bob's observation comes to the fore: "There's two kinds of thoughts in your mind: there's good thoughts and evil thoughts. Both come through your mind. Some people are more loaded down with one than another. Nevertheless, they come through. And you have to be able to sort them out". And many of the developers (yours truly included) have fallen victim to the evil thoughts - evil in a sense that it tends you to write weird codes, complex, unfathomable codes. Many talented programmers, while they are solving deep, critical, complex problems - solve the problems, but evil leaves its mark to some extent in some cases. It is not unusual you'd find many talented young, or not so young, programmers, occasionally writing codes which strike you as weird when you are reviewing them as a neutral observer.
Swami Vivekananda - a great Indian philosopher with unbound knowledge in yoga talks about the untrained yogi from the point of a knowledgeable one: "The yogi says there is a great danger in stumbling upon this state. In a good many cases, there is the danger of the brain being deranged, and, as a rule, you will find that all those men, however great they were, who had stumbled upon this super-conscious state without understanding it, groped in the dark.. .. inspired, no doubt, but that inspiration was, as it were, stumbled upon".
I know, I am stretching my thoughts too far to compare software development to yoga, but what I am actually referring to is the meditative state of mind of the developer - which he stumbles upon while searching for answers to solve complex problems. Definitely, the contemplation and the semi-trance state is way below the deep level of consciousness of a Yogi, but it cannot be denied that the developer crosses the boundary of normal activities of the brain. The pattern of thoughts swims into a world surrounded by complex problems and phenomena while it looks for solutions in a sea of infinite possibilities. It is a state of mind where you find it hard to filter out the complex solutions and focus on the simple ones. Trust me it is difficult, since there are lot of paths to take, to go looking for a single solution. As a result, it gets hard "to get rid of all that baggage" like Bob said. Unfortunately Bob, in his interview, doesn't shed light upon how "You ought to be able to sort out those thoughts" - so I couldn't find inspiration to write what would have been my next blog - 'Self Training for the untrained Yogi - the Developer'.
However, in my humble view (if it counts), it takes years and years of practice, intent and learning to think simple to come out of that complicated frame of mind where you end up writing lines and lines of codes, which "don't mean anything, they're just pulling you around". You have to train up your mind in your own methodology as you gather experience on the way.
Probably reviewing of your own codes time to time, finding ways to turn them into something simple but elegant, concise yet beautiful can be a good start if you are not doing it already. And most importantly, you must look to manifest your intent on the codes, remember not the comments, but the codes and the codes you write should reflect what it is about, what it does, what your thought pattern is and how you go about solving the problem. This, along with your own techniques for thought simplification can be a start of the self training of the untrained Yogi - in our world, whom we refer to as the Developer.
I remain, with my muse,