0% found this document useful (0 votes)
17 views144 pages

Lec 2 - CENON

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views144 pages

Lec 2 - CENON

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 144

INTECH 3201

INTEGRATIVE
PROGRAMMING
AND
TECHNOLOGIES II
Prepared by: CCCD
Course Topics
▪ History of Programming Language
▪ Effects of scale
▪ Virtual Machines
▪ Compiled vs Interpretative Languages
▪ Application vs Scripting Languages
Programming Language
▪ is a computer language programmers use to develop
software programs, scripts, or other sets of
instructions for computers to execute

3
Programming Language
▪ is a system of notation for writing computer
programs.
▪ Most programming languages are text-based formal
languages
▪ but they may also be graphical

4
Programming Language
▪ Although many languages share similarities, each has
its own syntax.
▪ Once a programmer learns the languages rules,
syntax, and structure, they write the source code in a
text editor or IDE.
▪ (integrated development environment)
5
Guess how many programming
language there is?

OVER 9000!!!!!!
6
Why so many?
▪ Different uses and different purposes

7
Application and program
development
▪ Application and program development involves
programs you work with on a daily basis.
▪ C Family, D, java, Swift, TCL, Visual Basic

8
Artificial intelligence
development
▪ Artificial intelligence or related fields involve creating
the character interactions in computer games, portions
of programs that make decisions, chatbots, and more.
▪ AIML, C Family, Prolog, Python

9
Database development

▪ Database developers create and maintain databases


▪ DBASE, FoxPro, Mysql, SQL, Visual FoxPro

10
Game development

▪ Game development involves creating computer games


or other entertainment software.
▪ C Family, DarkBasic, Java

11
Computer drivers or other
hardware development
▪ Computer drivers and programming hardware
interface support are a necessity for hardware
functionality.
▪ Assembly, C

12
Internet and web page
development
▪ Internet and web page development are the essence of
the Internet. Without developers, the Internet would
not exist
▪ HTML , Java, JavaScript , Perl, Python , PHP, XML

13
Script development

▪ Although it is not likely to become a career, knowing


how to create and develop scripts can increase
productivity for you or your company, saving you
countless hours.
▪ AutoHotkey ,awk ,bash ,Batch file ,Perl ,Python ,Tcl

14
Current TOP 10 Programming
Language
10. Go
▪ Active developers: 1.5 million
▪ Most popular: Cloud, AR/VR
▪ a programming language created by
Google.
15
9. Kotlin
▪ Active developers: 2.3 million
▪ Most popular: Mobile, AR/VR

The open-source programming language Kotlin is really popular


right now. Because of features like support for lambda functions,
smart casts, null safety, and operator overloading, businesses like
Netflix, Pinterest, and Amazon Web Services adopt this language.

16
8. Swift
▪ Active developers: 2.4 million
▪ Most popular: Mobile, AR/VR

Swift is a relatively new programming language, but because of its


speed, performance, and security, it is in the top 10 best
programming languages for profits and prospects. Swift is also a
simple language to learn.

17
7. Visual Dev Tools

▪ Active developers: 2.8 million


▪ Most popular: Desktop, AR/VR, Games
A type of programming language called visual programming
enables users to depict processes. In contrast to a conventional
text-based computer language that compels the developer to think
like a machine, a visual programming language enables developers
to explain the process in terms that are intelligible to people.

18
6. C#
▪ Active developers: 6.0 million
▪ Most popular: Games, AR/VR, Desktop

One of the primary factors contributing to C# popularity is the


language’s inherent capacity to accommodate object-oriented
programming principles. C# is among the top 10 greatest
programming languages for prospects and profits since it is seen to
be perfect for Windows, Android, and iOS apps.
19
5. PHP
▪ Active developers: 6.1 million
▪ Most popular: Web, Cloud

It has become more common to construct healthcare applications


with PHP. Mobile applications, the majority of which are based on
iOS and Android, are created using PHP and its coding skills.

20
4. C/C++
▪ Active developers: 6.3 million
▪ Most popular: IoT, AR/VR

With features like data abstraction, polymorphism, inheritance, etc., you can
be sure that C++ offers all you need for a successful programming career
and decent pay. This language is frequently used to create desktop
applications, GUI applications, 3D games, and real-time mathematical
answers.
21
3. Java
▪ Active developers: 8.2 million
▪ Most popular: Mobile, Cloud

