Friday, March 14, 2014

I'm Learning to Program!

I've learned CSS (ending years of confusion about why removing one HTML element sometimes results in lots of other elements totally freaking out) and am in the middle of learning Javascript. I intend to learn Python, Ruby, and PHP.

First observation: getting a leg up on this stuff is about two orders of magnitude easier than I'd expected. Any intelligent and experienced computer user has a feel for how computers work (e.g. variables, if/then contingencies, calls to other processes, etc). We just don't know the yadda yadda for making that stuff happen. And the yadda yadda (look, I'm already using variables!) isn't esoteric magic. In fact, it's pretty intuitive once you learn some basic grammar, none of which is rocket science.

My long-time friend, programming legend Bill Monk, has been encouraging me to get into this for years. He's insisted that you don't need to undergo some starchy, serious course of study. This is a realm where you can spend a couple of hours learning a few moves, then fool around like mad, pulling new strands into your tangly nest of knowledge as you go.

Once you're able to grok the general gist of a given bit of code - even if you don't understand every part - you can plunder that structure and make it do new things, building fresh worlds atop the hulk of someone else's work. Of course, the ability to create structures from scratch without reference is a little daunting (though not all that daunting), but that can come later. There's so much prior art, and so many references and tools available that you could make a career from cannibalizing stock structures.

Learning a computer language seems like learning any foreign language, except:

1. You could get along very well with a two year-old's vocabulary, and be downright erudite with a five year-old's.

2. Everything about the language is "regular" and logical; there are hardly any exceptions or special cases to learn.

3. You know those stilted language-learning dialogs which feature characters talking in ways real people hardly ever speak? That's exactly how people actually use these much so that those dialogs can be endlessly and fruitfully recycled.

4. There's no shame in looking stuff up as you go. In fact, you'd be a fool to try to keep it all in your head. Programming is the natural domain of inveterate cheaters!

Bill already told me all of this. I wish I'd started years earlier!

I'm learning via Codecademy, a free site which offers courses composed of static tutorials. The courses are very stripped down, and delightfully superficial. Each concept receives precisely one lesson, mostly taught pragmatically, via reverse-engineering example cases.

If Codecademy taught basic arithmetic, the multiplication lesson would look like this:

You have three pies, and you need to double that amount. We call this "multiplying" (symbol is "x). Doubling means multiplying by 2 (and if you double three pies, that's 3 x 2, or six pies). Of course, you can multiply by any number you want. Study these examples and confirm them for yourself by diagraming and counting:

5 x 3 = 15
6 x 4 = 24

So solve these, type your answers in the panel (which will tell you if you're correct), and click "hints" if you get stuck:

2 x 4 = ?
4 x 2 = ?
5 x 2 = ?

No one will become a multiplication whiz from such lessons (and I'm hardly a skilled CSS or Javascript programmer at this point!). But you'll be amply demystified, solidly oriented, and painlessly reach a point where mere practice could bring you fully up to speed. And that's how I like it! Once I understand something, I like to do my own exploration of whichever concepts interest me, remaining loosely informed about concepts which don't. I can decide how deeply schooled I want to be in a given area, and fill in, later, with other bits of know-how as needed.

Learning systems drive me nuts when they insist on thorough familiarity with each concept before moving on. I know people who've emigrated to a foreign country and spoke English right up to the moment when their local language skills felt 100% fluent...and then switched over. That is antithetical to my style. Everything I'm good at began with me being playfully sloppy and chaotic, and gradually whipping it all into shape - and sometimes I willfully leave off that last part (my Spanish, for example, remains sloppily chaotic).

If you share my learning predilections, consider trying Codecademy. You'll be amazed how swiftly you can attain MSC (minimal sloppy chaos)! Style sheets took a day, and Javascript is taking only a bit longer. I'm learning with blinders on, spending just enough time on each lesson to get me through to the next, and never sweating specifics (stuff can always be looked up!). I repeated CSS, and it sunk in much more deeply. I intend to go through each course at least two or three times.

If you're more of a thorough incremental learner, try Treehouse. It's not free, but there's a 14 day trial, and each new concept is introduced via calm videos of someone thoroughly explaining things. You're drilled exhaustively before moving on. It gives me hives.

No comments:

Blog Archive