One does not simply get a CS degree

Imagine an educational theory so powerful that it would allow just about anyone with no knowledge whatsoever to completely trash your degree, your experience, your expertise and everything you stand for in one swift sentence.

My brother works in a coffee shop, and the other day he called me up and asked me to bring something in to work he’d forgotten. I went in with it, and as I was waiting for him to finish up with some customers I got chatting to an old-ish lady who was waiting to use the loo. She asked what I did, I told her I taught ICT and Computing, and she said

…oh, it must be very hard to keep up with the kids these days. They’re all so good on the computer you must have to keep learning new things just to get ahead…”

Boom! There it was. 11 years of learning, coding, working, teaching – completely devalued in one sentence by an old lady in a coffee shop.

I spoke about this incident at the CAS roundup (#4) and a collective groan went round of two simple words: Digital Natives. It appears the term Digital Natives was coined by Marc Prensky in 2001 in his paper “Digital Natives, Digital Immigrants”. Upon reading his paper, I noticed that I actually do not have a problem with the theory in itself, because in essence what he is proposing is that current students learn in a different way to (some) current teachers, and therefore teachers must realise this and adapt their teaching. He also advocates game based learning as a good methodology, of which I am certainly a fan. Reader, I forgave him.

However, the digital natives theory is still the bane of my life because so many people hear it and then interpret it as something completely different, whilst still thinking they are justified in their views by “science”. Yes, you can almost feel me doing the sarcastic air quotes. I like these people just about as much as I like people who you see infrequently and who start every conversation with “so, on holiday again then?”.

The common interpretation is this:

Digital natives grew up with technology…so there is nothing you can teach them


*rolls up sleeves*

Objection #1: Knowing something != Knowing all the things

I grew up with a cat, so by that logic I don’t have to take Biology, right? I also grew up with cars, but I still had to do a driving test (*cough* 3 times) and I have no idea how to change a wheel let alone fiddle around in the engine. I also write, read and speak in English every day, so by this logic there’s obviously no need to study literature or to write any essays? Simply having experience of something does not make you an expert, and even in the old and rather dodgy ICT framework there was still considerable emphasis on using software appropriately and skilfully rather than just simply using it.

Objection #2: Computing is not using a computer

This is the one that really cuts deep, because it implies that I spent considerable amounts of money and three years of my life pursuing a degree which this person clearly perceives to be somewhat akin to Jen from the IT Crowd’s “experience” on her CV:

” I did say that on my CV, yes. I have a lot of experience with the whole computer thing you know, emails, sending emails, receiving emails, deleting emails…the web. Using a mouse, mices, using mice. Clicking, double clicking. The computer screen, of course. The keyboard. The… bit that goes on the floor down there.”

OH PLEASE! This makes me want to come over there and beat you with my linear algebra book. If I had a degree in Engineering, no one would dare to say that Design Tech students were probably building better bridges in their lessons out of toilet rolls and PVA glue! Seriously (and I know I’m preaching to the converted so I won’t harp on), my degree in Computer Science is MORE than enough to keep me ahead of even the best students in my class, thank you. That’s not to say that I know everything there is to know and I don’t need to work to keep up to date – very far from it – but at least if I don’t know it I have the skill to be able to figure it out rather than having to get someone else to Google it for me.

(Sorry, that was a bit of a rant! :D)

Objection #3: Students are only knowledgeable when they choose to try

If you don’t believe me, you have never been to an ICT lesson. You have never asked a “digital native” to save a piece of work, and then the next lesson been greeted by wails of “Where’s my work miss? The computer hasn’t saved it!”. You have never wished you were at the dentist instead rather than trying to drum up the enthusiasm to teach a pack of “digital natives” about the joys of Excel (aren’t vlookups AWESOME?!!!11). You have never done your world’s-best-practically-Oscar-winning starter, only to have a hand thrust in the air saying “I don’t understand” within 0.5 seconds of the last word you uttered.

Pupils ‘get’ what they want to get, the things they are interested in – because they put in the effort to do so. The last time I checked, ‘Facebook messenger’ and ‘stick cricket proficiency’ were not on my scheme of work.  A large part of teaching ICT and Computing is like being a big geeky cheerleader, encouraging kids on to learn things they haven’t realised are useful yet. It’s not that these things are hard, they just require perseverance – which is not something our digital natives are in high supply of. Ensuring they learn what I know will be useful for them tomorrow, today, is why I am here.

(Images from and )

Keeping women out of Computer Science

Whilst browsing idly through my Twitter feed the other day, I came across the following re-tweet:

I almost mindlessly re-tweeted it myself, but then I stopped to think. By singling out “being female” as the reason for some unspecified poor treatment, it would imply that the people dishing out this treatment are men. This is a fairly huge accusation – are men really on some kind of weird power trip to try to sabotage women in Computing, or is this all a big misinterpretation? Perhaps the reason girls are not at all keen on studying Computing is because men are deliberately shutting them out? This seemed ridiculous, so I wanted to investigate further.

What’s the problem?
I’m sure many of us ladies have experienced a “tennis ball meeting” – the same thing has even happened to Dame Wendy Hall (via @loobey41)! It is best summed up by this short clip of the ‘Fast Show’, where a woman says something, the men totally ignore her, and then shortly afterwards they pass off her ideas as their own to much praise and acclaim from the other men. I’ve never been a fan of feminism (I’m more a fan of “whoever-does-it-the-best-ism”), but I have to admit that on those occasions it is very tempting to rationalise this behaviour to yourself as “they’re treating me like that because I’m female”.

Why are girls so put off?
How many little girls do you know who aspire to be a Computer Scientist when they grow up? Surely there must be thousands of girls drooling over a poster of Dennis Ritchie on their bedroom wall and wishing to grow up faster so they can show the world how intelligent and logical they are at implementing well designed software solutions. Not.

Whether they realise it or not, girls by and large inherently conform to society’s expectations and their own genetic programming – attract a mate and look after children. I can feel some people about to scream “but I’m a modern woman, I don’t think like that, I have a successful career!” – I thought that too. Then I realised the first sentence I wrote in this section about girls drooling over men on posters was a prime example of me unconsciously perpetuating the stereotyping we’ve been subjected to since we were born. Dayumn, this stuff is pervasive.

You may choose to interpret the tennis ball story as the intelligent capable woman being seen by the men as a threat which must be contained. Even if you disagree, I’ll bet that if I asked you to describe the woman, ‘desirable’ would be fairly low down on your list. So why would any girl wish to study a “traditionally male” subject where achievement and intelligence is perceived as a threat, and she is actually decreasing her desirability amongst her peers? For a teenage girl – yes even the shy geeky ones – being singled out as obviously ‘different’, and not in an attractive way, is a Very Bad Thing.

Look even more closely and you will see more subtle barriers for girls – I remember buying my first “Sega Zone” magazine (aged 9) because it had a Sonic the Hedgehog guide – only to find it also contained various photographs of semi-naked ladies and assorted lad jokes. I was only 9 but I got the message loud and clear – this stuff isn’t for you. Would a tech company stand at a trade show be more effective if it boasted multiple female CS professors endorsing their product, or some scantily clad clueless booth babes? I think you know the answer. May as well put up signs saying ‘intelligent girls, keep out’.

So do men really have an evil exclusionary plan?
In a word, no. Some of the male dominated culture is inadvertently making girls feel uncomfortable and excluded, but I don’t think it is deliberate. It is unhelpful for females to assume that it is, but it is also unhelpful of men who are in a position to help to pretend it isn’t happening.

It’s perfectly possible for girls to succeed in Computer Science, but perhaps they have to make more sacrifices to get there than the guys. I have loved computers since I was four years old, and yet I could not face admitting to my parents (or myself) that this was what I wanted to study at university. I dutifully filled in my UCAS application for Law – because that was what intelligent girls were supposed to do – sent it off, received my offers – and then declined them all and got the place of my dreams studying CS through clearing. (Note: I do not recommend this as a strategy!)

To get more girls into Computing, we need to get more girls into Computing – vicious circle. Perhaps we should start by raising the profile of Computer Science as a ‘real subject’ to the general populace. I went to our leavers’ ball last week, someone’s partner found out I had a Computer Science degree and promptly asked me to fix his iPhone – because obviously that’s why I went to university for 3 years, to be your tech skivvy. (Even male academics get this kind of “will you fix my computer” nonsense!) I don’t think women want separate pink websites, girl encouragement programmes and “feminist” initiatives, they just want to be a valued and appreciated part of what the guys are doing.

But then, what would a woman know about it?

(Asus booth babe gaffe from

Why hot people are good at ICT

I just got my hair cut! (I was going to entitle this post “Pat Sharp is no more!” but I realised that some people might get the wrong idea :S)

I took various pictures of my new haircut, but there is a serious problem – I hate pictures of myself, especially pictures on the internet. But…if a picture could lead to an interesting lesson idea – great! I thought I’d try Photoshopping my favourite one to see what I could do. Except…I don’t own Photoshop, so I used Paint Shop Pro 7 instead. (Yes, I know.)

So what did I do? Well, this:

  • Cropped the shower out of the picture *facepalm*
  • Blurred the background and changed the hue slightly
  • Used a salt and pepper filter to make the skin tone more even (I tried ’em all and this one seemed to work!)
  • Clone brushed out the stray hairs and actually removed some of my head on the top left
  • Clone brushed out all of the moles
  • Increased the brightness of the teeth and eyes
  • Increased the magenta component of the lips
  • Changed the colour levels of the skin areas to make them less red (although it does look a bit TOWIE now if I’m honest)
  • Re-drew the eyebrows with the smudge tool and softened them out
  • Used the clone brush to make my face look thinner

Obviously I’m sure a proper image editing expert would rip my effort to shreds, but don’t you think this would be a really cool lesson?! You could even do a little intro showing them some of the pictures from this really good site: and discussing the ethics of why people used these techniques, before trying it out yourself. I expect you could even get similar results on a program such as if you don’t have Paint Shop Pro or Photoshop available at your school. You could even start the lesson with “Why are hot people good at ICT?” on the board to get a fierce debate going, before revealing the punch line…because all of their photos are doctored! (I hope people actually read that bit so they don’t think the title is implying I find myself attractive. Awkward.)

If you want a simple KS3 worksheet on doctoring images, this is one I’ve used many times with a lot of success.

Here is the original photo taken on my iphone camera, and the same photo after I’ve had a go at it on PSP 😉

Ugh, hideous!
Wow, hot!

Alan Turing, ‘Now 44’ and a nasty email

What do Alan Turing, the 90’s music CD ‘Now 44’ and cyber bullying have to do with each other?

I’ve had a pretty rough week, all told. Some of it I can’t comment on, but other highlights included waking up to a kitchen covered in mouse guts (the joy of cats), trailing pieces of freshly laundered tissue all through my house without realising (dark blue carpet), and knowing I’ve got 75 Year 9 exams sitting downstairs waiting to be marked. Not great. Look at this in contrast to last weekend where I was still feeling enthusiastic and energetic after attending the CAS conference on Friday, overflowing with cool ideas from the people I’d seen speaking and cheerful to have spoken in person to many of the lovely people I’ve been conversing with on Twitter for the past half a year. All week I’ve been frantically tweeting away trying to re-live a little bit of that glory – more on that later…

So, last night I did what any reasonable person with absolutely no issues would definitely do *cough* – brought out my collection of “Now ….” CD’s in a foolish attempt to regress to my childhood. It worked, a little too well. ‘Now 44’ is a CD which came out in 1999 when I was in Year 12 at school, and this brought back a very specific memory – I am young enough to have been cyber bullied at school.

In 1999, my school had three computers which were connected to the internet – I often tell my students this and they find it absolutely hilarious. You had to be organised in advance and book in your time slot with the librarian if you wished to use the internet, be it for personal messing around or school work. One day I logged on to my Yahoo account to find a pretty vile message from someone in the upper 6th – I won’t go into specifics, but it was pretty uncomplimentary about my good looks, if you get what I mean. This was followed up later that week by another slightly less nasty message from a different person. I did the totally obvious thing – told the head of Sixth Form who invoked the school cyber bullying policy and both people were found out and kicked out. Bzzzzzt, rewind – this was 1999 – no teachers used the internet, let alone schools having a cyber bullying policy, so that didn’t happen. I did the totally obvious thing (to a teenager) – I replied to their emails. (They eventually got bored and stopped.)

So what has this got to do with teaching? 

Well, as I’m sure you’re very aware, you as an ICT/Computing teacher are one of the only technological role models some students may have. Even now, as in 1999, they have very few places to turn to see people making use of technology appropriately and safely. Although we have now moved on and we have widespread cyber bullying policies and online bullying education, the problem still exists and will probably continue to exist. I know that many teachers of other subjects claim “oh I’m so bad on the computer”, and students know that most staff are absolutely not wise to what goes on in the mysterious world ‘online’. In fact, for some of the older generation it’s a badge of honour to claim that they know absolutely nothing about how computers works and have never been on Facebook in their life. I think it’s incredibly important that all teachers have our own online presence and where this presence is visible (e.g. Twitter) we use it with the understanding that curious students may find it, and we demonstrate how to use social tools online in a manner that does not tarnish our own online reputation. By refusing to use such technologies, we are condemning the students to the wilderness of 1999 when there *was* no one to turn to and bullies were free to roam without fear of repercussion, because the people in charge simply did not understand what was possible.

And Alan Turing?

Also this week, I was reading the article on the BBC News about Alan Turing’s suicide. This particular sentence stuck out for me:

His neighbour described him throwing “such a jolly [tea] party” for her and her son four days before he died.

I realised this week that since the CAS conference I have been tweeting excessively, like some kind of addict trying to get back the fix of replies and the feeling of popularity that arose from connecting with people at the conference. I looked back over my tweets of the week and noticed that many of them contained smiley faces – even though I knew that I had not been feeling particularly good at the time of writing. The quote from this article about the jolly tea party tied in with both this and the cyber bullying memory, because it is entirely possible to be displaying one state and feeling quite another (don’t worry, I’m not planning on ingesting any cyanide, accidental or otherwise). It is often easier to display emotions to the faceless internet than it would be to talk about them to another person, so we need to be knowledgeable about the kind of things our students do online to provide other students a credible outlet for letting us know if they notice a change in their friend’s online behaviour.

Which type of Computing teacher are you?

During the holidays I visited my parents’ house, and in my old bedroom I decided to clean out the wardrobe. (This post does get better, I promise). In the wardrobe, I found an old CD of “My Documents” from when I was at uni, and amongst the hilarious documents on it such as the Flash animation I made about myself being “C-Ra, Queen of Code”, I found a JavaScript quiz I created where the user had to answer a series of fairly arbitrary questions and was then told which piece of software they most resembled, along with a snazzy jpeg to post on their own blog. I think I ended up being Minesweeper, although I wouldn’t like to comment on why 😀 (This would also be an awesome programming task by the way, perhaps for GCSE? I may write it up in the future…)

It also occurred to me a while ago that when choosing A-Level subjects, one of the factors that does have an impact on pupil choice – whether this is logical or not or not – is you, the teacher. I think this is especially so in a small department where there may be only one or two teachers, so a student opting for Computing or ICT A-Level is guaranteed to be signing away a sizeable chunk of their time to being in your presence and trusting in your expertise to teach them the subject. What does this have to do with the quiz I mentioned before? Well I think it’s fair to say that even from a cursory glance round the excellent CAS conference last week, we are a fairly stereotypical lot. I thought it might be entertaining to have a tongue in cheek look at the types of Computing teacher I’ve met. Warning – blatant stereotypes ahead!


Embarassing ‘Dad
Embarrassing Dad is probably an older gentleman who is friendly, smiley and generous with his time. He probably wears a slightly worn out suit or pale chinos, and may even resort to sandals in the summer. He is obviously really down with the kids because he uses words like “Radical” and has the latest Simply Red LP. He probably learnt to program on a BBC micro and gets ridiculously over-enthusiastic at the thought of visiting the Bletchley Park museum. He might also teach Physics or Maths. Although they feel kind of bad about it because he is so nice, students may avoid the subject in case his uncoolness rubs off on them by association.

Sir Alan
This guy trained in business and actually wanted to teach Business Studies, but somehow got lumbered with teaching some ICT as well. He wears his suit as a badge of honour to show he should really be back ‘in the city’, even though he probably bought it from the bargain rail at Marks and Sparks and has only been to London on the bus. He has a tendency to gloss over the questions which he doesn’t really understand with his slick patter, and exposes the holes in his ICT knowledge in public – but no one else notices!

Shy Geek (male)
This guy totally knows his stuff, in fact he knows more than you could possibly want to ever know about computers. You slightly suspect that he goes home and writes compilers for fun. He either dresses in a similar fashion to Embarassing Dad, or if he is a bit younger you may just be able to discern the writing of a thinkgeek t-shirt slogan underneath his pristine white collared shirt. He runs awesome lunchtime clubs that the students secretly love to go to, but don’t want anyone to know they were there.

What is up with this guy – he’s breaking the rules! It should be written somewhere that it’s not possible to be both sporty and geeky, but somehow he manages it. Disproportionate amounts of his tasks are based around football and this can alienate some of the girls, but the boys love his lessons. He probably either goes to the gym before school, gets in on his bike or goes for a run afterwards, and hangs around with the PE department in the staff room.

Know it all
This guy is the overlord of all computers within the school and if you dare to install something he doesn’t like, he will smite you down. Don’t ever correct his SQL syntax. At internal moderation meetings, he will probably argue the smallest technical point just so that he can get to correct your marking, because clearly you can’t possibly know as much as him, mortal. He probably runs his own IRC channel in his spare time.

Shy Geek (female)
Similar to the male version, except she probably wears dodgy oversized tops from the BHS over 80’s range and you have never actually seen her legs. Like in all good films, if she took off her glasses she would suddenly resemble the geek version of Cameron Diaz, but she really doesn’t care about that because she knows she could kick your ass at Tekken and code the next Facebook without breaking a sweat.

Sideshow Bob
She has the craziest hair you’ve ever seen, probably because she finds it more enjoyable to do stuff on the computer than spend ages in the bathroom. She is a very knowledgeable teacher, but because she looks a bit like a crazy cat lady she is often grossly underestimated and underrated. She might wear brightly coloured tights or multi coloured skirts.

Nerd girl fail
Hot Mama
She probably doesn’t know a lot about ICT but she looks like Lara Croft, she’s going out with the Brogrammer and she needed a few extra lessons to fill up her timetable. She’s done an excellent job of teaching the year 10’s about write loops and her favourite programming language is HTML. If you are the shy geek (female) or Sideshow Bob, don’t dare to question her shocking lack of subject knowledge, you’ll be labelled mean and unsupportive by your male colleagues. I wonder why?

Department Mum
She’s like your mum in the department, always there to cheer you up and make things better. If the network goes down she’s probably already knocking on your classroom door with a handful of worksheets and a cup of tea with a chocolate hob nob. Sometimes she can be a bit forgetful, but everyone forgives her. The kids love her lessons and even come in at break and lunch for the safe environment.

Lady Sugar
She’s a woman in a male dominated subject and therefore she’s got something to prove. She reminds you constantly of her first class degree from a top university, lest you dare to even open your mouth and suggest something that could be a cool idea for the department. She designed all of the schemes of work, and you have to blackmail the students with sweets so that they don’t tell her your class is doing something different.

The Rebel
This one could be either male or female, and probably has a slightly deviant hair colour, earrings, a dodgy beard or wears a denim jacket. They insist on poking up in staff meetings and making their views known on *everything*, when everyone else is wishing they’d just shut up so the meeting was over more quickly. They enjoy using obscure teaching methods and probably don’t stick to the scheme of work, although this sometimes has surprisingly good results. Who knew that teaching Year 7 lisp would be so successful?

I’m sure there may be others I haven’t written (feel free to comment below!). In case you’re wondering, I think I’m a little bit of the Shy Geek, and a little bit of Sideshow Bob 🙂

jQuery – zero to hero (sort of)

Just a very short post to say that I’ve finished my HTML, CSS and jQuery booklet. It is a guide to starting from scratch from knowing no HTML at all, through learning CSS, through a bit of basic jQuery. It’s aimed at Lower 6th but I am sure it would be useful to any teachers who are just learning, or it could easily be adapted for other year groups.

 jQuery booklet (840KB)

At a convenient point soon I will post a working solution to the end exercise, as well as some other exercise ideas including Noughts and Crosses and Pairs.

Please leave me any feedback, glaring errors, omissions etc. 🙂

Why CS graduates don’t teach

I read an interesting article on the BBC website this morning which quotes many recommendations from MP’s on the Commons Education Select Committee. Although this is a general article about all subjects, it explains precisely why the top Computer Science graduates are not taking up teaching jobs – or more colloquially, why geeks don’t teach!

Of the people who were on my degree course for Computer Science, only three that I know of besides me are now involved in education. Two are qualified teachers (although one does not work as a teacher), and one is not a teacher but is pretty heavily involved in school education, especially in Wales 😉 Obviously I haven’t kept tabs on absolutely everybody I went to uni with so there may be others, but I’d say that is a pretty poor conversion figure – two teachers out of perhaps ~200 people.

So why is it that top Computer Science graduates choose not to teach?



I found that the Computer Science graduates from my course fitted into one of two categories. They either chose CS because they thought it could make them a lot of money, or because they were a  bit of a geek and they were into that kind of thing. The first group are lost already – you don’t earn anywhere near as much in teaching as you potentially could do in industry. The other group by their very nature are usually not particularly comfortable with social situations, and may find it their idea of hell to stand up in front of lots of people, let alone do it every day as a job. I’m not saying everyone shuffled around staring at the floor wearing 2 week old clothes and grunting for social interaction, but putting oneself on show in such a manner as teaching demands is not usually within a geek’s comfort zone – unless of course the room is filled with other geeks, which at school it definitely isn’t.

“The MPs also say all applicants for teacher-training should be observed taking a class before being offered a place.”

If the Government want to encourage Computer Science graduates to teach, this idea is a disaster. As @mwclarkson points out, it essentially equates to saying “we don’t want people who can’t teach already on PGCE courses”. Then what are they there for? I’m not afraid to admit that my first PGCE lesson had a script. Yes, like a play. *facepalm* I’d like to think that the PGCE taught me how to impart my knowledge a bit more appropriately! I hope he won’t mind me mentioning this, but my friend @simonw ‘s first attempt to teach PHP to some other undergraduates did not go very smoothly at all – and yet he is a very highly regarded programmer and public speaker. (The teaching profession has missed out!) Not all CS graduates would make good teachers, but if you put off the ones who want to try with a hurdle such as this, you will never find the hidden gems.

Other teachers

“We are concerned that the pay system continues to reward low -performers at the same levels as their more successful peers”

At present, we have a workforce of ICT & Computing teachers of whom some are excellent and some of whom are frankly pretty shocking. It makes me cringe to receive flyers in the post from OCR advertising a “skills course” to “help you with some of the more difficult aspects of AS ICT coursework”. COME ON!! Seriously! If you were a Maths teacher and you had to go on a course to figure out how to do integration or something, you’d be laughed out of the Maths office. At the very least an ICT/Computing teacher should know how to Google “how to do X in program Y” if they don’t know. (Check out this XKCD comic for all of your ICT training needs.) So why would an outstanding Computer Science graduate choose to use their skills to teach (for less pay than they would probably receive in industry), and receive the same pay as someone who can’t even figure out how to do a vlookup?


“It is crucial that we have an educational system which celebrates great teachers, keeps more of them in the classroom, supports their development and gives them greater status and reward.”

Of course it is! Everyone wants to know they are doing a good job, and that they are advancing within their career and that they are respected by their peers. I realised the other day when I was talking to my friend who is a pharmacist, and who hangs out with pharmacists and doctors and the like, that they all seem to “get” each other. They all trained in the same area, because they are interested in the same kind of things. At school, no one “gets it”. The majority of people I work with see computers as “those annoying things that break all the time”, and not “an instrument of incredible coolness”. They do not appreciate how freaking cool it would be if Year 9 could write their own Android apps. They are not pleased that I have figured out the CSS to do gradients, or impressed that some primary school visitors programmed a Scratch animation in less than an hour. They do not see online gaming as a valid excuse for not going to the pub. They are the other half of the 10 types of people, the ones who don’t understand binary.

And yet…if you’re a teacher, you’re shunned by the real geeks too. Most of my uni friends are developers, and whilst we all started out with broadly comparable skills when we left uni, 6 years after graduation my skills are extremely out of date whilst they have years of developer experience under their belt. I don’t fit in any more, I’m not credible *because* I only just figured out the CSS to do gradients (that’s so last year). Why would you expose yourself to the geek version of social death?

So what can we do?

Well, it clearly is possible to be a geek and be a teacher at the same time – and I’m somewhat preaching to the converted, as many of the people who will read this are probably both geeks and teachers. However, specifically for investing in future Computer Science teaching, I’d consider the following things if I were an MP:

  • Curriculum – the curriculum as KS3 & 4  is dire. Make it something people are excited to teach, and this will translate in students who are excited to learn
  • Create a PGCE in Computing (unless one already exists, in which case I apologise)
  • A better curriculum will mean more teachers will be needed in the Computing department, resulting in a higher concentration of geekery –> happier geeks
  • Encourage students to try “teaching” at university as part of their CS degree. (I worked as a paid lab tutor, as well as founding the Computer Science Society where we as students ran our own courses to teach others about aspects of Computing we were interested in.)
  • Acknowledge that the world of Computing is constantly changing, and provide money or time for teachers to keep up to date with their geek skills
  • If you do implement the previous point, don’t make other teachers cover for the Computing department in order to facilitate this 😉

PHP Love Calculator task

I’ve been meaning to write this one up for ages! This is an idea that grew to encompass more and more things that I realised fit in to it from the OCR Computing AS F452 syllabus.

The premise

I expect you’ve seen the TV adverts promising that if you text your name and your crush’s name to some premium rate number, it will tell you how compatible you are. This is an online version. Obviously a load of rubbish in the love stakes, but as far as appealing programming tasks for sixth formers go…well, it’s a hit! It’s also a sneaky way of introducing all sorts of boring concepts that they really need to know, such as ASCII character conversion, writing and reading from files, using common functions such as round() and devising algorithms.

You will need

– A central web server running PHP which students are able to write to

– OR a local installation of XAMPP for each student (see this post for more info). Apparently you can now even run a web server with PHP on a Raspberry Pi, although I haven’t tried it!

– Some students who have already done a fair bit of programming, although this doesn’t have to be in PHP. Mine had done about 1 week of PHP before doing this task, but had previously been working on Python for about 5 months.

Page one – typing in the names

This is your basic love calculator, we will add the bells and whistles later. You are going to need two PHP pages to accomplish your goal, and the first of those doesn’t even have any PHP on it – it’s just a basic HTML form. Call your page index.php. You can style the page however you like, but the essential part you will need is the form part:

  <form action="calculate.php" method="post">
    Your name: <input type="text" name="name1" /> 
    Boyfriend/girlfriend's name: <input type="text" name="name2" /> 
    <input type="submit" value="Calculate compatibility!" />

There are three interesting things to note here.

1. The action of the form tag is calculate.php. This means that when we press the button, the script will send the data typed into the form to the page calculate.php

2. We used the method post, which means that the data arrives on calculate.php, it is in an array called $_POST

3. Each field (in this case, both are text boxes) has its own index of the post array. So the “your name” box has the index name1 because that’s the name we gave it in the form.

 Your name: <input type="text" name="name1" />

…so we can refer to it on calculate.php as

<?php print $_POST['name1']; ?>

Page two – calculating the love!

I’m sorry to disappoint you, but I don’t know the secret of compatibility – if I did I’d probably be sunning it up in the Bahamas instead of writing blog posts getting a monitor tan. However, I do know that it’s rather fun to try to devise an algorithm that will produce the same result every time (i.e. is not random), produces different outputs depending on the input, and is sufficiently complex to not be easily guessable by the casual user. The beauty of this part is that you can let the students loose – it really does not matter what algorithm they come up with, and it may be fun for them to do some testing of each others algorithms to see if they really always come up with a number between 1 and 10!

Purely as an example, you could do something like this:

// Calculate the length of each of the names
$length1 = strlen($_POST['name1']);
$length2 = strlen($_POST['name2']);

// Add the two together
$calculate = $length1 + $length2;

// If 1 is longer than 2, take off 5, otherwise add 3
if($length1 > $length2){
  $calculate = $calculate - 5;
else {
  $calculate = $calculate + 3;
// Multiply by 42 (the meaning of life!)
$calculate = $calculate * 42;
// Divide by 100+ length of 2
$calculate = $calculate / (100 + $length2);

if($calculate > 10){
  $calculate = 10;
} else {
  $calculate = round($calculate, 0);

I have used two common functions here – strlen() takes a string as an argument and returns the number of characters in the string, i.e. the length, and round() takes a decimal as a first argument, and rounds it to a given number of places (in this case 0). As you can see, my algorithm sucks a little so I had to cheat and say that if the result was greater than 10, make it 10 😉

Now we need to do the cool bit. We have calculated the compatibility between these two lucky people, so we need to print it on the screen. Time for a bit of concatenation and a loop!

Put this code on calculate.php just below your algorithm, to display the levels of love!

// Print your compatibility score
print $_POST['name1']." and ".$_POST['name2'].
" score ".$calculate." out of 10<br>";

// Print out the love hearts
for($i=$calculate; $i>0; $i--){
  print '<img src="loveheart.png" width="20" height="20">';
// Meta refresh back to the previous page
print '<meta http-equiv="refresh" content="5; url=index.php">';

In the first part where we are printing the names, I have introduced concatenation which uses the full stop instead of the + in PHP.

The point of the loop is to print out a “love heart” graphic a given number of times depending on the score. So if they scored 8/10, it will print 8 hearts.

We don’t want to be stuck on this page, so I have used the meta refresh to return to the first page – index.php – in 5 seconds. Change the number to change the length of time.

Adding cool stuff

So I promised other cool stuff in the intro! When I was about to set this task, I took a look at my progress sheet to see which topics we still had left to cover on the syllabus. One topic was ASCII and the conversion between the ASCII code and the actual character, a topic I’d done as a theory lesson last year. Here is the perfect opportunity to actually use the functions provided in PHP to convert from a letter to the ASCII – ord() – and back to the character – chr().

In your algorithm on calculate.php you could include some code along the following lines:

// Initialise two variables
$ascii_value_1 = 0;
$ascii_value_2 = 0;

// Split both strings into arrays
$name1 = str_split($_POST['name1']);
$name2 = str_split($_POST['name2']);

// Calculate the ASCII value of each string
for( $i=0; $i < strlen($_POST['name1']); $i++){
  $ascii_value_1 += ord($name1[$i]);

for( $j=0; $j < strlen($_POST['name2']); $j++){
  $ascii_value_2 += ord($name2[$j]);
// Calculate compatibility (just made up, of course!)
$calculate = ($ascii_value_1 - $ascii_value_2)/100;

This is a bit complex. I have decided to find the ASCII value of each character in the name, and add them all up to be stored in the variable $ascii_value_1. The function ord() can only convert one character into ASCII at a time. So we can’t plonk the whole lot in as an argument like this:

// This doesn't work
$ascii_value_1 = ord($_POST['name1']);

Instead, we have to go through each of the names, character by character, and keep adding the values to the variable $ascii_value_1.

I have split both name strings into arrays $name1 and $name2, so that I can then reference each individual character of the string, i.e. the first character of the first name is $name1[0] and so on.
(Note: I realise I could treat the string itself as an array anyway which is more efficient, but that would result in two indexes of the array $_POST or a horrible variable rename, which I think would confuse the issue!)

I then calculate the ASCII value of that character using ord() and add it to the total. My calculation of compatibility also has a very obvious flaw in that if the first ASCII value is smaller than the second, it will result in a minus number – it’s very easy to overcome that, I leave it as an exercise!

What about writing to files?

Another modification you could try is writing to files – suggested by one of my enterprising female students who wished to send the love calculator to her friends and figure out who had a crush on who based on which names were written in. (Sneaky!) After computing the compatibility, you could write both names and the score to a text file (or even a database). I suggest using some of the code from my shoutbox task in order to accomplish this. I bet a student a packet of Haribo that he could do this in the 5 minutes between finishing the above and the end of the lesson, and I am now sadly lacking in gummy sweets – so it is possible!

Innovative use of ICT or cheap gimmicks?

Having recently had to complete a lesson observation for a colleague I was appraising in my department, I was reminded of the standard “lesson observation record form” from the glory days of PGCE. It has that wonderful little box on it usually entitled something along the lines of “Use of ICT”. Given that 9 times out of 10 when I am using such a form, I am observing an ICT or Computing lesson, I usually feel like writing “duh” in that box. (I never do though, I’m a good person.)

This box aggravates me. Part of the reason is because it encourages the use of gimmicky ICT that is either used in the observed lesson or then forgotten, or is very tenuous in its relationship to the lesson being taught, just so that the observer can pat the observee on the back and they can both toddle back to the staff room for a cup of tea and a malted milk. For example, you might have set a task with a given amount of time, and used a “countdown timer” on the board whilst the students did the work. Tick. You may have put the notes on whatever you were covering that lesson on a Powerpoint presentation and showed that on the board with twirly whirly animations and perhaps a few flash movies. Tick. Congratulations, you have now met this ridiculous requirement.

Why do we even need this box?

I have never been congratulated after an observed lesson for an “oustanding use of board pens” or a “innovative use of the photocopier” (although now I can figure out how to do the A3 folded middle staple booklet thingy, I think I really should deserve a bit of credit). Surely if you are using ICT to perform a task in a lesson, it should be because using technology is an efficient, sensible, engaging way of doing it, and most importantly it enhances the learning. Why use technology just for the sake of saying you did so? For example, I once tried to do the register at the start of a lesson using my iPad. Whilst it was possible, and elicited many cries of “ooh” and “wow” from the class, it was in fact slower than ticking off names in a book. Use it if you need it and if it makes the lesson better, if not then you shouldn’t feel bad for doing things the traditional way.

This also brings me on to the subject of “innovative use of ICT”. By definition, innovative means new and inventive? What someone else counts as an ‘innovative’ use of ICT, I count as something I do every day without thinking about – for example I may put up an exemplar piece of work on the board and use the interactive whiteboard tools to annotate over the top of it. To my mind, that isn’t particularly innovative, but it may appear to others that is like…totally cutting edge, man. Dude. In this case, innovative is relative to the skills of the individual. We all refer to students who are “coasting”, and I think the concept applies here. If I (the head of Computing), were content to do the same thing every year and not bother to learn or try anything new with technology, then I don’t really feel I would be doing my job well. However, if a teacher of <insert subject here> were to do some of the things which I currently do, they would probably be described as being innovative. However, neither of us is really innovating – we aren’t doing something that has never been done before in a classroom, we are simply progressing the bounds our knowledge, and I think that is what should be measured.

In appraising a teacher’s use of ICT, in my opinion what we should consider is the progress they have made. If a teacher started off not even being willing to turn their computer on, and has now progressed to using youtube videos to improve the understanding of a topic and provide variety in the lesson, that should be celebrated. If a teacher decides to fill his or her lessons with the use of gimmicky ICT at the expense of real teaching and learning, that may look impressive to the casual observer but in the long term it is not helpful. As we try to teach the students, half of the problem is knowing which tools are fit for the purpose – or indeed if the best fit would be to not use ICT at all for a particular task. The best lessons are the ones which are considered carefully in order to get this balance right.

Are you doing your job properly?

Whilst I have been away collecting in all of my coursework and writing endless reams of reports, I have still been keeping a keen eye on what my Twitter colleagues are up to. It never ceases to amaze me how other teachers can manage to go on so many courses and conferences, write articles, or speak at a variety of events – and still keep up with their work! I find it absolutely impossible to cope with my normal workload as well as the demands of everday life (laundry on a Sunday, joy) so I must be missing something.

So, are these people doing their job properly? Is it a teacher’s job to turn up every day, follow the syllabus, stick with what they know and teach all of the learning objectives to get the pupils good grades in their exams. Or is it a teacher’s job to attend lots of conferences, miss days worth of lessons and find out what else is going on in the world so that they can do new and wizzy things in the classroom. I think it’s a bit of both, but it’s hard to find the balance with this trade off.

I find professional development courses a bit of a minefield. I have been to some for which the content was truly dire (innovative teaching strategies: “use a powerpoint” – ugh!), for which I could not believe the questions some of the attendees were coming out with (why are you teaching this subject if you are clueless about relational databases), or which were just simply not worth the trade off of missing lessons with my sixth form groups. Equally, I have been to some excellent courses, and my quote from the first CAS conference feedback form is still being used on their promo material! In my opinion, usually the best courses are the ones where the other participants are interesting as the networking opportunities will probably be more valuable than the actual course content, although this is not something you are really able to judge from reading the blurb.

I have a problem with the fact that in order to attend meetings which would be useful for improving and innovating, this effectively involves “double work” for the teacher. You have to spend time planning activities for your classes to do whilst you are away (and this usually means they are not being taught by a specialist, given that most ICT/Computing departments are small), and you are also “working” at the conference/course as well. I dislike going away from school for this reason, and I dislike having to miss lessons at all, especially with A-Level groups. However, I do feel that I am also missing out on a lot of useful opportunities to improve and perhaps to help these students out, by not attending more meetings. Catch 22.

Any suggestions?