Wednesday, October 15, 2014

National Cipher Challenge 1A

The National Cipher Challenge is an annual event organised by the University of Southampton.

Cipher Challenge Logo
Cipher Challenge Logo
This is the second year teams from our school have had a go at the competition. We have a keen but young group of pupils and I hope that by exploring how the ciphers could have been solved after the answers have been published, we will have a better prepared team ready to tackle next year's challenges.

Also, I thought this blog would be a good place to consider some of the educational benefits of tackling competitions like this. So here is how I solved Challenge 1A. I'll follow up in the next day or so with a consideration of the computing and maths skills that could be developed through cipher cracking activities.

The first challenge was pretty straightforward. The cipher text given was:

QEVO,

XLEROW JSV FVMRKMRK QI MR SR XLMW SRI, WIIQW PMOI E JEWGMREXMRK GEWI.

M LEZI XLVII UYIWXMSRW:
ALC ASYPH XLI JPEK HEC EWWSGMEXIW AERX E WLMT?
ALC ASYPH XLIC AERX XLMW WLMT?
ALC ASYPH XLIC AERX XLMW WLMT RSA?

LEZMRK VIEH XLI EXXEGLIH HSGYQIRX M WYWTIGX XLEX XLI ERWAIVW EVI EPP 
VIPEXIH XS XLI UYIWXMSR SJ ALEX IBEGXPC WLI ERH LIV JPEK HEC EWWSGMEXI 
GVIA AIVI XVCMRK XS WYVZIC.

M EQ KYIWWMRK XLEX CSY EPVIEHC GLIGOIH SYX XLI SRFSEVH KTW WCWXIQ JSV 
MRJSVQEXMSR EFSYX LIV QSZIQIRXW, FYX MJ CSY HMH JMRH ERCXLMRK M ASYPH 
FI JEWGMREXIH XS LIEV EFSYX MX. MR XLI QIERXMQI M EQ TVIXXC WYVI XLEX 
CSY ORSA QSVI EFSYX XLI JPEK HEC EWWSGMEXIW XLER CSY LEZI XSPH QI, WS 
E FVMIJMRK ASYPH FI QYGL ETTVIGMEXIH.

EPP XLI FIWX,

LEVVC

The passage looked like a letter between Harry and Mark (two people named in the introductory text related to the challenge) so an obvious crib presents itself if you guess that QEVO at the start of the cipher text is Mark and that LEVVC at the end is Harry. This suggests the following substitutions:

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
. . y . a . . . . . . h . . k . m . . . . r . . . .
(Note: from now on I will adopt the convention of showing Cipher text in capital letters and plain text in lowercase, even to the extent of showing proper names like "Harry" as "harry".)

Substituting these letters into the cipher text gives you:

mark,XhaRkW JSr FrMRKMRK mI MR SR XhMW SRI, WIImW PMkI a JaWGMRaXMRK 
GaWI. M haZI XhrII UYIWXMSRW: Ahy ASYPH XhI JPaK Hay aWWSGMaXIW AaRX 
a WhMT? Ahy ASYPH XhIy AaRX XhMW WhMT? Ahy ASYPH XhIy AaRX XhMW WhMT 
RSA? haZMRK rIaH XhI aXXaGhIH HSGYmIRX M WYWTIGX XhaX XhI aRWAIrW arI 
aPP rIPaXIH XS XhI UYIWXMSR SJ AhaX IBaGXPy WhI aRH hIr JPaK Hay 
aWWSGMaXI GrIA AIrI XryMRK XS WYrZIy. M am KYIWWMRK XhaX ySY aPrIaHy 
GhIGkIH SYX XhI SRFSarH KTW WyWXIm JSr MRJSrmaXMSR aFSYX hIr mSZImIRXW, 
FYX MJ ySY HMH JMRH aRyXhMRK M ASYPH FI JaWGMRaXIH XS hIar aFSYX MX. MR 
XhI mIaRXMmI M am TrIXXy WYrI XhaX ySY kRSA mSrI aFSYX XhI JPaK Hay 
aWWSGMaXIW XhaR ySY haZI XSPH mI, WS a FrMIJMRK ASYPH FI mYGh 
aTTrIGMaXIH. aPP XhI FIWX, harry

