I recently picked up Learn Python the Hard Way: A Very Simple Introduction to the Terrifyingly Beautiful World of Computers and Code (3rd Edition) by Zed Shaw. Shaw’s approach to teaching you Python is to have you set up your computer to program in Python, then have you type in program after program and see what it does with a bit of guidance along the way. Says he:
At first, you will not understand anything. It’ll be weird, just like with learning any human language. You will struggle with words, and not know what symbols are what, and it’ll all be very confusing. Then one day BANG your brain will snap and you will suddenly “get it”.
One of the things he emphasizes is the value of making mistakes, typing in code wrong and having to debug it so that you can get a clear idea what is and isn’t important in making the program run, and making sure you really understand what you’re supposed to be typing. What’s striking though is that phrase, “just like any human language,” and joined up with the idea of “BANG“. It puts me in mind of my first time in France, where for two weeks, I knew all the rules and seemed to make sentences okay but then, one day, I was suddenly speaking French without thought or effort because I’d just done it enough that that was how my brain worked.
I recently did something similar to this with Sumerian, working through each passage in Hayes’ A Manual of Sumerian Grammar and Texts and copying it down. A lot of the passages were like this:
For God So-and-so/His lord/King So-and-So/King of Certain lands/Built this temple/rampart.
Phrases like “nitah kalaga, lugal Urimak, lugal Kiengi Kiurik” (Strongman, King of Ur, King of Sumer and Akkadia) get pretty ingrained in the memory after you’ve been doing this for a while. In a sense, the key may be “varied repetition”. That is, if you repeat or write the same phrase over and over, it becomes a mantra and becomes too automatic. But if you repeat or write a variety of sentences – be they inscriptions or lines of code – that often contain the same elements, then what you get familiar with is mixing and matching those elements.
I should mention why the author says his book teaches “the hard way.” He makes the point that we often look for an easy way, but that what is easily understood doesn’t necessarily stick. So for him, the hard way – exposing yourself, over and over, to what you need to know until it sinks in, is actually the easy way in the long run. Just so, you can learn a language quickly, but only if you are putting everything you learn to use by really speaking and/or reading and writing so that your newly found knowledge has time to become a part of your thinking.
Shop Amazon – Holiday Gift Cards – Instant Delivery or Free One-Day Shipping
I’ve been learning Python recently @Learnstreet , i was sooooo tired of Codecademy’s poor quality content. These guys definitely have a better structure to their courses. I love their code garage section personally where you can flaunt projects that you’ve completed , if you are also looking at learning Python you can check them out @ http://www.learnstreet.com
I’ll be staying with the book for the moment, but I did drop by the link. I don’t know about the course structure but the interface looks cleaner.
That seems a very odd approach to programming, to me. I was trying to pick up Python at the start of the summer (and I’m kind-of-sort-of picking it up again just now, but I’m fiddling with Javascript first) and the biggest problem (as a lapsed C coder) is the powerful but alien concepts involved in list, string and dictionary manipulations. A good explanation is worth its weight in gold, but most instructional materials don’t follow the explanation up with enough practice.
This books seems to want to eschew all explanation in favour of all practice, all the time, but then is blindly typing in listings real practice? Surely structured example problems are better for the learner.
Anyway, I’m curious to see how you get on.
As I’ve gotten a little further in, it gives a little more guidance on what to look for when things go wrong, and tips for how to think about what’s going on. In a way, it’s like direct instruction – the language is modeled, you’re asked to reproduce it and then you get feedback. Also, as you get further in, you’re asked to try other things and see what happens.
It is a strange and curious thing. In ways, it feels like Dr. Arguelles’ scriptorium exercises, but in other ways, it’s a much more engaged activity, just one that is extremely closely supervised. I do have the sense that getting used to typing in things correctly may actually improve your “fluency” – how naturally your fingers type with the strange syntax and symbols – in the same way that you need to actually speak to learn to use the language. When you start speaking, or typing, of course is a matter up for discussion though I’m not sure how you’d replicate an incubation program for a computer language except that according to the author, those books that let you download the code instead of typing it yourself hardly move beyond this.
Interesting. Certainly I keep making =/== mistakes. Even though i used to be a C programmer. A certain amount of hand-holding and just-in-time intervention would definitely help me kick that habit (and save me an awful lot of debugging). Not sure a book’s interactive enough to hold the hand though. Even if you believe in an optimal order of learning, you’ve still got to accept that people come to a computer language with vastly different prior learning under their belts….
Hi G Barto. I was searching around for language sites and stopped by. I loved this little “language” diversion you wrote about. Python is excellent. Very powerful and fairly simple to use. Good luck with it.