[email protected]. languages for it & cs pseudo-code what html isn’t early history...
TRANSCRIPT
![Page 2: R.G.Keim@kent.ac.uk1. Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpreting Classifying languages The process of programming](https://reader036.vdocuments.mx/reader036/viewer/2022062712/56649c715503460f94922c33/html5/thumbnails/2.jpg)
Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpretingClassifying languages The process of programming
Programming toolsBugs
Languages
![Page 3: R.G.Keim@kent.ac.uk1. Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpreting Classifying languages The process of programming](https://reader036.vdocuments.mx/reader036/viewer/2022062712/56649c715503460f94922c33/html5/thumbnails/3.jpg)
Languages in IT and CS
English … Pseudo-code Programming languages Other formalised languages
![Page 4: R.G.Keim@kent.ac.uk1. Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpreting Classifying languages The process of programming](https://reader036.vdocuments.mx/reader036/viewer/2022062712/56649c715503460f94922c33/html5/thumbnails/4.jpg)
Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpretingClassifying languages The process of programming
Programming toolsBugs
Languages
![Page 5: R.G.Keim@kent.ac.uk1. Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpreting Classifying languages The process of programming](https://reader036.vdocuments.mx/reader036/viewer/2022062712/56649c715503460f94922c33/html5/thumbnails/5.jpg)
5
Pseudo-code
A half-way point between the way in which we would describe the steps in a algorithm to another person and the way in which one would write them in a specific programming language to be run on a computer
![Page 6: R.G.Keim@kent.ac.uk1. Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpreting Classifying languages The process of programming](https://reader036.vdocuments.mx/reader036/viewer/2022062712/56649c715503460f94922c33/html5/thumbnails/6.jpg)
6
Pseudo-code
Doesn't relate to any specific programming language
More formal than natural human language, less formal than something written in a programming language
You’ll be familiar with flow charts
![Page 7: R.G.Keim@kent.ac.uk1. Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpreting Classifying languages The process of programming](https://reader036.vdocuments.mx/reader036/viewer/2022062712/56649c715503460f94922c33/html5/thumbnails/7.jpg)
Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpretingClassifying languages The process of programming
Programming toolsBugs
Languages
![Page 8: R.G.Keim@kent.ac.uk1. Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpreting Classifying languages The process of programming](https://reader036.vdocuments.mx/reader036/viewer/2022062712/56649c715503460f94922c33/html5/thumbnails/8.jpg)
8
Not all computer languages are programming languages Programming
languages– VB– Javascript– Java– VBScript– XSLT
NOT programming languages– HTML– XHTML– XML
– UML
![Page 9: R.G.Keim@kent.ac.uk1. Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpreting Classifying languages The process of programming](https://reader036.vdocuments.mx/reader036/viewer/2022062712/56649c715503460f94922c33/html5/thumbnails/9.jpg)
Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpretingClassifying languages The process of programming
Programming toolsBugs
Languages
![Page 10: R.G.Keim@kent.ac.uk1. Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpreting Classifying languages The process of programming](https://reader036.vdocuments.mx/reader036/viewer/2022062712/56649c715503460f94922c33/html5/thumbnails/10.jpg)
10
A early history of computing languages Machine code
– completely consists of binary, – is the computer code that machines actually execute– hard for humans to read, write and understand
(even when its converted to hex)
Assembler – designed so that humans have some guides to understanding – gets changed into the actual code that is run on the computers
Early higher order languages (eg FORTRAN, COBOL, BASIC, Lisp)
![Page 11: R.G.Keim@kent.ac.uk1. Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpreting Classifying languages The process of programming](https://reader036.vdocuments.mx/reader036/viewer/2022062712/56649c715503460f94922c33/html5/thumbnails/11.jpg)
11
The translation from high-level language to machine instructions.
Programs in assembly language
ADD 20, 20, 24
Programs in a standard programming language (C, C#, Java, VB.Net
Total=princ+interest
Programs in binary
00100100 0111010100101001 00110101
Compile
Assemble
![Page 12: R.G.Keim@kent.ac.uk1. Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpreting Classifying languages The process of programming](https://reader036.vdocuments.mx/reader036/viewer/2022062712/56649c715503460f94922c33/html5/thumbnails/12.jpg)
Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpretingClassifying languages The process of programming
Programming toolsBugs
Languages
![Page 13: R.G.Keim@kent.ac.uk1. Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpreting Classifying languages The process of programming](https://reader036.vdocuments.mx/reader036/viewer/2022062712/56649c715503460f94922c33/html5/thumbnails/13.jpg)
13
Compiling
Many computing languages are complied in versions that can be run on computers – languages such as C++, Java (most languages that are used for writing applications are compiled)
Other computing languages are interpreted. The machine code is generated by an interpreter at the time that they are run. Most scripting languages are of this sort – eg. JavaScript and VBScript
![Page 14: R.G.Keim@kent.ac.uk1. Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpreting Classifying languages The process of programming](https://reader036.vdocuments.mx/reader036/viewer/2022062712/56649c715503460f94922c33/html5/thumbnails/14.jpg)
14
Compiling and Interpreting
Not all computing languages are compiled. Some are interpreted
In interpreted languages, the source code is always present and it when it is run it is interpreted line-by-line and then it is executed. Most scripting languages are of this sort – eg. JavaScript and VBScript
![Page 15: R.G.Keim@kent.ac.uk1. Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpreting Classifying languages The process of programming](https://reader036.vdocuments.mx/reader036/viewer/2022062712/56649c715503460f94922c33/html5/thumbnails/15.jpg)
Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpretingClassifying languages The process of programming
Programming toolsBugs
Languages
![Page 16: R.G.Keim@kent.ac.uk1. Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpreting Classifying languages The process of programming](https://reader036.vdocuments.mx/reader036/viewer/2022062712/56649c715503460f94922c33/html5/thumbnails/16.jpg)
16
Classifying computer languages
Syntax Paradigm Common uses Relationship to with the lower-level
software and hardware
![Page 17: R.G.Keim@kent.ac.uk1. Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpreting Classifying languages The process of programming](https://reader036.vdocuments.mx/reader036/viewer/2022062712/56649c715503460f94922c33/html5/thumbnails/17.jpg)
17
Syntax
There are families of languages that have the same or nearly the same syntax
JavaScript's syntax is very like the syntax of C, C++, C#, Java ...
VB.Net's syntax is very like the syntax of Basic, VBScript ...
![Page 18: R.G.Keim@kent.ac.uk1. Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpreting Classifying languages The process of programming](https://reader036.vdocuments.mx/reader036/viewer/2022062712/56649c715503460f94922c33/html5/thumbnails/18.jpg)
18
Different types of computer languages – different paradigms Procedural programming languages (eg: C
and Basic) Functional languages (eg: Lisp, Haskell) Object-oriented languages (eg C++,
Smalltalk, Java, VisualBasic.Net) Scripting languages (JavaScript, Perl,
VBScript) Declarative languages (Prolog)
![Page 19: R.G.Keim@kent.ac.uk1. Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpreting Classifying languages The process of programming](https://reader036.vdocuments.mx/reader036/viewer/2022062712/56649c715503460f94922c33/html5/thumbnails/19.jpg)
19
Object-oriented programming– Examples C++, Java– Hopes to parallel ways we think about and
analyse problems
![Page 20: R.G.Keim@kent.ac.uk1. Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpreting Classifying languages The process of programming](https://reader036.vdocuments.mx/reader036/viewer/2022062712/56649c715503460f94922c33/html5/thumbnails/20.jpg)
20
Scripting languages
Examples: javascriptperl, VBScript, php, …
Usually interpreted rather than compiled Usually "weakly typed" Relatively quick to write – often used for small
jobs You write a script to handle.
Many of them are especially designed for certain purposes (javascript, php and to some extent perl
![Page 21: R.G.Keim@kent.ac.uk1. Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpreting Classifying languages The process of programming](https://reader036.vdocuments.mx/reader036/viewer/2022062712/56649c715503460f94922c33/html5/thumbnails/21.jpg)
21
Different types of computer languages – different paradigms Procedural programming languages (eg: C
and Basic) Functional languages (eg: Lisp, Haskell) Object-oriented languages (eg C++,
Smalltalk, Java, VB.Net) Scripting languages (JavaScript, Perl,
VBScript) Declarative languages (Prolog)
![Page 22: R.G.Keim@kent.ac.uk1. Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpreting Classifying languages The process of programming](https://reader036.vdocuments.mx/reader036/viewer/2022062712/56649c715503460f94922c33/html5/thumbnails/22.jpg)
22
Common uses
Scripting languages (Javascript, VBScript, perl, php)
Application languages Text manipulation (perl)
![Page 23: R.G.Keim@kent.ac.uk1. Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpreting Classifying languages The process of programming](https://reader036.vdocuments.mx/reader036/viewer/2022062712/56649c715503460f94922c33/html5/thumbnails/23.jpg)
23
FAQ
Why are there so many? Do I need to learn them all? Which ones are important for me to learn? How are they different?
![Page 24: R.G.Keim@kent.ac.uk1. Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpreting Classifying languages The process of programming](https://reader036.vdocuments.mx/reader036/viewer/2022062712/56649c715503460f94922c33/html5/thumbnails/24.jpg)
Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpretingClassifying languages The process of programming
Programming toolsBugs
Languages
![Page 25: R.G.Keim@kent.ac.uk1. Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpreting Classifying languages The process of programming](https://reader036.vdocuments.mx/reader036/viewer/2022062712/56649c715503460f94922c33/html5/thumbnails/25.jpg)
25
Things we do when programming
Writing code
Writing tests
Running tests
Finding problems with the code
Fixing problems with the code
Interpreting specifications
Adding functionality
Gathering specifications
![Page 26: R.G.Keim@kent.ac.uk1. Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpreting Classifying languages The process of programming](https://reader036.vdocuments.mx/reader036/viewer/2022062712/56649c715503460f94922c33/html5/thumbnails/26.jpg)
Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpretingClassifying languages The process of programming
Programming toolsBugs
Languages
![Page 27: R.G.Keim@kent.ac.uk1. Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpreting Classifying languages The process of programming](https://reader036.vdocuments.mx/reader036/viewer/2022062712/56649c715503460f94922c33/html5/thumbnails/27.jpg)
27
Tools
To understand what we need to build To create software
IDEsText editors
To test softwareunit test tools
To debug software - debuggers
![Page 28: R.G.Keim@kent.ac.uk1. Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpreting Classifying languages The process of programming](https://reader036.vdocuments.mx/reader036/viewer/2022062712/56649c715503460f94922c33/html5/thumbnails/28.jpg)
28
IDEs
Visual Studio
BlueJ
Excel (?)
![Page 29: R.G.Keim@kent.ac.uk1. Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpreting Classifying languages The process of programming](https://reader036.vdocuments.mx/reader036/viewer/2022062712/56649c715503460f94922c33/html5/thumbnails/29.jpg)
29
Tools
Write – IDEs Test – IDEs
debuggers Design and analyse –
UML
IDEs are software applications
UML – (the unified modelling language) helps people design software and communicate their designs
![Page 30: R.G.Keim@kent.ac.uk1. Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpreting Classifying languages The process of programming](https://reader036.vdocuments.mx/reader036/viewer/2022062712/56649c715503460f94922c33/html5/thumbnails/30.jpg)
30
An IDE
![Page 31: R.G.Keim@kent.ac.uk1. Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpreting Classifying languages The process of programming](https://reader036.vdocuments.mx/reader036/viewer/2022062712/56649c715503460f94922c33/html5/thumbnails/31.jpg)
31
A text editor
Syntax highlighting
!
![Page 32: R.G.Keim@kent.ac.uk1. Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpreting Classifying languages The process of programming](https://reader036.vdocuments.mx/reader036/viewer/2022062712/56649c715503460f94922c33/html5/thumbnails/32.jpg)
32
The cycle for writing code
Write some code ('edit')
Compile the code Run the code
Repeat
![Page 33: R.G.Keim@kent.ac.uk1. Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpreting Classifying languages The process of programming](https://reader036.vdocuments.mx/reader036/viewer/2022062712/56649c715503460f94922c33/html5/thumbnails/33.jpg)
33
A tool – UML ("the Unified Modelling language") Class diagrams are a
simple and useful way of expressing relationships between parts of our program in an object-oriented language.
![Page 34: R.G.Keim@kent.ac.uk1. Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpreting Classifying languages The process of programming](https://reader036.vdocuments.mx/reader036/viewer/2022062712/56649c715503460f94922c33/html5/thumbnails/34.jpg)
Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpretingClassifying languages The process of programming
Programming toolsBugs
Languages
![Page 35: R.G.Keim@kent.ac.uk1. Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpreting Classifying languages The process of programming](https://reader036.vdocuments.mx/reader036/viewer/2022062712/56649c715503460f94922c33/html5/thumbnails/35.jpg)
35
All the code we write has bugs
'All''Well, ...'
Bugs are not good!
![Page 36: R.G.Keim@kent.ac.uk1. Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpreting Classifying languages The process of programming](https://reader036.vdocuments.mx/reader036/viewer/2022062712/56649c715503460f94922c33/html5/thumbnails/36.jpg)
36
Harvard Mark II –the 1st bug
![Page 37: R.G.Keim@kent.ac.uk1. Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpreting Classifying languages The process of programming](https://reader036.vdocuments.mx/reader036/viewer/2022062712/56649c715503460f94922c33/html5/thumbnails/37.jpg)
37
What to do when you find a bug
Apply the debugging strategy:
– Reproduce the error, understand the problem, check the obvious causes
– If this does not solve the problem, press on
– Try to isolate the problem
– Think through the probable process
![Page 38: R.G.Keim@kent.ac.uk1. Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpreting Classifying languages The process of programming](https://reader036.vdocuments.mx/reader036/viewer/2022062712/56649c715503460f94922c33/html5/thumbnails/38.jpg)
38
Programming languages
Similiarities – help us to learn other ones– Syntax– Purpose– Paradigm
There are different programming languages for different purposes – different strengths and weaknesses
![Page 39: R.G.Keim@kent.ac.uk1. Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpreting Classifying languages The process of programming](https://reader036.vdocuments.mx/reader036/viewer/2022062712/56649c715503460f94922c33/html5/thumbnails/39.jpg)
39
Things we do when programming
Writing code
Writing tests
Running tests
Finding problems with the code
Fixing problems with the code
Interpreting specifications
Adding functionality
Gathering specifications
Is there any
special order here?
![Page 40: R.G.Keim@kent.ac.uk1. Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpreting Classifying languages The process of programming](https://reader036.vdocuments.mx/reader036/viewer/2022062712/56649c715503460f94922c33/html5/thumbnails/40.jpg)
Terminology you should know
IDE – Integrated programming environment
Scripting language Pseudo-code Machine code Syntax
![Page 41: R.G.Keim@kent.ac.uk1. Languages for IT & CS Pseudo-code What HTML isn’t Early history Compiling & interpreting Classifying languages The process of programming](https://reader036.vdocuments.mx/reader036/viewer/2022062712/56649c715503460f94922c33/html5/thumbnails/41.jpg)
Exam questions (2009 – CO332)
What is an IDE and what does it do? Give an example of an IDE. [2 marks]
Draw a flow diagram or write in pseudo-code an algorithm for alphabetising a collection of CDs. [4 marks]