100% found this document useful (1 vote)
46 views

Beginners Stepbystep Coding Course Learn Computer Programming The Easy Way Dk pdf download

The document is a promotional overview of a coding course titled 'Beginners Step-by-Step Coding Course: Learn Computer Programming the Easy Way' published by DK. It includes links to various related coding ebooks and highlights the course's structure, which covers programming languages like Scratch, Python, HTML, CSS, and JavaScript through practical projects. The course aims to make learning coding accessible and engaging for beginners, providing step-by-step guidance and hands-on projects.

Uploaded by

oneelkoves0r
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
46 views

Beginners Stepbystep Coding Course Learn Computer Programming The Easy Way Dk pdf download

The document is a promotional overview of a coding course titled 'Beginners Step-by-Step Coding Course: Learn Computer Programming the Easy Way' published by DK. It includes links to various related coding ebooks and highlights the course's structure, which covers programming languages like Scratch, Python, HTML, CSS, and JavaScript through practical projects. The course aims to make learning coding accessible and engaging for beginners, providing step-by-step guidance and hands-on projects.

Uploaded by

oneelkoves0r
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 90

Beginners Stepbystep Coding Course Learn

Computer Programming The Easy Way Dk download

https://ebookbell.com/product/beginners-stepbystep-coding-course-
learn-computer-programming-the-easy-way-dk-56023114

Explore and download more ebooks at ebookbell.com


Here are some recommended products that we believe you will be
interested in. You can click the link to download.

Beginners Stepbystep Coding Course Learn Computer Programming The Easy


Way Dk Publishing

https://ebookbell.com/product/beginners-stepbystep-coding-course-
learn-computer-programming-the-easy-way-dk-publishing-46708562

Beginners Stepbystep Coding Course Learn Computer Programming The Easy


Way Suefa Lee

https://ebookbell.com/product/beginners-stepbystep-coding-course-
learn-computer-programming-the-easy-way-suefa-lee-10792118

Sql Coding For Beginners Stepbystep Beginners Guide To Mastering Sql


Programming And Coding 2022 Crash Course For Newbies Fawn Watson

https://ebookbell.com/product/sql-coding-for-beginners-stepbystep-
beginners-guide-to-mastering-sql-programming-and-coding-2022-crash-
course-for-newbies-fawn-watson-51284574

Absolute Beginners Guide To Python Programming Master Coding Quickly


With Handson Realworld Projects Stepbystep Guidance And Comprehensive
Learning For All Ages Stirling Hale

https://ebookbell.com/product/absolute-beginners-guide-to-python-
programming-master-coding-quickly-with-handson-realworld-projects-
stepbystep-guidance-and-comprehensive-learning-for-all-ages-stirling-
hale-58084436
Python Pythons Companion A Step By Step Guide For Beginners To Start
Coding Today Joe Thompson

https://ebookbell.com/product/python-pythons-companion-a-step-by-step-
guide-for-beginners-to-start-coding-today-joe-thompson-5597956

The Python Bible For Beginners The Stepbystep Roadmap For Aspiring
Programmers To Achieve Coding Mastery And Unlock Rewarding Tech
Careers Pacey Islas

https://ebookbell.com/product/the-python-bible-for-beginners-the-
stepbystep-roadmap-for-aspiring-programmers-to-achieve-coding-mastery-
and-unlock-rewarding-tech-careers-pacey-islas-56502436

Computer Programming Allinonecoding For Beginners A Stepbystep Guide


To Learn Python Java Sql C C C Html And Css From Scratch Michail
Klling

https://ebookbell.com/product/computer-programming-allinonecoding-for-
beginners-a-stepbystep-guide-to-learn-python-java-sql-c-c-c-html-and-
css-from-scratch-michail-klling-55885230

Python Programming For Beginners Basic Language From Absolute


Beginners To Intermediate Learn Easily And Fast Data Science And Web
Development In A Simple And Practical Way Stepbystep Mark Coding

https://ebookbell.com/product/python-programming-for-beginners-basic-
language-from-absolute-beginners-to-intermediate-learn-easily-and-
fast-data-science-and-web-development-in-a-simple-and-practical-way-
stepbystep-mark-coding-11157304

Coding For Beginners Blockchain Development A Stepbystep Guide To


Create Your Own Blockchains Cryptocurrencies And Nfts Learn To Code
Davis

https://ebookbell.com/product/coding-for-beginners-blockchain-
development-a-stepbystep-guide-to-create-your-own-blockchains-
cryptocurrencies-and-nfts-learn-to-code-davis-42483362
BEGINNER’S
STEP-BY-STEP
CODING
COURSE
LEARN COMPUTER PROGRAMMING THE EASY WAY
DK DELHI
Senior editor Suefa Lee
Project art editor Sanjay Chauhan
Project editor Tina Jindal
Art editors Rabia Ahmad, Simar Dhamija,
Sonakshi Singh
Assistant editor Sonali Jindal
Jacket designer Tanya Mehrotra
DTP designer Jaypal Chauhan
Pre-production manager Balwant Singh
Senior managing editor Rohan Sinha
Managing art editor Sudakshina Basu

DK LONDON
Project editor Miezan van Zyl
Project art editor Francis Wong
Managing editor Angeles Gavira Guerrero
Managing art editor Michael Duffy
Associate publishing director Liz Wheeler
Publishing director Jonathan Metcalf
Art director Karen Self
Jacket design development manager Sophia MTT
Producer (pre-production) Gillian Reid
Senior producer Meskerem Berhane

First published in Great Britain in 2020


by Dorling Kindersley Limited,
80 Strand, London, WC2R 0RL

Copyright © 2020 Dorling Kindersley Limited


A Penguin Random House Company
10 9 8 7 6 5 4 3 2 1
001–311582–Jan/2020

All rights reserved.


No part of this publication may be reproduced,
stored in a retrieval system, or transmitted
in any form or by any means, electronic,
mechanical, photocopying, recording
or otherwise, without the prior written
permission of the copyright owner.

A CIP catalogue record for this book is


available from the British Library.

ISBN: 978–0–2413–5873–3

Printed in China

A WORLD OF IDEAS:
SEE ALL THERE IS TO KNOW

www.dk.com
CONTRIBUTORS

Clif Kussmaul is Principal Consultant at Green Mango Dr Tammy Pirmann is a computer science professor
Associates, LLC, where he designs and implements at the College of Computing and Informatics at Drexel
research projects, faculty development workshops, and University in Philadelphia, Pennsylvania. She is an
classroom activities. Formerly, he taught for 20 years at award-winning educator, recognized for her focus on
college level and worked full and part time in software equity in computer science education and for promoting
development and consulting. Craig was a Fulbright guided inquiry in secondary computing education. She
Specialist at Ashesi University and a Fulbright-Nehru was the co-chair of the Computer Science Teachers
Scholar at the University of Kerala. He has received Association’s Standards Committee and an advisor on
multiple grants from the US National Science Foundation, the K12 CS Framework.
Google, and other sources to support his work with
Process Oriented Guided Inquiry Learning (POGIL), Dr Martin Goodfellow is a Lecturer in the
Free and Open Source Software (FOSS), and other topics Computer and Information Sciences department
in computer science education. at the University of Strathclyde. He has also developed
educational computer science content and workshops
Sean McManus writes and co-writes inspiring coding for other organizations worldwide, including Google,
books, including Mission Python, Scratch Programming Oracle, CoderDojo Scotland, Glasgow Life, Makeblock,
in Easy Steps, Cool Scratch Projects in Easy Steps, and the BBC.
and Raspberry Pi For Dummies.
Jonathan Hogg is an audiovisual artist who has
Craig Steele is a specialist in computer science spent the last decade constructing works out of
education who helps people develop digital skills in combinations of software, electronics, sound,
a fun and creative environment. He runs Digital Skills light, wood, plastic, and metal. He often works
Education, and is a founder of CoderDojo in Scotland, with young people, running creative and technical
which runs free coding clubs for young people. Craig workshops. Prior to art, Jonathan designed and
has run digital workshops with the Raspberry Pi developed software in the London finance industry.
Foundation, Glasgow Science Centre, Glasgow School He began his career researching and teaching
of Art, and the BBC micro:bit project. Computing at the University of Glasgow. The
only constant in all of this has been Python.
Dr Claire Quigley studied Computing Science at
Glasgow University, where she obtained a BSc and David Krowitz learnt to program in the early
PhD. She has worked in the Computer Laboratory at 1980’s on a Commodore VIC-20 plugged into a
Cambridge University and at Glasgow Science Centre. portable black-and-white TV set. He has been studying
She is currently STEM Co-ordinator with Glasgow Life, and practising computer programming ever since.
and lectures part-time at the Royal Conservatoire of Nowadays, Dave spends his time building microservice
Scotland, working with BEd Music students. Claire architecture for businesses, whilst expounding his love
has been involved in running CoderDojo Scotland since for object-oriented design patterns and software
its initial session in 2012. architecture. See dotpusher.com for more info.
CONTENTS FOREWORD

About this book

INTRODUCTION
10

12

What is programming? 16

Coding in the real world 18

Working as a software developer 20

Programming languages 22
SCRATCH
What is Scratch? 28 Logic and decisions 44

Scratch interface 30 Input 46

Sprites 32 Sending messages 48

Coloured blocks and scripts 34 Using functions 50

Output using movement 36 PROJECT: Travel translator 52

Output using looks and sounds 38 PROJECT: Logic puzzle 64

Managing program flow 40 PROJECT: Asteroid dodge 80

Manipulating data 42
PYTHON
What is Python? 94 Libraries 116

Installing Python 96 PROJECT: Team allocator 118

Using IDLE 98 Debugging 130

Variables in Python 100 PROJECT: Project planner 134

Data in Python 102 Objects and classes 156

Logic operators and branching 104 PROJECT: Budget manager 158

Input and output 106 Pygame Zero 176

Loops in Python 108 PROJECT: Knight’s quest 178

Functions 112
WEB TECHNOLOGIES
How the Web works 206 JavaScript debugging 280

Code editors 208 Object-oriented JavaScript 282

Exploring basic HTML 210 Libraries and frameworks 284

HTML forms and hyperlinks 212 Graphic user interfaces 286

Build a better website 214 PROJECT: Animating the web page 288

PROJECT: Build a web page 216 PROJECT: Responsive website 304

Cascading Style Sheets 234

CSS selectors 236 Other programming languages 344

CSS styling 238 GLOSSARY 348

Responsive layouts 240 INDEX 352

PROJECT: Styling the web page 242 ACKNOWLEDGMENTS 360

What is JavaScript? 264

Variables and data types 266

Logic and branching 270

Input and output 272

Loops in JavaScript 274

Functions in JavaScript 278


10 11

Foreword
If you’ve ever asked a teenager for help with your Starting at the absolute beginning, this guide will
computer, you’ll probably have felt the crushing introduce the jargon and tools you’ll need to get
weight of self-doubt as you realize you understood programming in the most popular and versatile
less than half of what they just said. That same software languages. The pages are also peppered
“helpful teen” would most likely scoff at the idea of a with interesting facts about coding and careers,
book – made out of honest-to-goodness old-fashioned together with step-by-step projects to get you going.
paper – on the subject of learning to code. “Just Even if you decide not to become the next Mark
Google it, there are loads of tutorials on Youtube!” Zuckerberg, the skills you’ll learn will be a great
they might say. asset when talking to technology professionals
But not everyone is high-bandwidth, multi-screen and will also help develop your own logic and
ready. Plus, when you are carefully stepping through problem-solving abilities.
the creation of your first lines of code, a physical page It was an ancient Greek philosopher who first noted
with your fingertip planted firmly on the next step can the irony “the only constant in life is change”, and
act as a valuable lifeline to the tangible world. this has never been more true than in the world of
If you’re reading this as a teenager yourself, computing. Maybe you’re looking for a different career
congratulations on discovering life beyond YouTube! or want to learn a new skill to support a hobby or
You’re about to find out that the creators of this guide passion project? Or perhaps you just want to be able
are exactly the kind of industry-defining professionals to talk to your tech-obsessed teenager in a language
whose content channels, blogs, and social media posts that will impress them!
you’d end up on if you did decide to Google “learning For those curious about coding, this guide is full of
to code”. straightforward information, in easily digestible bites,
As a life-long gamer and computing enthusiast written by some of the leading educators and experts
I’ve been reporting on technology for almost a quarter in their field. There is jargon, but it’s jargon you’ll
of a century. In that time, I’ve witnessed seismic understand as you get to it. Is learning about coding
changes in the way we interact with the world. A.I., essential? No. Will it help you understand and feel
big data, automation, e-commerce – all now intrinsic more comfortable in the world we now live? I think so.
parts of our daily routines even if we aren’t always Could it lead to a new and amazing career direction?
aware of them. Definitely, if that’s what you want.
Technology is no longer a niche topic. In fact, There is still a desperate shortage of technology
today, every industry could be considered a tech professionals in the workforce. Opportunities exist,
industry, which leads to a simple choice: get with but they are not going to come looking for you unless
it or get left behind. you speak at least a bit of their language.

Kate Russell
Technology reporter,
author, and gamer
About this book
How this book works grouped under Web Technologies. The book defines
Divided into three chapters, this book teaches the the basic concepts of each programming language and
fundamentals of five programming languages: Scratch, builds on them with the help of detailed projects that
Python, HTML, CSS, and JavaScript; the last three are you can try on your own.

Concepts
Each chapter contains the basic
programming concepts of the language.
These are explained with the help of
practical code examples that you can try
out to understand the concept better.

Illustrations help
you understand
and learn concepts

Projects
The projects in this book teach you how to YOU WILL LEARN
create games, planners, apps, and websites. Indicates the estimated
Each project starts with a brief overview of Time: time it will take to create
what you will learn in the project, how to 1 hour a project
plan the project, and what you will need to
create it. Simple step-by-step instructions Lines of code: 58 Indicates the estimated lines
guide you through the project and explain of code in a project. This
Difficulty level may vary depending on the
every aspect of the code, with the help of
detailed annotations. code editor being used

YOU WILL LEARN


This box highlights the concepts Indicates the difficulty level of a
being used in a project project, with one being the easiest

1.2
Projects are broken down into 1.1
smaller sections with clear steps
to make learning easier

available = 2500.00
budgets = {}

STEP-BY-STEP

Hacks and tweaks


The “Hacks and tweaks” section at the end
of each project provides tips on how to Hacks and tweaks
tweak existing bits of code, or add new
functionalities to it.
12 13
Coding elements in the book Icons
The “Save” icon will remind you to save the program at a
Icons, colour-coded windows with grids, and particular point in the project. The “HTML”, “CSS”, and “JS”
flowcharts that explain the program structure icons indicate which web file you need to write the code in.
help you work your way through the projects.

Python code windows


SAVE HTML CSS JS
Python uses two different windows – the shell window
and the editor window – for writing code. To differentiate
between the two, this book uses different colours. This will Each block of the grid represents
help you know which window you should type the code in. a single space in the code

>>> input = 2 def reset_game():


>>> score = input * 3 global score, charms
>>> print(score) score = 0
6 charms = 0

SHELL WINDOW EDITOR WINDOW

These chevrons appear only in Every indent (spaces at the start of a line)
the shell window. Type in the equals four empty grid blocks. All subsequent
code at the >>> prompt indents will be in multiples of four

Web languages code window


The code for all the Web languages ...<ul id="topMenu" class="navbar-nav mr-auto">
is written in green-coloured windows
in this book. A special visual element, <li class="nav-item">
a turnover arrow, is used to indicate
code being split over two lines. This <a class="nav-link" href=
element is not part of the actual code
and has only been introduced in the "index.html">Home</a>
book to help explain the flow of code
in a block. </li>

In this book, ellipses are used at the Grey code indicates an CODE WINDOW FOR The placement of the arrow
start of a line of code to indicate an existing line of code in WEB LANGUAGES indicates if a space needs to
extended indent, usually more than the program. It is used be added before it. In instances
eight grid blocks to identify the line below where there will be no space,
or above which the new no empty grid blocks are left
code must be added between the arrow and the code

DK website for code DK


The resource pack for the projects in this book (except the
“Hacks and tweaks” sections and the projects created in www.dk.com/coding-course
Scratch) have been hosted on www.dk.com/coding-course.
This includes code in its original format (.py, .html, .css, .js)
and images for all the games and websites. Go to this url to download the
Coding Course Resource Pack
INTRODUCTION
What is
programming?
Computers and electronic devices need
software (or programs) to tell them what
to do. Programming, or coding, is the art BECOMING A CODER
of writing these instructions. Though some After learning the basics of programming,
people are professional programmers, these tips can be used to develop coding
skills further.
coding can also be a hobby. • Practice: Write and experiment with code
• Read code: A lot can be learned by
studying other people’s programs
• Learn multiple languages: Learning
Computer programs are everywhere the different ideas and concepts of other
Programming is not just about conventional computer languages can help programmers choose
systems anymore. The world has become increasingly the most suitable language for each project
• Publish projects: Putting work online and
digital, and almost everything runs on software.
getting feedback on it from other coders
Programs are now incorporated into devices such as helps you to write better code
mobile phones and tablets, labour-saving equipment
around the home, and even in transportation systems.

