Getting To Familiar
I spent last week at a four-day-intensive studio on learning to program for the iphone. It was run by Pragmatic Programmers and I recommend it. I chose to go because I want to learn iphone programming, but wanted guides for what I imagined would be a rocky takeoff, since I was struggling against my own instinctive, initial dislike of the language and platform. (It worked, btw. I'm excited now.)
During the week I learned a lot, and thought a lot about learning. How much initial learning is really just pattern recognition, making sense of a very blurry landscape. I'm a kinesthetic / experiential learner, for better and for worse, and often my first responses -- be it to people, places, or codes -- are stronger viscerally than cognitively. After a time of looking at something (or being somewhere), things fall into place, but at the beginning it is very much an equal blur that needs to be processed experientially somehow.
So while this "experiential brain" is poking around, how does the rest of the learning take place? How does it move through to the cognition phase? Being able to process what is meant by the symbols in front of me really doesn't happen until after a "getting familiar" phase, more akin to touching an elephant's leg than learning about his digestive system.
Imaging that initial learning of a new language is like looking at code with syntax highlighting turned off -- not in your IDE, per se, but in your brain.
The IDE might show the code in perfectly highlighted syntax:
but, maybe you "see" it as all red. There are no landmarks, it's hard to see what is important and what's peripheral, and there may be a "this is new!" sense of alarm accompanying it:
So just looking at code helps. Reading it with your eye like braille, letting the new bumps and cadences register without going into what they mean. Getting to where looking at the new code or IDE does not give you that jarring intake of breath, that quick eye scanning to find your place. Being in that state puts you in a defensive posture which can serve as a barrier to information coming in -- you might be rushing, you might be panicing, you might be simply copy-pasting, or even giving up.
For experiential learners, before you begin "hello world", maybe sit back and explore yourself in the new environment ("Um, ..world..? Hello..?"). Get a feel for a piece of code or an IDE as a formal structure before attempting to grok it cognitively. Are there many windows all over the screen? Is the code verbose or terse? What type of symbols do you see, and, is the effect to clutter the page? Clear the page? Highlight certain structures? What does it feel like? Do you know where you are? What metaphors does the environment use, and are they familiar to you? What are the menus? Do this until you feel kinda like you "get" where you are, even if you don't know what it's doing yet.
Thinking about seeing code and context brought to mind the work of an artist and poet, Austin Kleon, who has published a book of poetry called Newspaper Blackouts, in which he starts with a full page of newsprint and a black marker, and blacks out all but words he shapes into a poem. Not only do I like his work, but this way of seeing made me think about how you might "see" code after knowing a language or framework better. You might look at codes and immediately see the contextual groups:
"Ah, yes, view callbacks", you murmer to yourself, and begin implementing them:
After a while, the noise drops off and you "see" the callbacks more like this: clearly and simply, well-placed in space, tools for your use.
The calm of this last image is striking (as an aside, I can see why Matz invented Ruby! It really does improve programmer happiness). This calm, though, comes from getting to cognition.
So learning is both. Orienting in your space, and using your tools.
It's interesting to think about what you're seeing and what someone else is seeing, when you're looking at the same piece of code. It's so different based on where you both are in the process of learning. Thinking about what people see might be helpful in teaching, as well. If you do learn this way, give yourself the space to get comfortable and don't jump to judgment on your style.
All in all, it was a great week. And now that I've gotten this out of my system, stay tuned for my iphone app sometime in the not too terribly distant future!