(Note: to make it easier to process in the spreadsheet I used to help me crack this cipher, I removed the extra lines, effectively turning it into a single paragraph, but otherwise left the punctuation and spacing intact.)

You now have a choice to make:
  1. You can look at the partially deciphered text to see if any further substitutions suggest themselves. For example, the three letter grouping XhI appears many times in the text. Since "the" is a very common three letter word, there is a good chance that X=t and I=e. Similarly, the letters Ahy appear three times, which means A is probably w. Substitute these letters and then look at the text again. Keep looking for recognisable words and guessing letters until you have decoded the whole message.
     
  2. In this case, the easier option is to guess what kind of cipher was used and see if your guess is right by trying it out on the cipher text. Since we have guessed that E=a, we could further guess that Mark and Harry are using a Caesar cipher where plain text letters are moved forward four places to get the cipher text letter. So a goes to E (b to c to d to E - four places). Use your code wheel, set A to E and check if the other letters we have chosen match our guesses. You should see that the guesses match all round the wheel. That is r goes to V (s to t to u to V - four places) and y goes to C (z to a to b to C) etc.
What ever method you choose, you should be able to decipher the rest of the message and read:

mark,
 
thanks for bringing me in on this one, seems like a fascinating case.
 
i have three questions:
why would the flag day associates want a ship?
why would they want this ship?
why would they want this ship now?
 
having read the attached document i suspect that the answers are all 
related to the question of what exactly she and her flag day associate 
crew were trying to survey.
 
i am guessing that you already checked out the onboard gps system for 
information about her movements, but if you did find anything i would be 
fascinated to hear about it. in the meantime i am pretty sure that you 
know more about the flag day associates than you have told me, so a 
briefing would be much appreciated.
 
all the best,
 
harry

So, Challenge 1A solved. Before going on to solve Challenge 1B, the next post will talk about the spreadsheets I developed to help crack the ciphers.


Wednesday, June 25, 2014

Computer News

A former colleague told me about Weekly Computing News where, once a week, she shared some technology related news item with her Computing classes. I thought this was a brilliant idea and so shamelessly ripped it off when I started my new job here at the High School. I did fairly well for a year but it fell apart this session and I only made it up to Christmas before dribbling to a halt. Determined to do better next session, I thought I would try to get a couple in before the end of term.

I used to print out the presentation and post it outside my classroom ("print out"? How old fashioned!) but I realised if I converted it to a Google presentation, I could post it on our VLE. As an added bonus, I thought I could post it on my blog too (another much neglected project) and therefore hopefully manage at least one post a week through the school term.

So here is the first of the blogged Computer News items from session 2014/15:



As part of the presentation, there is a link to a BBC page with a short video which I showed in class as well as speaker's notes which give a bit more detail. There are also two QR code links at the end which give my primary sources. (The links are a BBC news report and an article from Wired magazine.)

Let me know what you think of the idea and/or the news item chosen. Would you like to see more?

Location:Crow Road,Glasgow,United Kingdom

Thursday, May 29, 2014

Computing Science Conference: Hacking HTML, CSS and JavaScript

Live notes from Education Scotland's Computing Science Conference
#HigherCS

Colin Maxwell

Useful websites are:
Codecademy (Colin's favourite) - great for getting yourself up to speed and for pupils to set practical homework as no special tools required.

w3schools.com - not as interactive as codecademy but good reference site.

webmaker.org - from Mozilla. The x-ray goggles is good but start with Thimble. Similar to codecademy with tutorials but the advantage is you can save and share what you create.

All three of these are great because all you need is access to the Internet. Possible to do it with some fairly basic tools: web browser (Chrome preferred) and a text editor (Notepad++, Brackets, Sublime, ...)

Brackets is free, open source. It does Live HTML Development, supports JavaScript debugging (with Theseus extension) and loads of other extensions (e.g. Extension that provides colour palette to choose hex colour codes or "beautify" code).

How do we teach HTML? Colin started teaching programming by getting pupils to hack code. Start by giving web pages for them to hack. Example given of a web page that asks for a pin code then flick backwards and forwards between the code and the page. Get pupils to identify how the different parts relate to each other. Start with JavaScript version of a simple PIN code form then same form but using CSS to code it. You can show how style is improved and extra functionality added. Can open the JavaScript file and the CSS file alongside HTML file. This approach let's pupils see the completed jigsaw puzzle rather than just giving them the bits and no picture.

Colin then went on to show editing a web page in bracket. bracket lets you open all the files in a folder and shows them in a side bar for easy navigation. From a teaching point of view, you can zoom the text in a window, highlight lines and do live update of a web page. Set pupils tasks like change a grade, add a person don't tell them how, let them work it out. Makes it more than a "monkey see, monkey do" exercise.

CSS
Set tasks to place objects (Colin uses zombies) using div to place graphics - house a png which can have transparency (for windows and doors) and zombies as gif because they can be animated. Place the zombies in the windows and doors. Uses layers to get zombie inside house. Then give file to another pupil who will stack crates in front on the windows - again using div and layers.

Went on to show JavaScript game using JavaScript library called enchant. Again, hacking an existing page to do things like change frame rate and sprite being animated. The enchant library much easier to use than many. Colin uses JavaScript as his main programming language.

Ran out of time but check his blog for more.


Computing Science Conference; PLAN-C

Live notes from Education Scotland's Computing Science Conference
#HigherCS

Programming: Teaching Standard Algorithms - Peter Donaldson

Visualising Hidden Mechanisms
Lots of hidden mechanisms in Computing. If pupils do not have an understanding of these mechanisms (only seen examples or relying on intuition) they will struggle. Showing examples is not enough. Must have a causal model or there can be "random twiddling" to try and fix problems. Watching a process helps but it is not enough. Often programming gives too much work for eyes and not enough work for the brain. You don't have to be a genius to program, you just have to develop an understanding of what the computer does when it is given an instruction.

How do we do that currently? Diagrams e.g. Boxes for variables or use debugger to inspect variables and trace an execution of a program. Use actual boxes and get pupils to put things in the boxes. (An aside was how do you read an assignment statement? Not read left to right or how do you make sense of total = total + 1?) interactively model the process of writing code - start with a blank page and build the code up a line at a time rather than starting with example programs.

Other suggeststions: draw a flowchart of a program; draw structure diagram; trace table/debugging tools; step through program and asking "what happens next...". There are limitations of all these approaches. Each approach contributes something but often need to teach new ways of describing when they are still getting their heads round coding. Is the cart before the horse teaching design notation before they understand coding?

Example was given of using a paper table to trace through a program. Started by identifying expressions (i.e. something that generates a value).



Teachers answer was:



Next draw arrows to show the flow of control:



Finally, hand execute the program with the input 20, 7, -1 (put the step numbers beside the arrows - makes it easier to see when things happen). Fill in changing variables in a table and show the expression being evaluated at each stage too. Work in progress:



So our final trace looked like this:



Using the "Expression evaluator" box makes pupils' understanding of what is going on clear.

But research shows there is a strong correlation between the ability to trace the flow of a program and the ability to produce code.

Location:Grosvenor Street,Edinburgh,United Kingdom

Making the dull bits interesting

David Bethune

Begs the question: are there any dull bits? Probably around the room, different people will give different answers. Key point is that we have to get pupils enthusiastic about our subject.

{Curses! Lost my notes from the first half of this session while looking for a cartoon.}





Concept cartoon to stimulate discussion. Should be no right answer, or at least no obvious right answer. Could set this as discussion starter or ask pupils to produce a concept cartoon. Here is our attempt:


We then passed on our carton to another group and they added to our concept cartoon.


Could then role play concepts produced. Could use this in a flipped classroom style. Perhaps look at cartoon at home and come in with discussion, research, ready to talk about it.

How do we develop investigation and reporting skills? E.g. Software Design & Development Outcome 3: "Produce detailed report on... Current trends in the development of intelligent systems" Should allow choice of topic.

Don't forget about SCHOLAR which has animation and interactive bits, CSI, and How Stuff Works. The BBC news technology section has some nice articles that can generate interest. {Computer news and Technology cool wall? -- DDM}

Location:Grosvenor Street,Edinburgh,United Kingdom

Computing Science Conference: Keynote

Live notes from Education Scotland's Computing Science Conference
#HigherCS

Keynote: Gerry Docherty, CE smarter Grid Solutions

The IT industry in Scotland could be bigger and better: "There are no geographical barriers to being successful in the IT industry. ...Computing is the big industry for the 21st Century."

Skills Investment Plan
A number of major players in the IT industry as well as public bodies and universities are involved in drawing up the plan. Gerry sees Computing teachers as the most "important cohort" in developing pupils' interest and aptitude in IT. Salaries in the IT industry in Scotland are 60% above the median salary in Scotland. IT in Scotland is second only to the Whiskey industry in terms of export value. Few jobs are at the IT support end of things. Most of the jobs are at the high end, computational thinking side of things.

There was then a "Wha's like us?" Section where it was claimed (among other things) that hypertext was invented in Edinburgh. (Not convinced!) was pointed out that there is a real shortage of people qualified to fill the required jobs (need 10,400 in the next few years). There are barriers though. Image of IT people is still that of spotty, t-shirted, game playing teenager. Need to get message through to parents, teachers and pupils that The industry that will change the world, that will make new things, are the high end IT people. The high flyers, the five A Higher pupils, need to see the IT industry as the place to go. That high end IT skills are useful, and even necessary, for people going I to other professions (e.g. Doctors, lawyers, finance, physicists...).

Various strategies.
One is a quick fix - a one year intensive course, industry led, sitting between college and university, to give people IT qualifications that will let them walk into a job).
Two: broaden pipeline. Not just more pupils in Computing courses but getting more Computing teachers in schools too.
Three: make sure courses reflect the new high end IT skills needed by industry (not so much network and technical support; more ”proper programming”).
Four: national campaign to raise profile of and educate public in what current IT industry is really like.

Tough challenges; not least because of rapid change in the sector.

We need to do everything we can to make pupils, especially girls, to see IT as a valuable and interesting place to be.

Q & A
Q: What kind of jobs are out there that are of interest to girls.
A: there are no jobs that are gender specific! Programming, system design, project management... The image is the problem. At the moment there is an uptake in girls taking physics perhaps because of the Brian Cox effect. Will.I.am has had similar effect in the USA for computing. In Scotland, majority of students studying law are now female thanks to a couple of TV programs featuring female lawyers.

Q: What form will the campaign take?
A: Early stages of discussion with BBC Scotland. Looking at people that could front campaign. Possible fly on the wall type documentary centred on IT company.

Q: Pool of industry people to come into school?
A: Hope to do this but there are many barriers that make this difficult. They are trying to set up a co-ordinated programme to do this. Could get people doing short videos, like TED talks! that we can show to children and parents. Can source this on YouTube with Will.i.am's stuff and Bring It On NI
Q
Q: Poor image of Computing in local authorities. How do we tackle this?
A: Skills Investment people trying to get Computing positioned as a science along with Physics, Chemistry and Biology. Trying to get that message across to head teachers and government ministers.
Post Session
Check out report from Wood Commission

Location:Grosvenor Street,Edinburgh,United Kingdom

Tuesday, December 03, 2013

Lego Education - WeDo

C@SS Conference Workshop

Lego Education - WeDo

{Live-ish capture of workshop session with only minor edits.}

WeDo Duck by DavidDMuir
WeDo Duck, a photo by DavidDMuir on Flickr
Connect, construct, contemplate, continue.

We were given six bricks and told to build a duck. Everyone made something different - creativity!

WeDo uses a couple of motors, a couple of sensors and a USB transmitter to send instructions to the kit. The programming interface is very Lego like and also provides hints on how to build the necessary models. Supporting children as the make something that comes to life is extraordinarily powerful. Engages and excites. 

Built a spinner and had a competition to see whose spinner spun the longest. Not that I'm competitive, but we won! (Nearly 28 seconds.)


The construction set we used is normally £88.99 but there was a 50% discount until end of November. Software is £59.99 for individual licence and site licence is available.