Girls and Coding

WARNING: small sample size ahead. With that out of the way, I'm going to use this post to extrapolate from my 11-year-old daughter to my theory about "females and coding".

The story with my daughter begins a few years ago when she was about 5 years old. I was showing her a technique for multiplication and division. The technique involves creating rows and columns.

So 8 x 6 would be written as 1, 2, ..., 8 in the first row, then 9, 10, ..., 16 in the second row, and so on until the number of rows equals 6. The answer for 8 x 6 is the last number of the last row. The answer for 48/6 is the number of columns (groups of 6); 48/8 is the number of rows (groups of 8).

One tool that solves multiplication and division at the same time! I love this tool. I find it beautiful for teaching math to young children.

I explained it to my daughter. She got it. She was able to apply the tool to other problems. But something was missing for her.

What was it?

Joy! She wasn't in the least excited with this tool.

That was a big moment for me. I knew that she could learn any math. But I began to worry that she wouldn't love it the way that I do.

So, I switched to teaching her coding. I saw coding as a "backdoor" and fun way to teach algebra and other math concepts to her.

We started with Javascript on the Khan Academy website. She took to it right away. But around lesson 8 or 9, I felt that there were too many graphics (i.e. printing "hello world" in Javascript is rendering a circle), and not enough rigorous coding.

I then switched to the Python language. I am currently teaching her the basics of data mining.

For the data, we use our rainfall recordings. I've been recording the daily rainfall at our home since the Fall of 2009. As of today, we have nearly 400 recordings, spanning 8 "rain years".

With my help, our child has built a Python script that asks the user what kind of chart she wants (bar, line or pie), and then generates the chart showing the total rainfall for each year. For the bar and line chart, she used the same default color: blue.

For the pie chart, she used different colors for the pie slices. I walked her through selecting the colors by hand, and then we progressed to pulling all of the colors from the matplotlib library, and randomly selecting the appropriate-sized subset for the chart.

We ran that code. Crazy combinations of colors appeared every time we ran it. I looked at these results and had ideas on modifying the code to display more useful information on the chart.

But my daughter didn't care about that. Instead, she cared only about the colors. First, she modified the code to print out the randomly generated collections of colors, and if she liked the combination, she would save that collection.

I didn't find what she doing interesting from a coding perspective, but I loved that she was highly motivated.

Last Thursday morning, I said "what the hell", and we spent our coding time with me showing her how to hand-build a Python dict structure with keys like "purplish", "greenish", "bluish", etc. The values for each of these keys are comprised of a list of color names that she feels belong in the category.

When she ran her code, the pies appeared with the thematic colors that she had selected. This can be seen in the picture at the top of this post. I created this picture from emails she sent to me last Thursday afternoon.

What was remarkable about last Thursday was the passion that she showed for developing this color-grouped code.

Normally, with homeschooling, my wife often has to "police" our daughter. That is, sometimes our daughter sneaks to online games or media instead of working on her core, school subjects.

But last Thursday, my child "sneaked" from schoolwork by developing her code. I was thrilled!

I was even more thrilled when she asked whether she could continue her coding during her "screen time".

Everyday she can log into a special computer account that is available for only one hour per day. This account allows her to access media and online games. She is totally passionate about this hour.

That her passion about coding superseded her normal Minecraft and YouTube screen time activities was a first in our family.

This amazing event is what I had been looking for in teaching my daughter coding. "You can bring the horse to water, ..." is so true about coding. That is, I can spend 15 minutes a day teaching my daughter to code in Python. And through that habit, she can become proficient. However, all of that says nothing about her passion for coding.

Last Thursday, her passion for coding exploded. And it was all about the colors! Moreover, if I had been paying attention, I would have also noticed her deep interest in the written language (i.e. when I taught her string processing in Python and asked her to write out sample strings, they were very interesting strings).

If I had to pick one phrase to describe what she loves about coding, it's "interface creativity". Right now, her engagement is totally visual (i.e. images, words, etc.). I suspect she'll also love it when we start coding with sounds.

Here are some of the things she understands about coding, but doesn't seem to love, but that I love: abstraction, elegance, efficiency, and robustness. Basically, I love the structure of coding. My daughter loves the rendered effects.

In teaching my daughter data mining with Python, I am planning on bringing her into the work of developing our data mining codebase. Originally, I was thinking of getting her to work on the structure. i.e. How to make the code faster, and more efficient.

After last Thursday, I realized that the best, initial coding role for my child is UI. Now, I don't give a rip about UI. UI is something I do only because I have to — not because I love it. But, my child loves it.

Moreover, UI is the gateway to making my code usable by anyone other than myself. In my various coding projects, I need to generate compiled, complete versions of code that can run like stand-alone applications on the Windows and Mac computers of our clients.

To do so, I need to spice up the UI. I'm going to love working with my child on this.

Finally, about the small sample size, I suspect that the nature of my daughter's interest in colors is not just random. Rather, I suspect it's "female".

My suspicion is based on my decades of experience in the math/computer science worlds, and my interactions with the women I've met in those worlds. I've noticed that on a creative, expressive metric, these women score much higher than their male counterparts.

Recently, a friend mentioned that his granddaughter has been diagnosed with synesthesia related to color. It is commonly perceived that synesthesia occurs more frequently in females than in males.

I told him that this reminded me of something I'd read about the Hmong culture and epileptics. Whereas, in our culture, we see epileptics as "sick" and needing "treatment", the Hmong see their epileptics as being closer to God and treat them as shamans.

I also said that the coming day when women take over the world, the synesthetes will be the high priestesses of the culture.

And when women finally dominate coding, it will become a lot more colorful and interesting, and way less abstract and boring to budding female coders like our child.

Comments