Why I Taught My Daughter To Code (A Little) Wednesday, May 16, 2012

Literacy

Imagine a world in which very few people knew how to read or write. You kept to certain parts of town because you couldn't read a map or a street sign. When you needed to sign a contract, you just asked what it said and had to take it on faith. A lot of your experience was based on legend and rumor. Books, and the information in them, were mystical. Sometimes you suspected they were being used against you, but you never really knew.

There was definitely plenty of work around, but some high end jobs weren't remotely possible - not just clerical work, but professions that required a lot of information management, like the medical and legal professions.

Please don't tell me not to learn to code

Over this past year, there have been commentary back and forth on whether everyone should learn to code. A few free, interactive sites like Codecademy popped up which made it easy to start learning some basic coding. I was a big fan - I helped my eleven year old daughter go through it, and we both agreed it was great. More on that later.

Then Codecademy launched Code Year - a grand plan to teach hundreds of thousands of people to code. It was a big hit - even NYC's mayor signed up.

But no good deed goes unpunished, and there's been some snarky criticism from - you guessed it - professional coders. The latest if Jeff Atwood's post, Please Don't Learn To Code.

Hogwash. Learning some basic coding is an excellent investment of anyone's time.

Easy on the Straw Men

It's "please don't hear what I'm not saying" time.

I don't think that the general populace needs to be proficient at writing code. It would be silly to argue Mayor Bloomberg shouldn't be slinging Javascript on the job (as Jeff does). That's not at all the goal. Nobody's saying that everyone should become a programmer.

What I - and others - are saying is that learning some basic coding skills is an excellent investment of anyone's time. I'll make two arguments:

Understanding computers (including all the computing devices and products that surround us) is of huge and growing benefit to everyone.

Basic programming is an excellent way to gain some of that understanding.

Computer Literacy as a Basic Life Skill - Right Now

Right now, pretty much every part of life is in some way affected by computers - most pretty heavily. Shopping, socializing, medicine, education, law, entertainment and more are all at the very least affected by computers and the internet. My three daughters had a use for basic computer skills long before math would do them any good.

This only gets more intense with increasing age. Teenagers can greatly profit from computer expertise and tech savvy. It's hard to imagine a college program (at least one with any practical application) that didn't involve a hefty amount of computer usage - from basic internet research and word processing on up to simulation and research.

Most careers (in the industrial world) involve some amount of information management, and workers in these professions who have some computer skill can often be a lot more effective. That includes areas where even a decade ago people might not have expected to see computers - agriculture, construction, family-run restaurants.

I've talked with countless "civilians" who have profited from computer skills over the years - a real estate appraiser who figured out how to automate using Excel and worked circles around his colleagues, film makers and musicians who figured out how to record, market and distribute on the internet, non-techies who sell things online, a school facilities manager who figured out how to cut costs significantly using computer security and automation.

And many of those people had new doors and careers open to them due to their new-found computer skills. When the real estate market slowed down, the appraiser jumped right into a technology job. Heck, learning to code on my own - starting with my grade school's Apple II - gave me the option to jump into a computer career after I got out of the Navy (in a technical but not computer related field).

Computer Literacy as an Absolute Essential in the Very Near Future

"The future is already here — it's just not very evenly distributed." - William Gibson

It should be obvious to anyone paying attention that computers have become a huge part of our daily lives, and that trend is rapidly accelerating.

I'm reading Physics of the Future (Michio Kaku). It's a fascinating book in which Michio points to obvious trends and extrapolates where things are going in the near future. In many cases, even a very conservative estimate - or even a look around - shows that every part of life will soon involve interacting with computers and the internet. He points out that global powers during World War II would have killed for the computational power in a simple musical birthday card. Now, we just throw them away. Average mobile phones rival supercomputers from the not-too-distant past, and they're connected to a growing internet and GPS satellites. In the next few decades, computers will continue to shrink and become integrated into everything we interact with.

The quality of our everyday lives will be greatly affected by how we interact with computers. How should that interaction take place?

Magical! Or, Should We See Computers as Products or Tools?

Technology companies work hard to package technology so that it can be used naturally, so consumers won't have to think or fiddle with details. This is a good thing. Anyone working in technology should be focused, consumed with the challenge of exposing the possible as the natural. We should be doing this not just because it's a worthy goal, but because it makes good business sense - friendly products sell.

But it is not in the average consumer's interest for them to blindly buy into this magical experience.

Think about the historical progress in how informed consumers approach medicine. In ancient times, mystics sold magic and consumers had no real insight into what they were buying. Over the centuries, the public has gained a much more informed view of science and medicine, and this is of huge benefit to them as consumers. We expect to see evidence, we read about product recalls, and the market for doctors who sell amulets and snake oils is pretty small. This applies to other areas of life, as well. While I could get around in a car I thought was powered by tiny horses, I'd be unlikely to make wise decisions regarding the purchase and repairs to said car. An informed approach to modern life helps.

Now think about the consumer approach to computer products.

Think about how computers and technology are shown in movies and TV.

Think about how helpless your relatives and neighbors feel when they're buying techy products, or when something doesn't work.

Think about a friend or relative who paid too much for a website that never worked right.

Ah, but you may be thinking about a favorite company who sells you magical products right now, or runs some of your favorite websites, or sells you apps or movies. Well marketed brands that have built reputations for quality and ease of use have helped uninformed consumers navigate the technology landscape, but keep in mind that these companies have divided interests. It's their job. They want to sell you things, and their stockholders demand that they bring in as much profit as they can from those sales. Mindless and uninformed brand loyalty is not only expensive, it's by nature counter to your interests. It's no way to live - and thrive - in a digital world.

Computer Literacy as a Leadership Requirement

The basic level of technical understanding that we expect of our leaders must grow with time in order for them to govern. We expect them to understand our legal system, but we also expect they should know that medicines are chemicals which influence the biological processes in our bodies, that electricity powers lightbulbs and is transmitted over an electrical power grid, that mobile phones have radios in them, etc. I'd be scared to hear that our leadership didn't have a very basic understanding of our modern world. They write and enforce laws and policies that greatly impact our lives, so they need to have a clue about the world we live in.

In the same way, leaders who see computers as magic boxes, coders as wizards, and computer code as incantations can't effectively govern. They can't set policy, they can't have informed legal opinions, they have no framework for evaluating whether information being fed to them makes any sense (or even knowing if they should ask).

Leadership requires understanding, and more, it requires - well, a sense of direction. The future is going to include more and more technology, and leaders who don't understand the present or even have a rough idea of the road ahead are a menace.

Computer Literacy as an Educational Oversight

I've been describing why non-techies can benefit from some computer literacy. Unfortunately, they won't get it in from our schools.

Computer literacy is undoubtedly of more use to most people than the foreign languages most high schools require (I want those 4 years I spent on high school French back). I have rich conversations with people worldwide thanks to the internet and automated translations, not any time I've spent studying languages.

Though it may offend, computer skills are of more use to the huge majority than mathematics including and beyond first year algebra. Most people will rarely if ever use algebra; everyone uses computers.

Consider this: in the off chance that the average farmer / dentist / lawyer / car mechanic / stay at home parent / author / teacher / etc. needs to solve an algebra problem, they can punch it into the search engine and get the answer: 3x + 7y = 4y - 35. Or, more likely, just ask their phone.

The same goes for so many things we devote educational time to. Does the average high school graduate remember anything important about titration or Augustus or sentence diagram? Titian or Taft? Or even remember how WWI started? Does it matter when they can just look it up on Wikipedia?

I'm all in favor a balanced education. I got a B.S. Physics (with honors) from Annapolis and went through the US Navy Nuclear Power program (a very rigorous engineering program) following that. My parents were both school teachers. My wife and I homeschool our daughters and put a very high priority on their education. I see education is important, and I think STEM is an important priority.

But in the broader perspective, our educational priorities are often focused on a historical ideal, completely out of touch with a world in which nearly everyone interacts regularly with computers that most people barely understand.

This is a much bigger discussion, but here's the main takeaway: after thousands of hours in the classroom, our students emerge unempowered into an increasingly digital world. We're on our own here.

Excess Capacity: Oh, the Hours We Throw Away

Fine, most people could benefit from some computer literacy. But who has the time?

I don't buy it. We as a society throw away countless hours on games, entertainment, and apparently even tracking the adventures of someone called Snooki. We make video mashups and silly tumblogs and meme pictures of cats. We catalog Pokémon. We read books about vampires romancing high school girls. We write long blog posts.

We have the time.

We have a ridiculous amount of leisure time, hours we just throw away because we can't think of anything better to do.

Basic Coding as a Gateway To Basic Computer Literacy

While it might make sense, I'm not proposing citizens spend a mandatory two years in the "Get Smart About Computers" corps. I'm just proposing that:

Non-techies consider spending a few hours learning how computers work. Techies encouraging them - and not actively discouraging them! Sheesh!

Thankfully, getting a basic idea of how computers work has gotten incredibly easy. Sites like Codecademy make it easy to learn - hands on - how computers work. These lessons are hands-on, and they're practical. You learn web fundamentals and how to build a simple website. This is empowering stuff. It's a great way to start the journey from a powerless consumer to a contributor, or at least informed consumer. It's not time consuming, and it's free.

Maybe some of the negative reactions from coders to the Code Year phenomenon have come from not bothering to actually read what's in the classes and assuming that the goal was to turn a bunch of people into programmers. Maybe.

Case Study: Rosemary, Champion of the World (and my daughter)

This past year, my daughter asked me if I could teach her computers. I talked to my wife and rolled it into her school plan. We had ten lessons. During this time, we worked did the following:

We worked through the Getting Started With Programming section of the Codecademy Javascript Fundamentals course. She did all the work on her own, and when she got stuck I would have her re-read the instructions out loud. She'd say "Oh! I should have read more carefully!" and move on. She learned some basic loops and conditionals - nothing difficult. I gave her at test on repl.it where she wrote a loop from 1 to 25, outputting either "You are too young to drive a car!" or "Your age is 20, you can drive a car!" She asked how the internet works, so we watched a video on YouTube about how the internet works. Then we went on a field trip to our router, and we talked about how to "fix the internet" when it's not working. She asked about making a web page, and how web pages work. We played with browser tools (Chrome and IE) and she learned the difference between HTML, CSS, and Javascript. I let her recolor my webpage pink, and we went to CNN and put her picture and the headline of her choice in the headlines. She asked about making a computer game. We talked about why that would take some work, and planned to do that when we started back up in the semester.

This was fun. We both had a good time. She asked questions that wouldn't have come up otherwise, and she wouldn't have been interested in otherwise.

More importantly, after only 8 or so hours, I noticed she saw the world differently. She had ideas about what computers should do. She laughed when computers did silly things on TV. She read error messages and solved problems in an intelligent way. She keeps asking about building a computer game.

She understands that there's no reason that girls can't have fun with computers, too.

From a time investment of about 8 hours.

This started with writing some Javascript and HTML. That was critical because it helped her understand how computers work. She learned that they were unthinking and unforgiving in the way they followed her instructions. More importantly, she learned that they would do what she told her if she learned their language (in this case, some basic Javascript).

Case Study: The Judge

In a funny bit of timing, just last night I read about the judge on the Oracle / Google trial was able to make an informed decision about a Java function because he'd been -shocker - learning some Java. It was something that would have seemed obvious to most programmers, but was delightfully refreshing to hear in a court.

Now here is a later followup where the Judge slams Oracle:

Judge: We heard the testimony of Mr. Bloch. I couldn't have told you the first thing about Java before this problem. I have done, and still do, a significant amount of programming in other languages. I've written blocks of code like rangeCheck a hundred times before. I could do it, you could do it. The idea that someone would copy that when they could do it themselves just as fast, it was an accident. There's no way you could say that was speeding them along to the marketplace. You're one of the best lawyers in America, how could you even make that kind of argument?

Oracle: I want to come back to rangeCheck.

Judge: rangeCheck! All it does is make sure the numbers you're inputting are within a range, and gives them some sort of exceptional treatment. That witness, when he said a high school student could do it...

So here's a judge who's able to make an informed decision about a technology case. What's more shocking is that this is news.

Some Objections

Shouldn't everyone learn plumbing, too?

Jeff's been having fun equating the "learn to code" movement with "learn plumbing!"

This is one of those fun arguments that sounds good but falls apart after a moment of thought. What would the return on investment be - both in cost and time - for your average person to learn more about plumbing than working a plunger? How often do they work with plumbing in a way that would benefit from a deeper understanding?

How often do most people work with computers, smartphones, and internet sites in a way that would benefit from knowing a bit more?

Not more code! The world needs less code!

This is a bad argument for three reasons:

This is a coder's argument to other coders. Solving your application's issues is often best solved by thinking, not mindless coding - granted. That has nothing to do with whether it's worthwhile for your average person to learn about how computers work. It's - perhaps unintentionally - elitist. We nerds have a huge advantage in dealing with the computers that surround us. Telling the rest of the world that they can't join in, or acting like it's harder than it is, is just wrong. It assumes that amateurs won't be writing code anyways. I've seen tons of code over the years written by people who had a problem to solve. They cobbled it together from internet searches. It was inelegant, but it worked in that it solved their problem. There are a lot of populist pseudocoding tools out there - think of ifttt or the use of countless Wordpress plugins - that let real people solve real problems without having to wait for nerds to get involved. They'll do what they need to do, the question is whether we'll encourage them and help them find the structure.

Fine, learn computer literacy, not coding!

This is at least something. The problem here is twofold:

It assumes people know what questions to ask, or how to ask them. As long as they see computers and the internet as mystical boxes full of magic, that's not the case. I'm continually helping people solve problems by prompting them to actually read what a program or web page is telling them (and saying that computers and web pages need to give better messages or not require input is irrelevant).



Without knowing the fundamental differences between how computers and people think, people resort to just yelling louder in their own language.

It assumes we know what people need to learn. That's only kind of true. Often the approaches I've seen here come down to teaching them how to use a particular product or software package, which is definitely not "teaching a man to fish." Real problem solving skills in the technology world come down to thinking systematically and rationally about technology, which requires some basic understanding.

Where Next?

If you don't know how to code, get started. It's free, fun and easy.

If you know how to code, encourage others around you when they want to learn. Odds are, someone did that for you a while back.