Friday, January 2, 2009

Wetware Refactorings

Brain rot.

While others were enjoying the final months of their college senioritis, I was worried about brain rot. It hit me that in order to be bad or at best mediocre at something, all I had to do was... nothing. From a boring job to a bad marriage, it seemed that the secret to mediocrity was to coast along and not make any adjustments or actively work to make things better. Towards graduation, I knew that I had the option of going into the workplace and just let things happen, stop actively learning, and let my brain rot. It'd take awhile for people to realize that I'd stopped caring about learning. But by then, I'd be locked into a job where it didn't matter.

The alternative was to force myself to keep learning and accept the fact that it would never be easy. Fearful of brain rot, I decided to pick this second path. But I was on my own. Unlike school, there wouldn't be anyone forcing me to learn new things. Even with this decision, there was a slight feeling I was part of a losing game.

Throughout my school years, the consistent message about the brain was that you were given a limited number of brain cells at birth and you had to do your best to keep all the ones you could. At best, you could hope to somehow mature the ones that remained. Popular culture promoted this message and sometimes joked about it, such as Cliff's "Buffalo Theory" on Cheers:

"Well you see, Norm, it's like this... A herd of buffalo can only move as fast as the slowest buffalo and when the herd is hunted, it is the slowest and weakest ones at the back that are killed first. This natural selection is good for the herd as a whole, because the general speed and health of the whole group keeps improving by the regular killing of the weakest members. In much the same way, the human brain can only operate as fast as the slowest brain cells. Now, as we know, excessive drinking of alcohol kills brain cells. But naturally, it attacks the slowest and weakest brain cells first. In this way, regular consumption of beer eliminates the weaker brain cells, making the brain a faster and more efficient machine. And that, Norm, is why you always feel smarter after a few beers."

I kept this depressing view of brain cell scarcity until I learned about neurogenesis:

Fortunately, professor Elizabeth Gould thought otherwise. In a discovery that turned the field on its ear, she discovered neurogenesis -- the continued birth of new brain cells throughout adulthood. But here's the funny part. The reason researchers had never witnessed neurogenesis previously was because of the environment of their test subjects.

If you're a lab animal stuck in a cage, you will never grow new neurons.

If you're a programmer stuck in a drab cubicle, you will never grow new neurons.

On the other hand, in a rich environment with things to learn, observe, and interact with, you will grow plenty of new neurons and new connections between them.

For decades, scientists were misled because an artificial environment (sterile lab cages) created artificial data. Once again, context is key. Your working environment needs to be rich in sensory opportunities, or else it will literally cause brain damage. Pragmatic Thinking and Learning, p.67

Neurobics

While listening to a segment on Radio Lab, I finally realized that the brain doesn't have one central command structure that interprets the world. It's more likely that each sensory organ feeds in its own "note" to your mind and it's the combined musical "chord" that you perceive as a thought or memory.

In an attempt to take advantage of this discovery, I checked out the book "Keep Your Brain Alive: 83 neurobic exercises to help prevent memory loss and increase mental fitness." It was a bit odd for me to read since the book is targeted at people twice my age, but it highlighted the interesting concept of "neurobics" which are like neural aerobics. The book explains how neurobics take advantage of the decentralized nature of your brain:

      1. Involve one or more of your senses in a novel context. By blunting the sense you normally use, force yourself to rely on other senses to do an ordinary task. For instance: Get dressed for work with your eyes closed.
      2. Engage your attention To stand out from the background of everyday events and make your brain go into alert mode, an activity has to be unusual, fun, surprising, engage your emotions, or have meaning for you. (e.g. turn the pictures on your desk upside down)
      3. Break a routine activity in an unexpected, nontrivial way. Novelty just for its own sake is not highly neurobic. Routine breakers include taking a completely new route to work and shopping at a farmers market instead of a supermarket.
        - Keep Your Brain Alive, pp.33-34

Some of my favorite suggestions from the book include: My desk with the chessboard

  • Shower with your eyes closed. (p.43)
  • Brushing roulette: brush your teeth with your nondominant hand. (p.44) This also works for other routine activities like using your mouse.
  • The sightless start: enter and get ready to start your car with your eyes closed. (p.55)
  • Take brain breaks: a walk or social lunch break can help invigorate the mind. (p.81)
  • Have an ongoing chess game.

The last was the most interesting, and had me involve coworkers:

We know of one office where a chessboard was left out near the water cooler. Any employee could come to the board (preferably during a break), assess the situation, and make a move. It was an ongoing game, with no known players, and no winners or losers.

Even a novice chess player will weigh dozens of possible moves, attempt to visualize the consequences of each one, then select the move that offers some strategic advantage. This type of "Random-player" chess game doesn't allow anyone to develop a long-term strategy. But it does require visual-spatial thinking that is different from what most of us do at work. The brief gear switching provides a break from verbal, left-brain activities and lets the "working brain" take a breather. - Keep Your Brain Alive, p.83

In my case, the chess game didn't work out exactly like the book described, but it has been fun. I set up a small magnetic chess board on my desk and encouraged anyone to come and make a move. I thought it'd be interesting to have clear winner and loser. This posed a challenge of how to keep track of the game that had no time limit or fixed set of players. I used a business card to track of whose turn it is. When the side with the printing on it is turned up, it means that it's black's turn; otherwise it's white's turn. This "protocol" has worked out well and has allowed several coworkers to play throughout the day. As a side benefit, it's caused me to actively work at getting better at chess.

Refactoring Your Wetware

Last week, I read through Andy Hunt's excellent "Pragmatic Thinking & Learning: Refactor Your Wetware" that has many more pragmatic brain tips that are written from a programmer perspective. The book is centered around the Dreyfus Model of skill acquisition where learning starts at a beginner stage where you need a lot of rules to function and then transitions all the way up to an expert level where you rely heavily on intuition. Here are just a few of the many ideas presented in the book:

    • Add sensory experience to engage more of your brain: continuing on the neurobics theme, Andy Hunt has some interesting ideas (pp.74-75):

      • Instead of UML diagrams, try toy blocks or Lego bricks.
      • Use physical CRC cards to engage your touch and spatial senses.
      • Draw a picture ("not UML or an official diagram; just a picture")
      • Describe your design verbally.
      • Act out your software design with coworkers.
    • Create a "Pragmatic Investment Plan" where you treat your skills and what you want to learn with at least as much care as you take with your finances and apply similar skills (e.g. diversify, have short and long term goals). Make sure your goals are Specific, Measurable, Achievable, Relevant, and Time-Boxed (SMART) (pp.154-156)
    • Consider starting a reading group with people in the office to help learn a skill from a book. (p.164)
    • Make sure you have freedom to explore ideas by having a "starter kit" infrastructure of version control, unit testing, and build automation. This gives you the safety to fail, which is often needed when learning. (p.192)
    • Unscaffolding: artificially make things harder than they need to be so that when you have to do it for real, it seems a lot easier (e.g. train for running by tying weights to your ankles). I like how the author claims that this is why Ruby programmers should at least spend some time working in C++ (p.206)
    • Develop Your Exocortex: Have a place outside your brain where you can store and organize thoughts. The author recommends a personal wiki. I personally prefer to use Google Notebook. (p.221)

Be the Query

I enjoyed the discussion in the book on changing your perspective, especially when it comes to feeling like you're inside the system you're creating:

Imagine yourself as an integral component of the problem you're working on: suppose you are the database query or the packet on the network. When you get tired of waiting in line, what will you do? Who would you tell? - (p.107)

I think that this approach can help lead to a richer Object Thinking in software designs. For example, if you can picture yourself as a database query, I think you'll have much more empathy for what's going on. This thinking might influence your design to avoid painful table scans and favor indexes.

My oblique strategies coffee cup and my Rubik's cube that I like to play with.

Another way to change your perspective is to use oblique strategies:

These questions and statements force you to draw analogies and to think more deeply about the problem. They are a great resource to draw on when you' get stuck. - (p.108)

Some example strategies include:

  • Use fewer notes
  • Don't be afraid of things because they're easy to do.
  • What wouldn't you do?

I printed a bunch of cards with each strategy on them and keep them by my desk in a coffee mug. It's a new addition, so I don't have long term results, but it is fun to take one out and think of how it might relate to a problem I'm working on when I get stuck.

Keep Your Brain Cache Warm

Many brain changing ideas require you to focus. This is hard to do when our jobs often require us to multitask or our culture encourages us to check email frequently in order to respond quickly and look good among our peers. There are dangers to this:

Scientists agree that trying to focus on several things at once means you'll do poorly at each of them.

And if that wasn't bad enough, a controversial study done in the United Kingdom noted that if you constantly interrupt your task to check email or respond to an IM text message, your effective IQ drops ten points.

By comparison, smoking a marijuana joint drops your IQ a mere four points. - Pragmatic Thinking and Learning, p.228

This is really hard to overcome. Since reading this, I've tried to avoid checking Outlook more than once an hour. After each check, I shut it down to prevent the distraction. I've found that it's helpful to actually shut it down; otherwise it's too tempting to ALT+TAB to it or get lured in by a notification message.

If you replace "phone" with "email", you can see that Peopleware described over two decades ago why most people are working far below their potential of being in a state of "flow" where you actually get stuff done:

If the average incoming [email] takes five minutes and your reimmersion period is fifteen minutes, the total cost of that [email] in flow time (work time) lost is twenty minutes. A dozen [emails] use up half a day. A dozen other interruptions and the rest of the work day is gone. This is what guarantees, "You never get anything done around here between 9 and 5." - Peopleware 2nd edition, p.63

Therefore, for the sake of your sanity and focus, be careful before flushing your brain cache by doing a context switch. The time saved can be used for more creative thinking and getting things done.

Is this All a Bunch of Hooey?

I admit that some of these ideas sound silly. I haven't yet worked up the courage to bring Legos to a design meeting yet, but I can see how it would help use a different neural pathway and activate more gray matter. Surely that couldn't hurt, right? It'd probably bring a new perspective and overcome a road block. This is probably why some of the most creative companies encourage playful behavior at work. This might be seen as a horrible waste of time to traditional management (and shareholders for that matter), but it's much more likely to use more of your brain which in turn might create better solutions.

One alternative to all of this is to just coast along and not take thinking and learning into your own hands. Left on their own, your company is likely to put you through a sheep dip using a "training course" in an artificial environment that will easily wear off just like a farmer might dunk his sheep into a chemical bath to get rid of parasites which will also wear off and need to be repeated.

While sometimes uncomfortable at first, I've enjoyed incorporating some "wetware refactoring" into my daily life as a way to overcome brain rot and aid learning and thinking. It sure beats a sheep dip.

What do you do? Do you have specific wetware refactorings that you do? I'd love to hear them; the "crazier" they are the more likely they'll probably activate different neural pathways and probably lead to a better result. Let me know in the comments.

31 comments:

Deadsunrise said...

I moved to a dvorak keyboard layout (writing at 50wpm after 5 weeks) and I'm meditating at least 30 minutes daily as well as trying to learn japanese.

I started all this a couple months ago and I don't remember when I felt so good in my live. Part of the motivation to do it came from this google tech talk that I think that will be very interesting for you:

http://www.youtube.com/watch?v=UyPrL0cmJRs

Jeff Moser said...

Deadsunrise: interesting recommendation on the Dvorak layout. I definitely think it qualifies as "breaking a routine in a non-trivial way."

Thanks for the neuroplasticity google tech talk link. I'll check it out.

nonzero said...

I've been learning to play the piano. I think learning a musical instrument would definitely encourage plasticity in many areas of the brain.

I also started meditating (shamatha) and use cognitivefun.net every so often.

Jeff Moser said...

nonzero: I think learning the piano is an excellent idea. Learning an instrument was specifically mentioned in the video that Deadsunrise referenced.

It seems that some of the smartest folks in our field are good at music. Alan Kay is a noted musician and one of my favorite quotes of his is:

"a computer is an instrument whose music is ideas."

I tried learning how to play piano around 2 years ago and gave up. After reading Pragmatic Thinking and Learning, I think I might try again.

Thanks for the link to cognitivefun.net, I hadn't heard of it before.

Deadsunrise said...

Just found another thing to do: http://www.solipsys.co.uk/new/Juggling.html?JugglingTalkSummary

Can be done in a week or two using 5 to 10 minutes intervals through the day. It looks pretty good as neurobics.

Martin Walker said...

Hello, Jeff.

Good for you to realize the trap of the conventional so early in life. Senioritis avast!

My own path to keep living and learning has involved piano lessons, writing a book of philosophy, blogging, switching careers and starting a business.

My company publishes brain-training software that exploits neurogenesis and brain plasticity to increase fluid intelligence (it's based on a landmark research study).

Martin Walker
www.mindsparke.com
Mind Sparke Brain Fitness Pro

Jeff Moser said...

Martin Walker: Congrats on the many initiatives you've started! Do you have link to the research study?

What do you think of games like Big Brain Academy: Wii Degree? I have that one and play it occasionally.

NEO D said...

Great post, I think it helps allot to combine your programming skills with hobbies that you are into too. I am into cars, old and fast. I wrote a program for a racer friend of mine to help predict how fast his car would go in the quarter mile factoring in altitude and other weather conditions. It was an interesting and fun little side project.

Dave Gallagher said...

Awesome post. :)

I've found one strategy to work relatively well, and that's to change my work environment up frequently. For example, I have a laptop and try to hop between different starbucks I'd libraries to go and do work. I've found that by not sitting in the same desk everyday, looking out the same window or at the same paintings, tends to spark more creativity and increases my level of happiness.

