Difference between revisions of "I253 Presessional Informatics"

From ICO wiki
(Grading)
(Grading)
Line 35: Line 35:
 
* Store your homepage files in Git repository at GitHub
 
* Store your homepage files in Git repository at GitHub
 
* Set up GitHub authentication using SSH keys
 
* Set up GitHub authentication using SSH keys
* Change a page on this wiki, for example by fixing a typo on this page
 
 
* Complete a test online, time will be set to schedule, probably mid-october
 
* Complete a test online, time will be set to schedule, probably mid-october
 +
* Edit a page on this wiki, for example by fixing a typo on this page
 +
* Create a page on this wiki by creating a howto page accompanied with screenshots relevant for this course (VirtualBox, FileZilla, WinSCP, Cyberduck etc)
 
* To be continued...
 
* To be continued...
  

Revision as of 22:22, 30 August 2016

General information

ECTS : 2

Grading: Test + homework

Lecturer: Lauri Võsandi with tutors Arti Zirk, Marvin Martinson, Kristjan Peterson, Taavi Teearu, Mohanad Aly


Prerequisites and target audience

Course aims to prepare freshmen for lectures read during fall-semester and to familiarize themselves with IT college's infrastructure. Powerusers are probably able to learn everything on the fly. It is advised to fill your voluntary subject points from other subjects.

Course goals and content

Topics aren't nescessarily in correct order, but to pass this course you should know following things:

  • ITC technical manuals, printing, e-mail forwarding and using enos web server.
  • Basics of computer hardware, so you know which computer to purchase.
  • Keyboard shortcuts for windows users, for Ubuntu users - it's a bit embarrasing if you are using mouse like a savage instead of Alt + Tab.
  • Managing files in Windows, in Ubuntu. You know how to copy, move, delete files. Distinguish files from folders. Can switch on showing file extensions and hidden files.
  • Using text editor Notepad++ in Windows, Gedit in Ubuntu. Use correct indentation, line breaks and charset (UTF-8).
  • Using SSH to manage server and other computers via command line (access, copy, relocate, delete, modify files) PuTTY and for GUI access via SFTP WinSCP
  • Basics of version control systems, can distinguish software from service eg. Git vs GitHub. Knows how to add files to version control system (add-commit-push) and open ones code on GitHub.
  • Basics of virtualization, can dual-boot between Windows and Ubuntu in a virtual machine and can manage doing the same to personal computer. Has heard of assigning resources to virtual machines, knows the difference between B, KiB, kB, B, MiB, MB, GiB, Gb.
  • Can figure out what is connected to where inside the computer (PCI, USB, SATA).
  • There will be additional bits and pieces here in the future...

Grading

In order to pass the course:

  • Set up a web page in enos web server
  • Store your homepage files in Git repository at GitHub
  • Set up GitHub authentication using SSH keys
  • Complete a test online, time will be set to schedule, probably mid-october
  • Edit a page on this wiki, for example by fixing a typo on this page
  • Create a page on this wiki by creating a howto page accompanied with screenshots relevant for this course (VirtualBox, FileZilla, WinSCP, Cyberduck etc)
  • To be continued...

Homework


Lectures

First day: Introduction to Windows and personalisation of enos homepage

In windows you can log in using user: "kylaline" and password:"kylaline". Log in with ID-card using Microsoft Edge, Chrome or Firefox and reset your password SIS. ID-card does not work with Microsoft Edge! Write down your IT College (ITC) username, which you can find from "My Data". Log out of your guest account and try to log in using the username and password which you obtained from SIS. After that check whether you are able to log in to Wiki as well as e-mail server. When logging into outlook, username is using format "username@itcollege.ee". All necessary links can be found IT College homepage top left corner.

In Windows 'This PC' should have four drives in it:

  • C: - Location of running Windows. SSD - not much space, but it's fast
  • D: - This is regular HDD, lots of space but slower. Virtual machines should go there in the future.
  • H: - This contains everything you have in enos.itcollege.ee server, also contains public_html folder that can be accessed from a web browser using address http://enos.itcollege.ee/~username/
  • W: - This is public folder, using which you can share files with one-another. Only for public content - no pirates allowed.

Create a file called index.html onto H: drive into public_html folder. Create content that introduces you - Who are you? Where are you from? Add a picture. Example can be found here. To create index.html get yourself a decent text editor. For example Notepad++, choose portable version in .zip file, because you have no rights to install software to the system. Microsoft word is for word processing. It IS NOT a text editor. Notepad++ should be installed during next week. Since you have no previous knowledge of HTML, don't worry, that's why you are here. You will have a course explaining everything regarding web application development in spring semester.

For now, you can use following code to make yourself an introductive web page:

<html>
  <head>
    <meta charset="utf-8"/>
  </head>
  <body>
    <p>Hey, I'm Lauri from Tallinn, Estonia</p>
    <!-- These two are from cloudfront server -->
    <img src="https://d1qb2nb5cznatu.cloudfront.net/users/18344-large?1405448591"/>
    <img src="//d1qb2nb5cznatu.cloudfront.net/users/18344-large?1405448591"/>

    <!-- These four are from enos server -->
    <img src="http://enos.itcollege.ee/~lvosandi/pics/lauri.jpeg"/>
    <img src="//enos.itcollege.ee/~lvosandi/pics/lauri.jpeg"/>
    <img src="/~lvosandi/pics/lauri.jpeg"/>
    <img src="pics/lauri.jpeg"/>

    <!-- Examples that definitely will NOT work -->
    <img src="/home/lvosandi/public_html/pics/lauri.jpeg"/>
    <img src="H:\public_html\pics\lauri.jpeg"/>
    <img src="pics\lauri.jpeg"/>
  </body>
</html>


If you have done all of the above, try to access files on enos server using FileZilla. FileZilla is preinstalled in Windows. You can also install it to your personal computer or use WinSCP.

Connecting FileZilla:

  • hostname: enos.itcollege.ee
  • username: <your-SIS-username>
  • password: <your-SIS-password>
  • port: 22

Make sure you can access your folder, try to upload/download files-


Day two: Introduction to Ubuntu and creating virtual machines

Boot your computer to Ubuntu, if computer is in Windows restart it and while in dualboot menu select Ubuntu (NOT advanced option). You should be able to log in with the same username and password as in SIS, Outlook and Windows environment. In case of emergency keep calm and use username: "student" and password: "student" In that case drive H: will not be attached and you have no access to your files in school server.

In Ubuntu, your home folder will be at /home/username. There are no drives C:, D: or H:, because all those rescources will be attached to folders. Drive H: familiar from Windows will be accessable in folder /home/username/Dokumendid and drive W: will be at /home/username/Avalik and D: can be found at /shared .

To open terminal use Ctrl + Alt + T

Some commands cherry-picked from last years I600 course:

  • Use lsb_release -a command to see what exact linux version are you running
  • Use uname -sr command to see what kernel version is your computer running
  • Use cat /proc/cpuinfo command to see everything there is to know about the processor your computer is running on. What's the model and how many cores does it have?
  • Use arch to see whether running configuration is 32- or 64 bit
  • Use cat /proc/meminfo command to see memory information. How much RAM does your computer have?
  • Use lspci -t -v -nn command to see which PCI and PCI Express devices are connected. Try to understand what is where.
  • Use lsusb and lsusb -t command to show all USB devices. Try to understand what is where.
  • Use lsblk command to show all drives, how much capacity does your computer's HDD/SSD have?
  • Use xrandr command to list all video output connectors. Which resolutions are available, which one is in use?
  • Use cat /proc/asound/cards command to list all audio devices.
  • Use dmidecode to get more information about your computer. For example which frequency is your RAM running on and which socket are they using? In case you need to shop for more RAM. The cheapest upgrade possible for a computer.
  • Use ifconfig -a or ip addr list commands to list network adapter settings
  • Use htop command to list all processes

Download Windows 10 ISO and install it to a virtual machine created with VirtualBox. Assign 8GB of RAM and 100 GB of HDD which is located under /shared. Otherwise SSD will be filled. Download Ubuntu MATE 16.04 ISO and install it to the same virtual machine. During installation choose "Install alongside Windows". If no such option was presented, Windows in the virtual machine was not correctly shut down. If Ubuntu should freeze while booting try to assign more cores to the virtual machine, that model of the processor does not exist with a single core.

Day three: Hello world in different programming languages

Try to create "Hello, World!" in different programming languages using Ubuntu. Try to add functionality to the program. Add asking name and let the program greet user using inserted name. Why is running programs so different in different languages? Name strenghts and weaknesses of used programming languages? Restart your computer, boot into Windows and try to do the same in Visual Studio using C#.


Python

Open gedit text editor, and save the following content into file hello.py.


#!/usr/bin/env python
print "Tere maailm"

Open command line Ctrl + Alt + T and run file you just saved:

python hello.py

Ruby

Create file hello.rb:

#!/usr/bin/env ruby
puts "Hello, world!"

Run the program on the command line:

ruby hello.rb


Bash

Create file hello.sh:

#!/bin/bash
echo "Hello, world!"

Run program on command line:

bash hello.sh

C

Create file hello.c:

#include <stdio.h>
void main() {
    printf("Hello, world!\n");
}

Compile program on the command line:

gcc hello.c -o hello

Run program in file hello:

./hello


Java

Create file HelloWorld.java:

class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello World!");
    }
}

Compile on command line:

javac HelloWorld.java

Run compiled Java bytecode in file HelloWorld.class

java HelloWorld