What is an Algorithm?

What is an algorithm?

It’s a reasonably straightforward question isn’t it? But one that yields quite a few debates. I’ve written the following answer to ‘what is an algorithm?’ question based around the STEM computing classes with children.

First it helps I find it helps if you pretend you’re asking one of these to solve a problem; if you don’t tell them everything they get into a real mess!

Robot algorithm

 

An Algorithm is a precise set of instructions to solve a  problem*

For me, that gets to the heart of the definition: solving a problem in a precise manner.

The problem being solved could be as simple as calculating the number of times ‘as’ appears in this sentence or as complicated as finding the quickest route for a journey across rush hour London.

What’s interesting about algorithms and not obvious from their definition is that once created, executed and observed they can often be refactored/reused to solve other problems that require the same generic process to solve.

For example, I’ve lost count of the times I’ve written a function to solve a specific problem then subsequently refined and abstracted it slightly to solve a much broader range of problems, often implemented using polymorphism. This elasticity, once you recognise it, is for me, the root of writing maintainable code. e.g. In the example above, rather than searching for a specific word, you would refine the algorithm to search for any word. This is obviously beyond the stated curriculum but a nice example of a way to illustrate a seemingly abstract part of the curriculum.

I’ve been asked about efficacy a few times as part of the definition and my view is that its not part of the definition. Efficacy is important for Computing Science but it’s not part of the definition.

* As some children are pretty young, under 7,  we don’t talk about Turing machines. But I know a few people favour this addition to the definition and describe it as something that could be simulated by a Turing complete machine. Although I do wonder if we could somehow simplify and adapt this into the design and discussion of Turing machines…

Year Of Code’s Substance Behind The Spin

Year of Code and its spokeswoman Lottie Dexter got off to a shaky start last week . It also trode on the toes of  a few that were already working in this area, notably Emma Mulqueeny (7 reasons why year of code is just AM Dram) and Computing At School.

Ok, so there is entrepreneurial motive behind Year of Code which has precedent for a more market focused goal. But that’s not necessarily a bad thing – if handled with empathy toward the initial trail blazers. Competition allied to good causes can affect change quickly. In this case, it’s to provide materials that allow a young generation to exploit the incredible technology they have, literally in their hands. For my part, that’s a good thing.

I wanted to post some additional info on Year Of Code for two reasons.

Firstly, I’ve a vested interest in this area as I’ve just launched a Kickstarter that teaches primary age children computing fundamentals – quick plug, please back and share it 😉 https://www.kickstarter.com/projects/inpractice/craft-computer-club-a-crafty-way-to-inspire-little/posts

Secondly, I spent a last night swapping tweets with one of its board advisors Dan Crow (uk.linkedin.com/in/dancrow) and Miles Berry who’s chair of NAACE and Principle Lecturer of Computing at Roehampton University (uk.linkedin.com/in/mgberry).

We were nerding out over languages and elegance – I know, engineers are a riot right! – and the topic turned to Apple’s HyperCard (http://en.wikipedia.org/wiki/HyperCard). HyperCard, as I’ve written a few times, holds a special place in my development history. It’s also a bit of a shibboleth within software engineering. Turns out Dan was the last engineer manager on Apple’s Hypercard and he also tried to give it a new lease of life when he was at Google:

HyperCard is an important milestone in Computing languages as it’s one of a few that understood and communicated a clear and relevant ‘metaphor’ through which the user intuitively understood how to interact with it. Something that ‘straight’ languages suffer from. It’s set in a clearly defined context and it’s obvious. Look at some PHP code and it might not be obvious what’s happening – btw, I like PHP a lot!

For me, the fact that Dan was part of that historic project  bodes well for the Year of Code team. They have substance behind the PR and if ‘code’ is the poster child that brings Computational Thinking back into the bedrooms of children again, I’m all for it.

Btw, I’m not sure I mentioned my Kickstarter 😉  it’s a craft book that teaches Primary age children Computing fundamentals and you can check it out here. https://www.kickstarter.com/projects/inpractice/craft-computer-club-a-crafty-way-to-inspire-little

Screenshot 2014-02-10 13.51.45

 

 

Gove and Osborne launch £500k “Year of Code” campaign to raise programming awareness

Year of Code announced:

Michael Gove and George Osborne, backed up by several UK tech luminaries, have dubbed 2014 the “Year of Code” in a campaign costing £500,000.

Year of Code
Year of Code

In the campaign’s promotional video, Chancellor of the Exchequer George Osborne explained how the campaign wants to “make sure that kids in our schools are not just consumers of technology and computer programs,” and that they shouldn’t just “know how to open up Word and PowerPoint; they also need to understand how those computer programs are put together”.

[Full article here on Computing.co.uk]

Stemettes Women Shift Digital / Keynote by Anne-Marie Imafidon

Great Keynote talk by Anne-Marie Imafidon* @WomenShiftDigi featuring my little girls computing groups as a great example on how to engage young girls in STEM @aimafidon

Women Shift Digital / Keynote by Anne-Marie Imafidon from body>data>space on Vimeo.

*Anne-Marie Imafidon (born 1990) is a British computing, mathematics and language child prodigy.[1] She is one of the youngest to pass two GCSEs in two different subjects while in primary school. She passed two GCSE Examinations (in Mathematics and Information technology) at the age of 11.

Google Engineer Says Vietnamese 11th Graders Know Enough Computer Science to Pass Their Interview Process

Screenshot 2013-11-09 09.48.39
Zac aged 4 gets to grips with a Raspberry Pi

Great article over on good.is featuring Google Engineer Neil Fraser

“By grade 4,” writes Google engineer Neil Fraser, Vietnamese students, “start programming in Logo. Starting with sequences of commands, then progressing to loops.” And “By grade 5 they are writing procedures containing loops calling procedures containing loops,” he says.

Fraser also says 5th graders in Vietnam are so skilled, they can do the same programming 11th graders in the U.S. can do, which means that the 11th graders in Vietnam significantly outpace their American peers. Indeed, they’re skilled enough, says Fraser, to succeed in Google’s interview process.

Full article here: http://www.good.is/posts/google-engineer-says-vietnamese-11th-graders-know-enough-computer-science-to-pass-their-interview-process

Why Hypercard had to die

Wonderful post over at Loper OS on ‘Why Hypercard had to do‘ which is a great read for anyone studying languages.

Compared to the familiar ROM BASIC of my family’s second-hand Commodore 64, the HyperTalk language seemed clunky and comically verbose. And yet there was something magical, something oddly enthralling about Hypercard as a whole. The ease with which a mostly-blank screen could be turned into an interactive, living, breathing graphical toy of my own creation was astounding, exhilarating, and addictive.

Hypercard
Hypercard

Full post here: Why Hypercard had to do

How To Introduce Linux To Your Little Kid

Bryan Lunduke, author of Linux for Hank an children’s introduction Linux, has posted a great article discussing the various Linux distributions aimed at children. The timing is great as the Kano Kickstarter that packages up the Raspberry Pi with a child friendly OS has just hit $450k in four days – it’s target goal of $100k was obliterated within about 16 hours!

Qimo, linux for children
Qimo, linux for children

With my daughter nearing 3 years old, the topic of “how best to introduce a young kid to computers” has been on my mind a great deal. And since my home (and work) computing life revolves around Linux, the ideal is to introduce her to the wide, wonderful world of Linux and Open Source.

Here’s the full How to introduce linux to your little Kid article:

Raspberry Pi – The Girls Takeover the Pi Shop (in pictures!)

Today I took our group of 20 girls to see how the Raspberry Pi is made at the Sony Pencoed facility in South Wales. Which, luckily for us is literally down the road. Must to say that Sony and the team that showed us around were absolutely fantastic!

Quick stat: They make 30,000 Pi’s a week – and when demand is high have gone up to 60,000!

Ian the Sony guide
Ian the Sony guide

This was the youngest group of visitors they’d had and were really excited to see such an enthusiastic all girl group. After the past 5 weeks of working with them, it was a real treat to hear them talking about CPU’s, Memory and Programs as I pointed out bits of circuitry to them!

I’ll let the pictures do the rest of the talking:

Computing is not Programming

There’s a fair amount of “teaching kids to code is a [great|terrible] idea” style articles around at the moment. For example the Telegraph recently ran a piece titled “The Government wants to teach all children how to code. Here’s why it’s a stupid idea

It’s a bit Clarkson by numbers, which I think was the point, but there are valid points in there and it got me thinking about both sides of the argument. This a good thing.

We are picking up where we left off in the 1980’s in the way we introduce technology to our children – see Nesta’s Legacy of the BBC Micro report. It makes sense to continually evaluate it and make sure it’s right for them and not just right for election campaigns.

The specific aspect that’s feeding the articles comes from the misapplication, or misinterpretation, of Computing for Programming. It’s easy to see why as code is the “stuff” that makes a Computer do something. There’s a good parallel here with being able to read and write musical notation and its composition.

Code is often not the only end product of a lot of design, thinking and problem solving. The valuable end product is often not the code but the data it subsequently produces and increasingly in large volumes aka big data. Being able to understand, manipulate and secure it is important and that’s not the same thing as programming. This is why it’s important to see that being able to write code is really useful but:

Computing is not programming.

Programming is a part of Computing but there’s a lot more to the area of Computing than just instructing a machine with code. It’s also about other aspects such security, privacy, Internet architecture, distributed service and how this affects our social, commercial and global communication.

Computing, as far as we’re concerned as parents and consumers, is largely about the application and use of technology to make things easier for us e.g. receiving an email/photo to the other side of the world in seconds rather than waiting days for a letter, ordering consumables, etc

Academically, Computing exists to solve problems that are too large or too time consuming for our poor old monkey brains to handle – which is usually anything to do with large amounts of data and numbers. e.g. forecasting weather, analysing massive amounts of data from the Large Hadron collisions at CERN, or helping architects develop safer structures through modelling.

Computing is not Programming - Monkey Tools
Computing is not Programming – Monkey Tools

Speaking of monkey brains ,this is really the point of why it’s important Computing as subject needs to be taught from a young age in schools:

Humans are tool users and the Computer is the most advanced and useful tool we have.

We are all taught from a young age to use a fork and knife, but not all of us will be surgeons. I know, it’s a trite example (and I’m certainly not saying programmers are the surgeons of Computing – that’s UI designers for me 😉 but you get the jist, Computing is learning to use a tool and it’s not just about coding.

Here’s a real example:

I worked as a Software Engineer at Reuters in a small R&D team that programmed the Reuters Business Briefing products for web. When I say a small team, although there were only 3 programmers the real team was much larger. Working with us was a team of branding experts, User Interface designers, SQA testers, System Administrators, enterprise network architects, operations deployment engineers and product managers.

If you read back that roll call that worked to deliver what became an award winning product, the number of people writing code was pretty small.

The majority of the jobs on a technical project were clearly not programming. Though, if you talk to the majority of programmers they’d tell you that they’re doing most of the work. But we’re slightly biased!

This is where the educational aspect of Computing beyond coding can have a real impact. There are many great, interesting, important, jobs building products that don’t involve any coding. But what they all need is a solid understanding of Computing.

Why? Because if the research is correct, the next 7 years will see a massive amount of opportunity for our children if they’ve got the correct skills.

Computing Jobs By 2020
Computing Jobs By 2020