Playing different new music certainly helps (online radio all the way).

Paul Graham wrote an essay about Procrastination (would paste a link but the iPhone won't let you do that ;) ). One of his suggestions was to have a separate computer just for work, one that's disconnected from the Internet and isolated from you distractions (example, don't even install outlook on it).

Paul gave the example of how watching television triggers a social queue in your head, which is "you're waisting time in front of this idiot box rather than accomplishing something."

You can apply that same logic with your non-Internet "work" computer. When you're in front of it, you're there just to do work. When you're in front of you "online" computer, realize that you're now exposing yourself to all of it's distractions, online and offline, and realize that you're waisting time in front of it much like the television.

Thanks again or the post!

-dave gallagher

Donald said...

Hi Jeff, great post.In "Mindset: The New Psychology of Success" by Carol Dweck, research conducted on rats indicates that running also initiates brain cells growth. You should try that too.

Jeff Moser said...

NEO D: I agree that it's good to do what you enjoy so that you keep motivated at it. From this post: "It's unlikely you can get just any child to apply themselves this rigorously for so long."

Glad that you found fun side projects.

Dave Gallagher: Switching the work environment was specifically mentioned in the Neurobics book, but it was in the context of moving stuff in your office around. Interesting to hear how you switch physical locations.

It's interesting that you mentioned music. Peopleware mentions:

"During the 1960s, researchers at Cornell University conducted a series of tests on the effects of working with music. They polled a group of computer science students and divided the students into two groups, those who liked to have music in the background while they worked (studied) and those who did not. They then put half of each group together in a silent room, and the other half of each group in a different roomed equipped with eaphones and a musical selections. Participants in both rooms were given a Fortran programming problem to work out from specification. To no one's surprise, participants in the two rooms performed about the same in speed and accuracy of programming. As any kid who does his arithmetic homework with music on knows, the part of the brain required for arithmetic and related logic is unbothered by music -- there's another brain center that listens to music.

The Cornell experiment, however, contained a hidden wild card. The specification required that an output data stream be formed through a series of manipulations on numbers in the input data stream. For example, participants had to shift each number two digits to the left and then divide by one hundred and so on, perhaps completing a dozen operations in total. Although the specification never said it, the net effect of all the operations was that each output number was necessarily equal to its input number. Some people realized this and others did not. Of those who figured it out, the overwhelming majority came from the quiet room.

Many of the everday tasks performed by professional workers are done in the serial processing center of the left brain. Music will not interfere particularly with this work, since it's the brain's holistic right side that digests music. But not all of the work is centered in the left brain. There is that occasional breakthrough that makes you say 'Ahah!' and steers you towards an ingenious bypass that may save months or years of work. The creative leap involves right-brain function. If the right brain is busy listening to 1001 Strings on Muzak, the opportunity for a creative leap is lost.

The creativity penalty exacted by the environment is insidious. Since creativity is a somethime thing anyway, we often don't notice when htere is less of it. People don't have a quota for creative thoughts. The effect of reduced creativity is cumulative over a long period. The organization is less effective, people grind out the work without a spark of excitement, and the best people leave." - Peopleware 2nd Edition, pp 78-79.

What are your thoughts on this? It's made me think twice about listening to music.

I think that Paul Graham's advice in disconnecting distraction is interesting and is a bit more extreme than shutting down Outlook, but I can see the point of how it'd help.

Donald: I think almost exercise will do, the more neurobic the better (e.g. new routes, new machines, etc.) There's probably chemical released when running that might be helpful. At the very least, I feel better after exercise and that helps focus.

Thanks for all the comments, keep 'em coming!

Donald said...

I'm wondering how effective games (video games) can be in growing brain cells. Does the activity have to be totally different or tic-tac and the lot would do .I've got myself a PSP 3000 and plannning getting "brainstorm" if indeed it would help me grow some brain cells :).

Jeff Moser said...

Donald: I'd guess that challenging games are better, especially if they provide lots of possibilities (e.g. chess being better than tic-tac-toe), but playing anything and thinking about it is better than nothing.

Dennis said...

You may already be aware that Google is stopping development on Notebook.

Jeff Moser said...

Dennis: I had heard a rumor that Google Notebook might shut down, but didn't realize that they actually discontinued it. That's too bad as it's a great tool. Its current set of features is all I need, so I suppose I'll use it until they pull the plug.

Thanks for the the info!

PurplePanda said...

Hi Jeff,

Great post.

I just started reading "Pragmatic Thinking and Learning" and I'm finding it really interesting and helpful.

Also, I recently listened to Kathy Sierra's talk from Etech last year called, "How to Kick Ass" (from IT Conversations), and she too mentioned that brain games and puzzles do help in keeping your brain nimble. However, she also said she found some research that shows that exercise helps a lot more than just doing the brain games. Maybe that ties in with what Carol Dweck said about running helping mices' brains.

Jeff Moser said...

PurplePanda: Combining physical and mental exercise sounds like the winning combination :-)