Java is yet another fantastic programming language to master for big


data, web development, and application development. The Oracle
Corporation owns this general-purpose programming language,
which has an object-oriented architecture.

22
2. Python
▪ Active developers: 9 million
▪ Most popular: Data Science, Machine Learning, IoT
Python is frequently used for creating websites and applications,
automating repetitive tasks, and analyzing and displaying data.
Python has been used by many non-programmers, including
accountants and scientists, for a range of routine activities including
managing finances since it is very simple to learn.

23
1. JavaScript
▪ Active developers: 12.4 million
▪ Most popular: Web, Cloud

Programmers all around the globe use Javascript to make dynamic


and interactive online apps and browsers. With 97% of all websites
using, it as a client-side programming language, JavaScript is the
most widely used programming language in the world.

24
Brief History of
Programming Language
▪ First Programming Language??
▪ was developed in 1883
▪ By Ada Lovelace and Charles Babbage
▪ Used to create an algorithm for the Analytical Engine,
the first computer program, to compute Bernoulli
numbers.
25
1944-45: Plankalkül
▪ Somewhere between 1944-45, Konrad Zuse developed the first ‘real’
programming language called Plankalkül (Plan Calculus).
▪ Zeus’s language (among other things) allowed for the creations of
procedures, which stored chunks of code that could be invoked over and
over to perform routine operations.

26
1949: Assembly Language
▪ Assembly language was used in the Electronic Delay Storage
Automatic Calculator (EDSAC).
▪ Assembly language was a type of low-level programming
language that simplified the language of machine code.
▪ In other words, the specific instructions necessary to operate a
computer.

27
Assembly

28
Assembly
▪ Was the programming language used to send APOLLO 11 to
space
▪ Margaret Hamilton
▪ nearly 145,000 lines of code
▪ Facebook, is more than 62 million lines of code.

29
30
1949: Shortcode
▪ Shortcode (or Short-order code), was the first High-Level
Language (HLL) suggested by John McCauley in 1949.
▪ However, it was William Schmitt who implemented it for the
BINAC computer the same year and for the UNIVAC in 1950.

31
Shortcode

32
1952: Autocode
▪ Autocode was a general term used for a family of programming
languages.
▪ First developed by Alick Glennie for the Mark 1 computer at the
University of Manchester
▪ Autocode was the first-ever compiled language to be
implemented meaning that it can be translated directly into
machine code using a program called a compiler.

33
34
35
1957: FORTRAN
▪ FORmula TRANslation or FORTRAN was created by John
Backus and is considered to be the oldest programming language
in use today. (high level programming language)
▪ The programming language was created for high-level scientific,
mathematical, and statistical computations. FORTRAN is still in
use today in some of the world’s most advanced supercomputers.

36
37
Fortran (present)
program Hello
print *, "Hello, World!"
end program Hello

38
1958: ALGOL (Algorithmic
Language)
▪ Algorithmic language or ALGOL was created by a joint
committee of American and European computer scientists.
▪ ALGOL served as the starting point for the development of some
of the most important programming languages including Pascal,
C, C++, and Java.

39
BEGIN
FILE F (KIND=REMOTE);
EBCDIC ARRAY E [0:11];
REPLACE E BY "HELLO WORLD!";
WHILE TRUE DO
BEGIN
WRITE (F, *, E);
END;
END.

40
1958: LISP (List Processor)
▪ List processor or LISP was invented by John McCarthy at the
Massachusetts Institute of Technology (MIT).
▪ Originally purposed for artificial intelligence, LISP is one of the
oldest programming languages still in use today and can be used
in the place of Ruby or Python
▪ Companies such as Acceleration, Boeing, and Genworks are still
using LISP in their tech stacks.

41
42
1959: COBOL (Common
Business Oriented Language)
▪ Common Business Oriented Language (COBOL), is the
programming language behind many credit card processors,
ATMs, telephone and cell calls, hospital signals, and traffic
signals systems

43
▪ The development of the language was led by Dr. Grace Murray
Hopper and was designed so that it could run on all brands and
types of computers. COBOL is still used to this day primarily for
banking and gamification systems.

44
IDENTIFICATION DIVISION.
PROGRAM-ID. IDSAMPLE.
ENVIRONMENT DIVISION.
PROCEDURE DIVISION.
DISPLAY 'HELLO WORLD'.
STOP RUN.

45
1964: BASIC (Beginner’s
All-Purpose Symbolic
Instruction Code)
▪ Beginners All-Purpose Symbolic Instruction Code or BASIC
was developed by a group of students at Dartmouth College.

46
▪ The language was written for students who did not have a strong
understanding of mathematics or computers.
▪ The language was developed further by Microsoft founders Bill
Gates and Paul Allen and became the first marketable product of
the company.

47
10 PRINT "Hello, World!"

48
1970: PASCAL
▪ Named after the French mathematician Blaise Pascal
▪ Niklaus Wirth developed the programming language in his
honor. It was developed as a learning tool for computer
programming which meant it was easy to learn
▪ It was favored by Apple in the company’s early days, because of
its ease of use and power.

49
program HelloWorld;
uses crt;

(* Here the main program block starts *)


begin
writeln('Hello, World!');
readkey;
end.

50
1972: Smalltalk
▪ Developed at the Xerox Palo Alto Research Centre by Alan Kay,
Adele Goldberg, and Dan Ingalls,
▪ It introduced a variety of programming language aspects that are
visible languages of today such as Python, Java, and Ruby.
▪ Companies such as Leafly, Logitech, and CrowdStrike state they
use Smalltalk in their tech stacks.

51
$ vim helloworld.st

"Hello world Program"

'Hello World!' printNl !

52
1972: C
▪ Developed by Dennis Ritchie at the Bell Telephone Laboratories
for use with the Unix operating system.
▪ It was called C because it was based on an earlier language
called ‘B’.
▪ Many of the current leading languages are derivatives of C
including; C#, Java, JavaScript, Perl, PHP, and Python.

53
#include <stdio.h>

int main() {
printf("Hello World");
return 0;
}

54
1972: SQL (SEQUEL at the time)
▪ SQL was first developed by IBM researchers Raymond Boyce
and Donald Chamberlain.
▪ SEQUEL (as it was referred to at the time), is used for viewing
and changing information that is stored in databases.
▪ Nowadays the language is an acronym – SQL, which stands for
Structured Query Language.

55
1980/81: Ada
▪ Ada was originally designed by a team led by Jean Ichbiah of
CUU Honeywell Bull under contract to the United States
Department of Defense
▪ Named after the mid-19th-century mathematician Ada Lovelace
▪ Ada is a structured, statically typed, imperative, wide-spectrum,
and object-oriented high-level programming language.

56
▪ Ada is used for air-traffic management systems in countries such
as Australia, Belgium, and Germany as well as a host of other
transport and space projects.

57
with Text_IO; use Text_IO;
procedure hello is
begin
Put_Line("Hello world!");
end hello;

58
1983: C++
▪ Bjarne Stroustrup modified the C language at the Bell Labs
▪ C++ is an extension of C with enhancements such as classes,
virtual functions, and templates.
▪ It has been listed in the top 10 programming languages since
1986 and received Hall of Fame status in 2003.

59
▪ C++ is used in MS Office, Adobe Photoshop, game engines, and
other high-performance software.
#include <iostream>

int main() {
std::cout << "Hello World";
return 0;
} 60
1983: Objective-C
▪ Developed by Brad Cox and Tom Love
▪ the main programming language used to write software for
macOS and iOS, Apple’s operating systems.

61
62
1987: Perl
▪ Perl was created by Larry Wall and is a general-purpose,
high-level programming language
▪ It was originally designed as a scripting language designed for
text editing
▪ but nowadays it’s widely used for many purposes such as CGI,
database applications, system administration, network
programming, and graphic programming.

63
print "Hello World";

64
1990: Haskell
▪ Haskell is a general-purpose programming language named after
the American logician and mathematician Haskell Brooks Curry.
▪ It is a purely functional programming language meaning it’s
primarily mathematical.
▪ It’s used across multiple industries particularly those that deal
with complicated calculations, records, and number-crunching.

65
module Main where

main :: IO ()
main = putStrLn "Hello World"

66
1991: Python
▪ Named after the British comedy troupe ‘Monty Python’
▪ was developed by Guido Van Rossum
▪ It is a general-purpose, high-level programming language
created to support a variety of programming styles and be fun to
use

67
▪ Python is, to this day, one of the most popular programming
languages in the world is used by companies such as Google,
yahoo, and Spotify.

Print (“Hello World”)

68
1991: Visual Basic
▪ Developed by Microsoft, Visual Basic allows programmers to
utilize a drag-and-drop style of choosing and changing
pre-selected chunks of code through a graphical user interface
(GUI).

69
70
1993: Ruby
▪ Created by Yukihiro Matsumoto, Ruby is an interpreted
high-level programming language.
▪ A teaching language which was influenced by Perl, Ada, Lisp,
and Smalltalk – among others.
▪ Ruby’s primary uses are for web applications development and
Ruby on Rails

71
puts 'Hello World'

72
1995: Java
▪ Java is a general-purpose, high-level language created by James
Gosling for an interactive TV project.
▪ It has cross-platform functionality and is consistently among the
top of the world’s most popular programming languages.
▪ Java can be found everywhere, from computers to smartphones
to parking meters.

73
import java.io.*;

class GFG {
public static void main (String[] args) {
System.out.println("Hello World");
}
}
74
1995: PHP
▪ Formerly known as ‘Personal Home Page’ which now stands for
‘Hypertext Preprocessor’
▪ was developed by Rasmus Lerdorf.
▪ Its primary uses include building and maintaining dynamic web
pages, as well as server-side development

75
echo "Hello World";

76
1995: JavaScript
▪ JavaScript was created by Brendan Eich, this language is
primarily used for dynamic web development, PDF documents,
web browsers, and desktop widgets.

77
78
console.log("Hello World");

79
2000: C#
▪ Developed at Microsoft with the hope of combining the
computing ability of C++ with the simplicity of Visual Basic
▪ C# is based on C++ and shares many similarities with Java
▪ The language is used in almost all Microsoft products and is seen
primarily in developing desktop applications.

80
namespace HelloWorld
{
class Hello {
static void Main(string[] args)
{
System.Console.WriteLine("Hello World");
}
}
}

81
2003: Scala
▪ Developed by Martin Odersky, Scala which combines
mathematical functional programming and organized
object-oriented programming
▪ Scala’s compatibility with Java makes it helpful with Android
development.

82
object HelloWorld extends App {
printIn("Hello World")
}

83
2003: Groovy
▪ Derived from Java, Groovy was developed by James Strachan
and Bob McWhirter.
▪ The language improves productivity because of its succinct and
easy to learn.

84
print "Hello World!\n"

85
2009: Go
▪ Go was developed by Google to address issues that occur due to
large software systems.
▪ Due to its simple and modern structure, Go has gained popularity
among some of the largest tech companies around the world such
as Google, Uber, Twitch, and Dropbox.

