1. Introduction

1.1. What’s the big picture?

Why is it that people have a love-hate relationship with computers? Why are some people so fanatic about particular types of computers, while others have been so angry at digital devices that they have been physically violent with them? And what does this have to do with computer science? And what is computer science anyway?

I’m glad you asked... put simply, computer science is about tools and techniques for designing and building applications that are very fast, that have great interfaces, that are reliable, secure, helpful and even fun.

A lot of people confuse computer science with programming. It has been said that “computer science is no more about programming than astronomy is about telescopes” (Mike Fellows). Programming is the tool that computer scientists use to bring great ideas to life, but just knowing how to give programmed instructions to a computer isn’t enough to create software that delights and empowers people.

For example, computers can perform billions of operations every second, and yet people often complain that they are too slow. Humans can perceive delays of about one tenth of a second, and if your program takes longer than that to respond, it will be regarded as sluggish, jerky or frustrating. You’ve got well under a second to delight the user! If you are searching millions of items of data, or displaying millions of pixels (megapixels) then you can’t afford to do things the wrong way, and you can’t just tell your users that they should buy a faster computer... they’ll probably just go out and buy someone’s faster software instead!

Here’s some advice from Fred Wilson, whose company has invested in a lot of high profile tech companies:

First and foremost, we believe that speed is more than a feature. Speed is the most important feature. If your application is slow, people won’t use it. I see this more with mainstream users than I do with power users. I think that power users sometimes have a bit of sympathetic eye to the challenges of building really fast web apps, and maybe they’re willing to live with it, but when I look at my wife and kids, they’re my mainstream view of the world. If something is slow, they’re just gone. ... speed is more than a feature. It’s a requirement.

(You can hear him talk more about this here.)

A key theme in computer science is working out how to make things run fast, especially if you want to be able to sell your software to the large market of people using an old-generation smartphone, or run it on a data centre where you pay by the minute for computing time. You can’t just tell your customers to buy a faster device — you need to deliver efficient software.

Try using the following two calculators to make a simple calculation. Both of them have the same functionality (they can do the same calculations), but which one is nicer to use? Why?

(This book has many interactives like the following one; if the first calculator doesn’t work properly for you then you may need to use a more recent browser. The interactive material in this book works in most recent browsers; Google Chrome is a particularly safe bet.)

The second calculator above is slower, and that can be frustrating. But the it also has a fancier interface — buttons expand when you point to them to highlight what you’re doing. Does this make it easier to use? Did you have problems because the “C” and “=” keys are so close?

How interfaces work is another important part of computer science. The images and layout are important, but what’s much more important is the psychology of how people interact with it. For example, imagine if the “OK” and “Cancel” button were randomly reversed in dialogue boxes. People would always need to check carefully before clicking on one of them, instead of using the instinctive moves they’ve made hundreds of times before. There are some very simple principles based on how people think and behave that you can take advantage of to design systems that people love.

Making software able to scale up is another important theme — imagine that you’ve built a web interface and have attracted thousands of customers. It’s all going well, then overnight your site goes viral and you suddenly have millions of customers. If you’ve designed your programs so they can scale up to work with such large amounts of data then your main problem will be dealing with offers to buy your company; but if the system gets bogged down then a day later people will be tired of waiting for the site to respond and will move on to someone else’s.

Some of these problems can be solved by buying more equipment, but that can be an expensive and wasteful option (not just for cost, but because of the impact on the environment including the wasted power used to do the processing inefficiently). With mobile computing it’s even more important to keep things lean and efficient — heavy duty programs chew up valuable battery life, and processing and memory has to be used sparingly as these affect the size, weight and even heat dissipation of devices.

And if your system continues be successful, pretty soon people will be trying to hack into it to steal valuable customer data or passwords. How can you design it so that you know it is secure from such attacks and your customers can trust you with their personal information or business transactions?

All of these questions and many more are answered by the field of computer science. The purpose of this guide is to introduce you to those ideas so that you have a better idea of whether this field is for you. It is aimed at high-school level, and is intended to get you to the point where you have a good overview of the field, and are well prepared for further in-depth study to become an expert.

We’ve broken computer science up into a whole lot of topics that you’ll often find in curricula around the world, such as algorithms, human-computer interactions, compression, cryptography, computer graphics, and artificial intelligence. The reality is that all these topics interact, so be on the lookout for the connections.

This isn’t a list of facts for you to memorise, or to copy and paste into projects! It is mainly a guide of things for you to do — experiences that you can have that will engage you with the topics. In fact, we won’t go through all the topics in great detail, but will give you references to the many websites and books out there that explain things thoroughly. The idea of this guide is to give you enough background to understand the topics, and to do something meaningful with them.

And what about programming? You can get through this whole guide without doing any programming, although we’ll suggest exercises, and ultimately all the concepts here are reflected in programs that people write. If you want to learn programming there are many excellent courses for doing this. Learning to program takes time and practice, and is well worth doing at the same time as working through the topics in this guide. There are a number of free online systems and books that you can use to teach yourself programming. A database of options for learning to program is being compiled by code.org <http://www.code.org/>. Also, here are some that might suit you:

  • The NCEA year 12 workbook is a book (two actually) on programming in Java and Python, written for the NZ achievement standards. The authors are developing a second book for the year 13 programming standard.
  • CodeAvengers is an online system where you can work through challenges that will introduce you to programming in Javascript. This system matches the NZ programming achievement standards from level 1 to 3.
  • Interactive Python has a free online “book” called “How to Think Like a Computer Scientist: Interactive Edition” (also referred to as “Think Python”) which teaches the Python language, and enables students to edit and run Python examples within the web browser. The original book is open source and is also available in various non-interactive versions.
  • Codecademy is an online system where you can learn languages including Python and Javascript
  • Coder Dojo is a “movement orientated around running free not-for-profit coding clubs and regular sessions for young people”.
  • TryPython is an instant Python tutorial that runs in your web browser.
  • CodingBat has hundreds of programming challenges that you can try to check on how you are progressing with learning to program.
  • Greenfoot is a visual, interactive system that teaches object orientation with Java. You create ‘actors’ that live in ‘worlds’ to build games, simulations, and other graphical programs.
  • Khan Academy has a “Computer Science” section; most of the material here is about programming rather than computer science in general.

The following programming teaching systems are aimed more at younger students or is based around a “drag and drop” language which is only used as a teaching tool:

  • ScratchEd provides extensive educational material for Scratch, which is a drag-and-drop programming language centred around creating 2D animations. Scratch has many of the features of more conventional languages. The Snap (BYOB) system is based on Scratch, and has some more advanced features.
  • Alice is an educational programming language based around creating 3D animations.
  • Kodu is a visual programming tool that is also available of Xbox.
  • Snake wrangling for kids is a free downloadable book that introduces younger students to Python programming.

But programming is just one of the skills you’ll need to be a computer scientist. In this book you’ll be exercising lots of other skills - maths, psychology, and communication are important ones.

1.2. How to use this guide

This guide has is intended to support a variety of curricula, and teacher guides will become available for using it for different contexts. For students, we’ve designed most chapters so that they can stand alone; the few that build on previous chapters explain at the start what preparation you need (the most useful general preparation is the chapter on data representation, because everything on a computer is stored using binary numbers and so they have an important role in many areas of computer science.)

Each chapter begins with a section about the “big picture” — why the topic is useful for understanding and designing computer systems, and what can be achieved using the main ideas in the chapter. You’ll then be introduced to key ideas and applications of the topic through examples, and wherever possible we’ll have interactive activities that enable you to work with the ideas first hand. Sometimes these will be simplified versions of the full sized problems that computer scientists need to deal with, but the idea is for you to actually interact with the ideas, not just read about them. Make sure you give them a go!

We finish each chapter by talking about the “whole story” — giving hints about the parts of the topic that we left out because we didn’t want to make the chapter too overwhelming. There will be pointers for further reading, but be warned that some of it might be quite deep, and require advanced math or programming skills to get into properly.

If you are doing this for formal study, you’ll end up having to do some sort of assessment. The chapters provide ideas for projects and activities that could be used for this, but your teacher will need to guide you on what is appropriate for the particular assessment that you’re doing.

1.3. About this guide

This guide is free for you to copy, share and even modify. More information on the system used for development and source code, can be found at

It’s available online, as a downloadable PDF file, and soon for ePub (e.g. for iBooks) & MOBI (e.g. for Kindle), although it’s much better viewed in the other formats because you can watch the videos and use the interactive activities.

This guide is licenced under a Creative Commons Attribution-NonCommercial-ShareAlike licence, which means that you are welcome to take copies and modify them. If you do make improvements, we ask that you share those, and acknowledge this guide by linking back to our web site. You’re not allowed to sell the guide or derivatives from it, only give it away.

Production of the guide was partially funded by a generous grant from Google Inc. and support from the University of Canterbury. Of course, we welcome donations to support further work on the guide.

1.4. Further reading

Each chapter gives suggestions for further reading for the specific topic, but there are also plenty of general books about computer science that you might want to read to keep your view of the topic broad. Some that might be helpful are:

  • Algorithmic adventures: from knowledge to magic, by Jurag Hromkovic
  • The Turing Omnibus, by A.K. Dewdney
  • Algorithmics, by David Harel
  • Computational fairy tales, by Jeremy Kubica

Wikipedia has a fairly extensive entry on computer science.

For more detailed view of many of these topics, the following book is relevant: AQA Computing A2 book(s) By Sylvia Langfield and Kevin Bond

There are also some excellent general web sites about Computer Science, many of which we’ve referenced: