Monday, October 04, 2010

Choices, Habits and Awareness

Every second, the human brain is bombarded with information, the conscious part of the brain is only able to handle a tiny percentage of this. The rest is handled by our unconscious.

A habit is an automatic reaction to a given situation. Habits allow us to do things automatically, without being consciously aware of what we are doing. But, to form a new habit takes time, and during that time we must choose to do what we want to make a habit of. And, to be able to make this choice we must be aware of the choice in the first place. We must be aware to be able to become unaware!

Here is an algorithm to illustrate this:

# Sequential
if not habit?(choice) or aware_of?(choice)
  make_decision(choice)
else
  automatic_response(choice)
end

Of course, it is not that simple. The brain is not sequential.

The brain is massively parallel and almost everything in it happens unconsciously. Every second our senses are fed with more than 11 million bits of information, while the conscious part of our brain is only able to process less than 50! All other information is filtered out by our unconscious. Scary! But, here comes the cool part, we can consciously change our filters by creating new habits.

Here is parallel version of the code above.

# Parallel, unconscious
if habit?(choice)
  automatic_response(choice)
end

# Parallel, conscious
if aware_of(choice)
  make_decision(choice) # Practice
end

Choices

Every single moment of our life, we are given choices. Some choices are obvious (the choices are, the answers may not be) such as:

  • Should I use Ruby or Python for my next project?
  • Do you take this woman to be your lawfully wedded wife?
  • Should I learn a new programming language that I have no hope, whatsoever, to use in a live project?
  • Are the kids allowed to play with fire?

Other choices are not so clear, such as:

  • Do I get up now or press snooze another time?
  • Should I step on the white lines when crossing the street?
  • Do I put the right foot in front of the left or jump on the left?
  • Should I remove the hand from the hot stove or not?
  • Should I react by being angry or not?

What's cool, and scary, with choices is that every time we make one, our brain changes. It literally changes physically every time. It actually changes every time we think a thought.

Every time we make a certain choice, that path through the brain gets wider, and thus the choice gets easier to make. It is easier to make the same decision, over and over, than it is to make new decisions all the time.

Another thing about choices is that it is often painful to make them. The reason for this, I believe, is that we often know, intuitively, what the right choice is, but that choice involves more work. This is why we should form good habits, because habits free us from the agony to choose.

Habits

When we have made a decision many times; when a path through the brain has become wide enough, we don't have to make a choice any more! We have formed a habit. Psychologists say that it takes 21 days. We have both good habits and bad ones. And most of the habits we have, we are unaware of.

A great thing about good habits is that they are performed by the unconscious part of the brain. They allow us to do things without consciously thinking about them. And since we are not consciously thinking about them, it is almost as if they do themselves. :D

A sad thing about bad habits is that they are performed by the unconscious part of the brain. We do things without consciously thinking about them. And since we are not consciously thinking about them, it is almost as if they do themselves. :(

That is why we should nurture our habits. We should create habits of things that we want to do, like writing our tests first, and complimenting people when they do good. We should make habits of boring things, that we have to do, like doing the dishes and writing documentation. Once they become habits they are not boring anymore.

This is also why we should be grateful when someone points out our bad habits, because they help us become aware of something that we may want to change.

Awareness

The key to forming new good habits and getting rid of bad ones, is awareness. We cannot change what we are not aware of. We cannot train what we are not aware of. But what are we aware of? We are aware of things we are trained to be aware of. Our awareness is learned, it is dependent on our habits! Ah, recursion!

When we are creating habits, we define ourselves.

Are you aware that there is a programming language designed for programmer happiness?

Are you aware that touch typing is a habit? That sitting in front of a computer eight hours a day without being able to touch type sucks? If you're not, read this blog post by blogger extraordinaire, Steve Yegge. I wasn't aware two years ago but now I type 50 WPM (which is not great, but I get better every day).

Are you aware of that your habits form your thoughts, that they form you?

We are what we repeatably do. --Aristotele

Conclusion

Can you imagine a day without googling for code-related things? When you don't have to think at all about the signatures of methods, the key combinations that moves you to the right position, or the inner workings of the authentication library. Can you imagine how good you would feel, and how fast you would work? Can you imagine eight hours of continuous flow?

Linus Torvalds, allegedly, wrote the bare bones of Git in two weeks. How could he do this? Because he has been living and breathing C and Linux, for the last 20 years!

So, where am I going with this? I want flow! I want eight hours of continuous flow while I'm working. In order to achieve this, I have to train my brain to know, really know, unconsciously know, the tools of my trade.

I am going to select a small number of tools that resonates with the way I am and want to work.

I have previously been a generalist when it comes to programming. I am proficient in many programming languages, but I have yet to become a true expert in one. With a true expert I mean someone who doesn't have to lookup anything. Everything, the language constructs, the built-in libraries, the major third-party libraries, the tools, should be intuitively known, habitual.

I aim to become an expert in the languages Javascript and Ruby.

This doesn't mean that I'll give up other programming languages. I will still dabble with interesting programming languages like Clojure, Scala, Mirah, etc., but my main focus will be on Ruby and Javascript.

Why Ruby and Javascript? Because they are languages that resonates with my brain. They are dynamic, interpreted and give lightning-fast feedback. They also allow me to express my concepts clearly and succinctly.

No comments: