Itching for More Overview
Total Page:16
File Type:pdf, Size:1020Kb
Itching for More An Intermediate Course in Computing Science by Jeremy Scott TUTOR NOTES Acknowledgements This resource was partially funded by a grant from Education Scotland. We are also grateful for the help and support provided by the following contributors: George Heriot’s School Crieff High School CompEdNet, Scottish Forum for Computing Science Teachers Computing At School Brian Clark, Portobello High School Susan Evans, Cleveland High School Colleen Lewis, UC Berkeley Mitchel Resnick, MIT Scottish Informatics and Computer Science Alliance (SICSA) Edinburgh Napier University School of Computing Glasgow University School of Computing Science Heriot-Watt University School of Mathematical and Computer Sciences University of Edinburgh School of Informatics Robert Gordon University School of Computing University of Dundee School of Computing University of Stirling Department of Computing Science and Mathematics University of West of Scotland School of Computing International Olympic Committee ScotlandIS Brightsolid Online Innovation JP Morgan Microsoft Research Oracle O2 Sword Ciboodle The contribution of the following individuals who served on the RSE/BCS Project Advisory Group is also gratefully acknowledged: Professor Sally Brown (chair), Mr David Bethune, Mr Ian Birrell, Professor Alan Bundy, Mr Paddy Burns, Dr Quintin Cutts, Ms Kate Farrell, Mr William Hardie, Mr Simon Humphreys, Professor Greg Michaelson, Dr Bill Mitchell, Ms Polly Purvis, Ms Jane Richardson and Ms Caroline Stuart. Some of the material within this resource is based on existing work from the ScratchEd site, reproduced and adapted under Creative Commons licence. The author thanks the individuals concerned for permission to use and adapt their materials. BCS is a registered charity: No 292786 The Royal Society of Edinburgh. Scotland's National Academy. Scottish Charity No. SC000470 i ii Contents Overview ........................................................................................................ 1 Introduction ................................................................................................... 1 Computational Thinking ................................................................................. 2 Why BYOB? .................................................................................................... 3 Using this resource ......................................................................................... 4 BYOB ............................................................................................................... 7 Known Issues .................................................................................................. 8 Installation ..................................................................................................... 8 Useful Resources ............................................................................................ 9 Lessons and approach ................................................................................... 11 Screencasts .................................................................................................. 11 Deep Understanding .................................................................................... 11 Pair Programming ........................................................................................ 11 Suggested Activities ..................................................................................... 12 Inter-Disciplinary Learning ........................................................................... 12 A Brief History of the Computer ..................................................................... 13 What is a computer? .................................................................................... 13 Representing information.............................................................................. 17 Binary: The language of computers ............................................................. 19 Layer cake .................................................................................................... 19 Programming in BYOB ................................................................................... 21 1: Haunted House Game ................................................................................ 23 Event-driven programming .......................................................................... 26 2: Fancy a Chat? ............................................................................................ 31 The Importance of Design ............................................................................ 32 3: Guessing Game .......................................................................................... 37 Procedures: Building Your Own Blocks (BYOB) ............................................ 40 Validating Input ............................................................................................ 41 4: Hungry Frog Game ..................................................................................... 46 Divide and Conquer...................................................................................... 50 5: Shaping up ................................................................................................ 53 Parameters: More Flexible Procedures ....................................................... 55 Project .......................................................................................................... 59 Congratulations! .......................................................................................... 60 An ancient programmer’s proverb .............................................................. 60 Appendices ................................................................................................... 61 Appendix A: Learner Tracking Sheet ............................................................ 62 Appendix B: Sample Code ............................................................................ 63 iii iv Itching for More Overview Overview Introduction Implementation of Curriculum for Excellence and the development of new National Qualifications presented a timely opportunity to revise the way computing science is taught in schools and to provide a more interesting, up-to-date and engaging experience for both tutors and learners. This is the second in a series of three resources developed by the Royal Society of Edinburgh and the BCS Academy of Computing that exemplify a subset of the computing science-related outcomes of CfE at Levels 3 & 4 and beyond. This resource is intended for use with learners who already have some programming experience – possibly via the first resource in this series Starting from Scratch: An Introduction to Computing Science. It will seek to consolidate learners’ understanding of Computing Science concepts, with a focus on abstraction and modularity, via the BYOB programming environment developed by the University of California, Berkeley. All three resources build on state-of-the-art understanding of the pedagogy of Computing, drawn from around the world. This should enable learners to develop both programming skills and deep understanding of core Computing concepts, including computational thinking (see overleaf). Whilst this resource is intended to support tutors’ thinking about how they might translate the intentions of the curriculum into classroom activity, it should not be seen as prescriptive. Rather, it is intended to stimulate innovation and offer tutors the flexibility and opportunity to deploy their creativity and skills in meeting the needs of learners. Page 1 Itching for More Overview Computational Thinking Computational thinking is recognised as a key skill set for all 21st century learners – whether they intend to continue with Computing Science or not. It involves viewing the world through thinking practices that software developers use to write programs. These can be grouped into five main areas: seeing a problem and its solution at many levels of detail (abstraction) thinking about tasks as a series of steps (algorithms) understanding that solving a large problem will involve breaking it down into a set of smaller problems (decomposition) appreciating that a new problem is likely to be related to other problems the learner has already solved (pattern recognition), and realising that a solution to a problem may be made to solve a whole range of related problems (generalisation). Furthermore, there are some key understandings about computers: Computers are deterministic: they do what you tell them to do. This is news to many, who think of them as pure magic. Computers are precise: they do exactly what you tell them to do. Computers can therefore be understood; they are just machines with logical working. Whilst computational thinking can be a component of many subjects, Computing Science is particularly well-placed to deliver it. Page 2 Itching for More Overview Why BYOB? Since its launch, MIT’s Scratch has received widespread acclaim as an ideal environment through which to introduce learners to computer programming and computational thinking. BYOB takes Scratch further by introducing the ability for users to create their own blocks (procedures/subroutines) with parameter passing, amongst many other features. BYOB is, in this sense, a fully-fledged programming language. Like Scratch, its building blocks approach all but eliminates a major problem for learners presented by traditional text-based languages i.e. the requirement to recall and type instructions