Orientation to Software Engineering
COURSE INFO
Welcome to the course Orientation to Software Engineering (SWD1TN001, SWD1TF001). Please attend the first lecture to learn more about the course. Still the most important information about the course is written on this site.
Check out the schedule of this course including lectures and lab sessions. Click the assessment button if you want to see how to pass this course and how many points you can get from an exercise. You should check out the learning objectives to understand where to focus during studies.
Please give feedback immediately after noticing issues before you forget them. You can give feedback about course contents, pedagogics, lectures, text material, videos, lab sessions, exercise assignments, development tools, web site bugs or whatever you think the teachers should be noticed of.

- Why this course is important?
- What can I do after this course?
- How to pass this course?
- How to study to get the best learning experience?
- Where can I find the theory?
- How to solve the exercises?
- When is the Exam?
- What kind of questions there is in the exam?
- How to prepare to the exam?
- What are the contents of this course?
- What the assessment criteria?
1 Software Development
Let's take a look at the industry, discuss the basic concepts and view what kind of education our curriculum provides.
Larry Wall: Computer Programming in 5 Minutes
Learning to make applications by yourself is a vital skill to understand the challenges that there is in software development.
"Software development is the process by which a company, team, or individual devises and implements an overall plan to create a new software program. Writing code is just one step of the software development process. The process usually begins with research or a general understanding of what type of software is needed in the marketplace. Once those involved in software development have a goal for the program they are working on, they can begin developing the plan for implementing the software." (Wisegeek)
"An Application is a program, or group of programs, that is designed for the end user. Software can be divided into two general classes: systems software and applications software. Applications software (also called end-user programs) include such things as word processors, Web browsers, spreadsheets and databases." (Webopedia)
"A programming language is a special language programmers use to develop applications, scripts, or other set of instructions for computers to execute. Choosing a programming language takes a lot of consideration: what do you want to do with the language, what platforms you're working with, applicability to the problem domain and more." (Computer Hope)

- Why software development is interesting?
- What is a program?
- What kind of programs there are?
- What is an application?
- What is programming?
- What kind of programming languages there are?
- What is a compiler?
- What is an interpreter?
- How applications are developed?
- What kind of markets there are for software development?
- What kind of markets there are for software developers?
- What kind of courses does the curriculum provide?
2 Algorithms
What is an algorithm and why should you care?
Your Brain Can Solve Algorithms
"An algorithm is any well-defined computational procedure that takes some value, or set of values, as input and produces some value, or set of values as output." In other words, algorithms are like road maps for accomplishing a given, well-defined task. (Introduction to algorithms by Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, Clifford Stein)

One example of the algorithms is a code that calculates the terms of the Fibonacci sequence. Even a simple function for adding two numbers is an algorithm in a sense.
Algorithms can be expressed in many ways. One example is Pseudocode. Pseudocode contains following logical structures.
- Sequence logic
- Selection logic
- Iteration logic
These structures are proven to be sufficient for writing any computer program.
Pseudocode example
IF HoursWorked > NormalMax
Display overtime message
ELSE
Display regular time message
The other example is Flowchart which graphically shows the logical steps to carry out a task.

Both of these techniques are widely used today. There are lot of benefits to achive by using these techiques like:
- Effective analysis and design
- Proper documentation
- Efficient Coding
(Flowcharts and pseudocode, Debra Wakefield)

- Where do I need algorithms?
- How to instruct the computer?
- What is the idea of a condition?
- What is the idea of a loop?
- When do we need variables?
- What is a flow chart?
- How to make my first algorithm with blockly?
3 Environments


- What kind of environments does a software developer need?
- What kind of tools does a software developer need?
- How to use the editor?
- What does the server do?
- How to use a browser developer toolbar?
- How to print logs to the console?
- How to publish my first application on localhost?
- How to publish my first application on the Internet?
4 JavaScript
<!DOCTYPE html>
<html>
<head>
<script>
function myListener() {
console.log("******************");
console.log("* BUTTON PRESSED *");
console.log("******************");
}
</script>
</head>
<body>
<button onclick="myListener()">Press me!</button>
</body>
</html>
JavaScript is an object oriented dynamic language. Its syntax comes from Java and C languages. With JavaScript you can for example:
- Change HTML content
- Change HTML attributes
- Change HTML styles
- Validate data
In HTML, JavaScript code must be inserted between <script> and </script> tags.
Example
<script>
document.getElementById("demo").innerHTML = "My First JavaScript";
</script>
You can place any number of scripts in an HTML document.
Scripts can be placed in the <body>, or in the <head> section of an HTML page, or in both.
Scripts can also be placed in external files. External scripts are practical when the same code is used in many different web pages. JavaScript files have the file extension.js.
JavaScript comments can be used to explain JavaScript code, and to make it more readable. Single line comments start with //. Any text between // and the end of the line, will be ignored by JavaScript.
Example
<script>
//This is my First comment
document.getElementById("demo").innerHTML = "My First JavaScript";
</script>
Multi-line comments start with /* and end with */. Any text between /* and */ will be ignored by JavaScript.
The HTML DOM is a standard object model and programming interface for HTML. It defines:
- The HTML elements as objects
- The properties of all HTML elements
- The methods to access all HTML elements
- The events for all HTML elements
In other words: The HTML DOM is a standard for how to get, change, add, or delete HTML elements.
The HTML DOM model is constructed as a tree of Objects

