1. computers - uni-weimar.de file1. computers prof. dr. charles wüthrich mfa gianluca pandolfo,...
TRANSCRIPT
![Page 1: 1. Computers - uni-weimar.de file1. Computers Prof. Dr. Charles Wüthrich MfA Gianluca Pandolfo, CoGVis/MMC, Faculty of Media ... A not quite so minimal computer October 2017 Charles](https://reader030.vdocuments.us/reader030/viewer/2022040802/5d4712da88c9932e638bc1b7/html5/thumbnails/1.jpg)
1. Computers
Prof. Dr. Charles Wüthrich MfA Gianluca Pandolfo, CoGVis/MMC, Faculty of Media Bauhaus-University Weimar
![Page 2: 1. Computers - uni-weimar.de file1. Computers Prof. Dr. Charles Wüthrich MfA Gianluca Pandolfo, CoGVis/MMC, Faculty of Media ... A not quite so minimal computer October 2017 Charles](https://reader030.vdocuments.us/reader030/viewer/2022040802/5d4712da88c9932e638bc1b7/html5/thumbnails/2.jpg)
A Computer
• From a young age, today people are used to use one or more computers
October 2017 Charles Wüthrich 2
![Page 3: 1. Computers - uni-weimar.de file1. Computers Prof. Dr. Charles Wüthrich MfA Gianluca Pandolfo, CoGVis/MMC, Faculty of Media ... A not quite so minimal computer October 2017 Charles](https://reader030.vdocuments.us/reader030/viewer/2022040802/5d4712da88c9932e638bc1b7/html5/thumbnails/3.jpg)
A Computer
• From a young age, today people are used to use one or more computers
October 2017 Charles Wüthrich 3
![Page 4: 1. Computers - uni-weimar.de file1. Computers Prof. Dr. Charles Wüthrich MfA Gianluca Pandolfo, CoGVis/MMC, Faculty of Media ... A not quite so minimal computer October 2017 Charles](https://reader030.vdocuments.us/reader030/viewer/2022040802/5d4712da88c9932e638bc1b7/html5/thumbnails/4.jpg)
A Computer
• From a young age, today people are used to use one or more computers
October 2017 Charles Wüthrich 4
Cou
rtesy
Bun
desa
rchi
v
![Page 5: 1. Computers - uni-weimar.de file1. Computers Prof. Dr. Charles Wüthrich MfA Gianluca Pandolfo, CoGVis/MMC, Faculty of Media ... A not quite so minimal computer October 2017 Charles](https://reader030.vdocuments.us/reader030/viewer/2022040802/5d4712da88c9932e638bc1b7/html5/thumbnails/5.jpg)
What makes a computer?
October 2017 Charles Wüthrich 5
![Page 6: 1. Computers - uni-weimar.de file1. Computers Prof. Dr. Charles Wüthrich MfA Gianluca Pandolfo, CoGVis/MMC, Faculty of Media ... A not quite so minimal computer October 2017 Charles](https://reader030.vdocuments.us/reader030/viewer/2022040802/5d4712da88c9932e638bc1b7/html5/thumbnails/6.jpg)
A minimal computer
October 2017 Charles Wüthrich 6
Processor
![Page 7: 1. Computers - uni-weimar.de file1. Computers Prof. Dr. Charles Wüthrich MfA Gianluca Pandolfo, CoGVis/MMC, Faculty of Media ... A not quite so minimal computer October 2017 Charles](https://reader030.vdocuments.us/reader030/viewer/2022040802/5d4712da88c9932e638bc1b7/html5/thumbnails/7.jpg)
A minimal computer
October 2017 Charles Wüthrich 7
Memory
Processor
![Page 8: 1. Computers - uni-weimar.de file1. Computers Prof. Dr. Charles Wüthrich MfA Gianluca Pandolfo, CoGVis/MMC, Faculty of Media ... A not quite so minimal computer October 2017 Charles](https://reader030.vdocuments.us/reader030/viewer/2022040802/5d4712da88c9932e638bc1b7/html5/thumbnails/8.jpg)
A minimal computer
October 2017 Charles Wüthrich 8
Memory
Processor
I/O
![Page 9: 1. Computers - uni-weimar.de file1. Computers Prof. Dr. Charles Wüthrich MfA Gianluca Pandolfo, CoGVis/MMC, Faculty of Media ... A not quite so minimal computer October 2017 Charles](https://reader030.vdocuments.us/reader030/viewer/2022040802/5d4712da88c9932e638bc1b7/html5/thumbnails/9.jpg)
A minimal computer
October 2017 Charles Wüthrich 9
Memory
Processor
I/O
![Page 10: 1. Computers - uni-weimar.de file1. Computers Prof. Dr. Charles Wüthrich MfA Gianluca Pandolfo, CoGVis/MMC, Faculty of Media ... A not quite so minimal computer October 2017 Charles](https://reader030.vdocuments.us/reader030/viewer/2022040802/5d4712da88c9932e638bc1b7/html5/thumbnails/10.jpg)
Hardware
A minimal computer
October 2017 Charles Wüthrich 10
Memory
Processor
I/O
![Page 11: 1. Computers - uni-weimar.de file1. Computers Prof. Dr. Charles Wüthrich MfA Gianluca Pandolfo, CoGVis/MMC, Faculty of Media ... A not quite so minimal computer October 2017 Charles](https://reader030.vdocuments.us/reader030/viewer/2022040802/5d4712da88c9932e638bc1b7/html5/thumbnails/11.jpg)
Hardware
A less minimal computer
October 2017 Charles Wüthrich 11
Memory
Processor
I/O O
pera
ting
Syst
em (O
S)
![Page 12: 1. Computers - uni-weimar.de file1. Computers Prof. Dr. Charles Wüthrich MfA Gianluca Pandolfo, CoGVis/MMC, Faculty of Media ... A not quite so minimal computer October 2017 Charles](https://reader030.vdocuments.us/reader030/viewer/2022040802/5d4712da88c9932e638bc1b7/html5/thumbnails/12.jpg)
Hardware
A less minimal computer
October 2017 Charles Wüthrich 12
Memory
Processor
I/O O
pera
ting
Syst
em (O
S)
![Page 13: 1. Computers - uni-weimar.de file1. Computers Prof. Dr. Charles Wüthrich MfA Gianluca Pandolfo, CoGVis/MMC, Faculty of Media ... A not quite so minimal computer October 2017 Charles](https://reader030.vdocuments.us/reader030/viewer/2022040802/5d4712da88c9932e638bc1b7/html5/thumbnails/13.jpg)
Hardware
A more realistic computer
October 2017 Charles Wüthrich 13
Memory
Processor
I/O O
pera
ting
Syst
em (O
S) Harddrive …
Bus
![Page 14: 1. Computers - uni-weimar.de file1. Computers Prof. Dr. Charles Wüthrich MfA Gianluca Pandolfo, CoGVis/MMC, Faculty of Media ... A not quite so minimal computer October 2017 Charles](https://reader030.vdocuments.us/reader030/viewer/2022040802/5d4712da88c9932e638bc1b7/html5/thumbnails/14.jpg)
Hardware
A not quite so minimal computer
October 2017 Charles Wüthrich 14
Memory
Processor
I/O
Ope
ratin
g Sy
stem
(OS)
Gra
phic
al U
ser I
nter
face
GU
I
HD ..
Bus
![Page 15: 1. Computers - uni-weimar.de file1. Computers Prof. Dr. Charles Wüthrich MfA Gianluca Pandolfo, CoGVis/MMC, Faculty of Media ... A not quite so minimal computer October 2017 Charles](https://reader030.vdocuments.us/reader030/viewer/2022040802/5d4712da88c9932e638bc1b7/html5/thumbnails/15.jpg)
A not quite so minimal computer
October 2017 Charles Wüthrich 15
![Page 16: 1. Computers - uni-weimar.de file1. Computers Prof. Dr. Charles Wüthrich MfA Gianluca Pandolfo, CoGVis/MMC, Faculty of Media ... A not quite so minimal computer October 2017 Charles](https://reader030.vdocuments.us/reader030/viewer/2022040802/5d4712da88c9932e638bc1b7/html5/thumbnails/16.jpg)
The file system
• All data organized in a file system (on your HD) like a tree
• Root directory: / • Subdirectories:
– /dir1/ /dir2/ …"
• Subsubdirectories – /dir1/sub1 /sub2 /… /dir2/sub1 /sub2 /… … and so on..."
October 2017 Charles Wüthrich 16
![Page 17: 1. Computers - uni-weimar.de file1. Computers Prof. Dr. Charles Wüthrich MfA Gianluca Pandolfo, CoGVis/MMC, Faculty of Media ... A not quite so minimal computer October 2017 Charles](https://reader030.vdocuments.us/reader030/viewer/2022040802/5d4712da88c9932e638bc1b7/html5/thumbnails/17.jpg)
Command Line Interface (CLI)
• All systems have a Command Line Interface where you can type commands for the computer Mac: Terminal"
October 2017 Charles Wüthrich 17
![Page 18: 1. Computers - uni-weimar.de file1. Computers Prof. Dr. Charles Wüthrich MfA Gianluca Pandolfo, CoGVis/MMC, Faculty of Media ... A not quite so minimal computer October 2017 Charles](https://reader030.vdocuments.us/reader030/viewer/2022040802/5d4712da88c9932e638bc1b7/html5/thumbnails/18.jpg)
Moving in the file system
• Change directory you are working at: from the CLI type cd "
• Example: cd / "
• Current directory: ."
• Up directory.. cd ..
October 2017 Charles Wüthrich 18
![Page 19: 1. Computers - uni-weimar.de file1. Computers Prof. Dr. Charles Wüthrich MfA Gianluca Pandolfo, CoGVis/MMC, Faculty of Media ... A not quite so minimal computer October 2017 Charles](https://reader030.vdocuments.us/reader030/viewer/2022040802/5d4712da88c9932e638bc1b7/html5/thumbnails/19.jpg)
Listing files
• From any directory position: ls"
• Example: ls ./introcs/ ArtistsLoveJava.java "hello " "lovejava checkstyle-5.5 " "java3d" "stdlib.jar findbugs-2.0.3 " "log.txt"
• Lists the subdirectory of the current directory named introcs
"
October 2017 Charles Wüthrich 19
![Page 20: 1. Computers - uni-weimar.de file1. Computers Prof. Dr. Charles Wüthrich MfA Gianluca Pandolfo, CoGVis/MMC, Faculty of Media ... A not quite so minimal computer October 2017 Charles](https://reader030.vdocuments.us/reader030/viewer/2022040802/5d4712da88c9932e638bc1b7/html5/thumbnails/20.jpg)
Editing files
• You will need an editor application, such as: nano emacs . . . ."
• Example: nano myfile.txt "
October 2017 Charles Wüthrich 20
![Page 21: 1. Computers - uni-weimar.de file1. Computers Prof. Dr. Charles Wüthrich MfA Gianluca Pandolfo, CoGVis/MMC, Faculty of Media ... A not quite so minimal computer October 2017 Charles](https://reader030.vdocuments.us/reader030/viewer/2022040802/5d4712da88c9932e638bc1b7/html5/thumbnails/21.jpg)
My first program
October 2017 Charles Wüthrich 21
![Page 22: 1. Computers - uni-weimar.de file1. Computers Prof. Dr. Charles Wüthrich MfA Gianluca Pandolfo, CoGVis/MMC, Faculty of Media ... A not quite so minimal computer October 2017 Charles](https://reader030.vdocuments.us/reader030/viewer/2022040802/5d4712da88c9932e638bc1b7/html5/thumbnails/22.jpg)
Compiling my first program
October 2017 Charles Wüthrich 22
![Page 23: 1. Computers - uni-weimar.de file1. Computers Prof. Dr. Charles Wüthrich MfA Gianluca Pandolfo, CoGVis/MMC, Faculty of Media ... A not quite so minimal computer October 2017 Charles](https://reader030.vdocuments.us/reader030/viewer/2022040802/5d4712da88c9932e638bc1b7/html5/thumbnails/23.jpg)
Compiling my first program
• Compiling: a “translator” compiles your high level code into a now level code understandable by the machine
• A compiler does exactly this, and achieves machine (or in our case java virtual machine) executable code
• This code is then ready to be “executed” by the machine so as to “run” your instructions
October 2017 Charles Wüthrich 23
![Page 24: 1. Computers - uni-weimar.de file1. Computers Prof. Dr. Charles Wüthrich MfA Gianluca Pandolfo, CoGVis/MMC, Faculty of Media ... A not quite so minimal computer October 2017 Charles](https://reader030.vdocuments.us/reader030/viewer/2022040802/5d4712da88c9932e638bc1b7/html5/thumbnails/24.jpg)
Running my first program
October 2017 Charles Wüthrich 24
![Page 25: 1. Computers - uni-weimar.de file1. Computers Prof. Dr. Charles Wüthrich MfA Gianluca Pandolfo, CoGVis/MMC, Faculty of Media ... A not quite so minimal computer October 2017 Charles](https://reader030.vdocuments.us/reader030/viewer/2022040802/5d4712da88c9932e638bc1b7/html5/thumbnails/25.jpg)
My first program (IDE)
October 2017 Charles Wüthrich 25
![Page 26: 1. Computers - uni-weimar.de file1. Computers Prof. Dr. Charles Wüthrich MfA Gianluca Pandolfo, CoGVis/MMC, Faculty of Media ... A not quite so minimal computer October 2017 Charles](https://reader030.vdocuments.us/reader030/viewer/2022040802/5d4712da88c9932e638bc1b7/html5/thumbnails/26.jpg)
My first program
October 2017 Charles Wüthrich 26
![Page 27: 1. Computers - uni-weimar.de file1. Computers Prof. Dr. Charles Wüthrich MfA Gianluca Pandolfo, CoGVis/MMC, Faculty of Media ... A not quite so minimal computer October 2017 Charles](https://reader030.vdocuments.us/reader030/viewer/2022040802/5d4712da88c9932e638bc1b7/html5/thumbnails/27.jpg)
Errors
• When you write a program there are three types of errors that can happen – Compile time: the compiler cannot understand the code you
typed in because it does not conform to the syntax – Execution time: the machine tries to execute the code you
wrote (which compiles correctly). • Possible causes: Division by zero, trying to touch things that
you are not allowed to touch (in the system) – Logical errors: most difficult to catch.
Wrong results, program behaves erratically…. Catching these is both frustrating and rewarding.
October 2017 Charles Wüthrich 27
![Page 28: 1. Computers - uni-weimar.de file1. Computers Prof. Dr. Charles Wüthrich MfA Gianluca Pandolfo, CoGVis/MMC, Faculty of Media ... A not quite so minimal computer October 2017 Charles](https://reader030.vdocuments.us/reader030/viewer/2022040802/5d4712da88c9932e638bc1b7/html5/thumbnails/28.jpg)
Controlling (a bit) Input and Output
• I’d like to discuss with you a new simple program:
• This time, the program has more lines • The computer starts at the main line, and executes
each of the 3 lines one after the other • What do these lines do?
October 2017 Charles Wüthrich 28
![Page 29: 1. Computers - uni-weimar.de file1. Computers Prof. Dr. Charles Wüthrich MfA Gianluca Pandolfo, CoGVis/MMC, Faculty of Media ... A not quite so minimal computer October 2017 Charles](https://reader030.vdocuments.us/reader030/viewer/2022040802/5d4712da88c9932e638bc1b7/html5/thumbnails/29.jpg)
Controlling (a bit) Input and Output
• The first line simply prints the content of the brackets in the CLI
October 2017 Charles Wüthrich 29
![Page 30: 1. Computers - uni-weimar.de file1. Computers Prof. Dr. Charles Wüthrich MfA Gianluca Pandolfo, CoGVis/MMC, Faculty of Media ... A not quite so minimal computer October 2017 Charles](https://reader030.vdocuments.us/reader030/viewer/2022040802/5d4712da88c9932e638bc1b7/html5/thumbnails/30.jpg)
Controlling (a bit) Input and Output
October 2017 Charles Wüthrich 30
• The second line prints a thing which is called “args[0]” • And who is this?
![Page 31: 1. Computers - uni-weimar.de file1. Computers Prof. Dr. Charles Wüthrich MfA Gianluca Pandolfo, CoGVis/MMC, Faculty of Media ... A not quite so minimal computer October 2017 Charles](https://reader030.vdocuments.us/reader030/viewer/2022040802/5d4712da88c9932e638bc1b7/html5/thumbnails/31.jpg)
Controlling (a bit) Input and Output
October 2017 Charles Wüthrich 31
• The second line prints a thing which is called “args[0]” • And who is this? • For now, to you, “args[0]” contains the first thing you
typed after calling the program name when you run the code: java ReadArgument sillycreature
![Page 32: 1. Computers - uni-weimar.de file1. Computers Prof. Dr. Charles Wüthrich MfA Gianluca Pandolfo, CoGVis/MMC, Faculty of Media ... A not quite so minimal computer October 2017 Charles](https://reader030.vdocuments.us/reader030/viewer/2022040802/5d4712da88c9932e638bc1b7/html5/thumbnails/32.jpg)
Controlling (a bit) Input and Output
• The second line prints a thing which is called “args[0]” • And who is this? • For now, to you, “args[0]” contains the first thing you
typed after calling the program name when you run the code: java ReadArgument sillycreature will contain “sillycreature”
October 2017 Charles Wüthrich 32
![Page 33: 1. Computers - uni-weimar.de file1. Computers Prof. Dr. Charles Wüthrich MfA Gianluca Pandolfo, CoGVis/MMC, Faculty of Media ... A not quite so minimal computer October 2017 Charles](https://reader030.vdocuments.us/reader030/viewer/2022040802/5d4712da88c9932e638bc1b7/html5/thumbnails/33.jpg)
Controlling (a bit) Input and Output
• The third line prints “and yours?” • So what is the result if we type
java ReadArgument worms in the console?
October 2017 Charles Wüthrich 33
![Page 34: 1. Computers - uni-weimar.de file1. Computers Prof. Dr. Charles Wüthrich MfA Gianluca Pandolfo, CoGVis/MMC, Faculty of Media ... A not quite so minimal computer October 2017 Charles](https://reader030.vdocuments.us/reader030/viewer/2022040802/5d4712da88c9932e638bc1b7/html5/thumbnails/34.jpg)
Controlling (a bit) Input and Output
October 2017 Charles Wüthrich 34
My favourite pets are worms. And yours?
![Page 35: 1. Computers - uni-weimar.de file1. Computers Prof. Dr. Charles Wüthrich MfA Gianluca Pandolfo, CoGVis/MMC, Faculty of Media ... A not quite so minimal computer October 2017 Charles](https://reader030.vdocuments.us/reader030/viewer/2022040802/5d4712da88c9932e638bc1b7/html5/thumbnails/35.jpg)
Controlling (a bit) Input and Output
October 2017 Charles Wüthrich 35
My favourite pets are worms. And yours?
• Notice the different use of “print” and “println”
![Page 36: 1. Computers - uni-weimar.de file1. Computers Prof. Dr. Charles Wüthrich MfA Gianluca Pandolfo, CoGVis/MMC, Faculty of Media ... A not quite so minimal computer October 2017 Charles](https://reader030.vdocuments.us/reader030/viewer/2022040802/5d4712da88c9932e638bc1b7/html5/thumbnails/36.jpg)
+++ Ende - The end - Finis - Fin - Fine +++ Ende - The end - Finis - Fin - Fine +++
End