Tuesday October 7
COS 201
Programming 1
● IDE - Integrated Development Environment
Programming(coding)
This is the process of writing a code or an instruction in a special language (any computer
language) that a computer can follow to solve a problem.
● Python uses compliers and interpreter
Program
What is a program?
A program is a sequence of instructions that specifies or tells the computer how to perform a
computation. (GIGO - garbage in garbage out)
Programming Environment
A programming environment is the complete set of software and hardware tools a developer (or
programmer) uses to create, write, test and debug software. Typically includes a text editor,
compiler, debugger.. often integrated into an IDE.
The key component of IDE varies but common elements are;
1. Operating system
2. Code editor
3. Build tools like compiler and debugging tools..
All working together on the underlying hardware.
Examples of IDE
1. Notepad++
2. Anaconda
3. Spyder
4. Notepad
5. Sublime text
6. Vs code
Categories of Programming Languages
They can be categorized in various ways often overlapping based on their level of abstraction,
paradigm and execution model.
● Level of abstraction:
I. Low level languages - These languages are very close to machine language and
provide direct control over hardware.
II. Machine language - Composed of binary code(zeros and one) directly
understood by the computer CPU.
III. Assembly language - Uses symbolic instructions (Mnemonics) that are direct
mapping to machine instructions requiring an assembler to translate it.
IV. High level languages - These languages are designed to be more human
readable and abstract away the complexity of hardware. They require a compiler
or interpreter.
● Functional programming:
It treats compilation as the evaluation of mathematical functions emphasizing
immutability and avoiding side effects.
Examples are:
I. Haskel
II. Lisp (list processing)
● Logic programming:
Based on formal logic where programs are expressed as a set of logical programs and
rules.
Examples:
I. Prolog
● Scripting language:
Often interpreted and used for automating task, web development and extending
applications.
Examples:
I. JavaScript
II. Python
III. Ruby
IV. PHP
● Execution models:
Compiler - source code is translated into machine code by a compiler.
Examples:
I. Java
II. C
III. C++ (compiled to byte code)
IV. Interpreted by JVM - Java Virtum Machine.
● Interpreted language:
Source code is interpreted line by line by an interpreter without prior interpretation.
Examples:
I. Python
II. Java. e.t.c
Assignment…
1. Write on programming errors - error in programming language
2. JVM - write on how Java does it.