1 . An algorithm is sequence of clearly defined steps that describe a process to be followed. You’ll learn more about them in Chapter 2 .
2 . This punchline features in a routine from UK sketch show Little Britain , where an unhelpful travel agent ‘delegates’ all decision-making to the computer… or so the audience is led to believe.
3 . See for example: Furber 2012, Barr and Stephenson 2011 or Bundy 2007.
4 . A programming language aimed at novices that is often used to control a cursor that can draw to the screen. The cursor is called a turtle.
5 . This list aligns very closely with others produced by various organisations, including Computing at School (CAS) (Csizmadia et al., 2015), a community supported by BCS, The Chartered Institute for IT, Microsoft, Google and others.
6 . ‘O(N log N)’ is an example of algorithm complexity, which is discussed in Chapter 6 .
7 . By ‘fail’, I don’t mean that the conclusion is necessarily wrong, only that the argument is useless for judging it to be right or wrong.
8 . That’s Tic-Tac-Toe for most of the world outside Britain.
9 . This would be to commit a logical fallacy called ‘affirming the consequent’, which means you incorrectly assumed that the proposed cause was the only way the consequent could be true.
10 . Although another operator named XOR (exclusive or) does match the meaning here.
11 . Some take the view that an algorithm is a combination of logic and some controlling component that specifies how the logic is used – that is, algorithm = logic + control (Kowalski, 1979).
12 . ‘Else’ in this context is synonymous with ‘otherwise’.
13 . And the reason for this is because brackets have the highest precedence of all operators.
14 . Decomposition (discussed later in this chapter) is an effective way of exposing unknown details.
15 . Trade-offs and optimisation of solutions feature in Chapter 6 .
16 . Entities: the core concepts of a system.
17 . You would also need to make clear what ‘easy’ means in this context, for example takes less than 30 seconds to find a specific book.
18 . Chapter 5 discusses various methods for anticipating and handling errors.
19 . The list has two items in it. For readability’s sake, each pair of coordinates is surrounded in parentheses.
20 . In fact, with some experience, you’ll be able to carry out decomposition and generalisation simultaneously.
21 . That’s hiding, not removing. The details still exist, it’s simply that they’re kept out of the picture.
22 . I’m being a little tongue-in-cheek here, but it’s worth familiarising yourself with Miller’s experiments on human working memory (Miller, 1956).
23 . The map in this figure is © OpenStreetMap contributors. This and other maps are available under the Open Database License.
24 . Recursion was explored in Chapter 3 . A recursive structure is something made up of many smaller things that are the same type as the whole.
25 . Payload is the capacity in kilograms of a van.
26 . Look up the Antikythera Mechanism at: https://en.wikipedia.org/wiki/Antikythera_mechanism .
27 . This turnstile doesn’t block incoming coins while it’s unlocked, so be careful: this is a prime way to waste money.
28 . Image from Wikimedia Commons (2006). Available at: https://commons.wikimedia.org/wiki/File:Image-
Koenigsberg,_Map_by_Merian-Erben_1652.jpg .
29 . Image from Wikimedia Commons (2012). Available at: https://commons.wikimedia.org/wiki/File:
Orrery_-_Nov._2010.jpg .
30 . How to test and evaluate user interfaces is covered in Chapter 6 .
31 . That’s right, ‘its’ is missing an apostrophe.
32 . If you’re interested, this kind of error is called a dangling modifier.
33 . Different types of handheld devices work differently and may affect the way your solution works.
34 . One way to see the number of relationships is to create a model. See Chapter 4 .
35 . The divisor is the number on the bottom of the division.
36 . Aka stubs.
37 . Aka drivers.
38 . Find an example of a test plan in Chapter 6 .
39 . This was termed ‘rubber duck debugging’ by the authors of The Pragmatic Programmer , who reference the story of a programmer having a rubber duck on their desk and explaining to it their current debugging woes (Hunt and Thomas, 1999).
40 . A critical system has extremely high reliability demands, usually because failure can incur loss of life or high financial loss.
41 . An impossible goal, given that there are literally endless different algorithms in existence.
42 . An example from this category is the bubble sort algorithm. It sorts input data by comparing every item to most or all other input items, thus squaring the amount of work it potentially needs to do.
43 . Or, if you think of software as art, then it isn’t just art .
44 . The U-shaped pipe beneath the sink.
45 . Maybe the teacher just wanted to keep the students busy.
46 . Chapter 3 discusses the power of finding patterns in a problem.
47 . Because your approach is clever or impressive, that is no justification in itself. It’s just showing off.
48 . A resolution of 2048 × 1536 = 3,145,728 pixels.
49 . The dimensions of a modern monitor screen are often multiples of 16 (for example, 1024, 1280), so a 16 × 16 is the smallest sensible-looking smiley face you could draw and have a neat row of them on screen.
50 . Consider the difference between a user-friendly, but specialised, table knife and the highly flexible Swiss Army Knife (Byrne, 2013).
51 . For example: Java, Ruby, C/C++ or JavaScript.
52 . A source file is a text file that contains source code.
53 . These are problems that occur when the program is running.
54 . Python also refers to a variable as a ‘name’.
55 . This creates a new list by including only elements from an old list that pass a test – in this case, the test is the is_even function; filter is a fundamental operation from functional programming (itself a type of declarative programming style).
56 . This code sample includes the importing of a module, which is explained in Chapter 9 .
57 . US Air Force (1967). Available from: https://commons.wikimedia.org/wiki/File:Offutt_Air_
Force_Base_operator.jpg
58 . This file can remain empty. Only its presence is required.
59 . Specifically, they’re put into a list of tuples.
60 . This isn’t strictly true. Every type in Python supports a small set of specific operations by default, but none that interests us right now.
61 . Vehicles in this category are up to 3,500 kg in weight and contain up to eight passenger seats.
62 . Or, more correctly, assumes .
63 . Very likely, because car companies love standardisation.
64 . Alterations like changing the signature of the initialiser.
65 . Or, if you prefer, the latter is a generalisation of the former.
66 . You can think of activity diagrams as flow charts with some additional features, in particular the ability to depict processes happening in parallel as well as which objects initiate each action.
67 . ‘Response time’ being the duration between the user clicking a button/link and receiving the response from the server.
68 . Consider the (incomplete) list of types of system testing here: www.tutorialspoint.com/software_testing_dictionary/
system_testing.htm
69 . That is to say, the system is doing something (and doing it well). But, whatever it’s doing, it doesn’t solve the original problem.
70 . The original problem did not mention sensors, but they are implied. The idea of a sensor will stand in for some entity that measures or calculates something about the environment.
71 . Hint: use the datetime module.