Chapter:Programming introduction
Contents
Programming introduction
Meta information about this chapter
Expand using link to the right to see the full content.
Introduction
In this presentation we will be introduced to programming by comparing programming to normal every day actions, such as washing clothes.
We will also get a better understanding of the compiler and the steps performed when compiling source code.
Purpose
The purpose of this presentation is to make it easier for the student to understand the following lectures.
Writing software in languages such as C, C++ and Java means you at some point must transform your source, which is in text form, into a form executable by either the operating system or a virtual machine.
Requirements
It is assumed that the student is familiar with OS (operating system), program, file system, file and file types.
No previous programming knowledge is required.
Goal
After this lecture the student shall have basic understanding of what a program is, how it is written and how it relates to every day actions we humans do.
The student should:
- understand the role of a compiler
Instructions to the teacher
Common problems
All videos
All videos in this chapter:
See below for individual links to the videos.
Introduction to programming
Description
Programming is the practice of writing text files (so called source code files) where you express instructions to be performed by a computer. You express these instructions using a so called programming language, which is a set of rules for how to write said instructions.
The product of programming is a set of source code text files which typically are transformed into a a file or several files in language which is also understood by the computer or some existing computer program. This transformation from source code to files that are meaningful to the computer (or some existing computer software) is generally referred to as compiling.
Further on in this book, we will also address different ways to analyse what we want our programs to do, as well as different ways to accomplish that. Those activities may also be seen as activities belonging to the practice of programming.
Videos
- Introduction to programming (eng) (sv) (download presentation)
Exercises
- What is the hardware used to store information temporarily (until the power goes off) called?
Solutions
Expand using link to the right to see the full content.
- Memory
Links
Program examples
Description
We will show you some examples of programs, how we write them and the different procedures to get them to be executed.
Resources in various languages
- Shell script video (eng) (source code)]
- C video (eng) (source code)]
- Groovy video (eng) (source code)]
- Java video (eng) (source code)]
Exercises
None
Compiler
Description
A compiler is a program that reads files with software written not directly compiled for the computer's CPU.
A compiler is a computer program (or a set of programs) that transforms source code written in a programming language (the source language) into another computer language (the target language), with the latter often having a binary form known as object code. The most common reason for converting source code is to create an executable program. - Wikipedia on Compiler
Exercises
No exercises in this chapter.
Videos
- Compiler (eng) (sv) (download presentation)
Chapter Links
External links
Wikipedia links for the keen student: