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!

 

Why is it so hard to get girls to study computing?

At my school, an independent all-girls school, there are 3 Computing electives: one in years 9-10 – Information and Software Technology (IST)  and two in years 11-12 Software Design and Development (SDD) and Information Processes and Technology (IPT). I started in this school this year and I was told that while SDD had been offered for years, there were never enough girls to viably run it year-on-year.  We only have IST and IPT at the moment …and for how long?

One doesn’t have to look hard to know that there are initiatives to get more girls into computing, in general, and into software engineering, in particular. For example, Sydney Uni runs Girls Programming Network, UNSW has Robogals, TAFE has Digi-Girls (program seems to have stopped) and Google has BOLD diversity program. Strangely though, my precursory look indicate that Computer Science or Software Engineering degrees don’t seem to include computing subjects as pre-requisites….how will students know if it’s for them if they haven’t been exposed to it previously (just wondering)?

Why is it so hard to get girls to study computing?

Fact is, there’s no easy answer….which means, there’s no easy solution. But first, some ideas on the problem.

Not counting conversations I’ve had on Twitter particularly with @asher_wolf, the following articles I read recently are indicative of the complexity of this issue.

  1. To my daughter’s HS programming teacher – by Rikki Endsley (a woman in IT) about her daughter’s awful experience of sexism whilst still in high school (tbh, there were more issues in that school)
  2. Titstare app at Techcrunch – report/outrage over a showcased app that lets you ‘stare at tits’
  3. The Brogrammer Effect – looking at why there are even fewer women in IT now than in the 1990s; also contains some positive ideas
  4. What it’s like to be a woman in Y Combinator – an interview with Nikki Durkin, creator of 99Dresses; i.e. a success story of a woman in IT and I’ll get back to this article because she has some positive ideas
  5. Terri Oda, Mathematician, debunks ‘women are bad in math’ [sic] myth – includes a brilliant, entertaining and informative slideshow debunking assumptions that the lack of women in STEM fields is due to being worse at science and math

Before I was a teacher, I was also a woman in IT. Luckily, I was never subjected to any of the sexism that Endsley’s daughter had or even Durkin who was “denied” programming electives, being offered Textiles instead (ironically, I teach both at my school).  Durkin is quite upbeat about being in the minority saying it is an advantage because she stands out more and THAT is important for entrepreneurs. And like me, she also hasn’t suffered sexism – the cynics will probably add ‘yet’ to that. My wish for her is that she never does especially in a way that would hurt her positive spirit. This is to say that even though I didn’t suffer from it, I acknowledge that it exists. This is important because when I talk to my students about careers in IT, I can tell them of these 2 sides to the story….as well as some strategies to address it.

Durkin mentioned that part of the problem is that girls aren’t exposed to it. This was also mentioned in The Brogrammer Effect. These 2 articles confirmed my theory which inspired me to change the existing course scope to include software programming  (see related post); that was a risk because girls chose this elective thinking it will be on Digital Media and web design…no mention of coding. Anyway, as it turned out, most of the girls loved it….actually more than I thought.

Endsley’s daughter was lucky to have her mum talk about careers in IT. Most girls don’t have people talking to them about it/IT. As one lady said in The Brogrammer Effect, women just don’t know about the perks of working in IT like flexible hours and “work on amazing projects with amazing people” – certainly an experience I could relate to as well.

…..I’m beginning to sound nostalgic about a past career….let’s move on….

I needed to write this now to reflect on my practice and will use the Stop, Start, Change, Continue framework for some future actions….and this is where your ideas could come in really handy….please make suggestions.

Stop

  • feeling so depressed about the situation; that doesn’t lead to anything but ….well, feeling depressed

Start

  • talking to girls outside of my computing classes about the benefits of studying computing…and that doesn’t mean going into an IT career. Computational thinking is beneficial in and of itself
  • building a community of students who can pursue such interests

Continue

  • searching for ideas to understand and solve the issue
  • connecting with women in IT like @asher_wolf and @kcarruthers  who could be mentors as well as moral support (think: this is worth fighting for so don’t give up)
  • connecting with fellow computing teachers and participating in #ozcschat
  • trying to inspire current computing students
  • seeking help

Change

  • computing course scope to include more Computer Science stuff; after all, students already do plenty of movie-making and web-designing in other subjects

 

Can you help me here please?

OR should I just give up…and go back to IT (that’s adding 1 to women in IT, right?)…or maybe teaching Maths?

Learning to code

Software programming hasn’t been taught at my school for years. It was a bit of a gamble for me to include it in my programs for 3 subjects I teach: 9IST, 10IST and 11IPT. I was intending to do programming with the year 9s but decided to extend this to the year 10s in the hope of drumming some interest for the Software Design  HSC course and to the year 11s because the students expressed interest in learning.

Intro to programming

I used different ways to introduce the topic. First up were the year 10s who I got to play with Context Free Art (visual programming) which I barely learned at the CS4HS at Sydney Uni a few days before. Next up were the year 11s and I took them straight to Python for Beginners course with groklearning; the first couple of modules are free and sufficient to get beginning programmers going. Finally, with the year 9s, I went completely analogue. In groups of 3, they had to design a dance move for 8 beats and write it in pseudo-code. Another group gets to execute the move using the pseudo-code.

The year 9s had the best fun and, in my opinion, really learned what it means to design and code software programs. They experienced the challenge of breaking down the problem (dance move) into smaller components and think of sequencing, concurrent processing and even looping. Then there was the challenge of coding the move. Also, they realised that code – if unclear – could be interpreted in different ways or worse, wrongly (not as designed). They got the big picture: developing algorithmic-thinking and coding skills.  As quoted from @gilfer in a previous post, 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.

Learning Python

I really enjoyed my road-test of NCSS challenge last year and so changed my new school’s IST course so I can include it in (he he).  As mentioned, both my years 9 and 10 are doing the NCSS challenge 2013 in its spiffy new groklearning platform. It fits right in with the IST syllabus (core topics + software design option) as well as my experiential approach to teaching. I even decided to make this one of the assessment tasks for year 9s; I’d have done the same with year 10s except their doing exams instead.

Both classes started the challenge today – Beginners. Starting with a quick campfire, I told them about pair programming (one of the strategies I learned yesterday as good for success in introductory programming – go on read it; I will try the other strategies later) and of course, remind them to have fun. It’s too early to tell but hey, I’m excited because the students were totally engaged in the challenge and were having fun….hard fun….as in, easy is boring kind of fun.  In both cases, I had to boot them out at the end of the period as they wanted to keep going – and we’re talking they’re supposed to go to recess or lunch….not another subject that perhaps they don’t like!

Perhaps it shouldn’t have surprised me but the year 9s did better than the year 10s. Was it the dance move intro? 🙂

There are a few year 9s who I will have upgraded to the Intermediate challenge as Beginners seem too easy for them. #proudmoment

I thought I’d share my here as well; feel free to reuse, upcycle, remix – if you do, all I ask for is feedback to how it can be better….atrribution would be nice, too. 2013 – 9IST – Assessment 3 – NCSS (PDF)

Using ClassDojo

I used ClassDojo before when I first ran my Digital Media Jedi Academy (also for 9IST). As before, I’m using it to communicate my expectations and award points. The points this time is for a request for an in-school competition outside of the national challenge. I do listen to my students and besides, using ClassDojo really forces me to look at each kid and see if they are showing expected behaviours…and my favourite is “exceeding expectations“. In this way, ClassDojo is my tool to remind me to check in with every kid as I have a visual reminder of eveyrone in my class and the ones who are not racking up points (are they not showing the expected behaviour or am I just not seeing it – go look, Mrs Mawby!). The points system is handy also for the teacher observation component of the 9IST task.

In case you’re wondering, I’m not using the Negative Behaviours (removing points) because in my 6 months with these classes, I’ve never had reason to control negative behaviour….yes, I’m lucky.

expected behaviour

expected behaviour

 

Okay, have shared heaps now and will stop – just wanted to leverage the excitement of the day to churn out a blog post 🙂

UPDATE 12 August 2013: I just added the task in PDF (I forgot to attach it last time….oops!)

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.

Can programming help students appreciate Maths more?

I love it when things start to converge in my mind. This post will attempt to encapsulate this convergence; attempt being the operative word. As Jack Dorsey said, simplifying the complex is not easy. Try I must to help me document my thinking.

I blogged about Maths not = calculating in reference to Wolfram’s computerbasedmath.org initiative and mentioned it in comments on relevant posts of other bloggers and to anyone who cared to listen. I recently attended webinar with @ColinTGraham on Teaching Maths Effectively which led me to Project Euler. I signed up to this project and had a go using Microsoft SmallBasic, a free and easy to learn/teach programming language. I read @garystager’s post on  Charlie Rose‘s interview with Jack Dorsey, Chairman and one of the three co-founders of Twitter; I watched the interview as well. I think perhaps that only developers can really appreciate Stager’s (and Dorsey’s) view on elegant code (I happen to as I was in Software Development for years before going into teaching).

One of the challenges of maths teachers is making maths relevant. Also, Wolfram mentioned that students often do not see, much less appreciate, the beauty of maths – especially when drowned in the number-crunching (read calculation) jungle.

Anyway, I’m coming to a conclusion that there is definitely room and reason for integrating programming in school and not necessarily as a separate subject/course. In my previous high school, I did suggest this as an extension activity for a very smart girl and in fact, introduced her to SmallBasic. My suggestion to use some Maths lesson time was rejected for various reasons including there’s no one really able to support this idea and struggled to justify the suggestion. Fast forward to now and the previous paragraph is justification enough.

I’ve only done a couple of problems on Project Euler. It offers much opportunity as an assessment tool – you need to decode the problem in order to code. The process can run the full gamut of the digital Bloom’s taxonomy – from remember through to create. For example, what does multiple mean? I used to say it’s the times table of a number. But, how do you code that? Well, a number is a multiple of a given number if the remainder is zero when you divide – there are programming functions for this (language-dependent). Now, there’s a definition not often mentioned. And “below 1000” provides an opportunity to apply inequalities.

Project Euler definitely provides an avenue for computational thinking that Stager and Dorsey espouse and openly enjoy. Upon solving problems, you get access to the solution and the forum so you can compare your own code. The pursuit of elegant code is very obvious in the forum. What this means, too, is that participants are naturally differentiating the task – motivated by finding the most efficient solution – often due to deep knowledge of maths (including finding patterns) and not so much programming ability. How awesome is that??? Actually, reading some of the comments help one appreciate the depth and beauty of maths that Wolfram – and passionate maths teachers – allude to.

Programming is problem-solving. It promotes analytical and logical thinking but not at the expense of creativity as both Stager and Dorsey argue. In fact, I daresay a good programmer has to have a healthy dose of creativity. Programming provides instant feedback (read: gratification or frustration).

Though much can be learned from programming, it really is not for everyoneI…not because it’s hard necessarily but because it doesn’t appeal to all such as carpentry does not appeal to me, for example; I’m sure carpentry provides fantastic opportunities to apply mathematical concepts and more besides. I understand apprehension to even try to include it as a teaching strategy, but there is help out there. Just as there is a community of developers out there, so there is too of teachers.

Where to now?

As an IT integrator, I plan to approach the Maths and the Technology Departments (the elective programming course was dropped due to dwindling numbers). I’ll walk them through my rationale mentioned above. Then, who knows?

Do you know any other initiatives similar to or linked to the ones above?