1 nädal. Sissejuhatus: arvuti ja info,
ajaloo algus ... 1940
Meanings:
Bit - the smallest unit of storage ( 1 binary digit)
Byte - collection of 8 bits / is a unit of storage, 8 binary digits long
Kilobyte - A unit of storage capacity (1024 bytes )
Megabyte - 1,048,576 bytes
Gigabyte - 1,073,741,824 bytes
Terabyte - 1 trillion bytes
Algorithm - is a step by step method of solving a problem
Program - is the expression of an algorithm in a programming language.
ALGORITM - kindel eeskirjade jada, mis määrab üheselt ülesande
lahenduskäigu.
PROGRAMM - programmeerimiskeeles kirja pandud algoritm
Greek logicians ( Kreeka loogikud ):
Parmenides (5 sajand e.m.a.) : kasutas pikki loogilisi põhjendusi.
Zenon Eleast (5 sajand e.m.a.) - apooriad/paradoksid
Sofistid - Sokrates (470-399 e.m.a) - Platon (428/427 - 348/347 e.m.a):
Aristoteles : väidete struktuur kui iseseisev uurimisobjekt
Aristoteles Süllogismide näited:
1. eeldus: iga koer on imetaja.
2. eeldus: mõned neljajalgsed on koerad. järeldus: mõned neljajalgsed on
imetajad.
1. eeldus: kõik luiged on valged
2. eeldus: mõni lind on luik. järeldus: mõni lind on valge.
Tuletuse struktuuri võib seega esitada muutujate x,y ja z abil ning tuletus
on õige sõltumata fraasidest, millega neid muutujaid asendada:
1. eeldus: iga x on y.
2. eeldus: mõni z on x. järeldus: mõni z on y.
Lausearvutus
Stoikud uurisid, kuidas saab loogiliste sidesõnade (ja, ei, või, kui...siis) abil
lihtsamatest lausetest keerulisemaid kokku panna ja kuidas näidata
selliselt moodustatud lausete õigsust.
Kui esimene, siis teine; esimene; järelikult teine.
((X -> Y) & X) -> Y
Kui esimene, siis teine; mitte teine; järelikult mitte esimene.
((X -> Y) & -X) -> -Y
Induktsioon(Inductive reasoning)
Inductive reasoning is an approach to logical thinking that involves
making generalizations based on specific details.
Deduktsioon (Deductive reasoning)
where you start with a generalization or theory, and then test it by
applying it to specific incidents.
Kristlik filosoof
Blaise Pascal 1640:
aritmeetiline masin: ainult liitis ja lahutas
Leibniz Saksa filosoof 1646-1716
Leibnizi arvuti(1671) liitis, lahutas, korrutas, jagas
Perfokaardid - ca 1800, Jacquard
1890:
Herman Hollerith: perfokaartidega masin USA
rahvaloenduse andmete töötlemiseks(Hollerith’i firmast tekkis
IBM)
Charles Babbage 1822
Difference Engine, jäi pooleli
Idee: Analytical Engine
esimene programmeerija: Ada Lovelace
Colossus
Londonis 1943: saksa allveelaevade salakirja dekodeerimiseks
1800 elektronlampi
Ideoloogia ja matemaatika: olulises osas
Alan Turing
1936 Turingi masina
Claude Shannon
MIT, 1938, Shannon’i magistritöö sidus:
Boole algebra
Elektrilülitid ja -skeemid
Bitid ja info kodeerimine
Info otsimise algoritmid
Konrad Zuse - Programmeeritavate arvutite pioneer saksamaalt.(Z1…)
By 1967, the Zuse KG had built a total of 251 computers.
First programmable computers
2 nädal: Keskajalugu 1940-1960 ja
e-riik.
1947
Transistor - Three elements solid-state device for amplifying, controlling
electrical signals. (scientists at Bell Telephone Laboratories)
1952
Arthur Samuel - The first AI program to run in the U.S. was also a
checkers program
1955 William Shockley founds
Shockley Semiconductor in Palo Alto, California
1957 A new language,
FORTRAN (short for formula translator), enabled a
computer to perform a repetitive task from a single set of instructions by using
loops.
1957 A group of eight engineers leaves Shockley Semiconductor to form
Fairchild Semiconductors.
1959
Fairchild Semiconductor files a patent application for the planar process
for manufacturing transistors.
1961
Fairchild Semiconductor releases the first commercial integrated circuit.
1958
SAGE -- Semi-Automatic Ground Environment -- linked hundreds of radar
stations in the United States and Canada in the first large-scale computer
communications network.
1954
Texas Instruments announces the start of commercial production on
silicon transistors.
1958 At
Texas Instruments, Jack St. Clair Kilby comes up with the idea of
creating a monolithic device (integrated circuit) on a single piece of silicon.
1959
Texas Instruments announces the discovery of the
integrated circuit.
1964
Texas Instruments receives a patent on the
integrated circuit.
1960 A team drawn from several computer manufacturers and the Pentagon
developed
COBOL, Common Business Oriented Language. Project leader: Grace
Hopper.
1960
LISP made its debut as the first computer language designed for writing
artificial intelligence programs. Inventor: John McCarthy.
1960 DEC
PDP-1: MIT TX project aftermath. (
(Programmed Data Processor-1) is the first computer in DEC).The PDP-1 sold for
$120,000. MIT wrote the first video game, Space War! for it.
1964 IBM announced
System/360, a family of six mutually compatible
computers and 40 peripherals that could work together.
1964 Gordon Moore suggests that integrated circuits would double in complexity
every year. This later becomes known as
Moore's Law.
1965
Moore's law is the observation that the number of transistors in a
dense integrated circuit doubles about every two years
1968 Robert Noyce and Gordon Moore found
Intel Corporation.
1969 W. Jerry Sanders III and Edwin Turney found
AMD
1963
Douglas Engelbart receives a patent on the mouse pointing device for
computers.
1968
Douglas C. Engelbart, of the Stanford Research Institute, demonstrates
his system of keyboard, keypad, mouse, and windows
1969 AT&T Bell Laboratories programmers Kenneth Thompson and Dennis
Ritchie developed the
UNIX operating system on a spare DEC minicomputer.
1969
I The Intel 4004 microprocessor. Intel's Marcian (Ted) Hoff designs an
integrated circuit chip that could receive instructions, and perform simple
functions on data.
3 nädal: Keskajalugu 1970 ... 1990 ja
küberkaitse.
1971 First commercial 4-bit
microprocessor: Intel 4004(2,300 transistors, 10
µm features, 10 mm2 die, 108 kHz )
1974 The language created by the System R group,
SQL (Structured Query
Language) has become the industry standard for relational databases and is now
an ISO standard. First commercial SQL database created by Honeywell
Information Systems Inc., which released a commercial product in June of 1976.
1971 Computer-to-computer Communication expanded when the Department of
Defense established four nodes on the
ARPANET(Advanced Research Projects
Agency Network): the University of California-Santa Barbara and UCLA, SRI
International, and the University of Utah.
1972 Nolan Bushnell created his own company:
Atari in 1972. Atari ships Pong,
one of the first really successful commercial video games. In 1977 Atari enters
the home computer market among others.1976 Warner Communications buys
Atari from Nolan Bushnell for US$26 million.
1973 Gary Kildall writes a simple operating system in his PL/M language. He calls
it
CP/M (Control Program/Monitor).1974 he develops the
CP/M operating
system for Intel 8080-based systems
1973 IBM introduces the IBM 3340 hard disk unit, known as the
Winchester,
IBM's internal development code name. The recording head rides on a layer of
air 18 millionths of an inch thick. It uses four 8-inch diameter platters, giving it a
capacity of 70 MB.
1974 MITS completes the first prototype
Altair 8800 microcomputer,based on
the Intel 8080 CPU. Altair was one of the first successfully sold personal
computer kits for do-it-yourself computing fans. No monitor, no keyboard.
Keyboard and cassette drive can be added. Oscilloscope can be attached to be
used as a display. US$439 in kit form.
1974 Xerox releases the
Alto computer. A personal computer to be used for
research. Cost: $32,000.First serious machine to feature a modern user
interface: windows, mouse, etc invented by Engelbart in 1964
1969-1971 birth of
UNIX. Ken Thompson, Dennis Ritchie
©
1969-1973 C development Thompson, Ritchie, Kernighan
1983 Big machines: AT&T announces
UNIX System V. AT&T Bell Labs designs
C++
1975 Bill Gates and Paul Allen found
Micro-Soft (the hyphen is later dropped).
MITS releases a version of MicroSoft BASIC 2.0 for its Altair 8800, in 4K and 8K
editions.
1976 Steve Wozniak and Steve Jobs finish work on a computer circuit board, that
they call the
Apple I computer. Steve Jobs and Steve Wozniak form the
Apple Computer Company, on April Fool's Day. Apple I Price: US$666.66.
1977 Apple Computer introduces the
Apple II at the West Coast Computer Faire.
The computer features a 6502 CPU, 4KB RAM, 16KB ROM, keyboard, 8-slot
motherboard, game paddles, graphics/text interface to color display, and built-in
BASIC, for US$1300. It is the first personal computer with color graphics. 1979
Apple Computer introduces the
Apple II Plus, with 48KB memory, for US$1195.
1977 Koduarvutid:
The
Commodore PET (Personal Electronic Transactor) -- the first of several
personal computers released in 1977 -- came fully assembled and was
straightforward to operate.
Apple II
Tandy Radio Shack's first desktop computer
1979 Harvard MBA candidate Daniel Bricklin and programmer Robert Frankston
developed
VisiCalc, the program that made a business machine of the personal
computer, for the Apple II.
1980
Symbolics. Created special hardware for running LISP programs (mostly
AI) efficiently.The whole system written in LISP.
1980 William Lowe assembles the members of "Project Chess", known as the
"Dirty Dozen", the 12 engineers assembled to design and build the
IBM PC, in
Boca Raton, Florida.
1981 IBM announces the
IBM 5150 PC Personal Computer, in New York. The
PC features a 4.77-MHz Intel 8088 CPU, 64KB RAM, 40KB ROM, one 5.25-inch
floppy drive (160KB capacity), and PC-DOS 1.0 (Microsoft's MS-DOS), for about
US$3000. Also included is Microsoft BASIC, VisiCalc, UCSD Pascal, CP/M-86, and
Easywriter 1.0. A fully loaded version with color graphics costs US$6000.
1982
Sun Microsystems is founded. "SUN" originally stood for Stanford
University Network. The SUN-2 features a Motorola 68010 processor and uses a
Multibus.
1987
Sun unveiled the Sparc microprocessor, based on RISC ideas.
1974-1979: IBM System/R project gives SQL language for database manipulation
and queries. SQL invented by IBM. Ideas: 70-72 Codd. n 1977 Relational Software
Inc. (RSI - currently Oracle Corporation) established: Ellison and Miner. n 1978
Oracle V1 ran on PDP-11 under RSX, 128 KB max memory. Written in assembly
language. Implementation separated Oracle code and user code. Oracle V1 was
never officially released. n 1980 Oracle V2 released on DEC PDP-11 machine. Still
written in PDP11 assembly language, but now ran under Vax/VMS. n 1982 Oracle
V3 released, Oracle became the first DBMS to run on mainframes,
minicomputers, and PC's. Code was written in C. n 1983 Relational Software Inc.
changed its name to
Oracle Corporation.
1984 Apple Computer's Steve Jobs introduces the
Apple Macintosh at the Flint
Center of DeAnza College in Cupertino, California. The Macintosh uses the 8-MHz
32-bit Motorola 68000 CPU, built-in 9-inch B/W screen, 512x342 graphics, 400KB
3.5-inch floppy disk drive, mouse, 128KB RAM, and weighs 20 pounds. Price:
US$2500.
Apple Computer launched the Macintosh, the first successful mousedriven
computer with a graphic user interface, with a single $1.5 million commercial
during the 1984 Super Bowl.
Kyberkaitse:
Turvateater - illusoorne turve: näilise, mitte tegeliku turbe meetmed
Malware(
Вредоносная программа) - is any software intentionally designed
to cause damage to a computer, server, client, or computer network(by contrast,
software that causes unintentional harm due to some deficiency is typically
described as a software bug).
Cookie - is a small piece of data sent from a website and stored on the user's
computer by the user's web browser while the user is browsing.
Phishing - A type of hacker attack, the purpose of which is to gain access to
confidential user data - logins and passwords.
Social engineering is the art of manipulating people so they give up
confidential information
4 nädal: Lähiajalugu 1990-... ja e-riik
edasi: ohud, analoogid
1989
Python implementation was started in 1989 by Guido van Rossum at CWI
in the Netherlands as a successor to the ABC programming language (itself
inspired by SETL).
Python 2.0 was released in 2000, with many major new features including a full
garbage collector and support for Unicode.
Python 3.0, a major, backwards-incompatible release, was released in 2008
1990
HTML, http and the browser are born
The World Wide Web was born when Tim Berners-Lee, a researcher at CERN,
the high-energy physics laboratory in Geneva, developed HyperText Markup
Language.
HTML, as it is commonly known, allowed the Internet to expand into the World
Wide Web, using specifications he developed such as URL (uniform resource
locator) and HTTP (hypertext transfer protocol).
1991 Berners-Lee designed both the first
World Wide Web server and browser
-- available to the general public in 1991.
1990
Internetiotsake Eestis: e-post, USENET
Tampere tehnikaülikoolist laenuks saadud moodemi Robotics Courier V.32 abil
panid Küberneerika Instituudi teadurid Aleksander Shmundak, Mari Kõpp ja
Leonid Tomberg käima regulaarse ühenduse oma instituudi ja soome UNIXI-
kasutajate seltsi (FUUG) masina vahel. § Küberneetika Instituudi arvuti helistas
iga poole tunni tagant Soome arvutisse ja saatis edasi ning võttis vastu vahepeal
saabunud eteated (põhiliselt e-posti).
Ca
400 rubla eest kuus said Eesti-poolsed kliendid ennast oma moodemi abil
Küberneetika Instituudi arvuti külge haakida ning samuti e-posti saata.
Küberneetika instituudi e-posti aadressi lõpus oli
.su, mis tähendas mõistagi
NSVL-i.
1991 Linus Torvalds, a student at the University of Helsinki in Finland, starts
working as a hobby on
Linux. Linus had an interest in Minix, a small UNIX
system created by Tannenbaum, and decided to develop a system that
exceeded the Minix standards. He began his work in 1991 when he released
version 0.02. Linus used both Minix and Gnu for his work:
essentially, Linux is
a Minix-inspired kernel for Gnu
1994 Mosaic Communications releases
Netscape Navigator 1.0, a worldwide
web browser. a worldwide web browser. Asutajad: Clark ja Andreessen. Microsoft
offers Netscape US$1 million to license Netscape's browser code. Netscape
refuses.
1979-80
USENET
-over a decade before the World Wide Web went online
-the oldest computer network communications systems still in widespread use
-Usenet can be defined as a network where people exchange news. It is used for
several purposes by people and support groups for sharing information.
-this is a distributed network means it is not controlled by any single source.
1994
PHP (Personal Home Page) language development began in 1994 when
the Danish/Greenlandic programmer Rasmus Lerdorf initially created a set of Perl
scripts he called "Personal Home Page Tools" to maintain his personal homepage
PHP is a general-purpose programming language originally designed for web
development.
1995
Eesti päevaleht. http://www.zzz.ee/epl/ . Esimene number: 5. oktoober
1995
1996 U.S. Robotics debuts the
Palm Pilot
1997
Google began in March 1997 as a research project by Larry Page and
Sergey Brin, Ph.D. students at Stanford working on the Stanford Digital Library
Project (SDLP)
1997
Deep Blue was a chess-playing computer developed by IBM, wins the
reigning Wold Champion in Chess, Garri Kasparov
2001
Wikipedia is founded by Jimmy Wales and Larry Sanger , is a multilingual
online encyclopedia
2001
X-road (X-tee) started in Estonia
Secure standardised communications platform between different state
information systems and databases. Idea and pilot 1999-2000: Tanel Tammet,
Ain Järv, Vello Kadarpik
5 nädal: Programmeerimise alused,
masinalähedane programmeerimine ja
andmetüübid
1936
Turing machine - lihtne teoreetiline masin. Alan Turingi idee, milline
võiks olla lihtne universaalne arvuti: suudaks
arvutada/järeldada kõike!! Turingi tees: kõike, mida üldse saab mingi
masinaga arvutada/järeldada, saab ka Turingi
masinaga arvutada.
Turingi tees: kõike, mida üldse saab mingi masinaga arvutada/järeldada,
saab ka Turingi
masinaga arvutada.
Маши́на Тью́ринга (МТ) — (абстрактная вычислительная машина).
Была предложена Аланом Тьюрингом в 1936 году для формализации
понятия алгоритма.
Mälutüübid:
Põhimälu - hoiab aktiivses kasutuses olevaid programme ja andmeid
Välismälu - pikaajaliseks säilitamiseks (kõvaketas, flopid jne)
DRAM (pronounced DEE-RAM), is widely used as a computer’s main
memory. Each DRAM memory cell is made up of a transistor and a
capacitor within an integrated circuit, and a data bit is stored in the
capacitor. Since transistors always leak a small amount, the
capacitors will slowly discharge, causing information stored in it to
drain; hence, DRAM has to be refreshed (given a new electronic
charge) every few milliseconds to retain data.
SRAM (pronounced ES-RAM) is made up of four to six transistors. It
keeps data in the memory as long as power is supplied to the system
unlike DRAM, which has to be refreshed periodically. As such, SRAM is
faster but also more expensive, making DRAM the more prevalent
memory in computer systems.
Lihtsad andmetüübid:
Täisarvud - A la 34, -4545, 0, 92829292 Põhiasjad, millega protsessor
tegutseda oskab
Ujukoma-arvud Kuidas kodeerida komaga (ja väikseid ja suuri!) arve nagu
1.34566 0.0122 0.0000000000000001 10000000000000000000 Tüüpiliselt
kasutatakse 8 baiti. Teine variant on 4 baiti. Levinud kodeering nn IEEE
standard.
Üksikud tähed arvutis? Osa progekeeli kasutab üksiku tähe
kodeerimiseks ühte baiti (C). Osa kasutab kahte baiti (Java). Mõned
kasutavad veel rohkem baite. Aga, üksikute tähtede asemel kasutavad
programmeerijaid tihti harilikke täisarve. Üksikutest tähtedest olulisem on
pika teksti kodeering.
Stringi
Tekst on lihtsalt jada baite mälus järjest pluss pikkuse määrang. Lihtsamal
juhul (ascii ja iso-8859-1 kodeeringud) on üks täht üks bait. Keerukamal
juhul (utf-8) on ascii tähed üks bait, teised rohkem. Java stringides on üks
täht kaks baiti. Pikkuse määrangut tehakse kahel eri viisil: • C stringid
lõpevad baidiga 0. • Pythoni, Java, Javascripti jne stringide osaks on eraldi
pikkuse number.
Massivid
Massiiv on jada ühetüübilisi väärtusi: tähti, täisarve, ujukoma-arve, teisi
massiive vms.
is a data structure consisting of a collection of elements (values or
variables), each identified by at least one array index or key.
Puud
Trees are well-known as a non-linear data structure. They don’t store data in
a linear way. They organize data hierarchically.
6 nädal: Programmeerimiskeeled ja
suurte infosüsteemide
andmearhitektuur.
Kompileerimine
Kompilaator teeb neist assemblerikeelsed ajutised failid
Kompilaator teeb assemblerfailidest masinkood+sümbolinfo failid
Kuidas keeles X kirjutatud programmi täidetakse?
Kompileerimine: masinkoodis programm nimega kompilaator teisendab keeles X
programmi masinkoodfailiks Y. Seejärel täidetakse saadud masinkoodis
programm Y. Näited: C, Fortran, Go.
В компьютерных науках компиляцией называют «перевод» программы с
языка высокого уровня на понятный компьютеру язык нулей и единиц. Для
этой нелёгкой задачи существуют специальные программы, называемые
«компиляторами».
Kompilaator - tõlgib kõrgtaseme keelest masinkoodi (või mingisse nn.
vahekoodi, näit. Java baitkoodi).
Interpreteerimine
masinkoodis programm nimega interpretaator loeb sisse X keeles faili, teisendab
ta nö pseudo-assembleriks / vahekoodiks ja asub seda vahekoodi varianti rida-
realt täitma. Näited: Python, PHP, Perl, vanemad Javascripti mootorid jne.
Interpretaator - täidab programmi ilma masinkoodi moodustamata; tavaliselt
interpreteeritakse vahekoodi, mitte programmi teksti.
Kuidas programmi täidetakse?
Interpretaator interpreteerib vahekoodi Y, kuid kompileerib töö ajal osa Y-st
masinkoodiks, mida seejärel täidab (Java, C#, Firefoxi Javascript) nn just-in-time
compilation ehk
JIT / just-in-time compilation (технология увеличения
производительности программных систем, использующих байт-код, путём
компиляции байт-кода в машинный код или в другой формат
непосредственно во время работы программы. Таким образом достигается
высокая скорость выполнения по сравнению с интерпретируемым байт-
кодом)
JIT (Just In Time) kompilaator - teisendab vahekoodi masinkoodiks "vajadusel"
(näit. optimiseerimise eesmärgil).
Основная разница между компилятором и интерпретатором заключается в
том, как они работают. Компилятор берет всю программу и преобразует ее в
машинный код, который понимает процессор.
Интерпретатор — это исполняемый файл, который поэтапно читает
программу, а затем обрабатывает, сразу выполняя ее инструкции.
NB!
Programmi interpreteerimine on ca 10-200 korda aeglasem, kui kompileeritud
koodi täitmine.
Põhimõtteliselt saaks igas keeles kirjutatud programme nii interpreteeritult täita
kui kompileerida.
Praktikas eelistatakse vahel interpreteerimist, vahel kompileerimist.
Parsimine, parsing
Парсинг – это процесс сбора данных с последующей их обработкой и
анализом.
Parser ehitab mällu süntaksipuu, mida siis edasi töödeldakse
Vahekood/Bytecode/baitkood
байт-код — это компактное представление программы, уже
прошедшей синтаксический и семантический анализ.
Многие современные языки программирования, особенно
интерпретируемые, используют
байт-код для облегчения и ускорения
работы интерпретатора.
Many modern programming languages, especially those interpreted, use
bytecode to facilitate and speed up the work of the interpreter.
Programming and description languages
Programming languages, in the familiar sense: Fortran, C, Java, C#, Python,
Javascript
Description languages (i.e. not for programming): Text layout: html Html
layout nuances: css Database query tasks: SQL Data representation: XML, json,
csv
Json(JavaScript Object Notation)
Description language for data representation<}
Html
Description language for text layot
Pealkiri
üks
bold sõna
SQL
Description language for database queries
select name, age from persons where age>18;
keelte äratundmine
Assembler/Язык ассемблера – это символическое представление
машинного языка.
Fortran
Cobol
LISP
C
Modula2/Pascal
Python
Data Warehouse(хранилище данных)
Sources are transformed from localschema to a global schema and copied to a
centralDB
A
data warehouse is a large collection of business data used to help an
organization make decisions. The concept of the data warehouse has existed
since the 1980s, when it was developed to help transition data from merely
powering operations to fueling decision support systems that reveal business
intelligence.
7. nädal: Operatsioonisüsteemid ja
tekstitöötlus
Opsüsteemi põhieesmärgid:
Pakkuda programmeerijale valmistehtud standardtükke.
Võimaldada kasutajal arvutis ühtemoodi ja harjumuspäraselt tegutseda,
sõltumatult sellest, mis programmid tal arvutis on.
Arvutit saaks programmeerida ka ilma opsüsteemita. Sel juhul:
Oleks iga programmi tegemine palju raskem
Kasutajate jaoks näeks eri programmid väga eri moodi välja
Mida opsüsteem teeb ja teha oskab?
Oskab kettalt programme lugeda ja neid käima panna.
Oskab programme seisma panna
Oskab anda programmidele parasjagu aega ja mälu
Oskab programme vajadusel korraks peatada ja taaskäivitada
Oskab kettale faile ja katalooge kirjutada ja sealt neid lugeda.
Oskab välisseadmetega (printer, monitor jne) suhelda.
Oskab võrguga suhelda.
Oskab intelligentselt mälu ja cachega tegeleda
Oskab suhelda graafikakaardiga
Operatsioonisüsteemi roll!!!
Distro/Linux distributionis an operating system made from a software collection that is based upon the
Linux kernel and, often, a package management system.
Linux itself is just a kernel(ядро). Compiled kernel size varies, from ca 1 to 50
megabytes. The largest part of the kernel source is a huge collection of drivers.
The Linux system requires a large set of libraries and tools on top of the kernel.
This is mostly Gnu software. Hence Gnu/Linux.
First distro still alive: slackware
Most popular now: Ubuntu, Fedora, Debian, Arch, Gentoo
Linux 1991(vabavara)
LINUX is a free version of UNIX that runs on Intel/AMD, ARM and a large number
of exotic processors .Linux itself is just a kernel.
Written in : C, assembler
Mac OS X(Macintosh Operating System) 1984
Mac OS is the computer operating system for Apple Computer's Macintosh line of
personal computers and workstations.
Mac OS was known as System Software.
Written in : C C++ Objective-C Swift assembly language
Android 2008
Android is a mobile operating system based on a modified version of the Linux
kernel and other open source software, designed primarily for touchscreen
mobile devices such as smartphones and tablets.
Written in : Java, C, C++ and others
Protsessid/processes
Process: program in execution
– Address space (memory) the program can use
– State (registers, including program counter & stack pointer)
OS keeps track of all processes in a process table
Processes can create other processes
– Process tree tracks these relationships
– A is the root of the tree
– A created three child processes: B, C, and D
– C created two child processes: E and F
– D created one child process: G
Multitasking
Многозадачность — свойство операционной системы или среды
выполнения обеспечивать возможность параллельной (или
псевдопараллельной) обработки нескольких задач.
Multitasking, in an operating system, is allowing a user to perform more than
one computer task (such as the operation of an application program) at a time.
Paralleeltöö/Parallel running
Parallel running of processes is a movie-like illusion
Each program gets ca 0.01 sec time slice, then another runs, etc, cyclically.
Slices vary: from 0.005 to ca 0.1
Concurrent computing is a form of computing in which several computations are
executed during overlapping time periods—
concurrently—instead of
sequentially (one completing before the next starts).
Wait/run
Поочередное выполнения процесса, задача не начнется пока другая не
закончена
Alternate process execution, task will not start until another is completed
Interrupts
The interrupt handler must save the machine state, do some processing, then
call the process scheduler and dispatcher.
In digital computers, an interrupt is an input signal to the processor indicating an
event that needs immediate attention.( сигнал от программного или
аппаратного обеспечения, сообщающий процессору о наступлении какого-
либо события, требующего немедленного внимания.)
Virtuaalmälu
Virtual Memory is a storage allocation scheme in which secondary memory can
be addressed as though it were part of main memory.
Lihttekst
Plain Text
Kogu info ainult tekstina
Võib sisaldada kujundusmärgendeid Lõppvarianti kuvab mõni teine
rakendus või seade
HTML, Markdown, LaTeX, PostScript
WYSIWYG
What You See Is What You Get
Lõplik vormindus kuvatakse otse redigeerimistarkvaras
Kooditabel
Kooditabel määrab, kuidas tuleb faili salvestatud sümbolit ekraanil näidata
Ascii
American Standard Code for Information Interchange, is a character
encoding standard for electronic communication.
Unicode
Unicode is a character encoding standard that has widespread acceptance.
A standard for representing characters as integers. Unlike ASCII, which uses
7
bits for each character, Unicode uses
16 bits, which means that it can
represent more than 65,000 unique characters.
UTF-8
UTF-8 (8-bit Unicode Transformation Format) is a variable width character
encoding capable of encoding all 1,112,064[nb 1] valid code points in Unicode
using one to four 8-bit bytes.
LaTeX
is a document preparation system
TeX - Looja: Donald Knuth (1978)
La - Leslie Lamport (1985)
Laiendab TeX keelt erinevate makrodega
Akadeemilised ja tehnilised dokumendid
Matemaatika, statistika, arvutiteadus, keemia, füüsika jms.
Markdown
Märgituskeel (markup language) teksti vormindamiseks
Looja: John Gruber (2004)
Juhendite jms. lühikeste dokumentide loomiseks
Veebisisu (foorumipostitused, kommentaarid) kujundamiseks
8. nädal: Tarkvara arhitektuur ja
tabelarvutus
Teek/library(библиотека)
1.In programming, a library is a collection of precompiled routines that a
program can use.
2.In computer science, a
library is a collection of non-volatile resources used by
computer programs, often for software development.
These may include configuration data, documentation, help data, message
templates..
В программировании — сборник подпрограмм или объектов, используемых
для разработки программного обеспечения (ПО).
Examples: расширения so, dylib, library, dll..
Raamistik/Software framework
Это программная среда специального назначения, своеобразный каркас,
используемый для того, чтобы существенно облегчить процесс
объединения определенных компонентов при создании программ.(a kind of
framework used to significantly facilitate the process of combining certain
components when creating programs.)
In computer programming, a
software framework is an abstraction in which
software providing generic functionality can be selectively changed by additional
user-written code, thus providing application-specific software.
Edasiarendamiseks ja ümbertegemiseks mõeldud terviklikud näiterakendused,
levinud eeskätt „tüüpiliste“ andmebaasi-kesksete veebirakenduste jaoks. Igast
hästi läbimõeldud rakendusest võib saada selline näiterakendus.
Examples: Java Spring, Ruby on Rails, PHP Zend framework, Python Django,
Javascript Angular, Microsoft .NET
9. nädal: Võrgurakendused ja interneti
funktsioneerimine
HTTP(Hypertext Transfer Protocol) 1992
HTTP on omaette protokoll TCP peal, mida kasutatakse veebilehtede, piltide,
tekstifailide, zip failide, jsoni jne jne saatmiseks veebiserveri ja brauseri vahel.
HTTP (Hypertext Transfer Protocol) is the set of rules for transferring files,
such as text, graphic images, sound, video, and other multimedia files, on the
World Wide Web.
HTTPS(Hypertext Transfer Protocol Secure) тоже самое только с
дополнительной защитой
расширение протокола HTTP для поддержки шифрования в целях
повышения безопасности.
is an extension of the Hypertext Transfer Protocol (HTTP). It is used for secure
communication over a computer network, and is widely used on the Internet.
https =
http +
cryptographic protocols.
uses an SSL (secure sockets layer) certificate, which
helps create a secure
encrypted connection between the server and the browser
HTML(Hypertext Markup Language)(Kujunduskeel) 1993
is the standard markup language for documents designed to be displayed in a
web browser.
CSS(Cascading Style Sheets) 1996
Täpset teksti paigutust ja kujundust võimaldav keel HTML täienduseks .
is a style sheet language used for describing the presentation of a document
written in a markup language like HTML.
Javascript 1995
Brauseri programmeerimiskeel: javascripti programmid töötavad otse brauseris:
muudavad htmli, css-i, võtavad ühendust serveriga jne jne
JavaScript on Netscape'i loodud objektorienteeritud programmeerimiskeel, mida
kasutatakse peamiselt veebilehtede skriptimiseks.
AJAX
AJAX tähistab: Javascript + asynchronous queries
is a set of web development techniques using many web technologies on the
client side to create asynchronous web applications.
JSON(Javascript Object Notation)
[1,2, “siin on tekst“, [“sisemine“ ,5], 10]<
JSON on:
Andmete esitamise formaat tekstina
Javascripti programmeerimiskeele „native“ andmestruktuur
Väga lihtne ja mugav kasutada n Kaasajal brauserirakendustes eelistatum
kui XML.
JSON ei ole:
Programmeerimiskeel.
XML(eXtensible Markup Language)
A Le CoqTartu
XML on:
Struktureeritud teksti esitamise formaat
XML standard ütleb, kuidas teksti struktuuri märgistada.
Saab kasutada andmete esitamiseks tekstina
Lihtne, aga veidi kohmakas kasutada
XML ei ole:
Programmeerimiskeel.
Veebirakendus
Веб приложение — клиент-серверное приложение, в котором клиент
взаимодействует с веб-сервером при помощи браузера.
А веб-приложение — это что-то технически более сложное. Тут HTML-
страницы генерируются на лету в зависимости от запроса пользователя.
Почтовые клиенты, соцсети, поисковики, интернет-магазины, онлайн-
программы для бизнеса, это все веб-приложения.
A web application is any application that works usually works of a browser and
requires a net connection (it can also be a localhost)
Examples: Twitter, Gmail, Facebook..
Single page app(SPA)
Single Page Application is a type of web application that requires only a single
page to be loaded into the browser.
MAC address(Media Access Control)
A MAC address is a hardware identification number that uniquely identifies each
device on a network.
Igal arvutil on oma unikaalne NIMI ehk aadress Ethernetis:
MAC aadress: 48 bitine arv 01:23:45:67:89: ab
IP address(Internet Protocol address)
is an address of your network hardware.
Igal arvutil on oma unikaalne NIMI ehk aadress
Internetis:
IP aadress:
32 bitine arv
Port
Порт — соединение (физическое или логическое), через которое
принимаются и отправляются данные в компьютере.
In computer networking, a port is a communication endpoint. A port number is
always associated with an IP address of a host and the protocol type of the
communication
Ethernet/локальная сеть
Ethernet is a technology that connects wired local area networks (LANs) and
enables the device to communicate with each other through a protocol which is
the common network language.
IP(internet protocol)
IP protokoll on kokkulepe, et kuidas infot saata ja sellest aru saada tuleb.
IP protokoll lubab saata ainult suhteliselt väikeseid sõnumeid (64 kB).
TCP/IP pere tööhobune
RFC 791
Garanteerib marsruutimise, st minemise õiges suunas
Mitteusaldusväärne - ei taga kohalejõudmist
Kui sisendpuhver on täis, siis ignoreerib
Ei loo kanalit
iga datagrammi käsitletakse sõltumatult
TCP (transfer control protocol) Toimub kontroll.
põhi-protokolli, mis kasutab IP-d
Ühendusorienteeritud
Usaldatav
Voo tüüpi
Jagab voo segmentideks
Saates käivitab taimeri ja ootab kinnitust
Kinnitab saadud segmendid
Kontrollsumma päisest ja andmetest
Korrastab segmentide järjestuse
Unustab dublikaadid
Kontrollib voo mahtu
UDP (user datagram protocol) Ei kontrollita, kas info jõudis pärale.
põhi-protokolli, mis kasutab IP-d.
Iga rakenduse väljund tekitab uue datagrammi
Ei taga usaldatavust
Datagrammi ehitus:
lähte- ja sihtport (kumbki kaks baiti)
datagrammi pikkus (kaks baiti)
kontrollsumma (kaks baiti, pole kohustuslik)
andmeosa (varieeruva pikkusega hulk baite)
UDP paketi maksimaalpikkus on seega 64 kilobaiti.
Kontrollsumma vea puhul unustatakse datagramm
Rakendused: DNS, NFS, TFTP
Kapseldamine In object-oriented programming (OOP), encapsulation refers to the bundling
of data with the methods that operate on that data, or the restricting of direct
access to some of an object's components.
In general,
encapsulation is the inclusion of one thing within another thing so
that the included thing is not apparent.
In telecommunication, encapsulation is the inclusion of one data structure
within another structure so that the first data structure is hidden for the time
being.
10. nädal: Rekursioon, funktsionaal- ja
loogiline progemine, reaalsed projektid
Rekursioon/recursion
A subroutine is said to be recursive if it calls itself, either directly or indirectly.
Faktoriaal:
Base cases/baasejuht
A simple base case (or cases) — a terminating scenario that does not use
recursion to produce an answer
Base case The case for which the solution can be stated non‐recursively
Recursive case/ rekursiivnejuht
In a recursive step, we compute the result with the help of one or more recursive
calls to this same function, but with the inputs somehow reduced in size or
complexity, closer to a base case.
Every recursive function can be written using
while or for loops instead
Every function using
while and/or for loops can be written using
recursion instead
Lambda-arvutus
Lambda-arvutuse keel on Alonzo Churchi poolt 1930. aastatel leiutatud
lihtne ja universaalne meetod funktsioonide kirjapanekuks.
Lambda-arvutuse teooria tegeleb arvutatavuse ja arvutatavate
funktsioonide uurimisega, kasutades selleks lambda-arvutuse keelt kui
universaalset programmeerimiskeelt.
Churchi tees väidab, et iga algoritmi saab lambda-arvutuse keeles kirja
panna. On võimalik näidata, et lambda-arvutus, nagu ka Prolog, C ja Basic
on üks paljudest universaalsetest programmeerimiskeeltest.
Konkreetselt on lambda-arvutuse keel ja teooria funktsionaalsete
programmeerimiskeelte aluseks.
Mitme formaalse parameetriga funktsioone esitatakse mitme üksteise sees oleva
üheparameetrilise funktsioonina:
Proloog
Prolog-i põhi-idee on nõuda otsitava lahenduse kirjeldamist esimest järku
predikaatarvutuse keeles, kusjuures Prolog-i süsteem sisaldab teatud tüüpi
automaatset teoreemitõetajat, mis on võimeline lahendust automaatselt
otsima ja tuletama.
Sellegipoolest ei ole Prolog siiski automaatse teoreemitõestamise
süsteem: viimast realiseeriv mehhanism on Prolog-is väga piiratud,
spetsiifline ja loogiliselt mittetäielik.
11. nädal: Algoritmid: lahenduvus ja
keerukus.
Lahenduvus teoreetilises ja tavamõttes
Selgub, et iga täpselt formuleeritud probleemi (matemaatika- ja
programmeerimisprobleemid) jaoks ei leidugi lahendavat algoritmi!
Vähe sellest: kui võtta “juhuslik” probleem, siis tõenäosus, et lahendav algoritm
leidub, on lõpmatult väike!
Tavamõttes:
Tüüpilised põhjused, miks me ei saa tavaprobleeme lahendada: näiteks, kuidas
saada kiiresti väga palju raha:
Ei ole piisavalt infot:
Kui teaks, kus on mõni peidetud aare, kaevaks kohe üles.
Kui teaks, mis firma ülesostmine homme välja kuulutatakse, ostaks selle
aktsiaid.
Juhuslikkus segab: n
Teel aaret välja kaevama minnes võin kraavi sõita.
Kasiinos panustades ei tea, mis number ruletis tuleb.
Kas aktsia lähiajal tõuseb või langeb, sõltub tihti hullult paljudest
juhuslikest teguritest.
Positiivsete täisarvude, positiivsete/negatiivsete ja murdarvude
võimsuse võrdlemine ja tõestamine.
Positiivsed täisarvud sama võimsad nagu pos/neg täisarvud
Reaalarvude hulk on suurem (võimsam) kui täisarvude hulk
Cantori teoreem
Теорема Кантора — классическое утверждение теории множеств.
Доказано Георгом Кантором в 1891 году. Утверждает, что любое
множествоA менее мощно, чем множество всех его подмножеств 2^A.A.
Peatuvusprobleem/Halting Problem
Алан Тьюринг доказал в 1936 году, что проблема остановки неразрешима
на машине Тьюринга. Другими словами, не существует общего алгоритма
решения этой проблемы.
Turing machine –
A Turing machine is a mathematical model of computation. A Turing machine is a
general example of a CPU that controls all data manipulation done by a
computer. Turing machine can be halting as well as non halting and it depends
on algorithm and input associated with the algorithm.
Algoritmide keerukus
Algoritmi keerukus on põhioperatsiooni(de) arvu sõltuvusfunktsioon K(n)
sisendi(te) suurusest n.
O-notatsioon
Algoritmi keerukus on põhioperatsiooni(de) arvu sõltuvusfunktsioon K(n)
sisendi(te) suurusest n.
Mis on sorteerimise parim keerukus halvimal juhul.
Halvima juhu keerukus O(n 2 )
Keskmise juhu keerukus O(n log n)
12. nädal: Tehisintellekt ja
andmeteadus
AI - artificial intilligence/Tehisintellekt
Tugev ehk lai AI:
Supersedes human intelligence
Can do typically human tasks
Can apply a wide range of background knowlenge
Has same degree or self-consciousness(самосознание)
Nõrk ehk kitsas AI:
To study or accomplish specific problem solving or reasoning tasks that do
not encompass the full range of human cognitive abilities
Turingi testТьюринг задался целью определить, может ли машина мыслить.
Developed by
Alan Turing in 1950, is a test of a machine's ability to exhibit
intelligent behaviour equivalent to, or indistinguishable from, that of a human
Tegelikkuses
ei suuda praegu keegi teha programmi, mis suudaks
Turingi testi edukalt läbi teha: sellest ollakse väga kaugel.
Praegu “edukalt” intellekti
simuleerivad Turingi testi programmid on
simulaatorid, mis hoiavad keskustelu väga kitsastes raamides ja sisuliselt ei
saa üldse aru talle öeldud lausetest.
Veidi põhjalikuma vestlusega saab alati aru, et simuleerival programmil
pole üldist arusaama isegi igapäevasest elust ja asjadest ning ta
ei oska
probleeme lahendada.
Eliza(Vestlev pseudointellekt)
In 1966 Joseph Weizenbaum at M.I.T. wrote ELIZA, a famous program that
simulates a Rogerian psychoanalyst by taking excerpts from the subject's
comments and posing questions back to the subject.
Eliza on lihtne programm, mille sees on suur hulk “standardlauseid” ja
“standardsõnu”. Kui Elizale anda lause, milles on sõna tema “standardsõnade”
loetelus, siis Eliza valib mõne “standardvastuse” ja paneb sinna sisse osi talle
antud tekstist.
MiniMax
Mini-max algorithm is a
recursive or backtracking algorithm which is
used in decision-making and game theory. It provides an optimal move for
the player assuming that opponent is also playing optimally.
Min-Max algorithm is mostly
used for game playing in AI. Such as
Chess, Checkers, tic-tac-toe, go, and various tow-players game
Alpha-beta
Alpha-beta pruning is a
modified version of the minimax algorithm. It
is an optimization technique for the minimax algorithm.
Alpha: The best (highest-value) choice we have found so far at any point
along the path of Maximizer.
Beta: The best (lowest-value) choice we have found so far at any point
along the path of Minimizer.
Masinõpe/machine learning
Machine learning is a specific subset of AI that trains a machine how to learn.
Machine learning want to integrate machine learning into their functions and
new opportunities
IBM Watson 2011
is a
question-answering computer system capable of answering
questions posed in natural language, developed in IBM's DeepQA
project.
Watson is an IBM supercomputer that combines artificial intelligence (AI)
and sophisticated analytical software for optimal performance as a
"question answering" machine. The supercomputer is named for IBM's
founder, Thomas J. Watson.
15 terrabyte of RAM
500 gb storage
200 mln pages of information
WolframAlpha 2009
Wolfram Alpha is a
computational search engine
The Wolfram Alpha search box accepts natural language input in keyword,
phrase, or sentence format, as well as mathematical equations. The results
are dynamically computed.
50,000+ types of algorithms & equation
10+ trillion pieces of data from primary sources with continuous updating
Kas mingit sorti ülesannet praegused tehisintellektisüsteemid
suudavad ok/väga hästi/väga halvasti lahendada?
Nowadays AI can solve a lot of problems, it can win in many popular
games, diagnose diseases and test scientific hypotheses, but of course
there are several problems that AI does not capable to do
Artificial intelligence is not yet able to separate the truth from fiction and
fight misinformation.
People do not trust artificial intelligence, which impedes its
implementation.
13. nädal: Arendusprotsess, IT äri ja
P2P võrgud, ledger, bitcoin
Peamised P2P liigid
• Napster model: central server used for storing info about which client has
which files
•
Gnutella model: no central server, queries forwared/multiplied and flood the
whole net
•
Kazaa/Skype model: supernodes act as central servers for N clients, Gnutella-
type queries between supernodes
•
Structured model (DHT) a la Chord, Kademlia: queries forwarded „closer“ to
target until hit, without flooding
•
Darknet model a la Freenet, TOR: structured model + random paths +
encryption to hide traffick
•
Bittorrent:
focus on efficient file sharing, not search
BitTorrent is a protocol that enables fast downloading of large files using
minimum Internet bandwidth.
BitTorrent maximizes
transfer speed by gathering pieces of the file
you want and downloading these pieces simultaneously
from people
who already have them. This process makes popular and very large files,
such as videos and television programs, download much faster than is
possible with other protocols.
Darknet/TOR
The main concept behind using Darknet is that it
maintains your
anonymity and due to this dark net is often associated with illegal
activities.
In Darknet connections are made between the trusted nodes to form a
network and in order to connect to that network one has to install some kind
of software to his / her computer.
TOR: The Onion Router
• Eriti tugev ja populaarne darknet.
• Analoogiline Freenetile: krüpteeritud P2P ühendused, garanteerimaks, et
ei ole võimalik tuvastada ühenduse osapooli.
Bittorenti proof of work/kaevandamineIt deters denial-of-service attacks and other service abuses such as spam on a
network
14. nädal: Masinõpe ja projektide
arendus
peamised masinõppe liigid/main types of ML:
● Supervised learning
Supervised machine learning algorithms are designed
to learn by
example. The name “supervised” learning originates from the idea that
training this type of algorithm is
like having a teacher supervise the
whole process.
● Reinforcement learning
where we learn to choose the correct actions based on the outcomes of
previous actions in similar situations.
It allows machines and software agents to automatically determine the
ideal behavior within a specific context, in order to maximize its
performance.
● Unsupervised learning
The computer is trained with unlabeled data.
Here there’s no teacher at all, actually the computer might be able to
teach you new things after it learns patterns in data, these algorithms a
particularly useful in cases where the human expert doesn’t know what to
look for in the data.
15. nädal: Konsultatsioon ja e-
valimised.
Mida peab hääletussüsteem tagama?
Hääled loetakse õieti kokku
Hääled on anonüümsed
Ainult hääletamisõiguslikud saavad hääletada, ei saa hääletada topelt, ei
saa hääletamist delegeerida
Hääletajaid ei diskrimineerita
… ja hea oleks häälte ostmist takistada jms …
E-hääletamine on palju keerulisem, kui internetipangandus
Internetipanga toimingud ei ole anonüümsed: kõik identifitseeritakse,
logitakse ja vajadusel saab minna kohtusse.
E-hääled on anonüümsed: ei ole võimalik tuvastada, kes kuidas hääletas.
Topelümbriku süsteem:
Topeltümbrik:
Sinu hääl on sisemises ümbrikus: seal ei ole sinu nime
Sinu nimi on välisel ümbrikul
Välimise ümbriku järgi sind registreeritakse hääletajaks, võetakse välja
sisemine ümbrik ja pannakse valimisurni.
Kõik kommentaarid