Data centre
A data centre is similar to an
industrial-scale computing facility.
Its many servers may be accessed
over the Internet to store data or
run software “in the cloud”. The
“cloud” is a global network of Desktop computer
remote servers that can provide Computers are widely used in
services through the Internet. offices and homes for managing
administrative and creative activities,
such as music, design, writing,
Car banking, and many more.
Software can be used to Washing machine
monitor a car’s systems and Many household appliances run
performance, including its embedded programs to perform
speed, temperature, and a function. Inside the casing of a
fuel. The global positioning washing machine, software runs
system (GPS) used to manage its wash cycles, water
for navigation also temperature, and timings.
requires programs.
INTRODUCTION
What is programming? 16 17
What is a computer program? Thinking like a computer
A program is a set of instructions that a computer To write a program it is necessary to
follows to perform a task. Programs can be extremely understand how a computer processes
complex, and there can be several different layers of instructions. This means that tasks need to
programs working together. Microsoft Windows, for be broken down into smaller chunks so that
example, is made up of millions of lines of instructions. the computer can understand the instructions.
For example, a robot cannot simply be asked to
Applications software, “make some toast”. It is necessary to program
such as word processors,
run on top of the
precise and detailed instructions for each step.
operating system
Instead of repeating
Operating systems, such 1. Open breadbin the same instruction
as Microsoft Windows 2. Remove loaf twice, it will be
and macOS manage the 3. Open bag shorter and clearer
hardware and software to say “Do this twice:
4. Remove slice
remove slice, insert in
5. Insert in toaster toaster” in a program
Firmware is software that
6. Remove slice
is coded into the hardware,
including the Basic Input/ 7. Insert in toaster
Output System (BIOS) 8. Push down plunger
9. Wait until toast
Hardware includes the physical pops up
elements of a computer, such
as the monitor

Games console
Consoles such as the Sony
PlayStation, Microsoft Xbox,
and Nintendo Switch are Camera
computers designed to offer Modern cameras use
a great gaming experience. software to change settings,
capture images digitally,
and enable users to review
and delete photographs.

Factory equipment
Factories can be highly automated. Assembly
line robots, planning and control systems,
and quality-control cameras all require
programs to operate.
Managers and office workers
Many businesses create and use specialized software.
Software engineers develop complex software systems,
but managers and office workers often write short
programs to solve problems or automate tasks that
might take hours or days by hand. For example,
they might write code to query databases,
format information, analyse data, control
equipment, customize websites, or add features
to word processors and spreadsheets. Some
programming languages are specifically
designed for these purposes (see pp.344–47).

Artists and hobbyists


Coding can support many forms of
creativity. Artists can create software to
make music or visual art that changes as
people interact with it. Hobbyists might
create software for games, interactive
stories, to direct simple robots, control
lighting, or do tasks around the home.

Coding in
the real world
Coding is used in nearly every aspect of modern life
and work. Basic knowledge of coding helps people to
use software more effectively, create simple programs,
and communicate with other software developers.
INTRODUCTION
Coding in the real world 18 19
Software engineers and web developers
Software developers work for many different businesses
and organizations. Businesses require software to
track inventory and place orders with suppliers,
to schedule employees and track work hours,
and to send mailings to customers. Insurance
companies use software to set pricing based
on the number and cost of events, and to
review and approve policies. Websites
often combine existing programs with
custom coding for special features.
Software engineers play key roles
in developing systems that suit
a client’s needs.

Scientists and researchers


Code can also be used to create
experiments, analyse data, and
create medical reports. For example,
brain scientists might use software
to display shapes or words to a
patient, to record brain activity, and
to analyse the data to learn what parts
of the brain are most active.

25,000,000
WORKERS ACROSS
THE WORLD ARE
SOFTWARE DEVELOPERS
Working as a
software developer
Writing a simple program might seem straightforward, but it can be
surprisingly difficult. Developing large, reliable software systems is
even more complex, and requires teams of software developers with
a variety of specialized skills and roles.

Analyse
In this phase, developers decide what the
software must do. They might study existing
systems, design new processes, or interview
people to understand how they will use the
system. This also defines other constraints
or requirements. For example, how much
data must the system handle, how quickly
must it respond, and what should it do when
problems occur? The resulting documents could
range from a few pages to hundreds or more.

Test
Developers check whether the
software works correctly, and fix
any problems they find during
the testing phase. This is often the
longest and least predictable phase,
and a common reason for delays
and extra costs. There are many
types of tests – unit tests check if
individual functions are correct,
functional tests check individual
components, integration tests
check if components work together,
and system tests check the
entire system.
INTRODUCTION
Working as a software developer 20 21
Overview
Software development involves four phases: analyse, design and
plan, build, and test. These phases, however, can be structured in
a variety of ways. A waterfall model steps through each phase once,
which seems simple, but often leads to problems. An iterative model
cycles through the phases several times, building part of the system
in each cycle. An agile model cycles through each phase many times,
adding different features in each cycle.

Design and plan pieces, and specifying the files and even the individual
In this phase, developers decide how the software functions to be created. Developers also need to
will work and how it will be created. This can include estimate the time, effort, materials, and cost to create
deciding on which language to use, sketching user the system, and a schedule for who will do which tasks
interfaces, designing databases, subdividing it into at what time.

Build
In the build phase developers
create the software, including
user interfaces, databases, code,
and documentation for users and
programmers. This means that
coding is just one part of one
phase of software development,
and in some ways the easiest and
most predictable. As each piece is
built, developers might inspect or
review the code to see how well
it is written, and then integrate it
into the larger system.
Programming
languages
A programming language is a set of words and symbols that
allows people to write instructions for a computer. There is
sometimes a compromise between how easy the language
is to use and how powerful it is.

High- and low-level languages program can run on different hardware if it is written
High-level programming languages are designed to be in a high-level language. By contrast, low-level
easy to use without needing a detailed understanding languages give programmers granular control over
of the computer hardware. They often use words that the computer, but also require a deeper understanding
are similar to human language, and manage some of how it works. Programs written in a low-level
aspects of the computer automatically. Often, the same language might not work on other hardware.

Instruction to
HIGH-LEVEL LANGUAGES display some text
• Relatively fast to write
• Relatively easy to understand
• Usually fast enough in execution print("Hello!")
• Programs can be used on different
hardware Python
• No need to understand hardware A popular high-level language,
Python is easy to read and write.
This instruction puts the message
“Hello!” on the screen.

This is hexadecimal,
a common counting
system in computing
LOW-LEVEL LANGUAGES
• Direct control of hardware features
• Can increase speed of highly MOV AX, 66H
performance-sensitive code
• Requires an understanding of Assembly language
the hardware Assembly language more
• Program only works on the closely reflects the processor's
same or similar processor machine code. This example
takes a number and places it
into the part of the processor
called the accumulator.
INTRODUCTION
Programming languages 22 23
Machine code How the computer understands
Low-level code that represents how the computer a programming language
hardware and processor understand instructions Ultimately, all programs end up as machine
is called machine code. It is a collection of binary code. Most programs are written in more
digits – 1s and 0s – that the processor reads and human-friendly languages and need to be
interprets. Machine code instructions are comprised translated into raw bits so that they can
of an opcode and one or more operands. The opcode be executed by a processor. An interpreter
tells the computer what to do and the operand tells translates and executes the instructions as
the computer what data to use. the program is running, while compilers
translate the program in one go before it runs.

Microprocessor
The microprocessor is the “brain”
of a computer and controls most
of the machine’s operations. It
carries out commands and runs
01101000
the machine code instructions. 01101001
00001101
00001010
HUMAN- CONVERT TO RUN
FRIENDLY COMPUTER INSTRUCTIONS
CODE INSTRUCTIONS

Using an integrated development


environment (IDE) APPLICATIONS
An IDE is a set of tools that helps programmers. It
has a code editor for writing programs, and may Once you have learned how to program, these
skills can be used for a wide range of creatively
include productivity features, such as autocomplete
fulfilling and useful projects.
for instructions and colour coding to help readability. • Home automation: To control things such
Some IDEs also include a debugger to help find as lights or curtains remotely
errors, and a compiler or interpreter to test and • Games: A great way to experiment with
run the programs. coding, games are easy to share and to
Code area to write
get feedback on (see pp.80–91, 178–203)
and edit programs • Robots: Using Arduino or Raspberry Pi boards
along with kits or electronic components,
people can program their own robots
• Websites and web apps: Programs that can run
File explorer anywhere in a web browser can be created using
for project files HTML, CSS, and JavaScript (see pp.210–343)

An example IDE layout


IDEs sometimes enable users to configure
their set-up. Here is one configuration that
allows the programmer to browse the
project files on the left, code and edit
on the right, and debug at the bottom.
Debugger to find
errors in the program
TYPES OF PROGRAMMING LANGUAGE

Types of programming language


Many different philosophies or paradigms have been used to design
programming languages over the years. Since they are not mutually
exclusive, programming languages often embody several core ideas. They
can also be used in different ways depending on the programmer’s preferred
approach. Python, for example, can be used for both object-oriented and
procedural programming. JavaScript can be used for event-driven and
object-oriented programming. The best approach or the best programming
language to use often depends on the programmer’s preference. Below are
some of the ways that programming languages can be defined and classified.

IMPERATIVE PROGRAMMING DECLARATIVE PROGRAMMING


These languages require a list of instructions for the In declarative programming, programmers tell the computer
computer to carry out. The programmer has to first what result they want, without needing to say how it will be
work out how the task can be completed, and then achieved. In the Wolfram Language, for example, a word cloud
provide step-by-step instructions to the computer. based on the words in Wikipedia’s Music page can be created
Imperative languages are common and include using a single line. Other declarative languages include SQL,
Python (see pp.94–95), C, C++, and Java. which is used for databases.

user = input("What's your name? ") WordCloud[WikipediaData["music"]]


print("Hello", user) INPUT IN WOLFRAM

INPUT IN PYTHON Python program


to greet a user
by name western musicians
classical work
styles
pop bass blues history

What's your name? Sean genres pitch


study Music styles
art
songs melody traditional period
Hello Sean culture
note era theory instruments
OUTPUT IN PYTHON
OUTPUT IN WOLFRAM

EVENT-DRIVEN PROGRAMMING
The event-driven programming concept is
Creates a
one where the program listens for certain
web page button
things to happen, and then starts the
appropriate program sequence when they
do. For example, a program might react <input type="button" value="Click me!"
to user actions, sensor input, or messages
from other computer systems. JavaScript
(see pp.264–65) and Scratch (see pp.28–29),
onClick="showMessage();">
among others, can be used to write
event-driven programs.
Runs the showMessage() This icon has been used in
JavaScript instructions when the book to indicate code
the button is clicked being split into two lines
INTRODUCTION
Programming languages 24 25
CHOOSING A LANGUAGE
Sometimes, programmers’ choice PYTHON SCRATCH
of language may be dictated by the
A flexible language, it emphasizes A great first programming language,
hardware they are using, the team ease of understanding in the code. Scratch is perfect for simple games.
they are programming with, or the
kind of application they want to
JAVA JAVASCRIPT
create. Often, they will have a choice.
Here are some popular languages Widely used in financial services, The language used by web
that can be considered. small devices, and Android phones. pages for interactivity.

PROCEDURAL PROGRAMMING OBJECT-ORIENTED PROGRAMMING


This type of programming is based on functions, In object-oriented programming, the idea is that data and the
which contain reusable chunks of program. instructions related to it are stored together in “objects”. Objects can
Functions can start other functions at any time, interact with each other to achieve the program’s objectives. The
and can even start themselves again. They make aim is to make code more modular, so it is easier to manage, and
programs easier to develop, test, and manage. is more reusable. Many popular programming languages, such as
Many popular programming languages, such C++, JavaScript, and Python support object-oriented programming.
as Java and Python (see pp.94–95) support
procedural programming.
OBJECT

MAIN PROGRAM
Data for this object

Instructions for this object

Interfaces for communicating

FUNCTION 1

FUNCTION 3

VISUAL PROGRAMMING LANGUAGES


These languages make it easier to develop software using drag-and-drop
FUNCTION 2 interfaces, so a programmer can create software more quickly and with
fewer errors. Visual Basic, for example, includes tools to design user
interfaces visually. Scratch (see pp.28–29) is another highly visual language,
often used to learn programming.

A Scratch program to react


when a button is clicked
when this sprite clicked

say Button was clicked! for 2 seconds


SCRATCH
What is Scratch?
Scratch is a visual programming language that does not require
users to type code. Instead, they build programs using coloured
blocks that represent instructions. Scratch focuses on the creative
aspect of coding, and allows users to create interactive games,
stories, and other visual applications.

Features
Scratch has a number of features that
make it an ideal programming language
for beginners. The use of ready-made
blocks of code sets it apart from most
Com
other programming languages. Scra munity
t
othe ch allow
com rs throu s users t
m g o
prog unit y. h a buil conne
U t c
mod rams for sers ca -in Scrat t with
n
learn if y, and others t share t ch
by st remix o pla
y
heir
ud y i .
ng o They can with,
t h er
s’ pr also
ojec
t s.

drop
Drag and cks can be
h b lo
Scratc ped in
and drop
dragged rea to build
A
the Code here is very
T
programs. , so users are
g
little typin make errors.
to
less likely

uage
Power ful lang use,
h is ea sy to
Scratc
core concepts
but includes
sional
used in profes s. It
ng la ng ua ge
codi
ides a good
therefore prov uction
in trod
all-round
ing.
to programm

Jigsaw de
sig
Instruction n
b
like jigsaw locks snap together
pie
cannot con ces, so users
nect them
ways. Non in wrong
sensical co
are typical mbination
ly s
errors in lo impossible, so
gic are min
imized.
SCRATCH
What is Scratch? 28 29
Learning to program with Scratch used in education. Scratch has a highly
Scratch was created by the Lifelong Kindergarten visual interface with coloured blocks of
group at the Massachusetts Institute of Technology code that join together to form scripts,
(MIT) in the US. It was first launched in 2007. which can include images and sounds
Scratch was designed to be fun and easy to use to create action on screen. Scratch provides
for beginners, and to help them understand basic a powerful platform (see pp.30–31) for
concepts and avoid errors. It is therefore widely exploring programming.

Hardware support
The latest version of Scratch works on computers
with Windows, macOS, and Linux. It can even
Built-in assets be used on tablets. Scratch projects can use
th a pre-installed
Scratch comes wi d extensions to interact with hardware devices.
so un ds and images (calle
librar y of 3) th at ma kes it
.32–3
sprites – see pp r
g right away. Othe
easy to start codin es lac k in this
guag Raspberry Pi
programming lan d
need to be create . Scratch can use a Raspberry Pi to connect
regard as images itin g a program
be for e wr to other sensors or motors.
or uploaded

micro:bit
Scratch can be used with a BBC micro:bit,
which has a built-in LED display, buttons,
and tilt sensors.

Lego®
Scratch can connect to Lego® WeDo and
Lego® Mindstorms™ to work with motors,
sensors, and robots.

Webcam
Scratch can access a webcam to layer images on
a live video feed to create simple augmented
reality applications.

GETTING SCRATCH
The Scratch developer environment is required
Colou
Instru r coding
for using Scratch. It can be accessed both online
c
move tion blocks and offline.
m
and se ent, sound for
are co nsing (amo , control, In your browser
lo n
be ea ur coded, g others) Visit the Scratch website at
s s
when ily identifie o they can https://scratch.mit.edu/ and click
creatin da
g a p r nd re ad Join Scratch to create an account.
og r a m
.
Offline
Scratch can be downloaded and used
without an Internet connection at
https://scratch.mit.edu/download.
Scratch interface
The screen layout, or interface, in Scratch can be used to build
programs, edit them, and view the output in the same screen. The
interface is divided into several sections, each serving a particular
purpose. This book uses Scratch 3.0 – the latest version of Scratch.
Create new projects, Use the Sounds tab to
Understanding the screen layout Change upload or save work Edit existing add music and sound
The Scratch interface is divided into the language to the computer projects effects to sprites
following sections:
• Blocks Palette: This contains the instructions,
SCRATCH File Edit Tutorials
or code blocks, required to build a program
• Code Area: The instruction blocks are Code Costumes Sounds
assembled here to create a script
• Stage: Allows the user to interact with Use the Costumes
Motion tab to change
the program Motion the appearance of
• Sprite List: Displays and manages all the move 10 steps a sprite
images, or sprites, used in a program
• Stage Info: Manages the background images Looks
turn 15 degrees

Sound turn 15 degrees

Events
go to random position
STAGE
BLOCKS CODE
Control go to x: 0 y: 0
PALETTE AREA
glide 1 secs to random position
SPRITE Sensing
LIST
glide 1 secs to x: 0 y: 0
Operators
STAGE INFO
point in direction 90
Variables
VERSIONS OF SCRATCH
point towards mouse-pointer
My Blocks
There have been three versions of Scratch so far,
Select instruction blocks and
each with a different screen layout. New features drag them into the Code Area
and instruction blocks were added at each update to build a program
of the interface. These features may not work on
earlier versions. Contains the instruction
• Scratch 1.4: The interface was similar to Scratch blocks that can be used
3.0, but the Code Area was called Scripts Area.
• Scratch 2.0: The Stage was on the left of the
screen. Introduced sprite cloning and reorganized
some blocks into the Events category. Backpack
• Scratch 3.0: Introduced Blocks Palette
extensions, and moved the Pen blocks into them. Use the “Add Extension” Store useful code, sprites, costumes,
button to add new categories and sounds in the Backpack so that
of blocks to the Blocks Palette they can be used in other projects
SCRATCH
Scratch interface 30 31

The Stage shows Click or tap a


the sprites moving sprite on the
Share projects and interacting with Stage or in the Edit profile
Name of with the Scratch Access the community each other when Sprite List to and access
the project community page of a project a project is run select it saved projects

Untitled Share See Project Page scratch-cat


Changes the size
Stop the
of the Stage and
Run the program program
Code Area

when clicked

forever
glide 3 secs to x: 0 y: –150
glide 3 secs to x: 200 y: 100
glide 3 secs to x: –200 y: 100

Blocks snap together – use the


mouse to move them around

Stage
Sprite Sprite1 x -90 y -10

Show Size 100 Direction 90

This panel gives Backdrops


information about the 2
selected sprite

Sprite 1 Cactus

Drag instruction blocks into the A blue box This panel shows the sprites used Add new sprites Change the
Code Area and join them together highlights the in a program. Select one to see to the project backdrop
to build a script for a sprite selected sprite its code in the Code Area
Sprites
Sprites are the basic components of Scratch. Similar to characters
in a video game, they can move around the Stage, change their
appearance, and interact with other sprites. Each sprite uses one
or more images and is controlled by scripts.

How do sprites work?


Most sprites have multiple images, called costumes,
which can be used to animate them in a program. The Cat
sprite, for example, has two costumes that show its legs
in different positions. Switching between the costumes
makes it look like the cat is walking on the Stage. Scratch Default sprite
Every project starts with the Cat
comes with a preloaded library of sprites that can be sprite. Delete it by clicking the “x” Sprite1
used and modified in a program. on its thumbnail in the Sprite List.

Creating a sprite
Scratch allows its users to add or create their own images. The Choose
a Sprite button on the bottom right of the Sprite List reveals options to
add, create, or upload sprites in a project.

Upload Surprise
Users can include their own Scratch also has an option
images and upload them to the to add a random sprite from
Scratch interface to be used as the Sprite library. It can be a
sprites. This includes images, such quick way to add sprites to
as photographs, which may be experiment with, or to generate
required to create or new game ideas.
personalize games.

Choose a Sprite Paint


Scratch contains a large Users can create their own
library of sprites that can be images in Scratch’s Paint Editor
used. The sprites are divided into (shown on the right). This editor
categories such as Animals, is quite versatile and can be used
People, and Fantasy. Hovering to edit the costumes of existing
over a sprite in the library sprites in the Sprite library.
cycles through its costumes.
SCRATCH
What is a sprite? 32 33
Painting a sprite’s costume
The Paint Editor in Scratch can be used to make new sprites or create
additional costumes. By default, the editor uses the vector mode, which
stores images as shapes and lines, making them easier to edit. The
user can switch to the bitmap mode, which stores the colour of every
bit in the image. The Paint Editor shown below is in the vector mode.

Select this tab to Name the costume


open the editor Undo / Redo
Control which
Combine or elements are in
Code Costumes Sounds split shapes front of others

1 Costume Costume1
Group Ungroup Forward Backward Front Back

Fill Outline 2
costume1 Copy Paste Delete Flip horizontal Flip vertical
239 x 315
Choose which
costume to edit Select an Line thickness Flip selected
Select a
outline colour elements
fill colour
horizontally
2 or vertically
Select tool

Eraser tool deletes


costume 2 a selected element
239 x 315
Text tool adds
Brush tool draws text elements
a shape in to an image
freehand
Fill tool adds
colour to a
shape

Use the Line,


Circle, and
Rectangle tools
to draw shapes

Convert to Bitmap

Add a Switch between vector Use the canvas to Zoom controls


costume and bitmap modes draw an image
Coloured blocks
and scripts
Scratch instructions come in colour-coded blocks that can be
assembled into chunks of program called “scripts”. These
blocks can be used for collecting input, processing information,
and displaying the output on screen.

Program flow computer systems, or sensors. Output, on the other


A program can receive information (input), do hand, can be given on the screen, by a printer, or by
something with it (process it), and then deliver the sending information to another system.
result (output). In a game, the input can be the player’s In Scratch, instructions in a program are built
key presses, and the output is the movement on screen. through code blocks. These instructions always run
A program may receive input from users, other from top to bottom, unless told otherwise.

Input blocks Processing blocks

touching mouse-pointer ? when backdrop switches to backdrop1

Sensing blocks Events blocks


These blocks check whether sprites or The hat-shaped Events blocks (see p.40) can also be
colours are touching each other, whether used to start processing scripts when something
keys are pressed, or are used to ask the happens, such as when the user presses a key or a
user to enter text (among other things). sprite sends a particular message to other sprites.

wait until

Control blocks
Control blocks are used to make decisions
about what to do next. They also dictate how
often a set of blocks should repeat, and when
the script should pause.

when this sprite clicked

Events blocks
These blocks detect when the green
flag is clicked, a key is pressed, or a
sprite is clicked.
SCRATCH
Coloured blocks and scripts 34 35
Using the Blocks Palette Select this tab to begin

The Blocks Palette can be found on the Code Costumes Sounds


extreme left of the Scratch interface. It Motion Select a block and drag
contains nine different types of blocks Motion
move 10 steps it to the Code Area
and an “Add Extension” button that can
Looks
be used to add more blocks to the palette. turn 15 degrees
The blocks can be accessed by switching Sound when clicked
between the coloured categories and turn 15 degrees
scrolling through the list of blocks move 10 steps
Events
that appear. go to random position
Control Join the blocks
together
go to x: 0 y: 0
Sensing
Creating scripts
To create a script, click or press a block and Operators
drag it into the Code Area. Drop the block Click on a coloured
below another block and they will snap Variables category to see the
together to make a script. If the blocks fail to list of blocks in it
snap together, it means they cannot be used
that way, or they are not close enough to attach. My Blocks

Output blocks

+ move 10 steps

Operators blocks Motion blocks


These blocks are used for maths, and comparing numbers Motion blocks display the output of a
and pieces of text, as well as analysing text. They can also program by moving and controlling
be used to generate random numbers, and are great for the sprites on the Stage.
adding surprises to a game.

change my variable by 1 switch costume to costume 1

Variables blocks Looks blocks


Variables blocks are used to store information, such as These blocks can alter a sprite’s costume, change
the current score of a game. They can also be used to the background image, and display information in
store text. Certain blocks in this category can increase a speech bubble. They can also change a sprite’s
or decrease a variable’s number. size and visibility, and apply special effects.

start sound Meow

Sound blocks
Sound blocks are used to add sound
effects to a program. They provide audio
output by replaying recorded sounds.
Output using
movement
Scratch is an ideal language for programming simple games and
applications that move images around the screen. It has a set of
blue Motion blocks that can be used to control a sprite’s movement.
x axis
–240 0 240
Coordinates 180 x and y grid
The Stage here has
In Scratch, any position on the Stage can be been marked with grid
(x=180, y=120)
pinpointed using the x and y coordinates. The x lines every 60 steps. Try
axis runs from -240 on the left to 240 on the right, (x=–120, y=60) these positions in the

y axis
0 Motion blocks (below)
and the y axis runs from -180 at the bottom to 180 for moving a
at the top. When writing a program, coordinates sprite using
(x=–180, y=60) coordinates.
can be used to place a sprite in a particular position.
(x=60 y=-120)
–180

Moving sprites using


coordinates
These Motion blocks can be used to
move a sprite to a particular position change x by 10 set y to 0
on the Stage using coordinates. The
Alter x position Change y position
go to x: y: block and set x to and set y to Changes the x position by the Moves the sprite to a particular
blocks are often used to set a sprite’s number in the block, without y position, without changing its
starting position. changing the y position. It is x position. As with the similar x block,
used to move a sprite sideways. the sprite jumps straight there.

go to x: 0 y: 0 set x to 0 x position

Set sprite position Change x position Show x position


Makes a sprite jump to a particular Moves the sprite to a particular This block does not move a sprite,
point on the Stage. The numbers in x position, without changing its but shows the sprite’s x position when
the block can be edited to choose y position. The sprite will jump clicked. Drop it into other blocks to
different coordinates. straight there. use this coordinate in a script.

glide 1 secs to x: 0 y: 0 change y by 10 y position

Move sprite in given time Alter y position Show y position


This block smoothly moves the sprite Changes the y position Does not move a sprite, but shows its
to a particular point. The time taken by the specified number, y position. It can also be used with
for this journey can be specified in without changing the other blocks. For example, a sprite can
the input area for seconds. x position. be made to say its y position (see p.38).
SCRATCH
Output using movement 36 37
0
Moving sprites using directions
-45 45
Scratch calls each position on the Stage a step. A sprite can be
moved by pointing it in a particular direction and then making -90 90
it walk forwards. The direction 90 degrees will make a sprite
face right. This is the default direction for most sprites. -135 135
180

move 10 steps turn 15 degrees

Move sprite Rotate sprite anticlockwise


This block moves the sprite 10 steps across the This block changes the sprite’s direction by 15
Stage. However, since this is just one movement, degrees the other way. The value in the degrees
the sprite will appear to jump, not walk. input can be changed by the user.

turn 15 degrees point in direction 90

Rotate sprite clockwise Change sprite’s direction


Changes the sprite’s direction by 15 degrees Sets the sprite’s direction to a specific number. The
clockwise. As with all blocks with input areas, the direction numbers are measured from 0 at the top
number of degrees can be changed as required. to 180 going clockwise, and -180 going anticlockwise.

Stops the sprite


drawing as it moves
to the start position

Drawing with pen blocks pen up


Each sprite has a pen, which it can use
go to random position
to draw a line as it moves around the Stage.
The thickness (or size) and colour of the Turns the
pen down pen on
line can be changed as required. The
pen down block is used to draw, while change pen color by 10
the pen up block turns off the pen. The
Pen blocks are an extension in Scratch 3.0. move 100 steps The script
changes the
They can be found under the Add Extension pen colour each
section of the Blocks Palette. turn 120 degrees time it runs

move 100 steps 100 is the


length of
the side
turn 120 degrees
Drawing a triangle
Try this script to draw a triangle using
the pen and movement blocks. Click
move 100 steps 120 is the
on the script to run it. The erase all angle to turn
block in the Blocks Palette can be turn 120 degrees for a triangle
used to wipe the Stage.
Output using
looks and sounds
In a game, sprites often mutate or play sound effects to tell players
what is going on. Changing a sprite’s appearance or playing sounds
can be useful in other programs as well. It can be used to warn
users or get their attention to look at something important.

Displaying messages say Hello! say Hello! for 2 seconds


In Scratch, sprites can display
messages through speech and Speech bubble Timed speech bubble
This block displays a speech bubble Using this block, a message can be displayed for two
thought bubbles. These are containing “Hello!” until a new say seconds before it disappears. Both the message and
created using the say and think or think block is used. its duration can be changed.
blocks from the Looks section
of the Blocks Palette. The holes think Hmm... think Hmm... for 2 seconds
in these blocks can be used to
change the message to be Thought bubble Timed thought bubble
This block uses a thought bubble to This displays a thought bubble that disappears after
displayed, or to drop another display a message until a new say or two seconds. Again, it is possible to change both the
round-ended block in it. think block is used. message and its duration.

Changing a sprite’s appearance clear graphic effects


The Looks blocks can be used to show a sprite’s reaction to
a game event by giving it special effects. They can also help Remove effects
In Scratch, each sprite can have its
to display a message. There are even blocks to make a sprite own special effects. This block removes
visible or invisible on the Stage. all special effects applied to a sprite.

switch costume to costume1 set size to 100 % hide

Change costume Change size Hide sprite


This block changes a sprite’s costume to a Makes the sprite’s size a particular Makes a sprite invisible on the Stage.
particular image. The menu can be used percentage, considering its default It can still move around using the
to choose which costume to display. size to be at 100 per cent. Motion blocks.

next costume change color effect by 25 show

Show next costume Change effect Show sprite


Useful for animation, it switches to a sprite’s Increases (or decreases) a special effect using Makes a sprite visible on the Stage if
next costume or goes back to the first one, a positive (or negative) number. Both the it has previously been made invisible
depending on the sprite’s current costume. number and special effect can be changed. with the hide block.

change size by 10 set color effect to 0

Alter size Set effect


Changes the sprite’s size by the percentage Used to give special effects a particular
entered in the block. Using a negative number value, no matter what the current value
shrinks the sprite. is. Used with 0, this turns off the effect.
SCRATCH
Output using looks and sounds 38 39

MUSIC BLOCKS
The Music blocks in Scratch are an extension,
set tempo to 120
and need to be added using the Add
Extension button on the bottom left of the set instrument to (20) Synth Lead
Blocks Palette. They make it possible for
programmers to use blocks to play musical play note 60 for 0.25 beats
notes. It is not necessary to know the number
for each note, since clicking the hole for the play note 62 for 0.25 beats
note number will display a piano keyboard to
help enter the required music. play note 64 for 0.25 beats

Scratch’s set play note 62 for 0.25 beats


instrument block has
21 built-in instruments play note 67 for 1 beats

Playing sounds play sound Meow until done change pitch effect by 10
Sounds are a great way to
provide feedback in a game Pause script to play sound Alter pitch
Sets a sound to play, and then pauses Changes the pitch of a sound effect. Positive
or as an alert in a program. the script until it is finished. The menu numbers make the pitch higher and negative
Before a sound can be used, in the block can be used to choose a ones make it lower. The stereo setting can
it has to be added to the different sound. be adjusted as well.
sprite from the Choose
a Sound button under the start sound Meow set pitch effect to 100
Sounds tab. Programmers
Play sound in background Reset pitch
can either use a sound from Starts playing a sound, but does not Resets the pitch or changes it to a value
the Scratch Sound library, pause the script. The sound plays in specified by the programmer. It can also be
the background while the script runs. used to adjust the stereo left/right setting.
or can record or upload a
sound of their own.
stop all sounds clear sound effects

Stop all sounds Remove sound effects


This block stops all the sounds, no This block resets all of the sound
matter which sprite started them, effects previously applied to sprites
or how many sounds are playing. or backdrops.
Managing
program flow
When writing code, programmers not only have to tell the computer
what to do, but also when to do it. In Scratch, the Control and Events
blocks are used to manage when an instruction is carried out.

Event-driven programming
In event-driven programming, the program’s actions are started by events,
such as user input, sensor input (see pp.46–47), or messages sent by other when clicked
programs or parts of the program. The Events section of the Blocks Palette
contains blocks that can start scripts when something happens. Also Use green flag to start
Provides an easy way for users to start the
called hat blocks due to their shape, these Events blocks provide many program. Copies of this block can be used to
more ways to start scripts than simply clicking on them. start multiple scripts simultaneously.

when this sprite clicked when loudness > 10 when I receive message1

Use mouse click to start Use sounds to start Use message to start
This block starts the attached script when When the microphone detects a volume Scripts can send messages to each other
the sprite is clicked. It is ideal for creating more than 10 (on a scale of 0 to 100), the (see pp.48–49). This block starts a script
on-screen buttons for users to click on. script can be activated. when a particular message is received.

when space key pressed when backdrop switches to backdrop 1

Use key press to start Use background to start


Starts a script when a key is pressed. The This block is particularly useful in story-based
menu in the block can be used to select projects. It enables scripts to start when
the required key. the scene (or background image) changes.

Making a clickable drum 2 Add the script


This example uses an Events block to make a simple Select the Code tab and add the following
script to the Drum Kit sprite. The sprite already
clickable drum. When the drum is clicked or tapped has the required sound. Click the sprite on the
on the Stage, the script plays a sound and briefly changes Stage to hear it play, and see its playing costume
the image (or costume) to show that it is playing. for half a second.

This costume
The blue highlight indicates indicates that the
this is the selected sprite Drum Kit is playing
when this sprite clicked

1 Add the Drum Kit sprite


Hover over the Choose a Sprite switch costume to drum-kit-b
icon in the Sprite List and select the
magnifying glass to see the library. Sprites start sound drum bass1
are listed alphabetically. Scroll down to
find the Drum Kit sprite and click or tap wait 0.5 seconds Reverts to
on it to add it. the original
Drum Kit switch costume to drum-kit costume
SCRATCH
Managing program flow 40 41
Using loops to repeat Repeating forever
A loop is a part of a program that needs to be Sometimes a program needs to repeat
repeated. In Scratch, these blocks are placed forever, until explicitly stopped. For example,
within the bracket of a repeat block, so that a simple animation or game can play
Scratch knows where the repeating section starts indefinitely. The forever block repeats a set
and ends. The bracket automatically stretches to of instructions without ending. This block
make room for longer sets of instructions. has no nub to join other blocks underneath it,
since it never ends. To end the script, click
repeat 10 It is possible the red Stop button. A stop all block may
to change the also be used to stop the script.
number of
repetitions

when clicked Encloses the blocks


that will repeat
forever without end

when clicked go to random position


go to random position pen down These Motion
blocks draw
pen down Starts the sprite repeat 3 the triangle
drawing
repeat 3 The movement move 100 steps
instructions draw
move 100 steps one side and turn turn 120 degrees
turn 120 degrees

This marks the end pen up Stops the program from


of the repeating drawing while it moves to
pen up section the next starting position

Drawing a triangle Drawing infinite triangles


In the previous example of drawing a triangle (see p.37), This script will draw triangles in random positions
three copies of the instructions for moving and turning were forever. As shown above, a repeat loop can be
added. The script above, however, uses a loop, which is much placed within a forever loop. A loop inside a loop
easier to read and write. is called a nested loop.

INTRODUCING DELAY
It is not always desirable to have
a program run as fast as possible.
In many cases, a program may when clicked
need to be slowed down so that
when clicked move 10 steps
users can easily see what is going
on and have time to respond. move 10 steps wait 1 seconds
Games are often artificially
slowed down in order to ensure move –10 steps move –10 steps
that players can keep up.
Normal movement Delayed movement
In this example, the program runs so Introducing a wait block makes
fast that the sprite’s movements are it possible to see the sprite move
not visible. Nothing seems to happen. from right to left and back again.
Manipulating data
Programs are often used to manage and process data. This data
is either provided by the user or collected from other computer
systems. In Scratch, the Operator blocks are used to manipulate
numbers and text stored in variables.

Variables
Many programming languages use variables Strings
to store information. A variable can store one Programmers often call a piece of text in a
piece of information, either text or a number. program a “string”. For example, a string can
In a game, for example, two variables might be a name, an answer to a question, or an entire
be used to store the player’s name and score. sentence. In Scratch, any variable can store a
number or a string, and it can store different
Make a variable
1 To create a variable in Scratch, select Variables in the Blocks values at different times.
Palette and click on the Make a Variable button. Give the new
variable a meaningful name, such as score, so that the code is easy banana
join apple
to understand. Usually, variables need to be created for all sprites,
which means that all sprites can see and change the variable. Join strings
This block can be used to join two strings. The strings are
joined without a space, so the result for this example will be
“applebanana”. Variable blocks can also be used in place of
Make a Variable words typed into the block.

my variable The new letter 1 of apple


variable will be
score displayed here Extract letters
This block extracts one letter from a string. In this
example, the first letter of the string “apple” is extracted.

Use blocks with your variable


2 Use the set [variable name] block to reset
length of apple
the variable’s value. For example, set score to 0. The Count a string
change [variable name] by block can be used to The number of characters in a string can be counted using this
increase or decrease the value. block. The result for the block can be viewed by clicking on it.
It can also be dropped into other blocks to use in a script.
set score to 0 change score by 1 apple contains a ?

Check strings
This block checks whether the second string input is in the first
one, and gives the answer as true or false. It is also possible to
check for more than one letter: apple contains app?
SCRATCH
Manipulating data 42 43
LISTS
A list is used to store similar pieces of information,
such as a list of names. In Scratch, a list can be created
from the Variables section of the Blocks Palette. List
positions are used for inserting and deleting items. For
example, the delete 2 of [list name] block can be used
to remove the second item from a list.

Length of the shape’s sides


Numbers clicked is randomly chosen,
when
Operator blocks are a core part between 10 and 100 The angle to turn is set at
of Scratch, and can be used for go to x: 0 y: 0 360 degrees divided by
the number of sides
arithmetic operations, comparisons, erase all
and to pick random numbers.
set length of sides to pick random 10 to 100
Some operator blocks even work
with strings. pick random 3 to 8
set number of sides to
Used for Used for
subtraction to 360 / number of sides
addition set angle to turn
7 + 2 7 – 2 This repeats the
pen down code to draw
number of sides each side
repeat

length of sides steps


7 * 2 7 / 2 move

angle to turn degrees


Computers use Computers use turn
the symbol * for the symbol / for
multiplication division
Moves the sprite Drop the variable
pen up
out of the way block s into hole in
move 150 steps after drawing the Motion block
pick random 1 to 10
Drawing random shapes
Chooses a random number each time the green
The program above draws a random shape
between 1 and 10
clicke d. Start by making the variab les length of sides,
flag is
, and angle to turn. Click the green flag
number of sides
several times to create random art.
Making decisions
Decisions in Scratch can be made using the if-then block or the
if-then-else block. The required Boolean expression is placed
in the diamond-shaped hole. If the expression is true, the blocks
inside the if block’s bracket will run; otherwise, they are ignored.

Make a high score recorder


This script checks whether the if score > high score then
player’s score is more than the high
score. If it is, the high score variable set high score to score
is changed to the player’s score. These blocks
say New high score! for 2 seconds only run if the
variable score
is more than
high score

Using the if-then-else block


The if-then-else block can be used if score > high score then This block only runs
to add instructions that are run when if the variable score
the Boolean expression is false. This set high score to score is less than or equal
extends the example above with a to high score
message if the player’s score is not say New high score! for 2 seconds
more than the high score.
else

say You didn’t beat the high score this time! for 2 seconds

Boolean expressions 15 < 50


Used for making decisions in
programs, a Boolean expression
true
returns a value that is either
“true” or “false”. For example, the
< operator block checks whether 15 > 50
the number on the left is less
than the one on its right.
false

Logic and
decisions
Programs can be made more flexible and useful
if they are coded to make decisions about what to
do next. They can use variables to control which
instruction to run, and when to run them.
SCRATCH
Logic and decisions 44 45
Combining expressions
Boolean expressions can be combined to make decisions
based on more than one factor. Here are some examples
using the current year Sensing block. It has a menu in it
to change the year to other time periods.

Using the and block


The and block has spaces for two Boolean expressions, and it checks
whether both expressions are true. In this example, the program
checks the month and date to give a special Valentine’s Day message.

if current month = 2 and current date = 14 then

say Happy Valentine’s Day! for 2 seconds

Find this block under the Looks


Using the or block section of the Blocks Palette
The or block checks whether either expression is true. In Scratch,
the week starts with day 1 being Sunday. This example checks the
day and displays a message if it is Saturday or Sunday.

if current day of week = 1 or current day of week = 7 then

say Hurrah! It’s the weekend for 2 seconds

Using the not block


The not block can be used to run instructions if if not current month = 12 then
an expression is not true. This example displays
a message if the month is not December. say It’s too early to talk about Christmas for 2 seconds

USING BOOLEANS
Boolean expressions can Using Booleans with loops
be used in other ways as The repeat until block repeats repeat until lives left = 0
well. Clicking on them in one or more instructions until
the Code Area allows users an expression is true. In this case,
the loop will keep going until the
to see their results while player has no lives left.
programming. They can also
be combined with repeat
Waiting using a Boolean
and wait blocks to make a Using a wait until block will pause wait until score = 50
program repeat or pause a script until an expression is true.
until something changes. However, it is often better to use a The program takes no
broadcast (see pp.48–49). action till the score is 50
Input
Sometimes programs need to receive information in order
to deliver a result, or output. Scratch has several ways
of getting input, including through key presses,
by sensing on-screen interactions, and by
asking users to type in information.
User interactions
Users can type information into
the computer, or use the keyboard
Types of input or mouse to provide movement or
There are a lot of different ways in which positioning instructions.
information can be entered into a computer
system for processing. In Scratch, input to a script
External information
is usually in the shape of a rounded block that Scratch can detect the username of the
contains some information, or a pointed block logged-in user, the current date and time,
that contains a Boolean expression (see p.44). and can get translations from Google
Translate using an extension.

Sensor input Information for processing


Some computer systems can sense the outside Sometimes programs are given some
world. In Scratch, it is possible to detect the information to work with. For example,
loudness of sounds and video camera a program might have a list of items to
movements. Sprites can detect each other. add up for a shopping checkout.

Moving under keyboard control If the up arrow is pressed,


In many games and other programs, the user when clicked
the sprite’s y position goes
presses keys on the keyboard to move objects or pen down up by 10
make things happen. Scratch has an Events block
forever
that starts a script when a key is pressed. However,
for smoother movement, a script can use a loop that if key up arrow pressed ? then
continuously checks for key presses. change y by 10

if key down arrow pressed ? then


This block change y by -10
moves the
sprite down

if key left arrow pressed ? then

change x by -10
Movement script
This script illustrates
how to move a sprite if key right arrow pressed ? then
under keyboard control,
using the arrow keys. It change x by 10
uses the pen to draw a
line as it goes, so it can
also be used as a simple
art program.
SCRATCH
Input 46 47
Collision detection
touching mouse-pointer ?
Video games often need to detect when two
objects touch each other, which can require tricky This block can be
calculations. However, Scratch has this capability mouse-pointer found under Sensing
in the Blocks Palette
built in. The touching mouse-pointer block has a
edge
drop-down menu that can be used to detect if a
sprite is touching the mouse-pointer, the edge of Sprite1 The drop-down menu lists
the screen, or another sprite. the available options

Making the Dodge Ball game Add the cat’s code


Here is a simple game to demonstrate collision 2 Add these two scripts to the Cat sprite. The first
detection in Scratch. Start a new project and add script checks whether the ball has hit the cat. If so, it uses
the keyboard control script from the previous page a broadcast (see pp.48–49) to trigger the second script to
to the Cat sprite. show a message.

when clicked Senses whether the ball


Add the Soccer Ball sprite
1 Select the Soccer Ball sprite from the Sprite
is touching the cat
forever
library and add it to the project. Then click on the
sprite in the Sprite List and give it this script:
if touching Soccer ball ? then

broadcast ouch
Adds a random delay
when clicked before moving

forever

wait pick random 1 to 3 seconds Displays a message


when the cat is hit
glide 0.5 seconds to Sprite1
when I receive ouch
Zooms towards say Ouch! for 2 seconds
the player’s sprite

Colliding with colours


Scratch also has the ability to detect whether a sprite touching color ?
is touching a particular colour. This can be used, for
example, to detect when a ball has crossed a goal line
Detects whether a sprite
by making the line a certain colour that does not appear
is touching a colour
anywhere else on the screen.

Checks whether one colour


color is touching ?
is touching another

Text input from users This block stores the


information entered
The ask block can be used to get users to type in
when clicked
information. The question inside the block appears
in the sprite’s speech bubble. Whatever the user ask what’s your name? and wait
types goes into an answer block. This program say Join Hello answer for 2 seconds
greets the user by name.
Sending messages
One of the ways that programs, or parts of a program,
can interact with each other is by sending messages.
Scratch has a dedicated Events block – the broadcast
block – for this purpose. 1. All sprites listen
for any broadcasts
all the time
Understanding broadcasts
Broadcast blocks make it possible to
send a message from a script that can
be seen by all other scripts for all other
sprites in a program. Scripts can be
set to start when they receive the
broadcast message, either for the
same sprite (see p.47), or for different
sprites. The when I receive block is
triggered in response to an incoming
message, while the broadcast block
allows sprites to send messages to
other sprites.

Using broadcasts 2 Send the broadcast


In Scratch, a single broadcast can trigger multiple Click Speaker in the Sprite List and add the following script
to it. Find the broadcast blocks in the Events section of the Blocks
sprites to run their scripts. In the example below, Palette and click the menu to enter a new broadcast message.
when the Speaker sprite is clicked, it starts playing
music and also broadcasts a message. This message
then triggers the other sprites. When the music ends, when this sprite clicked
another message is sent, which makes the Ballerina broadcast music on
The default sound
sprite stop dancing.
effect for the sprite
repeat 3

play sound Drive Around until done

1 Add new sprites


Start a new project and delete the default Cat sprite.
Then choose the Ballerina, Butterfly 2, and Speaker sprites from broadcast music off Sends a message when
the library. Click the Choose a Sprite icon and use the Search the music ends
box in the Sprite library to find them.
Trigger the Butterfly 2 sprite
3 Next, click and drag the Butterfly 2 sprite on the Stage to
move it away from the speaker. Add this script to Butterfly 2. When
it receives the message indicating the music has started, the butterfly
will fly towards the speaker.

Moves the
when I receive music on Butterfly
Ballerina Butterfly 2 Speaker sprite to the
glide 3 secs to Speaker Speaker
SCRATCH
Sending messages 48 49
2. When one sprite sends a
broadcast, it is picked up by
any sprite that may be
listening for that message

3. The sprites can use that


incoming message to start
their own scripts

SENSIBLE MESSAGES
The default name for a broadcast message
in Scratch is message1, but this can be
renamed by the user. To make a program
easier to understand, it is advisable to change
the message to something relevant. The menu
in the broadcast blocks can be used to choose
a new message name.

Trigger the Ballerina sprite


4 Select the Ballerina sprite in the Sprite List and add WHY BROADCAST?
these two scripts. A variable is used to store whether the
Ballerina should be dancing or not. When the music begins, Broadcasts can be used for several purposes
this variable is set to “yes” and the ballerina starts dancing.
The dance moves repeat until the dancing variable is set in Scratch programs. Here are some of the
to “no”. This happens when the Speaker broadcasts the most popular uses of broadcasting:
“music off” message. The outcome is that the ballerina starts
dancing when the music starts, and stops when it ends. • Synchronization: Broadcasts can be
used to trigger several scripts across several
The ballerina sprites to start at the same time, so that they
keeps dancing
when I receive music on can be synchronized as a group.
until this variable
stores “no” • Making other sprites move: Though a
set dancing to yes sprite can only move itself, it can also tell
other sprites when it is time for them to move.
repeat 3 dancing = no
For example, clicking the Speaker sprite also
next costume triggers the other sprites to move.
Adds a pause between
each costume change
• Enforcing a sequence: It is possible to make
wait 0.25 seconds sure scripts run in the right order by using
broadcasts to trigger them. The broadcast
and wait block sends a message, but the script
does not continue until every script that receives
the message is finished.
when I receive music off When the music
stops, the variable
set dancing to no is set to “no”
Using functions
A function is part of a program that performs a particular task and
can be reused. Functions make code easier to read, write, and test.
In Scratch, each block is a function, and users can define new blocks.

How the program flows


When a script is run, Scratch carries out one in the function. When the function ends, Scratch
instruction block at a time, from top to bottom. When picks up the main script where it left off. Functions
the instruction is a function, Scratch remembers its can be used by multiple scripts, and can accept
place in the script, and switches to run the instructions information for processing.

MAIN SCRIPT
RUNS

OTHER SCRIPTS
CAN ALSO USE
THE FUNCTION
AT ANY TIME

SCRIPT
CALLS THE
FUNCTION

THE
FUNCTION
BLOCKS RUN

WHEN THE
FUNCTION ENDS,
THE MAIN SCRIPT
PICKS UP AT ITS
NEXT BLOCK
Random documents with unrelated
content Scribd suggests to you:
III.

Winfrid eli Bonifacius.

Kiittäkäät Herraa, ja saarnatkaat hänen nimeensä,


julistakaat hänen töitänsä kansain seassa! Ps. 105: 1.

Kolkko on Herran viljavainio tuolla Alppien pohjoispuolella, minne


historia, kerrottuaan vanhan maailman perikadosta, luopi silmämme.
Sumut täyttävät ilman, työläs on täällä hengittää, vaikea ihmisjärjen
toivoa tulevaisuutta sille kirkolle, joka täällä yön pimeässä koettaa
virittää ijankaikkisen elämän valoa. Mutta uskon korva kuulee, miten
Herran Henki liikkuu tuon aution maan päällä, se älyää Hänen
kaikkivaltiaan äänensä: "tulkoon valkeus". Viitaten tähän pelastuksen
Jumalan sanaan, johdattaa kirkkohistoria meitä Keski-Euroopan
maihin, kertoaksensa meille, miten pakanuuden pimeys näiltäkin
seuduilta vähitellen poistui kristinuskon tieltä.

Jo ennen (katso I osa) on kerrottu lähetystoimen varhaisimmista


voitoista Keski-Euroopassa. Seitsemännen vuosisadan kuluessa
jatkettiin työtä monessa paikoin väsymättömällä uutteruudella,
vaikka siemen hitaasti iti. Kolumbanuksen työtä Allemannien
keskuudessa nykyisessä Schweitsissä jatkoi suurella menestyksellä
hänen oppilaansa Gallus (k. noin 640). Frankilaiset lähetyssaarnaajat
Emmeran, Ruprecht ja Korbianus julistivat evankeliumia Baijerissa; ja
Friesiläisten keskuudessa, jotka asuivat nykyisessä Belgiassa ja
Alamaissa, työskentelivät frankilaiset Amandus ja Eligius sekä
anglosaksilainen Willibrord. Viimmemainitun määräsi paavi v. 696
Utrechtin arkkipiispaksi. Mutta Saksanmaan varsinainen
lähetyssaarnaaja oli Winfrid eli Bonifacius.

Tämä mies syntyi Englannissa noin v. 682. Jo lapsena heräsi


hänessä halu kerta päästä papiksi. Vanhemmat, jotka olivat ylhäistä
sukua, vastustivat alussa tätä taipumusta, kunnes vihdoin suostuivat.
Winfrid sai kasvatuksensa eräässä englantilaisessa luostarissa, jossa
hän, suurella menestyksellä opintoja harjoitettuaan, jonkun ajan
kuluttua vihittiin papiksi. Luultavasti sai hän jo tähän aikaan nimen
Bonifacius. Paitse kotona saarnaamaan olivat nimenomaan tämän
ajan papit kutsutut pakanoille julistamaan Kristuksen evankeliumia.
Laaja on ala, jonka pakanuus vielä Euroopassa omistaa, työläästi
edistyvät kristinuskon tällä alueella siellä täällä perustamat
uudisasunnot, monen vihollisen uhkaamina ovat ne monessa
paikassa kokonaan kukistua eivätkä voi alaansa laajeutaa: jos
milloinkaan tarvitaan nyt uusia voimia lähetystoimen jatkamiseen. Ja
elon Herra, jolta ei milloinkaan aseita puutu, löytää niitä
asehuoneestaan keski-ajan pimeänä yönäkin. Hänen Henkensä ja
ajan vaatimusten kehottamana lähtee Bonifacius muutamien veljien
seurassa luostarin hiljaisuudesta ulos maailmaan julistamaan
pelastuksen sanomaa niille, jotka vielä "istuvat pimeydessä ja
kuoleman varjon maassa." Me kuulemme hänen jo v. 716 Utrechtin
seuduilla saarnaavan evankeliumia Friesiläisille. Nämä vastustivat
jäykästi kristinuskoa, joka Frankilaisvallan tukemana tahtoi rakentaa
salpoja heidän raa'alle pakanalliselle vapaudelleen. Tällä kertaa ei
Bonifacius sanottavia vaikuttanut Friesiläisten keskuudessa; jo
seuraavana vuonna palasi hän tuntemattomasta syystä Englantiin.
Mutta jo v. 718 alkoi hän varustautua uuteen lähetysmatkaan.
Saadaksensa luotettavaa kannatusta Frankien ruhtinailta, kääntyi
hän paavin puoleen, joka tähän aikaan Longobardien ahdistamana
pyrki ystävyydenliittoon etenkin mainittujen ruhtinasten kanssa.
Aikansa lapsena kaipasi Bonifacius sitä paitse uskonnollisistakin
syistä paavin siunausta, vaikkei hän suinkaan ollut altis omistamaan
hänelle jumalallista kunnioitusta. Paavikunnan mahtavuuden aika,
jolloin kaikki hengelliset nöyrinä polvistuvat "Pietarin jälkeisen"
valtaistuimen juuressa, on vielä kaukana, mutta sen enteitä
huomaamme jo tähän aikaan etäälläkin Roomasta. Oleskeltuaan
lähes vuoden ajan Roomassa ja neuvoteltuaan silloisen paavin
Gregorius II:sen kanssa aivoitusta lähetystoimestaan, lähti
Bonifacius, varustettuna tämän antamalla valtakirjalla, jossa häntä
nimitetään "jumalallisen sanan jakamisen auttajaksi", Friesiläisten
maalle keväällä v. 719. Työskenneltyään täällä kolme vuotta, siirtyi
hän Hessiin. Jo tällä matkalla kastoi hän kristinuskoon monta tuhatta
pakanaa.

Lukemattomia vaaroja ja kaikenlaisia vaikeuksia täytyi


Bonifaciuksen kokea vaikeassa työssään. Kannatus Frankien puolelta
oli monesti hyvinkin epäluotettava, pyrkien sitä paitse tuon tuostakin
tekemään lähetystointa riippuvaksi kaikenlaisista maallisista
tuumista. Bonifacius olisi tahtonut vapaasti, oman vakuutuksensa
mukaan toimia kristinuskon eduksi Saksanmaalla, hän pyrki
järjestämään sikäläisen kirkon olot omien periaatteittensa mukaan.
Tässä tarkoituksessa kääntyi hän täällä löytyvien pappien puoleen,
koettaen saada saksalaista lähetystointa mukaantumaan
johdonmukaisen, järjestetyn suunnitelman mukaan. Hänen silmänsä
näki kauas, vaikka yölliset sumut peittivät maan, hänen
tulevaisuuteen tähtäävä valtaava henkensä tarkoitti toisiinsa liittää,
kokonaisuudeksi rakentaa alkavan saksalaisen kirkon hajalla olevat,
monenkaltaiset ainekset. Juuri tässä järjestämistyössä onkin hän
saavuttanut suurimman maineensa, sillä yhtä vaikeaa kuin tärkeää
oli tämä työ, ja suuria on Bonifacius tässä suhteessa toimittanut,
vaikka hänen työnsä hedelmät vasta myöhempinä aikoina selvään
näkyvät. Etsien puolustusta tämän maailman mahtavia ruhtinaita
sekä kehnoja pappeja vastaan, kääntyi Bonifacius uudelleen paavin
puoleen. Hän saapui Roomaan v. 723. Vakuutettuna miehen kyvystä
ja hänen uskollisuudestaan kirkkoa kohtaan, vihki Gregorius hänen
piispaksi määräämättä häntä kumminkaan mihinkään erityiseen
hiippakuntaan, antoi hänelle suosituskirjeen Frankilaisten hoviin, jota
vaadittiin puolustamaan hänen piispallista arvoansa kaikkia
vastustajia vastaan. Samankaltaisia kirjeitä kirjoitti paavi myöskin
valtakunnan papeille sekä mahtavimmille maallikoille. Kaikissa näissä
kirjeissä ilmaisee Gregorius mitä selvimmällä tavalla, minne
paavikunta pyrkii. Hän ei ainoastaan puolla Bonifaciusta, hän käskee,
vaatii, uhkaa. Varustettuna näillä puoltokirjeillä, katolisen kirkon
kanonisella lakikirjalla sekä pyhänjäännöksillä, joita paavi oli hänelle
lahjoittanut, palasi Bonifacius työnalallensa. Sitä ennen oli hän
Pietarin haudalla vannonut paaville sen valan, jolla kaikki Rooman
patriarkka-hiippakuntaan kuuluvat piispat sitoutuivat pysymään tälle
kirkolle uskollisina. Se kuului: "minä lupaan sinulle, pyhä Pietari,
ensimmäinen apostoleista, ja sinun sijaisellesi paavi Gregoriukselle ja
hänen seuraajillensa, että minä pysyväisesti tunnustan katolisen
kirkon yksyyttä, en millään tavoin suostu mihinkään, joka vastustaa
samaa katolisen kirkon yksyyttä, vaan aina käytän voimani sinun
kirkkosi hyödyksi, jolle Jumala on antanut voiman sitoa ja päästää,
sekä sinun sijaisesi hyväksi. Ja jos kirkkokuntain johtajien järjestys
on vastoin isien järjestystä, niin en tahdo pitää mitään yhteyttä
semmoisten kanssa, vaan sitä estää, jos estää voin, taikka muussa
tapauksessa asian uskollisesti kertoa paaville".

Frankilaisten silloiselta hallitsijalta Kaarle Martelilta, jolle hän antoi


Gregoriuksen kirjeen, sai Bonifacius suojeluskirjeen lähetystointansa
varten. Itse hän eräässä kirjeessä tunnustaa, ettei hän ilman tätä
frankilaisruhtinaan suojelusta olisi saanut mitään aikaan. Sen
tukemana esiintyi hän Hessiläisten keskuudessa. Heidän maassaan
löytyi ikivanha, ukkosen jumalalle pyhitetty tammi, jota sanottiin
vahingoittumattomaksi. Taikauskoinen kansa luuli jumalien vihan heti
saavuttavan sen, joka uskaltaisi väkivaltaisesti koskea tuohon
pyhään puuhun. Bonifacius lähestyi paikkaa suuren väkijoukon häntä
seuratessa. Hän tarttui kirveesen hakataksensa kuuluisaa tammea
poikki. Hämmästyneenä katseli kansa, miten iskut tähtäsivät yhä
syvempään puun ytimeen, odottaen jumalain kostoa tuolle rohkealle
piispalle, vaan kun tämä vahingoittumatta jatkoi työtään, kunnes
tammi alkoi kallistua ja vihdoin romahti maahan, tunnustivat kaikki
saapuvilla olevat jumaliensa mitättömyyden ja antoivat kastaa
itsensä kristinuskoon.

Tämän jälkeen kääntyi Bonifacius Thüringiin, joka maa jo nimeksi


oli kristitty. Kun puuttui kelvollisia pappeja, tuotti hän semmoisia
Englannista, missä hänen nimensä oli saavuttanut erinomaisen
maineen. Innostuksella liittyi moni hänen kansalaisistaan hänen
lähetystyöhönsä. Mainitaanpa muutamia naisiakin, niinkuin pyhä
Tekla ja Walborg. Näiden hoidettaviksi uskoi Bonifacius omat
luostarit.

Sillä välin oli Gregorius II kuollut (731). Hänen seuraajansa


Gregorius III, joka iloiten ihmetteli Bonifaciuksen uskollista ja suurta
työtä, vahvisti hänelle ennen annetut valtakirjat, nimitti hänen
arkkipiispaksi ja paavin sijaiseksi itäfrankilaisen Saksan kristittyihin
seurakuntiin, määräämättä kumminkaan hänelle vakinaista
asuinpaikkaa, sekä lähetti hänelle palliumin [Arkkipiispan viitta.]
(732). Nyt lähti Bonifacius Baijeriin. Sikäläinen katolinen kirkko oli
päässyt verraten suureen kukoistukseen, vaan kaipasi järjestystä ja
yhdyshenkeä. Epäilemättä herätti Bonifaciuksen esiintyminen ja
hänen tuumansa tässä maassa vastarintaa, koska me vähän tämän
jälkeen jälleen tapaamme hänen Roomassa (738). Paavi antoi
hänelle puoltokirjeen, jossa Baijerin ja Allemannien piispoja
kehotettiin Bonifaciuksen johdolla kokoontumaan
kirkolliskokoukseen. Mutta kun sikäläiset piispat ja luostarit, jotka
olivat harjaantuneet oman kansallistapansa mukaan hoitamaan
kirkkoa, eivät taipuneet noudattamaan Roomasta tulleita käskyjä,
kääntyi Bonifacius Baijerin herttuan puoleen, jonka avulla hänen
onnistui niin masentaa vastarinta, että täällä perustettiin neljä uutta
hiippakuntaa. Semmoisia syntyi väsymättömän arkkipiispan toimesta
myöskin Thüringissä ja Hessissä. Saatuansa nämä valmistavat työt
toimeen, alkoi hän uudelleen tuumia kirkolliskokousta. Monien
vastuksien perästä onnistui Bonifaciuksen vihdoin saada Saksanmaan
ensimmäinen kirkolliskokous koolle. Se pidettiin v. 742, tietämätöntä
missä. Siinä tehtiin monta varsin tärkeätä, jumalanpalvelusta,
kirkkokuria ja siveyttä koskevaa päätöstä.

Huomattava on myös Bonifaciuksen suuri merkitys


munkkilaitoksen historiassa. Hänen toimestaan perustettiin monta
luostaria, jotka ennen pitkää saavuttivat suuren maineen. Kuuluisin
niistä oli Fuldan luostari, jonka ensimmäisenä ahbotina oli
Bonifaciuksen oppilas Lullus. Se perustettiin v. 744 ja pyhitettiin
hiljaiselle miettimiselle ja lihan kidutukselle. Vasta myöhemmin
alkoivat sikäläiset munkit opintoja harjoittaa.
Väsymättömästä, monesti hyvin vaivaloisesta työstä riutuneina
alkoivat Bonifaciuksen voimat uupua. Kummastelisimmeko, että iän
vihdoin halasi vakituista asuinpaikkaa, missä rauhassa voisi viettää
levottoman elämänpäivänsä illan. Tämä toivo täytettiin, kun
Bonifacius v. 745 määrättiin Mainzin piispaksi. Hänen
arkkipiispakuntaansa kuului 14 hiippakuntaa, joita hän
väsymättömällä innolla ja uutteruudella hoiti. Mutta nuoruuden
muistot heräsivät vastustamattomalla voimalla vanhuksen
sydämmessä, muistuttaen häntä tuosta hänen suuresta
lähetystoimestaan pakanamaissa, joka niin monessa paikassa oli
jäänyt aivan puolitekoiseksi. Etenkin muisteli hän usein Friesiläisiä,
joiden maassa pakanuuden valta vielä oli murtumaton. Nämä
ajatukset eivät myöntäneet hänelle sitä lepoa, johon hänen ikänsä ja
asemansa kehottivat. Tuon harmajapäisen vanhuksen silmissä
välkkyi jälleen lähetyssaarnaajan innostus yhtä kirkkaana, kuin
nuoruuden päivinä, eikä aikaakaan, niin näemme hänen vaeltavan
Friesiläisten luo. — Oli Kesäkuun 5 p. 755. Bonifacius puhutteli ja
neuvoi muutamia vasta kastettuja Friisiläisiä, kun yhtäkkiä joukko
pakanoita hyökkäsi esille piilopaikastaan aseet kädessä. Piispan
seura, johon kuului 52 miestä, varustautui vastarintaan, vaan
tyyneenä lausui tämä: "luopukaat taistelusta, olkaat väkevät
Herrassa, väkevät hengessä; älkäät peljätkö niitä, jotka ruumiin
tappavat, turvatkaat Jumalaan. Jo kauan olen odottanut tätä
hetkeä". Kuolemanhetken kauhut eivät vanhukselta himmentäneet
ijankaikkisen elämän autuaallista toivoa! Raivosat pakanat poistuivat
vasta kun lähetystoimen kaikki miehet olivat, saaneet surmansa.
Bonifaciuksen ruumis, joka tavattiin pää nojautuneena
evankeliumikirjaan — ainoa ase, jolla hän oli itseään suojellut! —
haudattiin hänen monesti ennen lausumansa toivon mukaan Fuldan
luostariin.
Näin päätti päivänsä saksalaisen lähetystoimen suurin mies, itä-
euroopalaisen kirkon ensimmäinen varsinainen pylväs. Moni on
häntä moittinut siitä, että hän kiinnitti saksalaisen kirkon
paavikuntaan, jonka kasvavaa, sittemmin niin rasittavaa valtaa hän
tällä tavoin suuresti kartutti. Mutta pintapuolinen on tämä arvostelu.
Jo ennenkuin Bonifacius esiintyy näyttämöllä on kirkon kehitys
suistunut tälle uralle, jota paitse häntä puoltaa semminkin se seikka,
että paavikunta oli ainoa ulkomuoto, johon keski-ajan kirkko voi
pukeutua säilyäksensä ajan myrskyissä. Että tämä paavikunta
ylpeytensä ja maailmallisen mielensä pettämänä aikojen kuluessa
kävi yhä enemmän vieraaksi Jesuksen Kristuksen Hengelle, joka on
nöyryyden, itsensä- ja maailmankieltämisen Henki, se ei ole niiden
syy, jotka rakkaudesta Herraan ja Hänen kirkkoonsa olivat alttiit
uhraamaan kaikki kirkon eduksi. Siinäkin, missä ajanhenki saastuttaa
tätä heidän rakkauttaan, tulee meidän heitä arvostellessa muistaa,
että Jumala katsoo sydämmen aivoitukseen ja tuomitsee sen
mukaan. Keski-ajankin turmeltuneista oloista, sen maailman
rasittamasta, usein kokonaan eksyneestä parannustyöstä kuuluu
kuitenkin huokaus "lähestyköön sinun valtakuntas". Se nousee tämä
huokaus ijankaikkisen armahtajan puoleen kaikkien niiden
sydämmestä, joiden silmämääränä Hänen kunniansa on. He ovat
suola, joka estää kirkon mätänemistä, kunnes heidän huokauksensa,
joka vuosisatojen vieriessä käy yhä enemmän itsetietoiseksi,
synnyttää uskonpuhdistuksen suuren työn. Siihen se tähtää, sitä se
valmistaa. Joka muuten luulee esim. Bonifaciuksen ehdottomasti
hyväksyneen paavikuntaa, jommoisena tämä hänen aikanaan
esiintyi, hän suuresti erehtyy. Uskonpuhdistusta tarkoitti tavallaan
hänkin, vaikkei tietysti sanan tavallisimmassa merkityksessä. Niinpä
kirjoittaa hän eräässä kirjeessä paaville: "taitamattomat Saksalaiset,
Baijerilaiset ja Frankilaiset arvelevat, jos he joskus Roomassa
sattumalta näkevät semmoista pahaa [Tarkoittaa lähinnä sitä
pakanallista ja epäsiveellistä tapaa, jolla erästä juhlaa Roomassa
vietettiin. Bonifacius nuhtelee paavia, kun ei tämä estänyt näitä
moitittavia menoja.], että papit sitä sallivat; he silloin meitä moittivat
ja itse pahentuvat, niin että meidän saarnamme ja meidän
opetuksemme tulee estetyksi". Toisessa kirjeessä, jossa hän puhuu,
miten vastahakoiset neustrialaiset piispat ovat kutsutut Roomasta
vastaanottamaan palliuminsa, moittii hän peittelemättä paavia hänen
papeilta kiskomistaan suurista rahasummista. Ei ole paavi hänen
silmissään erehtymätön, hän on vain kirkollisen järjestyksen korkein,
Jumalan säätämä valvoja.

Uskonpuhdistuksen suurta aatetta valmisti Bonifacius siinäkin, että


hän, mikäli hänen oli mahdollista, koetti edistää kansan sivistystä.
Jokaiselta papilta vaati hän ainakin niin paljon saksankielen taitoa,
että hän tällä kielellä osasi lukea synnintunnustuksen, toimittaa
kasteen sekä rukoilla "Isä meidän." Itse Bonifacius hyvin osasi niiden
kansojen kieltä, joiden keskuudessa hän lähetyssaarnaajana
työskenteli.

Bonifaciuksen luonnetta ja uskonnollista kantaa kuvaavat paraiten


hänen kirjeensä ja saarnansa. Rakkauden suuresta käskystä,
Jumalan armosta Jesuksessa Kristuksessa niissä puhutaan, vaan ei
milloinkaan pyhimysten eikä paavin avuksihuutamisesta. Lainaamme
tähän otteen eräästä hänen saarnastaan. Se on alkuansa kirjoitettu
saksaksi, sittemmin käännetty latinaksi. Se pidettiin kääntyneille
Friesiläisille.

"Taivaan autuuden on Herra luvannut niille, jotka pitävät Hänen


käskynsä; ensin puhuu Hän nöyryydestä: autuaat ovat hengellisesti
vaivaiset. Älkäämme pitäkö niitä autuaina, jotka pakosta ovat köyhiä,
vaan ne ovat totisesti autuaat, jotka hengellisesti nöyrtyvät, vaikka
he omistavat paljon maallisia tavaroita, eivätkä anna näiden tavarain
vietellä itseään ylpeyteen, vaan nöyryydessä ylistävät Jumalaa, Sillä
nöyryys on kaiken maallisenkin hyvän perustus. Ylpeytensä ja
tottelemattomuutensa kautta menetti ihminen taivaan valtakunnan,
sentähden tulee meidän voittaa se nöyryydellä ja tottelevaisuudella.
Autuaat ovat ne, jotka isoovat ja janoovat vanhurskautta —
isokaamme niin, ett'emme milloinkaan luulottele itseämme, että
olemme täydellisesti vanhurskaat, vaan rukoilkaamme alituisesti
Jumalaa lisäämään avujamme. Sillä se, joka luulee itsellään olevan
kylliksi vanhurskautta, hän ei isoo vanhurskautta, vaan kopeilee
ylpeästi ja on väleen lankeava. Mutta nöyrä on kehittyvä hyveestä
toiseen".
IV.

Kaarle Suuren aikakausi.

— Ei minun valtakuntani ole tästä maailmasta. Joh. 18: 36.

Keski-ajan kansoista vetävät etenkin Frankilaiset kirkkohistorian


huomion puoleensa. Mutta surkea on heidän historiansa alku.
Sisällinen eripuraisuus, alituiset ryöstö- ja valloitus-retket, mitä
julmimmat ja kavalimmat salavehkeet ja murhat, joihin semminkin
naiset tehokkaasti ottivat osaa, tahrasivat johtavien henkilöiden
maineen; raakuus ja kerrassaan pakanallinen mieli vallitsi
alamaisissa. Työläs on kristinuskon juurtua tässä kansassa!
Valtakunnan mahtavat anastavat itselleen kaiken vallan. Merovingien
suvun kelvottomat kuninkaat hallitsevat ainoastaan nimeksi. Etenkin
kohosivat mahtaviksi n.s. majores domi s.o. kuninkaan hovimestarit,
joiden käsissä hallitusohjat olivat. Yksi näitä oli ennen mainittu
Kaarle Martel. Hän löi Arapialaiset, jotka, tultuaan Gibraltarin salmen
ylitse, v. 711 olivat valloittaneet Espanjan ja nyt uhkasivat läntistäkin
kristikuntaa perikadolla, seitsemän päivää kestäneessä kuuluisassa
Poitiersin tappelussa (752) ja pakotti heidät peräytymään. Kaarlen
kuoleman jälkeen (741) jakoivat hänen poikansa Karlman ja Pipin
hovimestarin viran keskenänsä. Edellinen luopui kuitenkin
"rakkaudesta Jumalaan ja taivaallisen isänmaan ikävästä" ennen
pitkää maailmasta ja sulkeutui Monte-Kassinon luostariin, missä
oleskeli elämänsä loppuun asti. Tällä tavoin peri Pipin, historiassa
tunnettu liikanimellä "Pieni", yksin isänsä viran. Kuninkaana, vaan
ainoastaan nimeksi, oli Kilderik III. Frankilaiset, jotka olivat väsyneet
varjokuninkaisinsa, valitsivat Pipinin kuninkaaksi, ja valtakunnan
piispat vihkivät ja voitelivat hänen vanhan testamentin tavan mukaan
(752). Jo sitä ennen oli paavi Sakarias, jonka puoleen Pipin oli
kääntynyt saadaksensa papistoa hyväksymään aiottua
vallankumousta, vakuuttanut siihen suostuvansa. Paavia ahdistivat
nimittäin Longobardilaiset, joita vastaan heikko itäinen keisarikunta
ei voinut mitään, ja hän etsi maallista puolustusta heitä vastaan.
Hänen jälkeisensä Stefanus II lähti Franskanmaalle ja voiteli itse p.
Denysin tuomiokirkossa Pipinin "kuninkaaksi Jumalan armosta"
(754). Juuri tähän aikaan alkoi Longobardilaisten valta käydä paaville
yhä vaarallisemmaksi. Heidän sotaisa, saaliinhimoinen kuninkaansa
Aistulf esiintyi suurella sotajoukolla Roomaan edustalla, uhaten
pyhää kaupunkia perikadolla. Hädässään kirjoitti Stefanus Pietarin
nimessä Pipinille: "Minä, apostoli Pietari, rukoilen Teitä, Pipin, Kaarle
ja Karlman [Pipinin pojat.], kristillisimmät kuninkaat, sekä koko
Franskan kansaa; Jumalan neitsyellisen äidin ja koko taivaallisen
joukon nimessä rukoilen Teitä: pelastakaat kallis Rooman kaupunki!
Jos kiirehditte, lupaan teille paraimmat ja loistavimmat asuinsijat
taivaassa sekä paratiisin ilon. Älkäät erotko Rooman kansasta, jotta
ei Teitä erotettaisi Jumalan valtakunnasta ja ijankaikkisesta
elämästä. Enemmän kuin muita kansoja rakastan minä Frankilaisia.
Kuulkaat, tulkaat, joutukaat, niin Herra Kristus minun rukoukseni
tähden suo Teille pitkän ijän, voiton ja ijankaikkisen autuuden
pyhimysten ja enkelein luona." Kun ei Pipin näistä rukouksista
taipunut, lähti Stefanus häntä tapaamaan. Sydäntalvella 755 kulki
hän p. Bernhardin ylitse. Valtakunnan rajalla tulivat häntä
vastaanottamaan muutamat ylimykset. Pipinkin saapui paavia
vastaan, astui alas ratsunsa selästä ja seurasi vähän matkaa Jalkasin
ratsastavaa vierastansa. Erään toisen kertomuksen mukaan esiintyi
paavi seuransa kera katumuspukuun puettuna seuraavana päivänä
kuninkaan hovissa, heittäytyi hänen jalkainsa juureen, rukoillen
Jumalan nimessä apua kirkon vihollisia vastaan. Tässä asemassa
odotti hän, kunnes Pipin tarttui hänen käteensä, vaatien häntä
nousemaan ylös. Oli miten olikaan: Frankilaisten kuningas johti
sotajoukkonsa Pohjois-Italiaan, löi Aistulfin kahdessa tappelussa ja
pakotti hänen luopumaan Longobardilaisten valloittamista alueista
(755). N.s. eksarkatin sekä Rooman kaupungin lahjoitti Pipin
paaville, mutta Itä-Rooman keisari oli kuitenkin vielä nimeksi
kysymyksessä olevan alueen korkein suojelusherra. Tämä Itä-
Rooman varjovalta katosi kuitenkin ennen pitkää nimeksikin.

Haikein sydämmin on kirkkohistoria lehdillensä piirtänyt


kertomuksen näistä tapahtumista. Maalliseen mahtavuuteen pyrkii
paavikunta, salaten itseltänsä ja kristikunnalta kirkon Herran sanat:
"minun valtakuntani ei ole tästä maailmasta." Surkea on kuulla,
miten paavit, saadaksensa maallista valtaansa lisätyksi pienellä
maanliuskalla, liehakoiden kohtelevat tämän maailman mahtavia
unohtaen kokonaan Hänen, jolta ainoalta heidän tulisi armoa kerjätä.
Ja kuitenkin sanovat he itseään Pietarin jälkeisiksi, vieläpä Jesukeen
Kristuksen sijaisiksi maan päällä. Ken uskaltaa ajatella sitä tuomioa,
jonka he tämän kautta vetivät päällensä?

Pipin pieni kuoli v. 768. Häntä seurasi valtaistuimella hänen


poikansa Kaarle Suuri (k. 814), joka, veljensä Karlmanin eräässä
sodassa kaaduttua (771), korotettiin Frankilaisten yksinvaltiaaksi
kuninkaaksi. Jos kukaan, on Kaarle ansainnut nimen "Suuri", jonka
historia on hänelle antanut. Ihmeteltävän syvään loi hän tarkan
silmänsä aikansa tarpeisin; tavattomalla voimallaan ja nerollaan sai
hän epäjärjestyksen ja sekasorron riehuvat aallot niihin määrin
asettumaan, että läänityslaitos, tuo keski-ajan ainoa mahdollinen
yhteiskunnallinen järjestys, pääsi juurtumaan Itä-Euroopassa;
taitavalla kädellä ja tuolla jalolla uskalluksella, josta suuret henkilöt
tunnetaan, kynti hän raakaan maahan syviä vakoja henkiselle
viljelykselle, kylväen niihin rakkaudella ja valistuneella mielellä
sivistyksen siemeniä. Kirkkaana valotornina, jota kuohuvat aallot
turhaan koettavat kukistaa, kohoaa Kaarle aikansa myrskyisästä,
sumujen peittämästä merestä niin valtaavan suurena, ettei hänen
vertaistansa hallitsijaa monesti ole löytynyt. Tarkoituksemme ei voi
olla koettaa kokonaisuudessaan kuvata tämän merkillisen miehen
suurta elämäntyötä; tahdomme ainoastaan viitata Kaarle Suuren
merkitykseen kirkkohistoriallisena henkilönä.

Frankilaisten koillisena naapurina oli Saksilaisten jo


kansainvaelluksen ajoilta kuuluisa liitto, johon kuului monta Weserin
ja Elben varrella asuvaa kansaa. Täällä vallitsi synkkä yö,
pakanuuden ja pimeyden valta. Vapaina pakanoina olivat Saksilaiset
tietysti frankilais-kristittyjen olojen mitä katkerimpia vihollisia.
Turhaan olivat heikot Merovingit, turhaan heidän hoviherransa
koettaneet kuuliaisuuteen taivuttaa tätä vihollista, joka yöllisellä
vallallaan uhkasi heidän valtakuntaansa ja sen alkavaa, vielä
kerrassaan voimatonta sivistystä. Tähän vaaraan loi Kaarle Suuri
silmänsä. V. 772 johti hän sotajoukkonsa Saksilaisia vastaan, valloitti
heidän vankan, vapaan pakanuuden rajalla olevan linnansa
Erseburgin ja pakotti heidät rauhaan, jonka mukaan frankilaisten
lähetyssaarnaajain vapaasti piti saaman julistaa evankeliumia heidän
maassaan. Että Kaarle ryhtyi tähän sotaan valtiollisista syistä on
silminnähtävä, mutta vaatipa häntä siihen myöskin hänen palava
uskonnollinen innostuksensa. Tämä hänen luonteensa vaikutin on
nim. hyvin tärkeä, se määrää miltei kaikkien hänen tuumiensa ja
tekojensa suunnan ja laadun. Kristitty raamatun mielen mukaan hän
ei ollut, sillä maallisiin kiinnitetty, pakanallisen ajatustavan
varjostama ja sanan syvimmässä merkityksessä murtumaton oli
silminnähtävästi hänen sydämmensä. Tähän arvosteluun ottamatta
emme kuitenkaan saa jättää sitä tarkkaan huomattavaa seikkaa, että
Kaarle eli ja vaikutti aikana, jolloin kristikunta maailman liittolaisena
oli eksynyt kauas, kauas ijankaikkisen elämän viittaamalta tieltä.
Jokainen henkilö on arvosteltava oman aikansa vaatimusten mukaan.
Himmeänä loisti keski-ajan ensimmäisinä vuosisatoina kristinuskon
valo maailmassa, siihen kun liittyi niin paljo valevaloa maailman
suurelta näyttämöltä. Kirkon päätehtävänä oli saarnata evankeliumia
kaikille kansoille. Se avasi ovensa pakanamaailmalle, ja pimeys loi
synkät varjonsa sen kaikkeinpyhimpään, kun eivät vartijat valvoneet
Siionin muureilla. Jos milloinkaan, niin oli silloin vaikea tarkkaan
erottaa Jumalan valtakunnan ja maailman välistä rajaa. Alkava
sivistystyö, järjestykseen pyrkivät valtiolliset ja yhteiskunnalliset olot,
paavikunta, joka levittää valevaloansa Euroopan itsetietoisuuteen
heräjäviin kansoihin — kaikki sulaa yhteen, vaatien itselleen kristityn
nimen, joka sen erottaa tuosta raa'asta, kaikelle henkiselle viljelylle
kokonaan vieraasta pakanamaailmasta. Heikkona, pimitettynä
turvautuu näiden vuosisatojen kristillisyys maailmaan, jonka kanssa
se voi ystävyydessä olla, se kun ei pysty sille totuuden puhdasta
sanaa julistamaan, mutta pelastuksen Jumala varjelee sitä kuitenkin
nytkin perikatoon joutumasta. Hän valvoo, kun muut vartijat
nukkuvat, valmistaen kaikkivaltiaalla voimallaan vähitellen sitä aikaa,
jolloin Hänen valtakuntansa maan päällä alkaa tuntea orjuutensa
kahleiden raskaan painon ja Jumalan puhtaan sanan valaisemana
särkee ne Hengen miekalla.

Kaarle Suuri ei saanut keskeymättömästi jatkaa valloitus- ja


käännyttämistyötään Saksilaisten maassa, sillä hänen läsnäoloansa
kaivattiin pian muualla. Longobardilasten kuningas Desiderius alkoi
nim. jatkaa edeltäjäinsä hankkeita paavia vastaan. Tähän kehotti
häntä sekin seikka, että Kaarle Suuri, paavikunnan suosija, oli
luopunut avioliitostaan hänen tyttärensä kanssa. Kaarle marssi
sotajoukkoineen Alppien ylitse, valloitti Longobardilaisten
pääkaupungin ja teki koko heidän valtakunnastaan, jonka hän laski
valtikkansa alle, lopun (774). Pääsiäisjuhlan vietti hän Roomassa,
jossa uudisti liiton paavi Hadrianus I:sen kanssa ja vahvisti isänsä
kirkolle antamat lahjoitukset, vieläpä lisäsikin niitä.

Maallisen vallan ja kirkon solmima liitto käy vuosi vuodelta yhä


likeisemmäksi. Tähän viittaavat muun ohessa useat taideteokset,
jotka juuri näinä aikoina syntyivät Roomassa. Niin kuvaa esim. eräs
maalaus Pietaria, jonka istuimen juuressa paavi ja Kaarle Suuri
polvistuvat; edelliselle antaa apostoli paavinpuvun hänen arvonsa
merkiksi, viimmemainitulle lipun, joka kuvaa kristillisen maallisen
vallan voimaa.

Hadrianus I kuoli v. 795, ja Pietarin istuimelle korotettiin Leo III.


Heti ilmoitti tämä Kaarlelle edeltäjänsä kuolemasta ja omasta
paaviksi valitsemisestaan. Myöskin kehotti hän kuningasta vaatimaan
Roomalaisilta uskollisuudenvalaa. Kaarle lähetti muutamia ylimyksiä
Roomaan, jotka ottivat kansalta valan sekä järjestelivät kirkon ja
frankilaisvallan välistä liittoa. Monessa suhteessa merkillinen on se
Kaarle Suuren paaville kirjoittama kirje, jonka nämä lähettiläät toivat
muassaan Roomaan. Siinä tapaamme muiden kera nämäkin sanat:
"meidän tehtävämme on jumalallisen rakkauden avulla miekalla
puolustaa Kristuksen pyhää kirkkoa pakanoiden hyökkäyksiltä ja
uskottomain hävityksiltä sekä suojella sitä katolisen uskon
ylläpitämisellä. Teidän, pyhä isä, tulee kädet korotettuina Jumalan
puoleen Mooseksen tavoin kannattaa yrityksiämme, jotta kristityt
kansat Teidän välityksenne kautta Jumalan johtamina ja suojelemina
kaikkialla ja aina saavuttaisivat voiton, ja Herramme Jesuksen nimi
tulisi kirkastetuksi koko maailmassa." Ihmeellistä kristillistä aistia,
suurta uskonnollista harrastusta, jaloa valtioviisautta, mutta
ajanhengen tahraamaa, Jumalan valtakunnan salaisuuksille
vieraantunutta puolitotuutta ilmaisevat nämä sanat.

Ei aikaakaan, ennenkuin Kaarle Suuri oli tilaisuudessa maailmalle


osottamaan, että hän oli solminut ystävyyden liiton paavin kanssa.
Eräs Hadrianuksen sukulainen Paskalis, joka oli nauttinut tämän mitä
suurinta suosiota, ryhtyi kapinallisiin hankkeisin ja murhayrityksiin
Leo III:tta vastaan, kun hänen ei onnistunut säilyttää entistä
asemaansa paavillisessa hallituksessa. Vietettiin p. Markuksen juhlaa
Huhtikuun 25 p. v. 799. Paavi ratsasti juhlasaatossa Rooman kadulla,
kun yhtäkkiä kapinoitsijat hyökkäsivät häntä vastaan, tempasivat
hänen alas hevosen selästä, riistivät vaatteet hänen yltään ja jättivät
hänen rääkkäyksistä puolikuolleena kadulle. Ei ainoakaan ihminen
korottanut kättänsä puolustaaksensa onnetonta. Hetken kuluttua
veivät jumalattomat rauhanhäiritsijät paavin erääsen luostariin,
missä he luultavasti aikoivat hänen surmata. Muutamien ystävien
avulla onnistui Leon kuitenkin paeta. Hän lähti heti Kaarlelle
valittamaan sitä väkivaltaa ja ääretöntä solvausta, jonka alaisena hän
oli ollut. Kuningas, jonka sotajoukot juuri näinä vuosina taistelivat
tuon tuostakin kapinoitsevia Saksilaisia vastaan, lupasi seuraavana
vuonna saapua Roomaan. Leo oleskeli Frankilaisten turvissa syksyyn
saakka. Sillävälin hallitsivat kapinalliset vallananastajat Roomassa,
kirjoittaen Kaarlelle kirjeitä, joissa maanpakolaisuudessa olevaa
paavia syytettiin jos minkälaisista rikoksista. Sitä kummallisempaa,
että Leon palajaminen kotia muodostui täydelliseksi voittoretkeksi.
Hän otettiin vastaan rajattomalla kunnioituksella ja riemulla.

Uteliaina ja levottomina odottivat Roomalaiset Kaarle Suuren tuloa.


Hän saapui Roomaan syksyllä v. 800. Joulukuun 1 päiväksi kutsui
hän papiston, aateliston ja porvarit suureen kokoukseen p. Pietarin
kirkkoon, missä syytökset paavia vastaan olivat tutkittavat. Puettuna
roomalaiseen aatelispukuun esiintyi Kaarle määrättynä päivänä
kirkossa ja piti puheen äänettömälle väkijoukolle. Hän sanoi
tulleensa asettamaan kirkon häirittyä rauhaa, rankaisemaan sen
päämiestä kohtaan tehtyjä rikoksia sekä ratkaisemaan Roomalaisten
ja paavin välistä riitaa. Viimmemainitun kysymyksen johdosta
lausuivat saapuvilla olevat piispat yksimielisesti: "emme uskalla olla
osallisina apostolisen istuimen tuomitsemisessa, sillä se on kaikkien
kirkkojen pää; se ja sen sijainen tuomitsee kaikkia, vaan sitä ei
kukaan tuomitse." Paavin syyttäjät eivät voineet mitään todistaa, ja
vapaaehtoisesti tarjoutui Leo lisäksi valallakin vakuuttamaan
viattomuutensa. Rauhanhäiritsijöitä kohtaan noudatti Kaarle
valtiollisista syistä suurta lempeyttä.

Joulunpäivänä nähtiin samassa kirkossa vielä juhlallisempi


toimitus. Kun Kaarle jamalanpalveluksen päätyttyä hetken oli
polvistunut Pietarin kuvapatsaan edessä, lähestyi häntä paavi
kultainen kruunu kädessä ja laski sen kuninkaan pään päälle.
Riemastuneena huusi kansa, niinkuin muinoisille Rooman keisareille:
"Kaarlelle, hurskaimmalle Augustukselle, Jumalan kruunaamalle
suurelle, rauhaa suojelevalle roomalaiselle keisarille, ikää ja voittoa!"
Nyt voiteli Leo Kaarlen Länsi-Rooman keisariksi, antoi hänelle
kuuluisain keisarein puvun sekä suuteli häntä vanhan tavan mukaan.
Tyhjää seremoniaako, roomalaisen ylpeyden hetkistä tyydyttämistäkö
tämä vain oli ilman minkäänlaisia historiallisia seurauksia? Asiaa oli
tuumittu ja valmistettu jo silloinkuin Leo III kävi Kaarlen luona, ja
valtakunnan suuret samoinkuin Rooman ylhäiset tiesivät siitä
silminnähtävästi jo ennenkuin itse tuo juhlallinen toimitus täytti koko
Rooman riemulla. Mutta varma on, ettei yksikään siihen aikaan vielä
käsittänyt tämän kruunauksen suurta merkitystä kristikunnan
myöhemmille vaiheille, jos kohta muutamat aavistaen siihen
suuntaan ajattelivatkin. Länsi-Rooman suuri maine herää kuolleista,
sen keisarinkruunun loisto ei ole himmentynyt, vaikka tämä kruunu
kauan on ollut kätkettynä tuon kuuluisan keisarikunnan raunioiden
alla. Kansat luovat ihaillen silmänsä siihen, kunnioittaen sen
omistajaa kristikunnan Jumalan voitelemana hallitsijana. Rooma
kohoaa uudelleen maailman pääkaupungiksi, jonka hengellistä,
keisarin tukemaa valtaa kaikki ovat alttiit kumartaen palvelemaan.
Ihmisten keksimä maallinen Kristus-valta salaa, rasittaa, onpa
monesti kokonaan tukehuttaa Herran tosi valtakunnan, joka "ei ole
tästä maailmasta." Mutta totuuden voittamaton voima on kuitenkin
näistäkin pimeyden valtojen varjostamista olosuhteista kerta
esiintyvä todistukseksi, ettei se keski-ajan pimeimpinä aikoinakaan
sortunut.

Kaarlen sota Saksilaisia vastaan päättyi vasta v. 783. Miehuullisesti


olivat nämä puolustaneet vapauttansa ja vanhaa pakanallista
uskontoansa frankilaisia sotajoukkoja vastaan. Nyt heidän vihdoin
täytyi taipua ja antaa kastaa itsensä. Keski-aika levitti evankeliumia
miekka kädessä! Usein tahrasi Kaarle Suurikin tässä "pyhässä
sodassa" säälimättömällä julmuudella maineensa. Mutta kaiken
inhimillisen turmeluksen uhallakin itivät kuitenkin kristinuskon
väkivaltaisesti Saksilaisten maahan kylvämät siemenet siunaukseksi
lapsille ja lastenlapsille.
Monessa muussakin sodassa, paitse niissä, joihin tässä
sivumennen olemme viitanneet, välkkyi Kaarle Suuren voittoisa
miekka, hävittäen pakanamaailman uhkaavaa valtaa. Mutta paljoa
suuremman maineen kuin näiden sotaisten voittojen kautta on hän
saavuttanut voitoillaan henkisen viljavainion suurella
taistelutantereella. Kristillisen sivistyksen kartuttaminen oli aina
hänen silmämääränsä. Tämä on sitä ihmeellisempää, kun Kaarle oli
kasvatettu sotapalvelukseen eikä nuorena itse saanut paljo oppia.
Hän esim. vasta vanhana oppi kirjoittamaan. Mutta mitä hänen itse
nuorena oli täytynyt kaivata sitä koetti hän kuninkaaksi päästyään
voimiaan säästämättä saavuttaa sekä sivistyksen rakkaudesta
alamaisilleen runsaalla kädellä jakaa. Paraiten viihtyi hän aikansa
jaloimpain tiedemiesten seurassa, tuumien heidän kanssaan
tehokkaimmista keinoista raakuuden ja tietämättömyyden
poistamiseksi, suuren valtakuntansa korottamiseksi siveyteen ja
sivistykseen. Hän perusti monta koulua, jota hän itse tarkasteli,
valvoi pappien siveellisyyttä ja vaati heitä hurskauteen sekä
tieteellisiin harrastuksiin, toimitti oppineitten ystäviensä kautta
kirjoja, vaikutti sivistyttäen ja jalostuttaen kaikkiin oloihin.
Kirkkohistoriakin lukee hänen keski-ajan merkillisimpäin henkilöiden
joukkoon, todistaen hänen vaikutuksensa kirkon kehkeytymiseen
olleen arvaamattoman suuren. Kaarle Suuren aikakauden
kirkollisetkin olot ovat monessa suhteessa hänen henkensä
muodostamat. Silmäilkäämme likemmin näitä oloja.

Vaikea on meidän uuden ajan ihmisten, jotka sukupolvesta toiseen


olemme nauttineet sivistyksen hedelmiä ja esi-isillemme jo kauan
saarnattua puhtaan Jumalan sanan siunausta, käsittää, miten pimeä
keski-ajan pitkä yö oli. Niidenkin ihmisien siveellinen ja kristillinen
kanta, jotka olivat kutsutut muita johtamaan, oli surkean alhainen.
Sota- ja metsästysretket, juomingit ja muut hurjat huvitukset olivat
monessa paikoin silloisen papiston päätoimena. Työläästi itää
hengellisen elämän arka siemen tuossa kaikelle henkiselle viljelylle
turmiollisessa ilmanalassa. Suurta on semmoisissa olosuhteissa
ajatellakaan tuon raa'an maan viljelemistä, mutta vielä jalompaa
käsin tarttua auraan ja ryhtyä työhön. Sentähden ansaitsevat kaikki
tähän suuntaan viittaavat toimet, kuinka vähäpätöisiltä ja lapsellisilta
nämä meidän silmissä sitten näyttänevätkin, mitä suurinta huomiota.
Lähtemättömästi ovat niiden henkilöiden nimet, jotka tässä
tarkoituksessa astuivat keski-ajan kolkolle viljavainiolle, aikakirjoihin
piirretyt. Yksi niistä on Metzin piispan Krodegangin (k. 766).
Auttaaksensa papiston kurjaa tilaa vaati hän kaikkia hiippakuntansa
pappeja elämään yhdessä, luostarintapaisessa rakennuksessa, jotta
he, erotettuina maailman riehuvista oloista, voisivat auttaa toisiansa
tieteellisissä harrastuksissa sekä esimerkillään, etenkin yhteisinä
hartaudenhetkinä, joiden luku salmistan sanojen mukaan,
"seitsemästi päivässä minä kiitän sinua sinun vanhurskautes
oikeuden tähden", määrättiin seitsemäksi, kehottaisivat toinen
toistansa etsimään sitä mieltä, josta papinviran tosi siunaus valuu.
Näitä kokouksia kutsuttiin "capitula" [Krodegangin järjestämistä
"capituloista" saivat tuomiokapitulit alkunsa, niinkuin niiden nimikin
johtuu tästä sanasta.], sentähden että niissä aina luettiin yksi luku
raamatusta. Kaarle Suuri, jonka uskonnollinen harrastus ja rakkaus
sivistykseen kannatti kaikkia tähän suuntaan pyrkiviä yrityksiä, koetti
kaikin tavoin saada Krodegangin tuumaa käytäntöön. Tämän laatimia
sääntöjä korjaeltiin ja täydennettiin, ja Kaarlen pojan Ludvig
Hurskaan aikana määrättiin niiden noudattaminen laiksi kaikkialla
frankilaisvaltakunnassa Achenin kokouksessa (816). Monen papin
sydämmessä heräsi tämän laitoksen kautta ijankaikkisen elämän
painava kysymys, ja keski-ajan vaikea sivistystyö, jota kristinusko
tarvitsi välikappaleekseen, virkistyi sen kautta monessa paikoin
ennen arvaamattomaan eloon.

Jumalanpalveluksenkin järjestämisen suhteen on Kaarle Suuri


vaikuttanut paljon. Hän perusti erityisiä kouluja Gregorius Suuren
kirkkoveisun opettamista varten, jotta nuo juhlalliset säveleet
pääsisivät Jumalaa ylistämään kansainvaellusten kansojenkin
huulilla. Achenin tuomiokirkossa kuultiin Kaarle Suuren aikana
germanilaisen kristikunnan ensimmäisten urkujenkin soivan. Ne oli
Itä-Rooman keisari Mikael I hänelle lahjoittanut. Senaikuiset kirjailijat
kiittävät niiden ääntä valtaavan mahtavaksi ja ihmeen suloiseksi.

Alppien pohjoispuolella löytyvät kirkot olivat tähän aikaan vielä


yksinkertaiset ja pienet sekä miltei kaikki puusta. Keskiajan
rakennustaide, joka myöhemmin loi niin ihmeteltävän jaloja
rakennuksia, oli vielä kehdossaan. Mutta sitä nähtävämpänä ovat sen
sijaan nuo taikauskon ja väärälle uralle eksyneen kristinuskon
synnyttämät turmiolliset ilmiöt, jotka myöhempien aikojen
rakentamien kirkkojen komeiden holvien suojassa vuosisatojen
kuluessa eksyttävät ihmisiä. Ukkosenilman, vihollisen sotajoukon tahi
muun onnettomuuden lähestyessä soivat kirkonkellot, joita tältä
ajalta ruvettiin käyttämään. Niiden luultiin nim. voivan poistaa
pahojen henkien tuhotöitä. Kaarle Suuri kielsi tämän taikauskoisen
tavan, niinkuin myöskin kirkonkellojen "pyhällä öljyllä" voitelemisen
ja siunaamisen kolmiyhteisen Jumalan nimeen, jonka tavan
taikauskon varjostama, henkimaailman salaisuuksille vieraantunut
kristinusko oli keksinyt. Kuinka suuressa määrässä hän oli päässyt
kohoamaan aikansa katsantotavan yli, todistaa muun ohessa
myöskin hänen käsityksensä kirkonkuvista. Kuten vasta saamme
nähdä, riideltiin itäisessä kirkossa juuri hänen aikanaan tästä asiasta,
ja yhä suuremmalla innostuksella vaativat Konstantinopolin kristityt,
sekä oppimattomat että oppineet, itselleen oikeutta saada kuvia
palvella. Kun tähän vielä lisäämme, että sama eksyttävä tapa jo
Gregorius Suuren ajoista alkaen runsain käsin oli kylvänyt myrkyllisiä
siemeniään läntisenkin kirkon jumalanpalvelukseen, täytyy meidän
todellakin ihmetellä Kaarle Suuren käytöstä tämän kysymyksen
suhteen. Hänen kehotuksestaan kirjoitti hänen oppinut ystävänsä
Alkuin (k. 804) kirjan, jossa muun ohessa huomautetaan siitä, ettei
Jumalan ja pyhimysten töitä voida aistillisesti kuvata, ne kun ovat
hengellistä laatua. "Niillä mahtanee olla kehno muisti, joita ei kuvien
välityksettä voi saada Jumalaa kiittäen palvelemaan, niiden henki on
epäilemättä heikko, jotka eivät kuvien avutta pääse kohoamaan
aistillisuuden yli. Yleensä ei Jumala ole etsittävä näkyväisistä, vaan
sydämestä; salaisuutemme ovat hengellistä laatua," kirjoittaa hän.
Mutta toiselta puolen ei Kaarle Suuri myöskään tahtonut millään
tavoin kannattaa vastapuolueen, etenkin itäisessä kirkossa raakaan
väkivaltaisuuteen pukeutuvaa vaatimusta, että kysymyksessä olevan
paheen estämiseksi kaikki kuvat ja koristukset olivat kirkoista
poistettavat. Hänen kauneudenaistinsa tarjosi tässä kohden, niinkuin
monessa muussakin suhteessa, kättä hänen valistuneelle
uskonnolliselle käsitykselleen. Vaikka paavi Hadrianus I, joka puolusti
kuvien palvelemista kirkoissa, julkisesti vastusti Alkuinin kirjaa, pysyi
Kaarle mielipiteissään, koettaen saada frankilaisen kirkon pappeja
niitä noudattamaan. V. 794 pidettiin tässä tarkoituksessa
kirkolliskokous Frankfurt am Mainissa. Siellä päätettiin, että kirkkoja
kyllä saisi kuvilla kaunistaa, vaan kuvien palveleminen kiellettiin
jyrkästi. Ei pääse ajanhengen mahtava virta tempaamaan mukaansa
kaikkia oloja, niinkauan kuin Kaarle Suuren voimallinen käsi sille
salpoja rakentaa; kun tämä käsi hervosi, kävi kuvainpalveleminen
länsimaissa yhä yleisemmäksi.
Olemme maininneet Alkuinin nimen. Hän syntyi Yorkin
kaupungissa Euglandissa v. 735. Ensimmäiset tietonsa kokosi hän
kotikaupunkinsa piispankoulussa, jonka johtajaksi hän, kehitettyään
sivistystään matkoilla Franskassa ja Italiassa, pääsi. Kun hän jonkun
ajan kuluttua jälleen lähti ulkomaille, tapasi hän Kaarle Suuren
Paviassa y. 781. Tämä oli ennen kuullut mitä kiitettävimpiä
arvosteluja miehen opista ja kyvystä ja pyysi häntä muuttamaan
Franskaan. Alkuin piti kutsumusta Jumalan viittauksena ja saapui
seuraavana vuonna muutamien oppilastensa kera Kaarle Suuren
hoviin. Jo sitä ennen oli sivistystä harrastava frankilaiskuningas
kutsunut luoksensa muita oppineita, joista etenkin Paavali Warnefrid
ja Pietari Pisalainen ovat saavuttaneet suuren maineen. Kaarle
Suuren hovi tuli ennen pitkää ajan sivistystyön keskustaksi, josta
valon säteet herättäen ja virkistyttäen levisivät kaikkialle. Olemme jo
viitanneet Alkuinin tarkkaan, ajan turmeltunutta henkeä
vastustavaan uskonnolliseen aistiin. Vielä selvempänä esiintyy tämä
kuitenkin hänen p. raamatusta lausumistaan mielipiteistä. Niinpä
kirjoitti hän eräälle englantilaiselle piispalle: "pyhä raamattu olkoon
usein sinun kädessäsi, jotta itse saisit ravintoa sielullesi ja voisit
johdattaa muita laitumelle." Muuan toinen hänen Kanterburyn
seurakunnalle kirjoittamansa kirje päättyy näillä sanoilla: "Ilman
raamattua ei voi löytyä mitään tietoa Jumalasta. Jos sokea taluttaa
sokeata, niin he molemmat lankeavat kuoppaan. Hankkikaat
itsellenne opettajia, jotka teille raamattua opettavat, jotta ei
totuuden lähde teidän keskuudessanne kuivuisi. Kun rukoilemme,
puhumme me Jumalan kanssa, kun luemme Hänen sanaansa, puhuu
Hän meidän kanssamme." Oudon kirkasta valoa säteilee näistä
sanoista meitä kohtaan kahdeksannen vuosisadan pimeästä yöstä!

Kaarle Suuren kehotuksesta toimitti Alkuin raamatunselityksiä,


jotka kaikki huomauttavat meitä miehen nerosta ja kristillisestä
mielestä, jos niitä nimittäin arvostellaan hänen aikansa
kehityskannan mukaan.

Ihmeteltävä on tosiaan tuo väsymätön harrastus kristillisen


sivistyksen korottamiseksi, jonka tähän aikaan tapaamme Kaarle
Suuren hovissa. Sen tuloksena oli monen muun siellä silloin
syntyneen ansiokkaan teoksen kera myöskin eräs postilla eli
saarnakirja, johon mukaelemalla oli koottu vanhan kirkon suurimpain
saarnaajain saarnoja. Sen toimitti Warnefrid, Kaarle Suuren
pyynnöstä. Kirjan silmämääränä oli estää saarnaa pappien
oppimattomuuden ja epäkristillisen mielen vuoksi suistumasta
väärälle uralle tahi kerrassaan vaikenemasta. Ei olisi valistunut
keisari tähän yritykseen saattanut valita parempaa apumiestä.
Sydämmestään harrasti myös Alkuin puhtaan Jumalan sanan
julistamista kansalle. Eikä kukaan ollut alttiimpi kuin hän käymään
käsiksi niiden esteiden poistamiseksi, jotka hidastuttivat ja estivät
evankeliumin sanaa löytämästä tietä ihmisten sydämmiin. Papinvirka
oli hänen silmissään pyhä tämän sanan oikeassa merkityksessä,
kansan johtaminen pimeydestä totuuden ihmeelliseen valoon kaikista
toimista kalliin. Kauniisti kirjoittaa Alkuin Orleansin piispalle
Teodulfille, joka vasta oli saanut palliuminsa Roomasta: "niinkuin
kalliitten kivien loisto kaunistaa kuninkaan kruunua, niin tulee
saarnakyvyn jalostuttaa piispanviittaa. Muista, että papillisen arvon
kieli on taivaan valtakunnan avain. Sentähden, älä lepää, vaikene,
äläkä pelkää puhua, sillä Kristus itse seuraa sinua työssäsi ja
matkoillasi. Eloa on paljo, mutta vähä työntekijöitä; sitä ahkerampien
tulee näiden harvojen olla."

Yksissä Alkuinin ja muiden tieteellisyyttä ja kristillisyyttä


harrastavien ystäviensä kanssa valvoi Kaarle Suuri tarkkaan
valtakuntansa pappien elämää. Kelvottomat erotettiin virastaan,
joll'eivät varotukset ja nuhteet auttaneet. Yleensä käytti keisari
säälimätöntä ankaruutta missä vain huomasi, että hänen säätämiään
lakeja laiminlyötiin tahi niiden noudattamista kierrellen kartettiin.
Kirkon kuri, jonka määräyksiä vanhan ajan viimmeiset epäsiveelliset
vuosisadat, kristinuskon tnrmeltuminen sekä kansainvaelluksen
myrskyt olivat heikontaneet, määrättiin hyvinkin ankaraksi, jokaisen
täytyi oppia ainakin "Isä meidän" ja apostolinen uskontunnustus
äidinkielellään ulkoa, Huolimattomia pakotettiin tottelemaan
paastolla, vieläpä ruumiinrangaistuksillakin.

Tehokkaasti otti Kaarle Suuri osaa oppiriitoihinkin, mikäli niitä


hänen aikanaan ilmaantui. Itäinen kirkko, jonka tehtävänä kristillisen
opin puolustaminen ja kehittäminen oli ollut, ei enään pystynyt tätä
suurta tehtäväänsä jatkamaan. Totuuden Henki oli siitä poistunut; se
oli vanhentunut, väsynyt. Sen laatimista opinsuunnitelmista kaipasi
etenkin oppi Pyhästä Hengestä täydentämistä. Kirkkoisä Augustinus
oli kehittänyt toisen yleisen kirkolliskokouksen päätöstä, ja
viidennellä vuosisadalla syntyneesen Atanasiuksen
uskontunnustukseen (I osa) tehtiin se lisäys, että P. Henki käy ulos
myöskin Pojasta. Suuren kirkkoisän käsitys tästä syvästä totuudesta
on aivan raamatunmukainen, jos kysymystä Jumalan sanan valossa
tarkastetaan. Jesus kyllä sanoi opetuslapsilleen: "koska Lohduttaja
tulee, jonka minä teille Isältä lähetän, totuuden Henki, joka Isästä
käy ulos, se on minusta todistava", vaan sama Herra on myöskin
lausunut "Isä ja minä olemme yksi," siten selvään viitaten siihen,
että Isän Henki myöskin käy ulos Pojasta, ja samaa todistaa koko
raamatun oppi Jumalan kolminaisuudesta. Vaan tälle kannalle ei
menneiden aikojen laatimiin, kaavoihin jähmettynyt itäisen kirkon
oppi päässyt kohoamaan. Se riippui ykspuolisesti Konstantinopolin
kokouksen päätöksessä, syyttäen läntistä kirkkoa Nicaealais-
Konstantinopolilaisen tunnustuksen väärentämisestä. Asiaa tutkittiin
ensi kerran ennen mainitussa Toledon kokouksessa (589), missä
kuningas Reccared teki uskontunnustuksen (I osa) uuden
tunnustuksen mukaan. Tästä alkaen tuli tämä tunnustus yleiseksi
tavaksi länsimaissa. Kaarle suuren aikana keskusteltiin ja kirjoitettiin
paljon tämän riitakysymyksen johdosta, josta itäinen kirkko tuon
tuostakin moittien muistutti. Frankfurt am Mainin kokous hyväksyi
lisäyksen "Pyhä Henki käy ulos myöskin Pojasta," ja Achenin kokous
vahvisti tämän päätöksen, julistaen sen läntisen kirkon opiksi v. 809.
Tähän riitaan otti Alkuin tehokkaasti osaa. Leo III hyväksyi itse opin,
vaan koetti estää lisäyksen ottamista Nicaealais-
Konstantinopolilaiseen tunnustukseen.

Vaikka Arabialaiset olivat laskeneet suurimman osan Espanjaa


valtansa alle, koetti sikäläinen kristikunta säilyttää kirkkoansa ja
kristillistä tunnustustaan joutumasta perikatoon. Tämä onnistuikin
Kaikkivaltiaan armosta, vaikka valloittajien ies oli raskas. Vaan
luonnollista on, että sen vaikutus on huomattava monessa
suhteessa. Itse kristillisen opinkin alalla ilmaantuivat seuraukset jo
varhain. Arabialaiset pilkkasivat tätä oppia muun ohessa siitäkin, että
se väitti Jumalalla olevan pojan. Kun tämän lisäksi otamme
huomioon, etteivät Länsi-Gotilaiset monofysiitillisen riidan vaiheissa,
kuten kirkko yleensä, olleet hyljänneet Teodorus Mopsvestialaisen
teoksia, joissa Vapahtajan luonnot hyvin jyrkkään toisistaan
erotetaan, vaan päinvastoin mieltymyksellä olivat lukeneet niiden
latinalaista käännöstä, ei ole kummallista, että Nestoriuksen opista
muistuttava harhaoppi täälläkin syntyi. V. 785 esiintyi Toledon piispa
Elipandus oppilaansa Feliksin puolustamana sillä väitöksellä, ettei
Jesus olekaan Jumalan Poika sanan varsinaisessa merkityksessä.
"Maria" — niin hän opetti — "oli vain Jumalan palvelija eikä
semmoisena saattanut synnyttääkään kuin ainoastaan palvelijan."
Opettaen, että Vapahtaja vasta koko maallisen elämänsä aikana
osotetun kuuliaisuutensa vuoksi palvelijan asemasta oli korotettu
Jumalan Pojaksi sanan täydellisessä merkityksessä, sortui Elipandus
Nestoriuksen erehetykseen. Tätä uutta harhaoppia, joka
kirkkohistoriassa on tunnettu Adoptianismin nimellä, vastustivat
Kaarle Suuren teologit. Sekä Warnefrid että Pietari Pisalainen
kirjoittivat sen edustajia vastaan. Frankfurt am Mainin jo ennen
mainittu kokous, johon oli saapunut 300 piispaa, hylkäsi miltei
yksimielisesti Adoptianismin (794). Feliks taipui peruuttamaan
mielipiteensä, turhaan koetettuaan niitä puolustaa 9 päivää
kestäneessä väittelyssä Achenin kokouksessa (799), missä nerokas
Alkuin kumosi kaikki hänen vastaväitöksensä. Elipandus sitävastoin
pysyi erehdyksessään kuolemaansa asti.

Voitollisesti taisteli läntinen kirkko harhaoppisuutta vastaan Kaarle


Suuren aikana, jos nim. pidämme silmällä ainoastaan kahden
viimmemainitun erehdyksen poistamista. Mutta jos luomme
silmämme syvempään senaikuisen kirkon tilaan, ei arvostelumme ole
sama. Keski-ajan yö ei kyllä enää ole niin pimeä kuin edellisenä
vuosisatana: sen taivaalla välkkyy moni kirkaskin tähti, luoden
kristillisen sivistyksen valoa kaukaisiin maihin; mutta ikäänkuin
aavistaen tuon syntyvän maallisen Kristus-valtakunnan
kykenemättömyyttä oikein hoitamaan noita kalliita
armonvälikappaleita, jotka Herra kirkollensa on uskonut, uupuu
kristikunnan ijankaikkisuuden toivo, etsien lohdutustaan maallisissa.
Tyydyttäen itseänsä sillä pettävällä lohdutuksella, että yön himmeä
valta on päivän kirkkautta, ei tämä aika aavistakaan, miten kova
taistelu vielä on oleva, kun kristikunta herää unestaan. Mutta
näinäkin öisinä hetkinä, valmistaa kaikkivaltias Jumala
näkymättömän valtakuntansa voittoa maan päällä, käyttäen kaikkia
voimia, itse niitäkin, jotka silminnähtävästi vastustavat Häntä,
viisasten tarkoitustensa perille saattamiseksi. — "Hänen neuvonsa on
ihmeellinen, ja sen jalosti toimittaa."
V.

Itäisen kirkon riita kuvista. Johannes Damascenus.

Ei sinun pidä tekemän sinulle kuvaa, eikä jonkun muotoa, ei


niitten kuin ylhäällä taivaassa ovat, eli niitten, jotka alhaalla
ovat maan päällä, eikä niitten, jotka vesissä maan alla ovat.

Ei sinun pidä kumartaman niitä eikä myös palveleman niitä. 2


Moos. 20: 4-5.

Vaiennut on jo aikoja sitten itäisen kirkon suurten saarnaajain


ääni, lakastunut sen hengellinen elämä, sammunut sen kirkas valo.
Semminkin on Konstantinopolin seurakunta, lyötyään tuuleen
Krysostomuksen valtaavan herätyshuudon, vaipunut yhä
sitkeämpään uneen. Vaikka mahtavat viholliset kaikkialta uhkaavat
valtakunnan rajoja, vaikka karttuva henkinen ja aineellinen kurjuus
päivä päivältä yhä julkisemmin pilkaten nuhtelee tuota ulkonaista
prameutta, joka maailmalta koettaa salata sen surkean tilan, ei
nöyrry sikäläinen kristikunta parannusta tekemään, vaan kokoo
mielettömän kevytmielisyyden hurmaamana syntiä synnille.
Pimittymistään se pimittyy, eksyen jos minkäkaltaisiin hullutuksiin.
Paljo kyllä keskustellaan keski-ajan ensimmäisinä vuosisatoina
uskonnollisista asioista itäisessä kristikunnassa, ja etenkin
Konstantinopolissa ovat ihmiset puuhassa, vaan millainen on tämä
puuha, mikä on keskustelun esineenä? Ei meidän tarvitse kuin
silmäillä jumalanpalvelusta, jommoisena se tähän aikaan ilmaantuu
pääkaupunginkin kirkoissa, tietääksemme, ettei totuuden Henki ole
vaikuttanut sitä levottomuutta, joka kaikkialla on nähtävänä.
Seuratkaamme noita suurilukuisia väkijoukkoja kirkkoon. Mitä siellä
kuulemme, mitä näemme? Saarna on väsyttävää ja pintapuolista, se
koettaa miellyttää kuulijoita, vaan ei herättää, se nukuttaa, vaan ei
lohduta ketään, jonka sydämessä vielä kytee ijankaikkisen elämän
kipinä. Sointuvana kaikuu veisu urkujen ja muiden soittokoneiden
säestämänä, mutta se ei ilmaise hengen kohoamista Herran puoleen,
vaan sielullisen elämän nautinnonhimoista eloa. Kirkko on komeasti
rakennettu, sitä valaisee lukemattomain kynttiläin valo, mutta uskon
silmä ei erota kuin pimeyttä vain. Henkimaailman salaisuudet eivät
täällä viihdy ihmisten sydämmissä, vaikka lukemattomat kuvaukset,
toinen toista viehättävämpiä, kaunistavat seiniä, kehottaen heitä
pitämään kanssakäymistään taivaassa ja viihtymään noiden suurten
uskonsankarien elämänvaiheita tutkimassa, niistä oppiaksensa, millä
tiellä syntinen ihminen pääsee tästä ajallisesta, synnin turmelemasta
varjoelämästä taivaan kirkkauteen ja iloon. Nämä kuvat eivät ole se
"suuri todistusten joukko", josta apostoli puhuu, eivät ne saa ihmisiä
"panemaan pois kuormaa ja syntiä", ne päinvastoin kahlehtivat
heidän henkensä ja himmentävät heiltä uskon silmän. Tuossa
polvistuu vanhus pyhimyskuvan edessä, huokaelee ja rukoilee siltä
apua. Tuossa koskettaa äiti sairaan lapsensa vaipalla pyhän neitsyn
kuvaa, jotta siitä vuotava Ihmeitätekevä voima parantaisi hänen
lemmittynsä. Toisesta maalauksesta karvii joku salaa maalia,
sekoittaaksensa sitä ehtoollisviiniin, jotta sakramentin voima olisi
suurempi, toisen kuvatun pyhimyksen kättä tavottaa muuan
ehtoollisleivällä, hankkiakseen tälle leivälle todellista siunausta. Ja
tämä on Krysostomuksen kirkko, marttyyrein lasten
jumalanpalvelusta! Kuinka kauhean surkea on nyt tämän kirkon tila!

Muhammedilaisetkin, jotka, valloitettuaan itäisen kristikunnan


maita, kummastellen katselivat tätä ristiinnaulitun Herran
tunnustajain taikauskoa ja julki pakanallista jumalanpalvelusta,
pilkkasivat heitä ylönkatseellisesti, mutta ei avannut sekään
kristittyjen silmiä. Kuvainpalveleminen kävi yhä yleisemmäksi,
pukeutuen mitä törkeimpiin muotoihin. V. 726 ryhtyi keisari Leo III
Isaurialainen, joka jo kauan inholla oli katsellut tämän paheen
karttuvaa valtaa, kuten näyttää tehokkaisinkin toimiin,
rakentaakseen taikauskolle kestävät salvat. Hän näet kielsi
lainsäädännöllä kuvainpalveluksen, vannoen Hiskian tavoin
poistavansa tämän pakanallisen tavan Herran seurakunnasta. Mutta
hän erehtyi, olettaessaan keisarillisen mahtisanan voivan muuttaa
ihmisten mieliä. Turhaan käski hän ripustaa kuvat niin korkealle, ettei
kukaan voisi niihin käsin koskea, turhaan antoi hän joukottain
hävittää niitä: kansan sydän oli niin kiintynyt tuohon taikauskoiseen
tapaan, että sen väkivaltainen estäminen ainoastaan tuotti sille uusia
puolustajia. Kaksi puoluetta, kuvainpalvelijat ja kuvainraastajat
taistelevat tästä alkaen verivihollisina toinen toistansa vastaan,
kuluttaen hurjassa vimmassaan onnettoman keisarikunnan
viimmeisiä voimia ja tuoden ilmi mitä kamalimpien intohimojen
purkauksia. Länsimaissa, missä pyhäinjäännöksiä ja kuvia oli ruvettu
pitämään yhä suuremmassa arvossa, jos kohta tämän kunnioituksen
takana piilevä taikausko ei täällä vielä ollut pukeutunut yhtä
törkeään muotoon kuin itämaissa, seurattiin keisarin toimia suurella
mielipahalla. Paavit, jotka eivät enää saattaneet turvautua horjuvaan
bysantinolaiseen keisarikuntaan, uskalsivat julkisesti vastustaa
kuvien halveksimista. Gregorius III piti kirkolliskokouksen Roomassa
v. 732, jossa kaikki kuvienraastajat kirottiin. Turhaan koetti keisari
kukistaa uppiniskaista paavia. Hänen ankarat uhkauksensa,
vaikuttivat ainoastaan sen, että side, joka vielä yhdisti Rooman
itäiseen keisarikuntaan, höltymistään höltyi. Leon voimakas poika
Konstantinus V Kypronymus astui isänsä jälkiä. Hän piti
kirkolliskokouksen Konstantinopolissa (754), jonka päätöksen
mukaan kaikki pyhimyskuvat olivat poistettavat sekä kirkoista että
kodeista, "Kirotut, kirotut olkoot kaikki kuvienpalvelijat" — niin
huudettiin tässä tilaisuudessa — "perkele vihaa kirkon kauneutta,
senvuoksi on hän tuonut siihen tämän uuden
epäjumalanpalveluksen; ainoa Kristuksen kuvaus on Herran
ehtoollinen." Päätös pantiin toimeen heti. Pyhäinkuvat joko riistettiin
pois kirkonseinistä tahi maalattiin uudestaan kuvaamaan maisemia,
metsästysmatkoja y.m.s. Vastapuolueen kiihko yltyi entistä
hurjemmaksi, ja uhkaava kapina, johon tyytymättömät papit ja
munkit, käsityöläiset, taiteilijat, vieläpä naisetkin ottivat osaa, syntyi
Konstantinopolissa. Se masennettiin valovoimalla ja uppiniskaiset
rangaistiin säälimättä kuolemalla, maanpaolla tahi vankilalla, mutta
vaikka hetkeksi näytti kuin olisi keisari voittanut, paljastivat hänen
väkivaltaiset toimensa, kuinka kiitettävä niiden tarkoitus sitten
olikaan, ennen pitkää voimattomuutensa. Konstantinuksen poika Leo
IV oli kyllä kuvainraastaja vaan kun tämän puoliso Irene, jonka
käsiin hallitusohjat Leon kuoltua joutuivat, vapaasti pääsi
mielipiteitään ilmaisemaan, kääntyi voitto kerrassaan
kuvainpalvelijain puolelle. Tämä keisarinna liittyi nimittäin julman ja
vallanhimoisen naisen rajattomalla kiivaudella heihin. V. 787 kutsui
hän kokoon kirkolliskokouksen Nicaeaan. Täällä kumottiin edellisten
hallitsijain ja kirkolliskokousten päätökset ja kirkolle annettiin kuvat
takaisin. Nyt saivat munkit jälleen työnansiota; he toimittivat uusia,
entisiä komeampia kuvia kirkkoihin, ja hetkeksi säikähtynyt taikausko
astui ylpeänä julkisuuteen kiittämään pyhimyksiä voitosta. Mutta
eläköön-huutojen kaikuessa keisarinnan kunniaksi, loi kuoleman yö
synkät varjonsa itäisen kirkon turmeltuneisin oloihin, ennustaen sille
yhä kolkompaa tulevaisuutta. Ne harvat ponnistukset, jotka vielä
tehtiin kuvien palvelemisen poistamiseksi, olivat yhtä turhat kuin
voimattomat. Keisarinna Teodora lopetti tämän surkean taistelun
hyväksymällä kuvien palveluksen. Helmikuun 19 p. 842 nähtiin
hänen tuhansien tulisoittojen valaisemassa juhlasaatossa kulkevan
uudestaan koristettuun Sofiankirkkoon, siellä riemastuneen
väkijoukon kanssa viettääksensä "puhdasoppisuuden" voittoa. Vielä
tänä päivänä viettää itäinen kirkko n.s. "ortodoksian juhlaa" tämän
tapahtuman muistoksi.

Katsellessamme tämän riidan surkeita vaiheita, olemme tuon


tuostakin alttiit kysymään: eikö jo joku uskonsankari astu esille
totuuden voimallisella sanalla herättämään tuota onnetonta kirkkoa
uuteen eloon? Mutta turhaan etsimme tämmöistä henkilöä. Ainoa
mies, joka senaikusessa itäisessä kristikunnassa on omiaan
herättämään suurempaa huomiota, on Johannes Damascenus (k.
noin 760), vaan mikään uskonsankari ja valistunut kristitty hän ei
ollut. Hän oli kyllä siihen aikaan tavattomalla opillaan saavuttanut
suurenkin maineen, vaikkei hän luonut mitään uutta, vaan
ainoastaan taitavasti toisiinsa sovitteli suurten kirkkoisien mietelmiä,
mutta ei oikeuta tämä seikka vielä meitä häneltä odottamaan mitään
todellisesti jaloa ja suurta. Eikä kelpaa miehen runollinen mieli, joka
sepitteli kauniitakin virsiä, hänestä muodostamaan
uskonpuhdistajaa. Hänen runoilijakykynsä paraat tuotteet ovat
heikkouden voimatonta valitusta tämän elämän viheliäisyydestä.
Eivät riitä oppineimmankaan teologin tiedot eikä suurimmankaan
runoilijan nero luomaan uskonsankaria, joka Jumalan sanan
Welcome to our website – the perfect destination for book lovers and
knowledge seekers. We believe that every book holds a new world,
offering opportunities for learning, discovery, and personal growth.
That’s why we are dedicated to bringing you a diverse collection of
books, ranging from classic literature and specialized publications to
self-development guides and children's books.

More than just a book-buying platform, we strive to be a bridge


connecting you with timeless cultural and intellectual values. With an
elegant, user-friendly interface and a smart search system, you can
quickly find the books that best suit your interests. Additionally,
our special promotions and home delivery services help you save time
and fully enjoy the joy of reading.

Join us on a journey of knowledge exploration, passion nurturing, and


personal growth every day!

ebookbell.com

You might also like