Most JavaScript programs contain many JavaScript statements. Semicolons separate JavaScript statements. The statements are executed, one by one, in the same order as they are written. In this example, x, y, and are given values, and finally sum is displayed:
//Example: x, y and sum are variables
var x = 2;
var y = 7;
var sum = x + y;
document.getElementById("demo").innerHTML = sum;

- Why JavaScript is important?
- What kind of language is JavaScript?
- Where can I run JavaScript code?
- How to add JavaScript Code to a web page?
- How to run JavaScript Code on a web page?
- How do I write code comments?
- Why do I write code comments?
- What is a dom tree?
- How to attach an event listener to a button?
5 Variables

Variables are containers for storing data values.
//Example: a and b are variables
var a = 5;
var b = 10;
Variables can be used in expressions (see artihmetic operators below).
//Example: expression
var c = a + b;
All variables must be indentified with unique names. Identifiers are case-sensitive in javascript. In javaScript '=' operator is an assignment operator, not an equal to operator.
In JavaScript, there are tree primitive datatypes: String, Number and Boolean.
JavaScript is loosely typed which means that you don't have to declare the type of a variable.
// JavaScript primitive datatypes
var length = 100; // Number (Either integer or floating point numbers
var name = "John" // String
var x = true; // Boolean: true or false
Arithmetic operators in JavaScript.
| + | Addition |
| - | Subtraction |
| * | Multiplication |
| / | Division |
| % | Modulus |
| ++ | Increment |
| -- | Decrement |
Operator precedence describes the order in which operations are performed in an arithmetic expression. As in traditional school mathematics, multiplication (*) and division (/) have higher precedence than addition (+) and subraction (-). And the precedence can be changed by using parentheses.
The increment operator (++) increments numbers and the decrement operator (--) decrements numbers.
// Example
var x = 3;
x++; // Increments x by one

- Why and where do I need variables?
- What is the concept of a variable?
- What types of variables there are available?
- How to assign a value to a variable?
- How to read a value from a variable?
- How to debug the variable values?
- How do I show a variable value on a web page?
6 Conditions
Bill Gates Explains If statements
If statement
If statement defines a block of code which is executed if condition is true
if (condition) {
block of code to be executed if the condition is true
}
// Example
if (hour < 12) {
say = "Good morning";
}
Else statement
Else statement defines a block of code which is executed if condition is false
if (condition) {
block of code to be executed if the condition is true
} else {
block of code to be executed if the condition is false
}
// Example
if (score < 100) {
say = "Try again";
}
else {
say = "Well done";
}
Else if statement
Else if statement can be used to specify new condition if the first condition is false
if (condition1) {
block of code to be executed if condition1 is true
} else if (condition2) {
block of code to be executed if the condition1 is false and condition2 is true
} else {
block of code to be executed if the condition1 is false and condition2 is false
}
if (score < 100) {
say = "Try again";
}
else if (score < 1000){
say = "Well done";
}
else {
say = "Great result!";
}
Operators
Comparison operators are used to determine equality or difference between values or variables.
| == | equal to |
| === | equal value and equal type |
| != | not equal |
| !== | not equal value or not equal type |
| > | greater than |
| < | less than |
| >= | greater than or equal to |
| <= | less than or equal to |
Logical operators allows you to combine multiple conditions into one expression.
| && | and |
| || | or |
| ! | not |

- Why and where do I need conditions?
- How can I write a conditional statement (if)?
- How can I write an alternative path (else)?
- What kind of operators there are available?
- How to debug conditional code?
- How do I make conditional features on a web page?
7 Functions
A JavaScript function is a block of code designed to perform a particular task. A JavaScript function is executed by invoking it (calling it).
Values can be passed to a function, and the function can return a value.

JavaScript contains a lot of core API functions for different purposes. One example is alert function which is used to show alert messages to the user.
//Example usage of alert function
alert("This is alert message");
Function is defined with function keyword followed by a function name and parentheses. The code to be executed by the function, is placed inside curly brackets {}
function name(parameter1, parameter2) {
code to be executed
}
The function will stop when return statement is reached. If the function was invoked from JavaScript statement, it will return executing the code after invoking statement.
// Function example
var a = calcSum(5, 12); // Function call, sum is returned to variable a
function calcSum(x, y) {
return x + y; // Function stops and returns
}
JavaScript methods are the actions that can be performed on objects. Methods are saved as a property containing a function definition. Good example of methods are Math objects methods. The Math object allows you to perform mathematical tasks.
// Math example
Math.sqrt(10); // Returns the square root of 10
Why functions? You can reuse code by defining the code once, and use it many times. You can use the same code many times with different arguments, to produce different results.

- Why and where do I need functions?
- How do I define a function?
- How do I call a function?
- What is a parameter?
- What is a return value?
- How do I pass a parameter to a function?
- How do I use a parameter inside a function?
- How do I return a value from a function?
- How do I save a return value from a function?
8 Loops
Mark Zuckerberg explains loops

There are situations when we need to execute a block of code several number of times, and is often referred to as a loop
JavaScript has three main looping mechanism
- For loop
- While loop
- Do-While loop (not covered in this course)
While loop
A while loop is suitable, if you don't know how many times loop should be repeated
The syntax of a while loop is
while(condition)
{
block of code to be executed
}
The following while loop iterates as long as n is less than five.
var n = 0;
while (n < 5) {
//statements
n++;
}
For loop
The syntax of a for loop is
for(initialization; condition; update)
{
block of code to be executed
}
The following for statement starts by declaring the variable i and initializing it to 0. It checks that i is less than ten, performs the two succeeding statements, and increments i by 1 after each pass through the loop.
// For loop example
for (var i = 0; i < 10; i++) {
console.log(i);
// more statements
}

- Why and where do I need loops?
- How do I make an endless loop?
- How do I make a loop that stops?
- How do I make a while loop?
- How do I make a for loop?
- When should I use a for loop?
- When should I use a while loop?
- How do I make an animation on a web?
9 Arrays
Arrays are used to store multiple values in a single variable
// Array syntax
var arrayName = [item1, item2, item3,...];
// Array example
var pets = ["Dog", "Cat", "Snake"];
You refer to array elements by using the index number. Indexing of array elements starts from 0.
// Referring example
var myPet = pets[0]; // myPet is Dog
Arrays has property length which returns the number of elements in the array.
// Array length property
var a = pets.length;
Looping the arrays
The best way to loop through arrays are using for-loops and length property
// Looping the arrays
var index;
var pets = ["Dog", "Cat", "Snake"];
for (index = 0; index < pets.length; index++) {
text = text + pets[index];
}

- Why and where do I need arrays?
- How do I put numbers in an array?
- How do I put strings in an array?
- How do I put objects in an array?
- How to loop an array with a forEach-callback?
10 Objects
Object can contain multiple values. A variable can only contain one value. But a reference to the memory address of object can be assigned as the only value of a variable. After that you will access properties of the object with variable.propertyName, e.g. person1.firstName. The following code assigns many values to variable named student.
var student = {firstname:"John", lastname:"Smith", studentnr=100232, department="IT"};
The values are written as name:value pairs. The name:value pairs are called as properties
You can access object properties in two ways:
objectName.propertyName
or
objectName[propertyName]
//Example
student.firstname; // is John

- Why and where do I need Objects?
- How do I save structured data on a single variable?
- How do I create an object literal?
- What is an attribute?
- What is an attribute name?
- What is an attribute value?
- What is a method?
- How do I read data from an attribute?
- How do I change the attribute value?
- How do I create an object with the new-notation?
- How do I collect object data from a web page form?
- How do I print object data on a web page?
11 Application Lifecycle
The software requirements are description of features and functionalities of the target system. Requirements gathering is an essential part of the software development process. There are multiple techinques for requirement gathering like
- Questionnaires
- Interviews
- Observation
- Prototyping
Software requirements specification is a documented description of the intended purpose and environment for the software.
Software design is a process to transform user requirements into some form, which helps the programmers in software implementation. There are different aspects in software design:
- Architecture design: How subsystems and components will be connected and how they interact
- Class design: Different features of classes
- User interface design
- Algorithm design
The goals of a good design are: Increasing profit by redusing the cost, fulfilling the requirements, accelerating development and good quality.

- What is a software development project?
- How to gather software requirements?
- How to design an application?
- How to test an application?
- How to handle the deployment?
- How to handle the maintenance?
- Why do you need documentation?
- What is a revision control system?
12 Development methods
There are various software development methodologies
- Waterfall
- Agile
- RAD
- And so on...
Waterfall is traditional method for software development project. Development moves from concept, through design, implementation, testing, installation, troubleshooting, and ends up at operation and maintenance. Each phase of development proceeds in strict order. (Tutorialspoint)
Agile development is a term that was derived from the Agile Manifesto, which was written in 2001.
Agile manifesto: The four main principles
- Individuals and interactions over processes and tools
- Working software over comprehensive documentation
- Customer collaboration over contract negotiation
- Responding to change over following a plan
'Agile' is an umbrella term used for identifying various models used for agile development, such as Scrum. Scrum is a management framework for incremental product development using one or more cross-functional, self-organizing teams.
The Scrum framework consists of Scrum Teams and their associated roles, events, artifacts, and rules. The rules of Scrum bind together the events, roles, and artifacts, governing the relationships and interaction between them. (Scrum Alliance)
Kanban is another framework based on the Agile methodology. A Kanban team is only focusing on the work that is currently in progress. There is regular fixed length sprints in the Scrum but in Kanban the work is continuous flow. There is no any fixed roles in Kanban. Some companies might work by mixing the Scrum and Kanban.
Kanban board is used to visualize work in team environment. Every team member can easilly get overview of their current workload.


- What is a waterfall model?
- What is an agile method?
- What are the principles of agile software development?
- What is Scrum?
- What is Kanban?
- What is Lean?
ROUNDUP
EXAM
- Moodle Exam