Mike Petry said...

Coding Horror amazing!

Spradicus said...

I just finished Pragmatic Thinking and Learning and will say that it is definitely worth a read.

Here are some tips that I took away from the book http://www.fiascode.com/reviews/helpful-tips-from-pragmatic-thinking-and-learning/

Thanks for your great write up!

abraginsky said...

I too believe that I have more insight into difficult problems when I'm NOT listening to music. I used to think it was because I was so used to focusing on music due to my experience with having a lot of training at piano as a child but learned it had more to do with the whole left/right brain coordination.

Jeff Moser said...

Mike Petry: Thanks. Background information on that can be found in my latest post.

Spradicus: Nice review yourself! Thanks for the link.

abraginsky: I know personally that listening to anything beyond environmental sounds (e.g. ocean waves or a mountain stream) causes a decrease in my productivity (creativity is much harder to gauge), so I tend to agree with the study Peopleware quoted.

EK said...

Jeff, great posts. Thanks. In my 50's, and learned C#, Javascript, prestidigitation, and just for fun, memorized a set of 400 random numbers. I find it is helpful to consider the mind a place, and give it as much reality as i give physical world, so thoughts become things.

Still trying to get Wireshark to work, though ! LOL.

Jeff Moser said...

EK: Sounds like you're having fun keeping current. I loved your use of "prestidigitation." I've only heard it once before. Certainly a unique recommendation. Do you have a primary audience? I think it'd be a good neurobic activity, especially if you have to rely on your other senses to make the tricks happen.

400 random numbers? Are they random, or digits of some number like pi? Sounds like the effort might be worth it for a password like your WPA key.

Feel free to ask questions on the HTTPS post for Wireshark help. I just use the basics (I outlined the steps I used in a comment to "Mr T's Fashion Consultant.")

Thanks for the sharing and stopping by

EK said...

Thanks for the reply, Jeff. Wireshark up and running. Now the questions is what is the highest and best use for this awesome tool. I wonder if there is a way to translate the hex into English to read packet contents, or is that only for higher "Echelons".

Prestidigitation audience? For a year I regularly performed before a group of fund managers, and another group of professional magicians, along with the occasional party, and after-dinner parlor entertainment.

400 numbers are random, exercising a memory method learned from Harry Lorraine, the master.

Also practicing meditation using a specialized language with vocabulary for inner states of consciousness, lacking in English. Source code for the soul.

Jeff Moser said...

EK: Make sure you clicked on View*Packet Details and Wireshark will automatically decode most of the hex values into very readable data that you can expand in a tree view style by expanding nodes.

I hadn't heard of Harry Lorayne before. I might have to check out his books.

Elizabeth Burke said...

I liked this article and the comments (good links). Am a poor artist type, so am constantly trying challenging myself to 1) find what I need w/o buying and w/o stealing (which local towns have the best recycle dumpsters, for instance); 2) wondering what else I can do w/stuff others throw out (tennis balls, metalic coffee bags, etc); 3) how not to get depressed when the money is low (take up things I used to do as a child, ie. sledding on cardboard, building snow monsters). So far, I've gotten entire course work for a CPA in the dumpster--lots of law, economics, etc. I've made insulation for my yurt w/coffee bags and worn out socks. I've made a shed roof w/old toboggan. Being poor keeps my mind active! Cheers & thanks.

Jeff Moser said...

Elizabeth Burke: Interesting take on being creative. Thanks for sharing!

Jeff said...

Great blog... I thought you might find the book 'Spark' an interesting read. It talks about the effects of exercise on the neuro chemistry and neuro genesis of the brain. But I think you've got the right idea of keeping things novel and interesting to stay sharp throughout life.

Thanks,
Jeff

Jeff Moser said...

Jeff: Thanks, I'll add that book to queue.

Deadsunrise said...

A year ago I said that I was using dvorak as my keyboard layout. I still do it but to make it more challenging I spend a couple of hours doing this:


http://www.flickr.com/photos/deadsunrise/4338226640/

Jeff Moser said...

Deadsunrise: Nice :) I assume you use that keyboard with the Dvorak layout?