I love teaching girls to code

Tomorrow, my classes and club will begin participating in the NCSS python programming  Challenge 2014. It’s our second year and I’m quite excited as it’s a really fun challenge.

Like last year, I introduced the software programming and design topic using dance; except this time, I actually linked it to computational thinking straight away – decomposition, pattern recognition, pattern generalisation and abstraction, and algorithm design.  Timing was on my side as the year 9s have been learning new dance steps in preparation for the Year 9 dance. Plenty of inspiration in terms of computational thinking processes, value of coding, control structures and even functions…with parameters!

There is so much hype on teaching kids to code – nearly 12 million views of code.org’s What most schools don’t teach and the rise and rise of many learn to code sites. There’s also the impending implementation of the Digital Technologies curriculum, etc. etc. etc. But for me, it’s far more than the hype – I actually love teaching students to code.

Learning to code is more than just about writing code; it’s the least of it, in my opinion. It’s all the other stuff about computational thinking and systems thinking and critical thinking and creative thinking. That’s a whole lot of thinking – and doing – right there!

With computation thinking, I think it’s important to point out that we all do most of this already.. in real life! Think of all the procedural and component-based stuff like recipes and routines we have, for example. What is less common is algorithm design, especially in school where we teach ‘tried-and-tested’ algorithms. This is true not just in mathematics where we teach (and test) mastery of algorithms but also in humanities subjects like English as we teach the “right way” to write essays, for instance. In schools, it’s rare for students to design their own algorithms, their own way of doing things.  Learning to code provides opportunities for algorithm design, encourages it even. And I love it.

Systems thinking is taught in many subjects. We are surrounded by systems. We’re made of systems. But, it’s rare for students to make their own systems. Learning to code provides opportunities for designing systems.

Teaching kids to code can be daunting and having set “courses” do help. Learn.code.org is a good entry point for beginners (students and teachers alike). I also recommend  NCSS python programming  Challenge . Both are challenge-based and fun.

I also think it’s a good idea to expose students to the experience of learning another language, mapping similarities and differences – the meta stuff. This includes reflecting on problem-solving methods and attitude when faced with difficulty.

I enjoy doing the challenges with the students. Sharing the joy of wrestling with knotty problems and working out solutions. I love that I have a window to how they think. I love it when they come up with creative ways of thinking and solving problems. I love that they don’t ask “when I’m I ever going to use this?” because it’s fun just getting through it.  I love it when they teach each other and work together and share frustrations and wins together. This, for me, is the fun stuff…and I’m lucky I get a chance to be part of it because I teach coding.

The best part is that I get to play along.

print (“NCSS 2014, here we come!”);

Python Revision FUN

With Year 9 exams next week, I spent some time today revising some software development concepts with my class. With the end of NCSS Challenge ending a few weeks ago, it’s been a while since my students last coded in Python.

The focus today was on errors (ha!) particularly desk-checking and variable tracking. So, I wrote this code on the board:

code part 1

I got student volunteers to write out the values for variables: sites, mysites, i, len(mysites) and print.

Short as this code may be, it provided plenty of opportunities to revise a fair bit of content. Anyway, the sites the girls elected to have were Google, Apple and Sony, so print showed:

Option 0 Google

Option 1 Apple

Option 2 Sony

We then went on to editing the code to start printing from Option 1, instead of 0, etc., followed by this bit code (with opportunity to correct syntax errors for relational operator and if statement):google2And thus updating the value of print to show:

Option 1 Google

This is where we’re going

and I kept writing ‘on November 5′

We’re really going to Google?”

Are we really?”

Plenty of squeals and smiles.

To which I can only reply, “Wasn’t that a fun way to break the news?” *do it in code*

Two birds with one stone. And happy students to boot. Got to love that!

 

Software is poetry

… programming is not really the practice of writing lines of code. It is the art of taking big, intractable problems and breaking them down into ever smaller ones which can be understood, explained and then carefully assembled into a living, breathing work of art.

Software is poetry. It’s the expression of ideas in the most elegant form a programmer can devise.

This is a quote from a piece entitled, Coding. Way funner than you think by @gilfer. It’s a wonderful piece that really gets inside a programmer’s head – the feeling, the buzz, the excitement, the creative process that is software programming. There’s many more I can quote here but hey, go over and read it because @gilfer’s prose is beautifully written.

My chosen quote, however, does capture the essence of my NCSS Challenge experience.  @grubbypandas pinged me about this challenge knowing that I wanted to learn Python as a potential language to teach for Computing Studies (IST and SDD).  Aside, @grubbypandas also told me about pastebin, really useful site, imho (THANK YOU). In other words, I joined the NCSS Challenge to learn Python AND get ideas on how to teach Python, or other programming language – all for $20….bargain!. I haven’t written programs for ages (and I mean ages) so I had my reservations but going into the challenge with  @grubbypandas and @akwc  helped.

I’m proud to say that I finished the challenge – Intermediate level –  and before I forget everything, thought it wise to jot down these thoughts.

Likes

Learn in manageable chunks. Each week, a set of notes were provided that  provided enough information to complete the week’s 6 questions. I skimmed through these and then referred back as needed. Over the weeks, I referred back to more and more – a good indication that I was building on previous knowledge and skills. All these resources are now available to me. yay!

Tackle interesting problems. Just like the quote says above, programming is at its core a problem-solving exercise. It involves looking for patterns (algorithms) and exceptions and then writing/tweaking. Still with the initial nod to the traditional “Hello world” , the challenge then took advantage of opportunities for tangential learning with questions involving Kaprekar’s constant, Aboriginal languages, QWERTZ keyboard (Y and Z swapped in German keyboards), iambic pentameter en route to writing Twitter poetry. I was learning more than Python.

Provide instant feedback and hidden cases. The interactive checker is rigorous and unforgiving chucking out an error for that printed extra space, for example – which is a good lesson in terms of real-world programming; pay attention to the requirements and realise that the computer will only do what you tell it to do. But wait, there’s more. The checker also includes hidden test cases which is a good way to ‘catch’ hard-coding of solutions (I’m not quite sure how else to explain that) as well as promoting extrapolation (higher-order thinking). And those green checks look better than the red crosses.

Have multiple-entry levels and promote community. It was very humbling to note that the challenge was meant for students, some as young as in year 5 (10 or 11 years old?) and that they were tackling the same problems as I was. Truth be told, I struggled more with unpacking the problems (finding algorithms) than in actual coding. The challenge provided a forum for students to help/engage with each other as well as contact tutors for more support.  The forums also showed that there are very capable students out there, already thinking about elegance and efficiency in writing and executing code; these skills rarely have outlets in traditional schooling.

There is more than one solution. As @gilfer noted in his piece, there is no single solution and that every programmer will express his/her style. The checker accepted working code but the challenge also published solutions which provided more opportunities to learn such as new commands/syntax not yet covered. I liked that I could play with different algorithms.

Dislikes (no more, see update)

There was no forum for teachers. Okay, so there are benefits for going in there as a level-playing field (think massivelyminecraft approach). Still, it would be nice to discuss how this challenge can be incorporated into the curriculum or as an enrichment/extension activity. This is partially why I’m writing this post, in the hope that other teachers could extend my thinking here!

…not much else to dislike…seriously. (Update a few minutes later: @grubbypandas has kindly pointed out what I missed… THERE IS A FORUM FOR TEACHERS…and I missed it….gah!)

All up, it was a fantastic 5-week challenge. Sure it got frustrating in parts but ultimately rewarding. I highly recommend doing the challenge with students, not just for Computing Studies, in fact. It’s for anyone who wants to encourage computational or algorithmic thinking. As this challenge has shown, this type of thinking can be promoted as cross-curricular; there are patterns everywhere (I’ve said that in my Algebra classes as well); Python is a tool to help code those patterns.

Besides, as @gilfer said…

Coding. Way funner than you think.