Upload
sathis-kumar
View
223
Download
0
Embed Size (px)
Citation preview
8/7/2019 Why We Study Programming Fundamandals
1/26
Introduction to Programming
Fundamentals
B.Sathis Kumar
8/7/2019 Why We Study Programming Fundamandals
2/26
Computer H/w, OS
RDBMS Programming S/W Development
Methodology Internet Technology Algorithms, UI, OO
Seminars Industry Visits Learning
ResourcesIndustry Trends Quiz Contests Paper
Presentations
Project Bank Online Assessments Book
Reviews
Aligning Student Competencies
Employability Competencies
Basic IT Competencies
Quality/ Process Orientation
Life Skills
English Language Fluency
Professional Core
Client Server
OOAD Project Management Adv. Programming Internet Applications
Hw/, OS, N/W
ProgrammingConcepts RDBMS UI Design S/W Testing SDM
Lecture Tutorial Practical
CommunicationTeam work Discussions,
Decisions and Presn. Ethics and Etiquette
Time Management Customer Interaction Goal Setting
TQM SW QA
CMM Projects
Comprehension Articulation Persuasion
Written & Oral Comm Essay Writing Technical papers
Essays Technical Papers Reports
Communication lab Team work Projects Group Discussions Analytical Skills Team problem solvingI
ntegrated
Integrat
ed
2B.SATHIS KUMAR VITCC
8/7/2019 Why We Study Programming Fundamandals
3/26
Programming Fundamentals
Its about:
a) foundations of programming langauges
b) but also how to design your own languages
c) how to implement them
d) and about PL tools, such as analyzers
e) also learn about some classical C.S. algorithms.
33B.SATHIS KUMAR VITCC
8/7/2019 Why We Study Programming Fundamandals
4/26
4
Why a software
engineer/developer needs PLNew languages will keep coming
Understand them, choose the right one.
Write code that writes code Be the wizard, not the typist.
Develop your own language.
Are you kidding? No.Learn about compilers and interpreters.
Programmers main tools.
4B.SATHIS KUMAR VITCC
8/7/2019 Why We Study Programming Fundamandals
5/26
New Languages will KeepComing
5B.SATHIS KUMAR VITCC
8/7/2019 Why We Study Programming Fundamandals
6/26
The Reality...
C
Java
C++
Haskell
perlPython
Ruby
PHP
javascript
SQL
VisualBasic
Tcl/TK
regular
XSLT
awk
postscript
latex
make ML
Ocaml
ActionScript
bashXQuery
C#
6B.SATHIS KUMAR VITCC
8/7/2019 Why We Study Programming Fundamandals
7/26
7
A survey: how many languages
did you use? Lets list them here:
7B.SATHIS KUMAR VITCC
8/7/2019 Why We Study Programming Fundamandals
8/26
Explosive Growth
In the past 20 years, computer science has
deepened intellectually, broadened in scope, and
penetrated all areas of modern life.
The web, electronic commerce, social networks,
graphics, gaming, image processing, security,natural language processing, bio informatics,
machine learning, multi-core processors, sensor
networks, Google-style distributed processing,
XML, software transactions, databases,operating systems, networks...
This growth puts enormous pressure on
undergraduate curriculum.
8B.SATHIS KUMAR VITCC
8/7/2019 Why We Study Programming Fundamandals
9/26
Learning New Languages
it is more important that studentslearn how to learn a language rather
than the particulars of a single
language.
Understanding PL fundamentals
makes learning languages much
easier.9B.SATHIS KUMAR VITCC
8/7/2019 Why We Study Programming Fundamandals
10/26
10
Be prepared to program in new
languagesLanguages undergo constant change
FORTRAN 1953
ALGOL 60 1960
C 1973 C++ 1985
Java 1995
Evolution steps: 12 years per widelyadopted language
10B.SATHIS KUMAR VITCC
8/7/2019 Why We Study Programming Fundamandals
11/26
11
Develop your own language
Are you kidding? No. Guess who developed:
PHP
Ruby
JavaScript perl
Done by smart students like you
Our goal: learn good academic lessons
so that your future languages avoid known mistakes
11B.SATHIS KUMAR VITCC
8/7/2019 Why We Study Programming Fundamandals
12/26
Building Languages
Not many people design new general-
purpose languages.
But many people design APIs, configuration
languages, and domain-specific languages.
Understanding PL fundamentals allows
students to know when and how to build
such little languages.What are the abstractions? How do they
interact? What should be expressible? What
should not be?
12B.SATHIS KUMAR VITCC
8/7/2019 Why We Study Programming Fundamandals
13/26
Trends in ProgrammingLanguages
13B.SATHIS KUMAR VITCC
8/7/2019 Why We Study Programming Fundamandals
14/26
14
Trends in programming
languagesprogramming language and its interpreter/compiler:
programmers primary tools
you must know them inside out
languages have been constantly evolving ...
what are the forces driving the change?
... and will keep doing so to predict the future, lets examine the history
14B.SATHIS KUMAR VITCC
8/7/2019 Why We Study Programming Fundamandals
15/26
15
ENIAC (1946, University of
Philadelphia)NIAC program for external ballistic equations:
15B.SATHIS KUMAR VITCC
8/7/2019 Why We Study Programming Fundamandals
16/26
16
Programming the ENIAC
16B.SATHIS KUMAR VITCC
8/7/2019 Why We Study Programming Fundamandals
17/26
17
ENIAC (1946, University of
Philadelphia)programming done by
rewiring the interconnections
to set up desired formulas,
etcProblem (whats the tedious
part?)
programming = rewiring
slow, error-prone
solution:
store the program in
memory! birth ofvon Neuman
17B.SATHIS KUMAR VITCC
8/7/2019 Why We Study Programming Fundamandals
18/26
18
UDSAC (1947, Cambridge
University)the first real computer
large-scale, fully functional, stored-program
electronic digital computer (by Maurice Wilkes)
problem: Wilkes realized: a good part of the remainder of my life was going to
be spent in finding errors in ... programs
solution: procedures (1951)
procedure: abstracts away the implementation reusable software was born
18B.SATHIS KUMAR VITCC
8/7/2019 Why We Study Programming Fundamandals
19/26
19
Assembly the language
(UNIVAC 1, 1950)Idea: mnemonic (assembly) code
Then translate it to machine code by hand (no compiler yet)
write programs with mnemonic codes (add, sub),
with symbolic labels,
then assign addresses by handExample of symbolic assembler
clear-and-add a
add b
store c
translate it by hand to something like this (understood by CPU)
B100 A200
C300
19B.SATHIS KUMAR VITCC
8/7/2019 Why We Study Programming Fundamandals
20/26
Example
20B.SATHIS KUMAR VITCC
8/7/2019 Why We Study Programming Fundamandals
21/26
21
Assembler the compiler
(Manchester, 1952) it was assembler nearly as we know it, called
AutoCode
21B.SATHIS KUMAR VITCC
8/7/2019 Why We Study Programming Fundamandals
22/26
22
Assembly programming caught
on, but
Problem: Software costs exceeded hardware
costs!
John Backus: Speedcoding
An interpreter for a high-level language
Ran 10-20 times slower than hand-written
assembly
way too slow
22B.SATHIS KUMAR VITCC
8/7/2019 Why We Study Programming Fundamandals
23/26
23
FORTRAN I (1954-57)
Langauge, and the first compiler
Produced code almost as good as hand-written
Huge impact on computer science (laid foundations for cs164)
Modern compilers
FORTRAN (the language) still in use today
By 1958, >50% of all software is in FORTRAN
Cut development time dramatically
23B.SATHIS KUMAR VITCC
8/7/2019 Why We Study Programming Fundamandals
24/26
24
Goto considered harmful
L1: statement
if expression goto L1
statement
Dijkstra says: gotos are harmful
use structured programming
lose some performance, gain a lot of readability
how do you rewrite the above code into structured
form?
24B.SATHIS KUMAR VITCC
8/7/2019 Why We Study Programming Fundamandals
25/26
25
Object-oriented programming
(1970s)
OO approach Model the world as it is
Simulation based modelling
25B.SATHIS KUMAR VITCC
8/7/2019 Why We Study Programming Fundamandals
26/26
26
Review of historic development
wired interconnects stored program (vonNeuman machines)
lots of common bugs in repeated code procedures
machine code symbolic assembly (compiledby hand)
tedious compilation assembler (the assemblycompiler)
assembly FORTRAN I gotos structured programming
OO programming inheritance,
26B.SATHIS KUMAR VITCC