Monthly Archives: April 2012

Quote

Many people may disagree …

From the thoroughly brain charging article Coding for Success by Andy Young

Many people may disagree that learning to code is for all or should be compulsory. “Why bother?” they may say – “We don’t need that many coders, most wouldn’t use the skills – it’s not that useful.” But it’s critical to understand what learning to code is not. Learning to code is not learning C++, or Ruby, or HTML. Learning to code is not learning architecture, or security, or memory allocation. Learning to code is not training to be a professional programmer.

Learning to code is learning to use logic and reason, and express your intent in a consistent, understandable, repeatable way. Learning to code is learning to get under the skin of a problem and reduce it to it’s simplest form. Learning to code is learning to harness power external to yourself and provide instructions to realise your ideas – whether that be directly to a computer, to delegate to one or more professional programmers or even a human team that work for and with you in any dicipline. Learning to code is ultimately a fantastic way to gain a multitude of transferrable skills.

Published in The Kernel, January 23rd, 2012

Advertisement

Family 3.0: A Manifesto

Alright, I’m ready to call it. If the 90s was the decade of the brain, and the 2000s, the decade of impossible to categorize millennial upheaval, this decade is going to be the decade of digital literacy. Or at least that’s what it should be.

When I say digital literacy I don’t mean this is the decade when everyone finally figured out how to use Twitter.  I mean during the next ten years society is going to accept that computer science can no longer remain a field reserved only for specialists.  It needs to become a core subject in schools, as important as math or english. And it needs to be something that all citizens are learning at whatever pace is realistic for them.

There are so many reasons for this, but the most  important, every day we’re  uploading more and more of our personal, professional and financial data into a cloud. If we don’t understand at least the fundamentals of how that cloud works, we’re leaving ourselves and our children vulnerable to all kinds of manipulation, surveillance and violation that we’re not even conscious of. 

Some people will choose to gate themselves off with strict parental controls. But the Internet has the potential to be one of the greatest incubators of creativity, knowledge and social connection in the history of  human civilization.  Who wants to gate their kids off from that?  Or more realistically, how long will you even be able to?

The best way to turn kids into good digital citizens, able to protect themselves and each other, is to direct them towards the knowledge and skills they need to make informed decisions consistent with good values.

Learning to program is no longer about learning how to make  robots.  More and more it’s going to be about learning how to stay human. As Douglas Rushkoff started pointing out last year,  we are  increasingly being faced with the choice of  being the programmer or the programmed.

So how to start? We can call for massive educational reform, like they’re doing in the U.K.  In January the Ministry of Education  announced a huge overhaul of the teaching of information technology in schools. Last month The Observer ran a week-long series called “Why All Our Kids Should Be Taught To Code”  It covered all the best reasons why computer science needs to become a core subject, and why information technology needs to be less about teaching kids how to use software and more about understanding how it is made (there’s an especially great article on why girls need to start learning it early, before puberty when  they start to become more vulnerable to peer pressure.)

Enough with the  stale back to basics testing. Incorporating computer programming into core courses will bring education alive. Fooling around with the functions that make a computer do your bidding, for example, calculating every multiple of three up to 10,000 in under 10 seconds,  is empowering and makes math fun.  Bringing some HTML or CSS into a research project is like mixing a magic graphics potion from twigs. These are challenging skills, but they’re skills with big, immediate payoffs.  Most kids are smart enough to figure that out.

But do we have the time to wait for this educational reform?  If you’re a parent there are great reasons to  simply start learning to code on your own. There are few professions left in which knowledge of code won’t help your career dramatically. Do you really think you can’t learn something that can be taught to eleven year olds? If you’ve cut back from work to raise children, or your college degree is going to be gathering dust for a few years before you head into the work force, learning to code will keep you brain sharp and your skills fresh. And you can use these skills now to build games and projects with your kids. Literacy begins at home, whether it be analog or digital.

Nobody needs to learn enough to become a senior developer.  But just spend  an hour dipping your feet into one of the free coding education programs  that have popped up in the last year. One of the first things you’ll learn is how to create a confirmation box.

In JavaScript that’s as simple as writing this sentence:

>confirm (“Do you like my awesome confirmation box?”);  

Run that in a browser console.  Spend an afternoon hacking that box with a kid.  Make up some nonsense choices.  Another hour and you can learn to prompt some default choices.  For fun try to force each other to make  decisions that lead to embarrassing results. That confirmation box will never again have quite the same unquestioned authority for either of you.

If you do just that, you’re already one giant baby step ahead.

Alan Turing to be featured on British stamp

Alan Turing

Thanks to Lisa Williams over at Life and Code, for the scoop on this.

I first found out about Turing when my mom took me to see “Breaking The Code,” a West End play in London, starring Derek Jacobi. Turing was considered one of the founding fathers of computational thinking, until the mid 1950s when he was outed and convicted of homosexuality. It didn’t get better. He committed suicide and the world lost a brilliant mind.

More at Life and Code.

Understanding The Password

Last week my eleven-year-old son’s yahoo mail account was hacked.  Ben’s on Facebook and doesn’t e-mail very much, so fortunately his list of contacts was small.  Because he doesn’t have any bank accounts or credit cards, I guess I’ve procrastinated explaining to him the importance of having a reasonably complex password you change often

If you’re a parent who hasn’t done this yet.  Do it now. Believe me, you do not ever want to see to see the look on an eleven year old boy’s face when he discovers his identity attached to thousands of e-mails offering to introduce people around the world to his “beautiful lady friends.”

One thing I discovered this week, however, is that I am a significantly different parent after three and a half months of coding lessons.

If this had happened last year, I probably would have shared my son’s sudden picture of the world as a cryptic, chaotic place filled with evil geniuses programming bots that inexplicably burrow their way into your private, vulnerable data.  I would have soldered up the parental controls, because that’s all I would have known to do, and I probably would have done everything I could to protect my son’s innocence and to continue doing it for as long as possible.

But because of our family Code Year pledge, I decided, instead, this would be a good week to review what we’d learned about randomization programs. From what we already knew, it was easy to see how someone with just elementary programming skills could spout out enough random letters or numbers in under an hour to crack the accounts of people who still believed that they could easily protect their data with a simple memorable word or a birthdate.

It was also easy to imagine how some of these simple hacking bots were being created by teenagers in poorer countries, taking advantage of the fact that they’re learning core-programming skills that are not currently being taught as a part of a standard high school education in richer countries.

I’m not talking about skills fundamental to a computer science degree.  I’m talking about skills so basic they can be learned by a middle aged mother and her eleven year old.

I didn’t have to go past week three, conditionals, to find a simple randomization project we could adapt to create our own superSecurePasswordCreatorBot.

We used the dice-throwing project. This elementary program throws a virtual set of dice to create a random score.  With just a few more lines of code, we could replace the numbers on each side of the die with six meaningful words and six meaningful double digits.  Call the program and we have a randomized, but memorable password that can be changed weekly. Add a third die, and we have a SuperDooperSecurePasswordCreator.  As Ben’s knowledge of Object Oriented Programming develops we can continue working on this so that we can easily and automatically store our passwords for easy retrieval.

The important thing at this moment, however, is not so much creating an impenetrable password in a family war against an army of alien grifter bots.  What’s important is that we’re engaged in a productive learning curve, not huddling together into some increasingly tiny information gated community.

Now I’m wondering if in protecting my son’s “innocence,” what I really would have been protecting was his ignorance, and mine.

We’ve grown up in a society that thinks that teaching people how to use software is digital literacy. But in the three months since I’ve started learning core-programming skills, I am being hit with the full on obvious truth that this is pretty much the same as if we were teaching people how to read without teaching them how to write.

Computers monitor and manage every aspect of our civilization.  We would never make math something that people only started learning in university, if they showed an interest.  Why are we doing this with computer science? 

How is this different from the days where monks wrote and priests read from illuminated texts? While the masses listened enthralled.

Our progress was never dependent on how well we memorized or used the illuminated text. It was always dependent on how well we understood that text and used it to illuminate the world around us.

In the same way, our progress as a civilization is not dependent on how well we use, or even how well we make software. It’s dependent on how well we understand how it is made and how this computational thinking helps us understand the world we live in.

That’s the password to the next level.


 

Image

Humanizing Factorials

Annos-Mysterious-Multiplying-Jar

With The Tower of Hanoi, I had fun with the evil powers of recursion. But I’m not actually learning code to teach my son to become a dictator, even a benevolent one, bearing brownies.   While we’re learning recursion, it’s probably not such a bad idea to bring up the some of the consequences of creating formulas that make work and data collection efficient, but potentially dehumanizing.

A few years back a friend gave Ben a lovely book that shows both ends of the spectrum of rich creativity and mechanistic abstraction. Anno’s Mysterious Multiplying Jar was written and illustraed in 1999 by the Japanese  father and son team, Mitsumasa and Masaichiro Anno.  It tells a simple story of factorial development that starts with a jar,  large enough to contain an ocean.

In this ocean is an island and on this island are two countries:

In each country are three mountains.  On each mountain, four walled kingdoms.  In each kingdom, five villages.  In each village, six houses.  In each house, seven rooms, in each room eight cupboards.  In each cupboard, nine boxes.  In each box, ten jars like the first.

The question at the end of the story is how many jars are contained inside the jar?   The answer is ,of course,  3,628,800  a.k.a.  10 factorial or !10.

The first part of the story is filled with richly illustrated picture of villages, houses, rooms, cupboards, all with their unique, individual characteristics.  The second part retells the story with dots instead.  It goes as far as a two page spread representing !8, or 40,320 dots.   The Annos don’t venture past that, since they’re writing a children’s book, not a heavy tome full of dots.

But the point, so to say, is made.

Tower of Hanoi

Subliminal hint, in German

An old school software engineer showed me a computational thinking exercise the other day that finally helped me understand recursion. Or at least brought me a step closer to figuring it out.

The Tower of Hanoi is a classic math puzzle.

Go work on it. I’m going to assume you’re smart enough to figure it out eventually. Come back when you’ve done that. And don’t come back until then.

**Hanoi tiger mom locks blog door**

Have you figured it out?  Oh really. So how many moves would it take to move a ten disk tower?  If you don’t know that, then you didn’t really figure it out! Get out of here!

**Locks door again (secretly bakes brownies)**

Figured it out?

Of course you did.  Have a brownie.

Now we can talk about your adventure. Remember that joyful moment of insight, when you realized that you could move a tower that reached the sky, if you wanted to, because you’d figured out the simple formula! (Start by moving the top 3 disks, then move the fourth disk on to the empty rod, then move the  3 disk tower back on top of the 4th disk, then move the 5th disk onto the empty rod, then move the 4 disk tower back on to that, then move the 6th disk onto the empty rod. Repeat forever.)  But then there was the  horrific realization of how much work that would involve, since every time you add a disk, the number of moves increases exponentially (the formula for figuring out the moves is actually (2 number of disks -1))

Welcome to a secret truth of civilization. Engineering has a simple solution to almost any problem, except where to find the slaves to actually do the totally tedious work!

A recursive formula is basically a formula that repeats the same work over and over, but always adding a little something else—or taking something away–so that the work is actually producing some kind of change.

Crack that and you’ve cracked a major concept in programming.

Now you just have to find slaves! Here bring them some brownies.

rasberry pi….I want some!

Just found out about this really cool UK project called rasberry pi.  This is a $25 computer, the size or a credit card. It’s basically just a minimalist linux platform with a USB port.  The purpose of it is to teach kids to program by stripping the computer down to its punk rock roots.  Look how cute it is:

Image

How Coding is like French

Polemical article here by Canadian novelist/developer Jon Evans in Tech Crunch on why hipsters shouldn’t waste their time learning to code.  His argument is essentially, what’s the point, to be truly proficient at it, you should start learning it, like he did, at age 10.

Interesting that he compares learning to code just for the sake of learning code, to learning French when you may never go to Paris.

I’d be curious how his French is.

French is one of Canada’s two official languages. Outside of Quebec,however, few people are really fluent, or even functional in it. This creates political tension, but on a practical level it doesn’t make much difference.

I grew up in Quebec, however, where over the course of my lifetime, French became the official language of business, government and basically, life.  I saw what happened to an entire generation of people who weren’t functional enough in French to get a job even working in a restaurant.

Americans are anxious. As they should be. They grew up believing that English was going to be the dominant language of business forever. And it probably will be for a long time.  But  anyone who  can’t see that computer code is becoming the dominant language of trade in the world, is blind to the future or kinda has their head in the sand.

Does this mean that anyone who doesn’t have senior developer skills will be unemployed? No. The soft skills–conversation, social networking, etc.–will always be essential.  But deciding not to learn code because  you may never build an app, is like deciding to not learn French because you’ll never be fluent—except  you’re living in Quebec, not potentially vacationing in Paris.

In the future, we may not know when we’re going to need a functional knowledge of code.  But I have no doubt we’re going to need it.