Aukland Compsci 111 Practical Computing Reference Manual Itebooks Download
Aukland Compsci 111 Practical Computing Reference Manual Itebooks Download
https://ebookbell.com/product/aukland-compsci-111-practical-
computing-reference-manual-itebooks-23836050
https://ebookbell.com/product/aukland-compsci-210-computer-
system-1-lecture-notes-itebooks-23836094
https://ebookbell.com/product/aukland-compsci-220-introduction-to-
algorithms-data-structures-formal-languages-4e-itebooks-23836102
https://ebookbell.com/product/from-tamakimakaurau-to-auckland-a-
history-of-auckland-russell-stone-5733964
https://ebookbell.com/product/the-auckland-university-press-anthology-
of-new-zealand-literature-1st-jane-stafford-5735162
A Press Achieved The Emergence Of Auckland University Press 19271972
Dennis Mceldowney
https://ebookbell.com/product/a-press-achieved-the-emergence-of-
auckland-university-press-19271972-dennis-mceldowney-5853060
Auckland The Bay Of Islands Road Trips 1st Edition Brett Atkinson
https://ebookbell.com/product/auckland-the-bay-of-islands-road-
trips-1st-edition-brett-atkinson-7004384
https://ebookbell.com/product/from-tamakimakauraurau-to-auckland-
russell-stone-44875752
https://ebookbell.com/product/volcanoes-of-auckland-a-field-guide-
bruce-w-hayward-46191444
https://ebookbell.com/product/carried-away-auckland-museum-46387344
ii
COMPSCI 111/111G
An Introduction to Practical Computing
Reference Manual
June 10, 2016
Andrew Luxton-Reilly
Copyright c 2008
Copyright Notice
This coursebook may be used only for the University’s educational purposes. It in-
cludes extracts of copyright works copied under copyright licences. You may not copy
or distribute any part of this coursebook to any other person. Where this coursebook is
provided to you in electronic format you may only print from it for your own use. You may
not make a further copy for any other purpose. Failure to comply with the terms of this
warning may expose you to legal action for copyright infringement and/or disciplinary
action by the University.
Acknowledgements
Feedback
We welcome any and all feedback on the coursebook. Please send all corrections,
comments and other feedback on this coursebook to [email protected]
iv
Contents
Learning Outcomes xv
1 Digital information 1
1.1 Analogue vs. Digital Systems . . . . . . . . . . . . . . . . . . . . . . 1
1.1.1 Analogue Systems . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1.2 Digits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1.3 Digital Systems . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Encoding Information Digitally . . . . . . . . . . . . . . . . . . . . . 3
1.2.1 Encoding Images . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2.2 Encoding Sounds . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Binary Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3.1 Storing Decimal Numbers in a Machine . . . . . . . . . . . . 4
1.3.2 Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.3.3 Converting Binary to Decimal Numbers . . . . . . . . . . . . 5
1.3.4 Bytes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.4 Recommended Reading . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.5 Self-Test Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2 Computer Systems 9
2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2 Processing hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.2.1 Inside a CPU — Advanced, not examinable . . . . . . . . . . 11
2.3 Storage components . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.3.1 Primary memory . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.3.2 Mass storage (Secondary storage) . . . . . . . . . . . . . . . . 15
2.4 Input components . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.5 Output components . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3 Online Publishing 17
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.2 The World-Wide Web as a media source . . . . . . . . . . . . . . . . 17
3.3 Blog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.4 Wiki . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.5 Recommended Reading . . . . . . . . . . . . . . . . . . . . . . . . . 18
4 Wiki 19
4.1 Introduction - What is a wiki? . . . . . . . . . . . . . . . . . . . . . . 19
4.2 The stage one wiki . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.2.1 Teaching and learning . . . . . . . . . . . . . . . . . . . . . . 20
v
CONTENTS CONTENTS
4.2.2 Expectations . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.3 Using MediaWiki . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.3.1 Logging in . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.3.2 Tabs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.3.3 Article tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.3.4 Discussion tab . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.3.5 Edit tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.3.6 Editing conflicts . . . . . . . . . . . . . . . . . . . . . . . . . 28
4.3.7 History tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.3.8 Move tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.3.9 Watch tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.4 Markup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.4.1 Headings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.4.2 New lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
4.4.3 Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
4.4.4 Indentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
4.4.5 Pre-formatted text . . . . . . . . . . . . . . . . . . . . . . . . 37
4.4.6 Horizontal lines . . . . . . . . . . . . . . . . . . . . . . . . . 38
4.4.7 Adding the author’s name . . . . . . . . . . . . . . . . . . . . 39
4.4.8 Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
4.4.9 Character formatting . . . . . . . . . . . . . . . . . . . . . . 41
4.5 Creating a new page . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
4.5.1 Following a link . . . . . . . . . . . . . . . . . . . . . . . . . 43
4.5.2 Creating a new link . . . . . . . . . . . . . . . . . . . . . . . 43
4.6 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
5 HTML 45
5.0.1 Versions of HTML and XHTML . . . . . . . . . . . . . . . . 45
5.0.2 Document Type Definition . . . . . . . . . . . . . . . . . . . 46
5.0.3 Encoding standards . . . . . . . . . . . . . . . . . . . . . . . 46
5.1 Hypertext Markup Language (HTML) . . . . . . . . . . . . . . . . . 46
5.2 Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
5.2.1 Nested tags . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
5.2.2 Attributes of tags . . . . . . . . . . . . . . . . . . . . . . . . 48
5.3 Essential HTML tags . . . . . . . . . . . . . . . . . . . . . . . . . . 49
5.3.1 <html> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
5.3.2 <head> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
5.3.3 <title> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
5.3.4 <body> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
5.3.5 A simple example . . . . . . . . . . . . . . . . . . . . . . . . 51
5.4 Block-level tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
5.4.1 <h1> to <h6> . . . . . . . . . . . . . . . . . . . . . . . . . . 53
5.4.2 <p> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
5.4.3 <hr> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
5.4.4 <pre> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
5.4.5 Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
5.4.6 Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
5.5 Inline tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
5.5.1 <br> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
5.5.2 <img> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
vi
CONTENTS CONTENTS
5.5.3 <a> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
5.6 Uniform Resource Locator . . . . . . . . . . . . . . . . . . . . . . . . 67
5.6.1 Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
5.6.2 Host Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
5.6.3 Path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
5.6.4 Resource Name . . . . . . . . . . . . . . . . . . . . . . . . . 67
5.6.5 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
5.7 Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
5.8 HTML5 Semantic Elements . . . . . . . . . . . . . . . . . . . . . . . 69
5.9 Videos in HTML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
5.10 Validating your pages . . . . . . . . . . . . . . . . . . . . . . . . . . 72
5.11 Quick Reference List . . . . . . . . . . . . . . . . . . . . . . . . . . 74
5.12 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
6 CSS 77
6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
6.2 Style definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
6.2.1 Changing multiple properties for a selector . . . . . . . . . . . 78
6.2.2 Defining a style that has multiple selectors . . . . . . . . . . . 78
6.2.3 The class selector . . . . . . . . . . . . . . . . . . . . . . . . 79
6.2.4 The id selector . . . . . . . . . . . . . . . . . . . . . . . . . . 80
6.2.5 Other selectors . . . . . . . . . . . . . . . . . . . . . . . . . . 80
6.3 Location of styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
6.3.1 An external style sheet . . . . . . . . . . . . . . . . . . . . . 82
6.3.2 An internal style sheet . . . . . . . . . . . . . . . . . . . . . . 82
6.3.3 An inline style . . . . . . . . . . . . . . . . . . . . . . . . . . 83
6.3.4 Applying styles in order . . . . . . . . . . . . . . . . . . . . . 83
6.4 <div> and <span> . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
6.5 Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
6.5.1 Font . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
6.5.2 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
6.5.3 Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
6.5.4 Borders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
6.5.5 Table Borders . . . . . . . . . . . . . . . . . . . . . . . . . . 88
6.5.6 Lengths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
6.5.7 Colours . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
6.6 Advanced CSS (not examinable) . . . . . . . . . . . . . . . . . . . . 90
6.6.1 Box model . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
6.6.2 Padding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
6.6.3 Margins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
6.6.4 Positioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
6.6.5 Dimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
6.7 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
7 PowerPoint 95
7.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
7.2 Getting started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
7.2.1 Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
7.2.2 Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
7.3 Adding content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
vii
CONTENTS CONTENTS
8 Spreadsheets 121
8.1 Visicalc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
8.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
8.2.1 Menus and Toolbars . . . . . . . . . . . . . . . . . . . . . . . 123
8.3 Adding data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
8.3.1 Entering data . . . . . . . . . . . . . . . . . . . . . . . . . . 124
8.3.2 Selecting a range of cells . . . . . . . . . . . . . . . . . . . . 125
8.3.3 Selecting an entire row or column . . . . . . . . . . . . . . . . 125
8.3.4 Copying and pasting . . . . . . . . . . . . . . . . . . . . . . . 126
8.3.5 Filling data . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
8.3.6 Insert/delete rows and columns . . . . . . . . . . . . . . . . . 128
viii
CONTENTS CONTENTS
9 Databases 159
9.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
9.1.1 Databases and Database Management Systems . . . . . . . . . 159
9.2 Elements of a database . . . . . . . . . . . . . . . . . . . . . . . . . . 160
9.2.1 Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
9.2.2 Record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
9.2.3 Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
9.2.4 Relationships between tables . . . . . . . . . . . . . . . . . . 161
9.2.5 What can we do with a database? . . . . . . . . . . . . . . . . 161
9.2.6 What are some advantages of databases? . . . . . . . . . . . . 162
9.3 Creating your own database . . . . . . . . . . . . . . . . . . . . . . . 162
9.3.1 Working with database objects . . . . . . . . . . . . . . . . . 163
9.4 Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
9.4.1 Design view . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
9.4.2 Defining fields . . . . . . . . . . . . . . . . . . . . . . . . . . 164
ix
CONTENTS CONTENTS
10 Python 181
10.1 Computer programming . . . . . . . . . . . . . . . . . . . . . . . . . 181
10.2 Using IDLE to program in Python . . . . . . . . . . . . . . . . . . . . 181
10.2.1 Using an interactive interpreter . . . . . . . . . . . . . . . . . 182
10.2.2 Writing a Python program . . . . . . . . . . . . . . . . . . . . 182
10.3 Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
10.4 Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
10.5 A first program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
10.6 Printing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
10.7 Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
10.8 Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
10.8.1 Printing numbers . . . . . . . . . . . . . . . . . . . . . . . . 186
10.9 Mathematical operations . . . . . . . . . . . . . . . . . . . . . . . . . 186
10.9.1 Order of precedence . . . . . . . . . . . . . . . . . . . . . . . 187
10.10 String operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
10.11 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
10.11.1 Assigning a value to a variable . . . . . . . . . . . . . . . . . 190
10.11.2 Using the value stored in a variable . . . . . . . . . . . . . . . 190
10.11.3 Assignment happens last . . . . . . . . . . . . . . . . . . . . 190
10.12 Reading input from the user . . . . . . . . . . . . . . . . . . . . . . . 191
10.13 Making Decisions: if, elif, and else statements . . . . . . . . . . . . . 192
10.13.1 If. . .Else Statement . . . . . . . . . . . . . . . . . . . . . . . 193
10.13.2 If. . .Elif. . .Else Statement . . . . . . . . . . . . . . . . . . . . 194
10.13.3 Comparison operators . . . . . . . . . . . . . . . . . . . . . . 195
10.13.4 Logical operators . . . . . . . . . . . . . . . . . . . . . . . . 195
x
CONTENTS CONTENTS
11 LATEX 205
11.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
11.1.1 Why would we use LATEX? . . . . . . . . . . . . . . . . . . . 206
11.2 Overview of the language elements . . . . . . . . . . . . . . . . . . . 206
11.2.1 Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
11.2.2 Whitespace . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
11.2.3 Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
11.2.4 Environments . . . . . . . . . . . . . . . . . . . . . . . . . . 208
11.2.5 Special characters . . . . . . . . . . . . . . . . . . . . . . . . 209
11.2.6 Paragraphs and line breaks . . . . . . . . . . . . . . . . . . . 209
11.3 Document class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
11.3.1 Classes of document . . . . . . . . . . . . . . . . . . . . . . . 211
11.3.2 Preamble . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
11.3.3 A simple LATEX document . . . . . . . . . . . . . . . . . . . . 212
11.4 Titles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
11.5 Structuring a document . . . . . . . . . . . . . . . . . . . . . . . . . 213
11.5.1 Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
11.5.2 Chapters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
11.5.3 Sections and subsections . . . . . . . . . . . . . . . . . . . . 214
11.6 Table of contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
11.7 Footnotes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
11.8 Symbols used in text . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
11.8.1 Quote marks . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
11.8.2 Special symbols . . . . . . . . . . . . . . . . . . . . . . . . . 218
11.8.3 Dashes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
11.8.4 Ellipsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
11.8.5 Spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
11.9 Text styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
11.9.1 Emphasis . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
11.9.2 Font styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
11.9.3 Font size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
11.10 Alignment environments . . . . . . . . . . . . . . . . . . . . . . . . . 223
11.10.1 Left aligned text . . . . . . . . . . . . . . . . . . . . . . . . . 223
11.10.2 Right aligned text . . . . . . . . . . . . . . . . . . . . . . . . 224
11.10.3 Centred text . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
11.11 List environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
11.11.1 Unordered lists . . . . . . . . . . . . . . . . . . . . . . . . . 225
11.11.2 Ordered lists . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
11.11.3 Description lists . . . . . . . . . . . . . . . . . . . . . . . . . 226
11.12 Quote and quotation environments . . . . . . . . . . . . . . . . . . . 227
11.12.1 Quote . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
xi
CONTENTS CONTENTS
12 History 239
12.1 Early history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
12.1.1 Abacus (1000–500BC) . . . . . . . . . . . . . . . . . . . . . 239
12.1.2 Arabic numerals . . . . . . . . . . . . . . . . . . . . . . . . . 240
12.1.3 Wilhelm Schickard (1592–1635) . . . . . . . . . . . . . . . . 240
12.1.4 Blaise Pascal (1623–1662) . . . . . . . . . . . . . . . . . . . 240
12.1.5 Gottfried Wilhelm von Leibniz (1646 - 1716) . . . . . . . . . 241
12.1.6 Joseph Jacquard (1752 - 1834) . . . . . . . . . . . . . . . . . 241
12.1.7 Charles Babbage (1791 - 1871) . . . . . . . . . . . . . . . . . 242
12.1.8 Ada Augusta Lovelace (1816 - 1852) . . . . . . . . . . . . . . 243
12.2 The electronic computer . . . . . . . . . . . . . . . . . . . . . . . . . 244
12.2.1 Dr. Herman Hollerith (1860 - 1929) . . . . . . . . . . . . . . 244
12.2.2 Atanasoff-Berry Computer (ABC) . . . . . . . . . . . . . . . 244
12.2.3 Z3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
12.2.4 Colossus Mark I . . . . . . . . . . . . . . . . . . . . . . . . . 245
12.2.5 Harvard Mark I . . . . . . . . . . . . . . . . . . . . . . . . . 245
12.2.6 ENIAC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
12.2.7 John von Neumann (1903 - 1957) . . . . . . . . . . . . . . . . 247
12.3 Commercialisation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
12.4 The personal computer industry . . . . . . . . . . . . . . . . . . . . . 248
12.4.1 Mainframes . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
12.4.2 Xerox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
12.4.3 Intel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
12.5 The first personal computer—Altair 8800 . . . . . . . . . . . . . . . . 249
12.5.1 Microsoft . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
12.5.2 Homebrew Computer Club . . . . . . . . . . . . . . . . . . . 250
12.6 Apple . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
12.6.1 VisiCalc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
12.7 IBM PC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
12.7.1 CPM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
12.7.2 Microsoft DOS . . . . . . . . . . . . . . . . . . . . . . . . . 253
12.7.3 Clones . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
12.7.4 Compaq 386 . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
12.8 Apple Macintosh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
xii
CONTENTS CONTENTS
xiii
CONTENTS CONTENTS
xiv
Learning Outcomes
Students will be familiar with the binary representation of numbers and the prefixes
commonly used with binary numbers.
• use the decimal SI units (kilo, mega, giga, and tera) appropriately.
• compare and contrast the binary SI units (kibi, mebi, gibi, tebi) with the corre-
sponding decimal SI units.
• state the biggest decimal number that can be represented using a given number
of binary digits.
• state the number of binary digits required to represent a given decimal number.
Standards
Students will have an appreciation of how numbers can be used to represent different
kinds of information (such as text and images). Students will understand the importance
of standard methods of encoding.
• compare and contrast open standards with proprietary standards, giving exam-
ples of each.
xv
LEARNING OUTCOMES
Hardware
Students will understand the purpose of the major components of a computer system,
and will be able to identify those components visually.
Software
Students will be aware of some major software companies. Students will have an un-
derstanding of different software licences, and the purpose of common system and
application software.
Operating systems
Students will be aware of the major operating systems available today, will be able to
explain the purpose of an operating system and will be able to use a standard operating
system comfortably.
• identify common file extensions and the applications they correspond to.
• give examples of different operating systems.
• discuss the purpose of an operating system.
xvi
LEARNING OUTCOMES
User interfaces
Students will understand the purpose of a user interface and will be aware of the differ-
ences between command line interfaces and graphical user interfaces.
Internet
Students will have a basic understanding of the development of the Internet, and will be
familiar with simple networking terminology.
WWW
Students will be familiar with the development of the WWW, its relationship to the Inter-
net and how to effectively use the WWW.
• describe some of the copyright issues that relate to the use of search engines.
xvii
LEARNING OUTCOMES
• explain the purpose of the common header fields — To, From, Reply-to, CC, BCC,
Subject.
Students will have an appreciation of the tools that are commonly used by online com-
munities.
xviii
LEARNING OUTCOMES
Word processing
Students will be familiar with the idea of encoding text, and the importance of standards.
Students will gain experience using a word processor to format documents.
• describe the meaning of the acronym “ASCII” and explain why ASCII is important.
• use ASCII to encode or decode text.
• explain the difference between a text editor and a word processor.
• distinguish between examples of surface formatting and examples of structural
formatting.
Digital images
xix
LEARNING OUTCOMES
HTML5
Students will understand how web pages are created using a recent standard (HTML5),
and will be able to create their own web pages using this standard.
• use HTML tags to create a web page that adheres to the HTML5 standard.
CSS
Students will understand the advantages of using Cascading Style Sheets, and will be
able to create a web page that uses both HTML5 and CSS.
• compare and contrast the different locations that styles can be defined.
• write a style sheet that will produce a specified appearance (given a table of
attributes).
• use style sheets to create a standard appearance for a web site that includes at
least three web pages.
xx
LEARNING OUTCOMES
PowerPoint
Students will understand the functions and limitations of PowerPoint software, and will
be able to use PowerPoint to create a presentation.
Spreadsheet
Students will understand how to create spreadsheets using cell references and simple
functions.
Database
Students will understand what a relational database is, how to create and how to use a
relational database.
xxi
LEARNING OUTCOMES
Programming/Python
Students will understand simple programming concepts and be able to write very simple
programs.
• use an if statement.
• use a while loop to perform repetitive tasks.
• read a simple program and determine the output that would be produced.
• write simple programs that contain a while loop and/or if statements.
LATEX
Students will be able to use LATEX to typeset a document, including the typesetting of
mathematical formulae.
xxii
LEARNING OUTCOMES
History
Students will have a basic understanding of the history of the personal computer, the
major companies and the people involved in that history.
Social issues
Students will have an appreciation of some of the complex social issues that result from
the Internet.
Acronyms
• CPU
• HDD, FDD
• RAM, ROM
• AGP
• ASCII
• GUI, CLI
• WYSIWYG
• OS
xxiii
LEARNING OUTCOMES
xxiv
CHAPTER 1
Digital information
Figure 1.1: Both the tape measure and the dial are analogue devices
1.1.2 Digits
Digits are the building blocks of numbers. They are symbols such as “0”, “1”, “2” etc.
which can be combined to express a quantity. If we combine the digits “1”, “0” and “3”
1
1.1 Analogue vs. Digital Systems DIGITAL INFORMATION
Figure 1.2: An analogue signal is continuous, i.e. it changes in infinitely small steps.
we get the number “one hundred and three”. The more digits we combine, the higher
are the numbers that we can represent with them.
In a digital system, information can only change within a fixed number of predefined,
discrete steps. That is, only a certain number of values are actually possible. There
are no in-between values as in the analogue systems, which have a continuous value
range as described before. As a result, we can represent digital information precisely
by using digits, hence the term “digital”. Examples for digital systems are computers,
CD players, electronic scales and calculators.
Figure 1.3: A digital system that has only 3 digits cannot represent numbers more
precisely than .001.
How many values a digital system can process depends on the maximum number of
digits it can use. For example, most modern calculators have space to display around
10 different digits on the screen. The biggest number that could be displayed using
these 10 digits is 9 999 999 999. The smallest number that could be represented using
10 digits is .000 000 000 1.
2
DIGITAL INFORMATION 1.2 Encoding Information Digitally
Any information can be encoded using numbers. We just have to decide what encoding
system to use. If we have analogue information and want to store it digitally, then we
need to do something called sampling: sampling means that we divide the analogue
information with its infinitely small changes into discrete blocks (samples) that can each
be described by one value of a predefined set of values. In the following, let us consider
how this works for images and sounds.
In the real world, images consist of colours and shapes which change in infinitely small
steps. That is, they are a type of analogue information and therefore change continu-
ously. Devices that store images digitally, such as digital cameras, cannot cope with all
these infinitely many colors and shapes. So they reduce an image to a finite number
of building blocks called pixels (short for picture element). A pixel is a rectangular area
that has a single colour. Each colour is encoded as a number using a certain number of
digits. The reduction from the real image to the set of pixels is an example for sampling.
As we can see in the figure below, the pixels are arranged in a matrix so that they look
like the original image (although they do not contain all the infinitely small steps of the
original anymore).
When magnifying the digital image on the left, we can see its pixels (middle), which are
represented as a matrix of numbers (right).
In the real world, sounds such as noises or music consist of vibrations in the air that
make our eardrums vibrate as well. Since those vibrations are analogue information,
they change continuously and in infinitely small steps. The vibrations can be described
as a waveform over time, that is, as a description of how much our eardrum is stretched
at each point in time. Such a waveform is shown on the left side of the figure below:
time flows from left to right, and the zigzag deviations up and down signify the vibrations
in the air. In order to make it possible to store sound on a digital device, such as an
MP3 player, we need to break the waveform down into discrete steps that can each be
described digitally with a number – another example of sampling. On the left side of
the figure we see the magnified waveform and how the waveform is broken down into
discrete steps by sampling. Each of the small boxes has the same width, i.e. we break
3
1.3 Binary Numbers DIGITAL INFORMATION
down the time into equal units (usually around 1/44000 of a second), and the height
of each approximates the degree to which our eardrum is stretched at that time. The
boxes are simply called samples and are represented as a sequence of numbers, each
number describing the height of one box.
When a sound is played by a digital device, the device goes through the samples in
order and generates an electrical voltage with a strength proportional to the respective
number. The electrical voltage is sent to a loudspeaker, and the membrane of the
loudspeaker starts vibrating just as expressed by the samples. The membrane makes
the air vibrate, which in turn makes our eardrums vibrate. Modern digital music players
use clever tricks to store music with as little numbers as possible. The main idea behind
music compression formats such as MP3 is that the human ear cannot hear all the
samples anyway, so they do not store them all.
The way we usually represent our numbers is called the decimal representation. “Deci-
mal” comes from the Latin word for “ten” and means that we use ten digits: “0”, “1”, “2”,
“3”, “4”, “5”, “6”, “7”, “8” and “9”. The reason why we use ten digits is that we have ten
fingers, which can be very convenient for counting. In fact, the word “digit” is also Latin
and means “finger”. Computers store numbers using a different number representation,
the binary representation. In the following we will learn how the binary representation
of numbers works.
Before learning how to use binary numbers, let us first consider how we would store
decimal numbers in a machine such as a computer. For each of the decimal digits, we
would need some sort of a dial that can be set to ten different states. Of course, in a
computer we would not have mechanical dials but some sort of electronic storage units.
If we want to represent, say, decimal number with three digits (from 0 to 999) then
4
DIGITAL INFORMATION 1.3 Binary Numbers
we need three such dials. The leftmost dial would store how many 100’s there are in
our number, the middle dial would store how many 10’s there are, and the rightmost
dial would store how many 1’s there are. If we have a single dial, we could represent
101 = 10 different values, with two dial we could represent 102 = 100, with three dials
103 = 1000 etc. In the general case, if we have n dials, we can represent 10n different
values.
1.3.2 Bits
Digital systems do not use decimal numbers because they are usually electronic sys-
tems, and in order to represent the ten different values of a decimal digit they would
need to deal with ten different electric voltages. Technically this would be very difficult.
As a consequence, digital systems use binary digits which have only two possible val-
ues: 0 and 1. The word “binary” comes from the Latin word for “two”. This is technically
much easier because the systems need to deal with only two different voltages: a very
low voltage for 0, and a much higher voltage for 1. This is similar to a light switch: either
the light is switched off (0) and no electric current is flowing, or it is on (1) and the elec-
tric current can flow and power the light. A binary digit is called a bit (short for binary
digit).
If we want to store bits, we could do so with switches. A switch has two different states,
on and off, which correspond to the binary values 0 and 1. Of course, in an electronic
system the switches would not be mechanical but some sort of electronic switching
units. For each bit that we want to store, we install a switch. With a single switch, we
could represent 21 = 2 different values. With two switches we could represent twice
as many values, that is 22 = 4: for each of the two states of the first switch the second
switch could assume two different states. If we add a third switch, the number of possible
values again doubles to 23 = 8 etc. Note that this is just like the aforementioned dials
we used to explain storage of decimal numbers, only that the binary system is based on
the number 2, so that with n bits (or switches) we can represent 2n different values.
When we read numbers, we go through the digits and because we know the quantity
each digit represents we can understand what quantity is represented by the number as
a whole. In this regard, binary numbers are just the same as decimal numbers. Let us
first have a look at how we actually understand the quantity represented by a decimal
number:
135 = 1 × 100 + 3 × 10 + 5×1
= 1 × 102 + 3 × 101 + 5 × 100
The number “one hundred and thirty-five” is made up of one 100, three 10s and five
1s. Going through the decimal digits from right to left, the rightmost digit always refers
to the 1s, i.e. the quantity 100 = 1. The next digit refers to the 10s, i.e. 101 = 10.
In general, the ith digit from the right refers to the quantity 10i−1 . The value of the
whole number can always be calculated arithmetically by multiplying each digit with the
quantity it refers to, and then adding up all these products.
Let us now consider how we can calculate the decimal value of a binary number. The
key is to know which quantity (as a decimal number) each of the bits in the binary
5
1.4 Recommended Reading DIGITAL INFORMATION
number represents. Let us consider the binary number 10101b (note that in the following
equation we add the suffix b to all binary numbers to distinguish them clearly from the
decimal numbers):
Going through the bits from right to left, the rightmost bit always refers to the 1s, i.e. the
quantity 20 = 1. The next bit refers to the 2s, i.e. 21 = 2. The bit after that refers to the
4s, i.e. 22 = 4, etc. In general, the ith bit from the right refers to the quantity 2i−1 . Just
as for the decimal numbers, the decimal value of the whole binary number can always
be calculated arithmetically by multiplying each digit with the decimal quantity it refers
to, and then adding up all these products.
1.3.4 Bytes
A single bit can only represent two different values, which is not much. In order to
store information such as text or images it makes sense to combine the bits into groups,
so that more values can be represented. A group of eight bits is called a byte. From
the previous sections we know that a byte can be used to represent 28 = 256 different
values.
When describing the size of data, we usually use bytes as a unit. For example, if we
have a text document on our computer that contains 50 characters in ASCII encod-
ing, then the size of this document would be 50 B (“B” is the common abbreviation for
“bytes”). Many types of data are thousands, millions or even billions of bytes big. As a
result, we use prefixes in front of the B that express that we mean thousands, millions
or billions etc. of bytes. The prefixes are the same as the ones used for meters, e.g.
thousand meters are one kilometer (1000m = 1km) and thousand bytes are one kilobyte
(1000B = 1kB). The following table lists the most important prefixes, and also points
out what types of data usually require numbers of bytes in the order of a prefix.
Prefix pronounced as is equal to used for
kB kilobyte 1,000 B text documents
small and medium sized images
MB megabyte 1,000,000 B large images
music files (e.g. MP3 files)
GB gigabyte 1,000,000,000 B movies (e.g. on a DVD)
• Digital systems
6
DIGITAL INFORMATION 1.5 Self-Test Questions
– http://en.wikipedia.org/wiki/Digital
• Binary
– http://en.wikipedia.org/wiki/Binary_numeral_system
• Bits
– http://en.wikipedia.org/wiki/Bit
• Bytes
– http://en.wikipedia.org/wiki/Byte
• Standard decimal prefixes
– http://en.wikipedia.org/wiki/SI_prefix
• Binary Prefixes
– http://en.wikipedia.org/wiki/Binary_prefix
7
1.5 Self-Test Questions DIGITAL INFORMATION
8
CHAPTER 2
Computer Systems
2.1 Introduction
The main part of a computer is called the central processing unit (CPU), which is the part
that executes the instructions given to the computer. However, a number of additional
components are required so that we can use computer systems effectively. These com-
ponents perform jobs such as translating information between humans and computers
(input and output), storing information, and transferring information between different
computers.
9
2.2 Processing hardware COMPUTER SYSTEMS
The most important part of any computer system is the Central Processing Unit (CPU). It
reads and follows the instructions that make up a program. It also does any calculations
required, and controls the rest of the computer system.
Analogy: It might help to think of a CPU as the “brain” of the computer. Like
a brain, the CPU receives input from input devices, processes and makes deci-
sions based on that data, and sends commands to output devices. In the case
of a computer, common input devices are the keyboard and the mouse, and
common output devices are a screen, speakers or a printer. The “input devices”
of our brain are our sensory organs, i.e. our eyes, ears etc. The brain’s “out-
put devices” include our voice and the skeletal muscles that allow us to move
freely. However, keep in mind that computers are not intelligent, in contrast to
us human beings. CPUs are very good at performing exact operations such as
adding or comparing numbers, but if we do not tell them exactly what to do they
are completely useless. They cannot “think” by themselves.
The performance of a CPU is commonly measured in operations per second. How many
operations a CPU can perform in a second depends on several factors. One factor is the
CPU’s clock speed, i.e. the frequency with which electrical impulses are sent through
10
COMPUTER SYSTEMS 2.2 Processing hardware
the CPU. The more electrical impulses per second we send through a CPU, the more
operations it will be able to perform.
It is worth noting that while the CPU can follow instructions extremely rapidly, it is limited
by the speed of the other components. If a job requires a lot of calculations, then the
speed of the CPU will be the most significant factor. However, if the job relies heavily on
other parts of the computer, the speed of the CPU may not be important because the
other parts may act like bottlenecks that slow down the whole process.
Analogy: For example, you might take an hour to make a decision about the
colour to paint a room in your house. It will take substantially longer to actually
paint the room, perhaps as long as a week. In this case, making the decision
twice as fast will not make any real difference to the time it takes for the room to
be painted.
However, if you were buying a car then it might take an entire week to decide
exactly what model of car you wanted. Paying for the car would only take a
few minutes. In this case, making the decision twice as fast makes a significant
different to the time it takes to buy a car.
Although there are many different designs of CPU, they all have some common features.
These are discussed below:
The main control unit is the part of a CPU that controls everything. The main control
unit follows a repetitive cycle where it
11
2.2 Processing hardware COMPUTER SYSTEMS
Analogy: It may help to think of the main control unit as the manager of the
CPU. It is responsible for figuring out what to do next and ensuring that it actually
gets done. If we think of the CPU as being a large building, then the main control
unit would be the manager in charge of that building.
The arithmetic and logic unit is designed specifically to do calculations. The circuits in
this unit can perform simple arithmetic on numbers. It holds the logic circuits that allow
the computer to compare numbers to see if they are equal to, greater than, or less than
one another. It can also apply logical operators such as AND, OR and NOT.
Registers
The CPU needs a place that it can hold the numbers that it is currently working on.
The registers provide this temporary storage location. Each register can hold a single
number. Each CPU has a very small number of registers (typically less than 100).
For example, if an instruction tell the computer to add together the numbers 7 and 8,
then the CPU needs to remember the number 7, the number 8 and also the result of
adding the numbers together, the number 15.
12
COMPUTER SYSTEMS 2.2 Processing hardware
Cache
Accessing the information in a register is extremely rapid, but there are very few regis-
ters available. Getting any information from outside the CPU takes a long time, since
the information has to travel a long way to get from the primary memory to the CPU.
Most modern CPUs have a small amount of additional memory that is included inside
the CPU itself and therefore is able to be accessed fairly rapidly (although not as fast as
the registers). This is called the cache.
Analogy: Returning to our mathematician, the cache would be like having a set
of storage lockers located in the same building as the mathematician. We might
have thousands of storage lockers in the basement. It is reasonably fast to get
information out of those lockers, but if were working on the numbers regularly,
we would prefer that they were stored in the registers. However, we only have a
small number of registers, so numbers that we don’t need as often would have
to be put into the lockers in the basement.
Bus
13
2.3 Storage components COMPUTER SYSTEMS
Computers store a lot of information. This information can be stored in different ways,
using different pieces of hardware. The devices that store information for long-term use
are generally very cheap, but slow. We call these devices mass storage or secondary
storage devices. Information that needs to be accessed very rapidly has to be stored in
more expensive components known as primary memory.
The form of primary memory that we are most concerned with is the Random Access
Memory (RAM). This is the memory that stores any programs that we are currently
executing, and the data that we are working on.
Because the CPU can follow instructions very rapidly, it has to be able to retrieve the
next instruction from memory as fast as possible. When we want to run a program (i.e. a
series of instructions), we copy those instructions from a mass storage device (such as
a hard drive) into the RAM. When the CPU asks for the next instruction, it is loaded from
the RAM into the CPU where it can be decoded and executed. Any data that is required
by the CPU is also shifted from the mass storage device into the RAM. That way, when
the CPU needs to read some data, or make changes to the data, it will happen very
rapidly.
RAM consists of electronic circuits that store an electrical charge. These circuits are
normally printed onto silicon chips. Memory of this type is extremely fast to access,
since it only requires an electrical charge to be sent from one location to another. Man-
ufacturing memory of this type is fairly expensive (usually about 100 times as expensive
as mass storage devices). Although the RAM is extremely fast to access and modify,
when the power is turned off, the information is lost. This kind of memory is known as
volatile memory.
14
COMPUTER SYSTEMS 2.4 Input components
Analogy: Think of the CPU as a building filled with people doing paperwork.
The instructions that specify the jobs that need to be done are located at a
nearby warehouse. An instruction is fetched from the warehouse and brought
back to the CPU building where it is executed. Once the instruction has been
completed, the next instruction is fetched from the warehouse. These instruc-
tions are very simple, so they might say something like “Add the number located
in locker number 77445 to the number stored in locker number 982 and put the
answer into locker 14528”.
In this analogy, the warehouse plays the role of the RAM.
The physical RAM is divided up into a set of discrete boxes, each of which can hold a
single byte (a number between 0 and 255). The number of boxes in a normal RAM chip
is huge. A RAM chip that holds 1 GB of memory will have space to store 1,000,000,000
different numbers.
Devices used for mass storage are capable of storing information over a long period
of time while the computer is switched off. Accessing this information is much slower
than accessing RAM (thousands of times slower). It is much cheaper to store infor-
mation using a mass storage device than it is to store it on RAM (hundreds of times
cheaper). When we compare mass storage devices with primary memory, we see that
mass storage devices are:
• cheaper
• slower
• and store information when the power is turned off (non-volatile).
The most commonly used forms of mass storage are: hard disk, solid-state drive (SSD),
optical disk (CD-ROM / DVD). Magnetic tape is still used for backup as it is very cost
effective. However, access is very slow compared to the other storage devices.
Input devices are those components that are used by humans to provide information to
the computer. These devices are used to put data into the computer, hence the term
“input”. This type of equipment often acts as a translator, converting signals which are
used and understood by humans into an electronic form which can be processed by a
computer. The most common device of this type is a keyboard, which allows a user to
15
2.5 Output components COMPUTER SYSTEMS
perform almost any task. Other input devices are typically used for more specialised
tasks.
A graphical user interface often requires a device to control a pointer, and the most
common device for this task is the mouse. However, other devices such as the light-pen,
tablet, and track-ball provide more flexibility for specialised applications. Today, touch
screens are becoming more common in publicly accessible terminals where another
form of pointing device is likely to be damaged.
Direct input is required where the data is too complex (or it is inconvenient) to be entered
using a keyboard or pointing device. An image scanner or fax machine is used to input
entire images into the computer, and bar-code readers and magnetic stripe readers
provide a quick (and private) method to enter specific information. Optical recognition
systems are used by banks to read cheque numbers (using magnetic-ink character
recognition), and by other organisations to read pen or pencil marks in allocated spaces
(e.g. lotto sheets, or multi-choice examinations). More recently, the development of
software has encouraged voice input (using a microphone) as a method of dictation or
control of computer systems.
Output devices are the complement to input devices. Equipment used for output acts as
a translator, converting the digital signals a computer uses into a form which is readily
understood by humans. The monitor or screen is the most common example of an
output device. Any device that produces something understandable (to humans) from
the computer is classified as an output device. Common examples include screens
(monitor), speakers, printers and plotters.
16
CHAPTER 3
Online Publishing
3.1 Introduction
The Internet is a communication medium that we can use to publish information and
distribute our ideas. There are commonly available tools that provide a way for us to
easily publish information alone, or work collaboratively with others.
The World-Wide Web has provided the opportunity for anyone to publish anything. How-
ever, although it is possible for anyone to publish, a certain amount of technical expertise
is required to create and maintain a web site. The difficulty in authoring and hosting a
web site is a barrier to most people.
It is also difficult to contribute to a community through the publication of web sites since
each web site exists independently. It is easy to author a site which links to other
content, but getting reciprocal links to form a network of related information can be
difficult or impossible.
The benefits are that you own and control the content on your own web site and can
express any opinion you have. The costs are that each web site is independent, rather
than part of an existing network of pages. It can be technically difficult, financially costly,
impossible to integrate into an existing community. Few people may ever find or read
the web site.
Most content on the web is produced by individuals, or by small teams of people who
know each other. A single person will typically write the content. This content will often
be reviewed and edited before it is published. Small teams of people are sometimes
17
3.3 Blog ONLINE PUBLISHING
given the responsibility of writing or maintaining content about a particular topic. These
individuals or teams that publish content are frequently normal members of the public
without any official affiliation with a traditional media organisation.
3.3 Blog
The word “blog” was shortened from the term “weblog”. A weblog is a web page which
consists of a series of posted messages. These messages normally appear in reverse
chronological order (i.e. with the newest message appearing at the top of the page).
Blogs are frequently used to maintain online journals. The content published in blogs is
often the opinion of an individual (similar to the editorial in a newspaper).
3.4 Wiki
A Wiki is a piece of server software that allows users to freely create and edit Web page
content using any Web browser. Wiki supports hyperlinks and has a simple text syntax
for creating new pages and crosslinks between internal pages on the fly.
The content stored by a wiki is produced collaboratively by the users of the system.
• There’s usually a strong commitment from the wiki community to keep the wiki
clean and nice. Everyone uses it, so they all try to maintain it in a usable state.
• A wiki is not like online chat. It doesn’t work in real time. People take time to think,
sometimes days or weeks, before they follow up some edit. So what people write
is generally well-considered.
• Blogs
– http://en.wikipedia.org/wiki/Blog
• Wikis
– http://en.wikipedia.org/wiki/Wiki
18
CHAPTER 4
Wiki
A wiki is a system that allows a user to easily create and edit web pages. However,
unlike traditional web pages, the content in a wiki is able to be edited by anyone. Anyone
using the system can freely edit the content of the pages, add hyperlinks and rearrange
the structure of the pages as they wish. Since a wiki is designed to be extremely easy
to use and freely accessible to everyone, it provides a real opportunity for anyone who
wants to contribute. This “open-editing” approach encourages the democratic use of the
web and promotes the development of content by non-technical users.
We have set up a wiki for stage one students in Computer Science. Everyone enrolled in
a stage one Computer Science course will have an account set up for them so that they
can log in and start contributing. Note that the Computer Science wiki uses the same
software as the Wikipedia, i.e. the MediaWiki system, but looks a bit different because
it was changed to fit better into the Computer Science website. The screenshots and
descriptions in this chapter refer to the standard MediaWiki user interface, so they will
differ a bit from the Computer Science wiki. However, the underlying software is the
same, therefore you will find the same functions in the Computer Science wiki, although
possibly at slightly different locations in the user interface. The figure below shows a
Wikipedia page (left) and a CS Wiki page (right). In both wikis, the main document area
works just the same. But while the Wikipedia arranges the links for the functions (e.g.
“discussion”, “preferences” and “search”) at the top and left border of each wiki page,
the CS wiki arranges those links at the right border. Some of the links are different, too:
19
4.2 The stage one wiki WIKI
for example, only the Wikipedia offers a link “Donate to Wikipedia” and the possibility to
change between different languages.
Students learn best when they are involved in activities. The process of actually doing
something engages more attention and promotes deeper understanding of the material.
Research has shown that one of the best ways to learn something is to try and teach it
to someone else. This applies to students of all ages, from primary school through to
post-graduate students.
4.2.2 Expectations
20
WIKI 4.3 Using MediaWiki
MediaWiki is the product used to create Wikipedia. It is one of many wiki systems
currently available. MediaWiki is distributed under the GNU General Public Licence,
so that means that it is free and open-source. It is reasonably easy to use and has a
professional looking interface. We will be using MediaWiki throughout the course. When
you arrive at the main page of a MediaWiki site, it will look something like the following:
At the very top of the page, we see a link that allows us to “Create an account or log in”.
4.3.1 Logging in
MediaWiki has the ability to protect pages and restrict access. Anyone can read the
wiki, but it can be set up to ensure that only some people can edit the pages. We have
set up MediaWiki so that only students enrolled in the course can make changes. Before
we can start contributing to the wiki, we must first log in. We use our normal NetLogin
username and password here.
21
4.3 Using MediaWiki WIKI
Once we are logged in, we can return to the main page and explore the system.
At the very top of the page, we now see a variety of links. They are (in order):
user
The first link shows the name of the user. Each user of a wiki is given their own personal
home page. Clicking on the name of the user will lead to the user’s home page (within
the wiki). Initially this will be empty, but each user should endeavour to include some
simple details about themselves on their home page.
22
WIKI 4.3 Using MediaWiki
my talk
The second link leads to a discussion page about the user. Any discussion or personal
messages directed towards an individual user should be posted in their discussion page.
preferences
The third link allows a user to customise the way the wiki displays information. Users
are welcome to change these preferences.
23
4.3 Using MediaWiki WIKI
my watchlist
The fourth link leads to a page containing the watchlist of a user. This is a list of all the
pages that a user has specified that they are interested in watching. The pages on the
watchlist are listed in the order that they were last modified. Any pages that have been
modified since the user last looked at them are highlighted. This makes it very easy to
keep track of specific articles or pages that the user finds interesting. See section 4.3.9
for details about how to add a page to the watchlist.
my contributions
The fifth link displays a list of all the contributions the user has made to the content of
the wiki.
24
WIKI 4.3 Using MediaWiki
log out
When we have finished with the wiki, then we should log out.
4.3.2 Tabs
Along the top of the page we can see a number of tabs. These are article ,
discussion , edit , history , move and watch/unwatch .
The article tab contains the main content on this topic. Most users are interested in
the articles that are contributed to a wiki. Anyone can read the articles contained in the
wiki, even if they are not logged in.
The discussion tab will display a page containing a discussion about the article. This is
an area where users can make comments, suggest improvements, argue and generally
discuss the topic in question. When a new article is created, there will be no actual
comments on the discussion section. Whenever we have any questions or comments
about a given article, then the discussion page is the ideal place to post them.
The edit tab allows a user to edit the article shown on this page. We have set up the
MediaWiki so that you must be logged in before you can edit a page. Not all wikis have
this restriction. In fact, most wikis allow anonymous users to edit pages without logging
in to anything.
Editing a page
To edit a page we simply need to click on the edit tab which appears at the top of the
page. This will allow us to immediately start making changes to the content.
25
4.3 Using MediaWiki WIKI
One of the advantages of using a wiki is that it is easy to edit pages. If we change a
page and then realise we made a mistake, then we can easily edit the same page and
correct the mistake.
When we are happy with the changes we have made, the Show preview button will
allow us to check how it looks.
It is always a good idea to preview the changes and just verify that the page
is correct
before we commit to saving the page. We must remember to click the Save page
button when we are finished.
26
Other documents randomly have
different content
"Minä en käy kauppaa sellaisella tavaralla, minä", ärjäisee Gösta,
"mutta jos mitä haluat, niin ota Forsin vanha Sintram, hän on ihan
valmis, siitä olen varma."
JOULUPÄIVÄLLISET
Missä ovat sitten kavaljeerit, missä ovat nyt ne, jotka pajan
mustalla lattialla joivat kirkkaaksi kiilloitetusta kuparikattilasta
Ekebyn uusien isäntien maljan?
"Ne eivät voi riittää", hän sanoo. "Minä tiedän, kuinka monta niitä
on. Mutta he eivät ole silti olleet neuvottomia, kapteeni Kristian, he
ovat paistaneet variksia meille, tänne pikkupöytään."
Mutta eversti Beerencreutzin huulet tuimain viiksien alla vääntyvät
vain heikkoon hymyyn, ja Gösta näyttää koko ajan siltä kuin aikoisi
lyödä jonkun kuoliaaksi.
Niin katkerasti hän niitä vihasi, että hän syksyisin puki yllensä
akkain laahaavat hameet ja sitaisi päähänsä huivin ja alentui kaiken
maailman pilkan uhriksi päästäkseen vain ampumamatkan päähän
niitä, kun ne söivät jyviä pelloilla.
Ja kavaljeerijoukko riemuitsee.
"Vaiti, kapteeni!"
"Tukitko suusi!"
"Minä olen humalassa", huutaa hän, "en tiedä, mitä sanon, minä
en ole mitään sanonut. Hänen koiransa ja orjansa, minä olen ollut
koira ja orja, enkä mitään muuta, jo neljäkymmentä vuotta. Hän on
Margareta Celsing, jota olen palvellut koko ikäni. Minä en sano
mitään pahaa hänestä. Sanoisinko mitä kauniista Margareta
Celsingistä! Minä olen koira, joka vartioin hänen oveansa, orja, joka
kannan hänen kuormaansa. Hän potkaiskoon minua, hän lyököön
minua! Näettehän nyt, että minä vaikenen ja masennun. Minä olen
rakastanut häntä neljäkymmentä vuotta. Miten voisin minä sanoa
mitään pahaa hänestä?"
"Sinä varastit minut", huudahti hän. "Sinä tulit kuin ryöväri ja otit
minut. Ne pakottivat minut kotona lyönneillä ja iskuilla, nälällä ja
pahoilla sanoilla sinun vaimoksesi. Minä olen ollut sinulle sellainen
kuin olet ansainnutkin."
"Hän oli mies, mainio mies. Mikä olit sinä asettuaksesi meidän
väliimme? Koskaan en ole minä nähnyt hänen vertaistaan. Onnen
hän antoi minulle, kultaa hän antoi minulle. Siunattu olkoon hänen
muistonsa!"
"Ulos, ulos!"
"Ennen marssit sinä itse ulos kuin minä. Luuletko sinä, että minä
väistyn sinua", sanoo hän. Ja hän astuu ovelta peremmälle.
"Sinä olit viisi vuotta sitten paljon Borgin kartanossa, Anna", hän
sanoo. "Tiedätkö sinä, majurinrouvako se sanoi Ebba Dohnalle, että
minä olin virkaheitto pappi?"
"Sinä ymmärrät, että minä tahdon ensin tietää, onko hän tehnyt
minusta murhaajan."
"Pitääkö minun vielä antaa anteeksi?" sanoo hän. "Etkö sinä ole
syypää kaikkeen onnettomuuteeni, Kristian Bergh? Mene
kavaljeerien joukkoon ja iloitse työstäsi!"
Huoli odotti oven takana, sanoi hän, tuimat ajat oli Bergan
kartanossa.
Heillä ei ollut edes piparjuurta suolaiseen päivällislihaan, vaan
Ferdinand ja tytöt olivat valjastaneet Disan reen eteen ja lähteneet
sitä lainaamaan Munkerudista.
Ei, työtä sai tehdä se, joka oli näin vanha ja harmaa kuin Ulrika
Dillner. Yöt ja päivät hän sai puurtaa pitääkseen talorähjää pystyssä.
Eikä se ollut aina liioin helppoa, sillä, toden tunnustaen, kerran ei
heillä ollut talossa koko talvena muuta liharuokaa kuin
karhunkinkkua. Eikä hän suurta palkkaa odottanut, pennin
pyöreääkään hän ei ollut vielä nähnyt, mutta eiväthän ne nakanne
häntä maantiellekään sitten kun hän ei enää jaksa ruokansa edestä
ahertaa. Ne, talonväki, pitivät seuramamseliakin ihmisenä, ja kyllä ne
saattavat kerran vanhan Ulrikan kunnialla hautaan, jos heillä on millä
arkun ostaa.
"Runoilija!"
"Sinä olet sittenkin runoilija, Gösta, sen lisänimen saat pitää. Sinä
olet elänyt useampia runoja kuin meidän runoilijamme ovat
kirjoittaneet."
"Ota nämä", sanoi hän Göstalle, joka jo istui reessä, "ota nämä,
jollet onnistu! Se on 'Corinne', madame Staëlin 'Corinne'. En tahdo,
että ne menevät huutokaupassa."
"Kyllä onnistun."
Taas kiiti Gösta pitkin maantietä, musta Don Juan edessä, valkea
Tankred perässä, ja seikkailun riemu täytti hänen sydämensä. Nuori
valloittaja hän tunsi olevansa: innon henki hehkui hänessä.
Tie vei hänet Svartsjön pappilan ohi. Hän kiepahutti sinne ja kysyi,
eikö hän saisi viedä Anna Stjärnhökiä tanssiaisiin. Ja hän sai.
Kauniin, itsepäisen tytön hän sai rekeensä. Kuka ei tahtoisi kiitää
mustan Don Juanin reessä!
"Mutta muista ja tiedä se, että tästä lähin et enää saa leikkiä
nuorten miesten kanssa. Nyt loppui tanssi ja leikit. Sinun paikkasi on
sohvan nurkassa — tai ehkäpä aiot lyödä viiraa[6] ukko Dahlbergin
kanssa?"
"Mitä minä sitten olen tehnyt sinulle ja teille muille, kun ette anna
minun olla rauhassa? Rahojeni tähden te minua vainoatte. Löveniin
minä ne viskaan, haratkoon sitten kuka tahtoo ne sieltä."
Hän istahti sohvalle Annan viereen. Hiljaa hän laski kätensä Annan
vyötäreille tukeakseen häntä ja sovittaakseen hyväilevän hellästi.
"Ferdinand."
*****
Silloin ryntäsi Tankred reen luo. Se laukkasi niin että vatsa maata
viisti. Kauhusta ulvoen se hyppäsi rekeen ja ryömi Annan jalkoihin.
"Anna olla, se ei auta! Koiran tähden eivät hukat tänä yönä ole
liikkeellä."
"Hän toi hänet", huusivat he, "hän toi Annan. Eläköön Gösta
Berling!"
Ja tulleita riistettiin sylistä syliin.
*****
Koko talo nukkui. Silloin nousi Gösta, pukeutui ja hiipi ulos. Hän
otti aivan hiljaa Don Juanin tallista, vei sen reen eteen ja aikoi
lähteä. Silloin tuli Anna Stjärnhök pihalle.
ebookbell.com