Luet oppimateriaalin englanninkielistä versiota. Mainitsit kuitenkin taustakyselyssä
osaavasi suomea. Siksi suosittelemme, että käytät suomenkielistä versiota, joka on
testatumpi ja hieman laajempi ja muutenkin mukava.
Suomenkielinen materiaali kyllä esittelee englanninkielisetkin termit.
Kieli vaihtuu A+:n sivujen yläreunan painikkeesta. Tai tästä: Vaihda suomeksi.
This interactive ebook combines text with diverse practice activities and dynamic
illustrations. The ebook has been tailored to the needs of the Aalto University course
Programming 1 a.k.a. O1, but we’ve made it publicly available for personal use.
The ebook is divided into weeks, which set a tempo for Aalto students: each week has
a deadline for submitting assignments.
The weeks are further divided in chapters. Each chapter builds on earlier ones; the ebook
is meant to be read in order, without skipping chapters. Of course, you may occasionally
want to go back to refresh your memory, and there are a lot of links between the chapters
to help you do that.
Chapter 1.1 serves as an introduction to the course.
The ebook comes with a lot of example programs. Some of them are embedded directly in
the ebook’s text; others are packaged into downloadable modules that you’ll load into a
separate programming environment.
The main chapters are not designed for use as a reference and aren’t optimal for that
purpose. When you want to look something up, try the Scala Reference page or the Glossary.
Chapter 1.2 will introduce you to the environment that we use. Read this ebook on a
computer where you can access the programming environment.
The ebook isn’t designed for use on mobile devices. Not that it’s forbidden, but you
won’t be able to install all the necessary tools on a mobile device. Some parts
of the ebook may also work imperfectly on such devices.
The ebook makes occasional use of sound. Obviously, this can work only if your computer
setup has audio support switched on. If you study among other people, see if you can pack
some headphones with you. On the other hand, we use sound only infrequently, and none of
the chapters is impossible without sound.
Gray-bordered boxes like this contain optional material. Skipping
these boxes won’t prevent you from learning the basics of programming;
neither will it put your course grade in danger. Some of the boxes do,
however, contain additional practice tasks that you may find useful.
Others have links to further reading, and still others present you with
challenges that may take you well beyond official course requirements.
We recommend that you take a look at these boxes, too. But if you
must skip something, skip them.
The ebook embeds quotations from students who have taken the course before — and even
students who are taking the course right now. In the English version of the ebook, most
of these have been translated from Finnish. Here’s an example:
It’s great to feel like you understand something after such a
long and confused struggle! I was so hyped up that I submitted the
assignment twice even though I already scored full points with the
first try. :)
Boxes like the one below appear all over the ebook. They contain program code. Many of
these boxes use color to highlight the different parts the code consists of.
def withdraw(sum: Int) =
val withdrawn = min(sum, this.balance)
this.balance = this.balance - withdrawn
Chapter 1.3 introduces an interactive programming environment known as the REPL; boxes
like the one below contain examples of interactions in that environment. The text written
by the programmer appears on a darker background and the automatic response from the REPL
on a lighter one.
1 + 1res0: Int = 2
50 + 50 > 100res1: Boolean = false
Many examples come with green boxes like the two below; they contain explanatory
text. If you mouse over the explanations, the relevant part of the above example
will be highlighted. You can also click the boxes to make the highlight stay on.
These are inputs from the programmer.
These are values automatically computed as a response
to the inputs.
Boxes like the next one contain pseudocode: text that resembles actual program code but
is meant for human readers only. You’ll see these boxes from Chapter 2.5 onwards.
def totalPrice =
For each of the auctions in this.items in turn:
- Determine the current price of the item and add it to the sum.
Finally, return the sum.
The ebook also contains many dynamic elements, such as multiple-choice questions and
interactive animations that you the reader can control. These elements are either
self-explanatory or explained where they appear.
You can use this form to report errors, request additions to the page,
or send other feedback.
Thousands of students have given feedback and so contributed to this ebook’s design.
The ebook’s chapters, programming assignments, and weekly bulletins have been written in
Finnish and translated into English by Juha Sorva.
The appendices (glossary, Scala reference,
FAQ, etc.) are by Juha Sorva unless otherwise specified on the page.
The automatic assessment of the assignments has been developed by: (in alphabetical order)
Riku Autio, Nikolas Drosdek, Joonatan Honkamaa, Antti Immonen, Jaakko Kantojärvi, Niklas
Kröger, Kalle Laitinen, Teemu Lehtinen, Jaakko Nakaza, Strasdosky Otewa, Timi Seppälä,
Teemu Sirkiä, Anna Valldeoriola Cardó, and Aleksi Vartiainen.
The illustrations at the top of each chapter, and the similar drawings elsewhere in the
ebook, are the work of Christina Lassheikki.
The animations that detail the execution Scala programs have been designed by Juha
Sorva and Teemu Sirkiä. Teemu Sirkiä and Riku Autio did the technical implementation,
relying on Teemu’s Jsvee and Kelmu toolkits.
The other diagrams and interactive presentations in the ebook are by Juha Sorva.
The O1Library software
has been developed by Aleksi Lukkarinen and Juha Sorva. Several of its key components
are built upon Aleksi’s SMCL
The pedagogy of using O1Library for simple graphical programming (such as Pic) is
inspired by the textbooks How to Design Programs by Flatt, Felleisen, Findler, and
Krishnamurthi and Picturing Programs by Stephen Bloch.
The course platform A+ was originally created at Aalto’s LeTech
research group as a student project. The open-source project
is now shepherded by the Computer Science department’s edu-tech team and hosted by the department’s IT
Markku Riekkinen is the current lead developer; dozens of Aalto students and others have also contributed.
The A+ Courses plugin,
which supports A+ and O1 in IntelliJ IDEA, is another open-source project. It has been designed and
implemented by various students
in collaboration with O1’s teachers.
For O1’s current teaching staff, please see Chapter 1.1.
Additional credits appear at the ends of some chapters.
These are inputs from the programmer.