86
println('Hello World");

87
2014: Swift
▪ Developed by Apple as a replacement for C, C++, and
Objective-C
▪ was developed with the intention to be easier than the
aforementioned languages and allow less room for error
▪ Swift’s versatility means it can be used for desktop, mobile, and
cloud applications.

88
println('Hello World');

89
Effect of Scale
▪ Scaling ( in programming) - Scaling is making something bigger
or smaller, easier or harder.

90
Scaling
▪ It can be defined as a process to expand the existing
configuration (servers/computers) to handle a large number of
user requests or to manage the amount of load on the server.
▪ This process is called scalability.

91
▪ Scalability plays a vital role in the designing of a system as it
helps in responding to a large number of user requests more
effectively and quickly.

92
2 Different ways of scaling
1. Vertical
2. Horizontal

93
Vertical Scaling (Scale up)
▪ It is defined as the process of increasing the capacity of a single
machine by adding more resources such as memory, storage, etc.
to increase the throughput of the system
▪ No new resource is added
▪ rather the capability of the existing resources is made more
efficient

94
95
A Real-time Example of
Vertical Scaling
▪ When traffic increases, the server degrades in performance
▪ The first possible solution that everyone has is to increase the
power of their system
▪ For instance, if earlier they used 8 GB RAM and 128 GB hard
drive now with increasing traffic, the power of the system is
affected

96
▪ So a possible solution is to increase the existing RAM or hard
drive storage, for e.g. the resources could be increased to 16 GB
of RAM and 500 GB of a hard drive
▪ but this is not an ultimate solution as after a point of time, these
capacities will reach a saturation point.

97
Advantages of Vertical
Scaling
▪ It is easy to implement
▪ Reduced software costs as no new resources are added
▪ Fewer efforts required to maintain this single system

98
Disadvantages of Vertical
Scaling
▪ Single-point failure
▪ Since when the system (server) fails, the downtime is high
because we only have a single server
▪ High risk of hardware failures

99
100
Horizontal Scaling (Scale out)
▪ It is defined as the process of adding more instances of the same
type to the existing pool of resources and not increasing the
capacity of existing resources like in vertical scaling.
▪ This kind of scaling also helps in decreasing the load on the
server.

101
▪ In this process, the number of servers is increased and not the
individual capacity of the server.
▪ This is done with the help of a Load Balancer which basically
routes the user requests to different servers according to the
availability of the server.

102
▪ Thereby, increasing the overall performance of the system.
▪ In this way, the entire process is distributed among all servers
rather than just depending on a single server.

103
104
Advantages of Horizontal
Scaling
▪ Fault Tolerance means that there is no single point of failure in
this kind of scale because there are N servers here instead of 1
powerful server. So if anyone of the servers fails then there will
be other servers for backup. Whereas, in Vertical Scaling there is
single point failure i.e: if a server fails then the whole service is
stopped.

105
▪ Low Latency: Latency refers to how late or delayed our request
is being processed.
▪ Built-in backup

106
A Real-time Example of
Horizontal Scaling
▪ For example, if there exists a system of the capacity of 8 GB of
RAM and in future, there is a requirement of 16 GB of RAM
▪ rather than the increasing capacity of 8 GB RAM to 16 GB of
RAM, similar instances of 8 GB RAM could be used to meet the
requirements.

107
108
Virtual Machine
▪ is the virtualization/emulation of a computer system
▪ Virtual machines are based on computer architectures and
provide functionality of a physical computer
▪ Their implementations may involve specialized hardware,
software, or a combination.

109
▪ Each virtual machine runs its own operating system and
functions separately from the other VMs

110
▪ A virtual machine (VM) is a simulated computer system that
runs within a physical computer. The physical device, called a
host or parent server, houses the VMs called guest or child server
instances.

111
Virtual machines include the following components:
• Memory.

• A virtual CPU.

• Disk storage space.

• A network interface.

112
How do virtual machines work?
▪ The virtual machine runs as a process in an application window,
similar to any other application, on the operating system of the
physical machine.
▪ Key files that make up a virtual machine include a log file,
NVRAM setting file, virtual disk file and configuration file.

113
▪ Virtual machines operate using virtualization technology. As
mentioned earlier, these virtualization applications use specialty
software (a hypervisor) to effectively create an isolated virtual
space in which different operating systems run and separate
resources are distributed to each VM. Meaning you could have
multiple VMs running on your host server.

114
115
Hypervisor
▪ A hypervisor, also known as a virtual machine monitor or VMM,
is software that creates and runs virtual machines (VMs).
▪ A hypervisor allows one host computer to support multiple guest
VMs by virtually sharing its resources, such as memory and
processing.

116
▪ It’s an internal software that controls the resources of the parent
system.
▪ Think of it as a layer on top of the parent operating system or
installed directly on the hardware. Its primary responsibility is to
take the available resources on the parent server and distribute
them to one or more VMs.

117
▪ The hypervisor also acts as a barrier between the host operating
system and the virtual machines, effectively making it two
completely separate entities on one physical device.

118
Types of Hypervisors
▪ Bare Metal Hypervisors (process VMs), also known as Type-1
hypervisors.
▪ Hosted Hypervisors (system VMs), also known as Type-2
hypervisors.

119
Bare-Metal Hypervisor (Process
VM)
▪ A bare metal or Type-1 hypervisor runs directly on the host's
hardware to control and manage the guest operating systems.
Bare metal hypervisors are primarily used in enterprise
environments, as they allow for the over-allocation of physical
resources.

120
▪ This over-allocation means a Type-1 hypervisor can designate
additional resources, like memory, to a group of VMs.

121
Hosted Hypervisor (System VM)
▪ A Hosted or Type-2 hypervisor will run inside the operating
system of a physical host server, making it hosted.
▪ The main difference between Type-1 and Type-2 hypervisors is
their platform. Type-1 hypervisors run on hardware, and Type-2
hypervisors run on software within the host operating system.

122
123
124
What are virtual machines used
for?
▪ Virtual machines (VMs) allow a business to run an operating
system that behaves like a completely separate computer in an
app window on a desktop
▪ VMs may be deployed to accommodate different levels of
processing power needs, to run software that requires a different
operating system, or to test applications in a safe, sandboxed
environment.

125
▪ Virtual machines have historically been used for server
virtualization, which enables IT teams to consolidate their
computing resources and improve efficiency
▪ Additionally, virtual machines can perform specific tasks
considered too risky to carry out in a host environment, such as
accessing virus-infected data or testing operating systems.

126
Advantages of virtual machines
▪ VMs can run multiple operating system environments on a single
physical computer, saving physical space, time and management
costs.
▪ Virtual machines support legacy applications, reducing the cost
of migrating to a new operating system.

127
▪ VMs can also provide integrated disaster recovery and
application provisioning options.

128
Disadvantages of virtual
machines
▪ Running multiple virtual machines on one physical machine can
result in unstable performance if infrastructure requirements are
not met.
▪ Virtual machines are less efficient and run slower than a full
physical computer.

129
The two types of virtual
machines
▪ A process virtual machine
▪ A system virtual machine

130
A process virtual machine
▪ allows a single process to run as an application on a host
machine,
▪ providing a platform-independent programming environment by
masking the information of the underlying hardware or operating
system.

131
▪ An example of a process VM is the Java Virtual Machine, which
enables any operating system to run Java applications as if they
were native to that system.

132
A system virtual machine
▪ is fully virtualized to substitute for a physical machine
▪ A system platform supports the sharing of a host computer’s
physical resources between multiple virtual machines
▪ each running its own copy of the operating system.

133
5 types of virtualization
▪ Hardware
▪ Software
▪ Storage
▪ Network
▪ Desktop

134
Hardware virtualization
▪ When virtualizing hardware, virtual versions of computers and
operating systems (VMs) are created and consolidated into a
single, primary, physical server.
▪ A hypervisor communicates directly with a physical server’s disk
space and CPU to manage the VMs

135
▪ Hardware virtualization, which is also known as server
virtualization, allows hardware resources to be utilized more
efficiently and for one machine to simultaneously run different
operating systems.

136
Software virtualization
▪ Software virtualization creates a computer system complete with
hardware that allows one or more guest operating systems to run
on a physical host machine.
▪ For example, Android OS can run on a host machine that is
natively using a Microsoft Windows OS, utilizing the same
hardware as the host machine does.

137
Storage virtualization
▪ Storage can be virtualized by consolidating multiple physical
storage devices to appear as a single storage device.
▪ Benefits include increased performance and speed, load
balancing and reduced costs.
▪ Storage virtualization also helps with disaster recovery planning,
as virtual storage data can be duplicated and quickly transferred
to another location, reducing downtime.

138
Network virtualization:
▪ Multiple sub-networks can be created on the same physical
network by combining equipment into a single, software-based
virtual network resource.
▪ Network virtualization also divides available bandwidth into
multiple, independent channels, each of which can be assigned to
servers and devices in real time.

139
▪ Advantages include increased reliability, network speed, security
and better monitoring of data usage.

140
Desktop virtualization:
▪ This common type of virtualization separates the desktop
environment from the physical device and stores a desktop on a
remote server, allowing users to access their desktops from
anywhere on any device
▪ In addition to easy accessibility, benefits of virtual desktops
include better data security, cost savings on software licenses and
updates, and ease of management.

141
Compiled Vs. Interpreted
Language

142
TO BE CONTINUED….
143
Activity 2:
▪ What is the difference between vertical and horizontal scaling?
▪ Give an example where vertical scaling is better, and an example
where horizontal scaling is better.

144

You might also like