Uploaded by Shanmukh Sai

L2.1 - What is Programming and Worlds (1)

advertisement
Goal
• To teach syntax of programming languages
(You should learn though, through practice!)
• Learn the principles to quickly learn
programming languages
What is a
Program?
What is
Programming?
Communication
of Ideas
•Natural Language
•Symbols?
Where is
Programming
used today?
The Worlds of Programming
What are the fundamental things a programmer does
in order to program?
Problem
World
• Expression of
this world
• Goals and
Intent
Programmer
s’ World
• Expression of
this world
• Intent, Syntax
and Semantics
Machine
World
• Expression of
this world
• Syntax and
Semantics
The Transitions
informal → informal → semi-informal
→ semi-informal → semi-formal
→ semi-formal → formal → formal
• How can we ensure that the transitions between these
phases is persisted?
What does a programmer do?
1.
2.
3.
4.
Understand the problem world
Express it
Find a solution to it in the mind
Create a solution aka program in the programming
language world and
5. Convert this to machine language's world
Is it not
problem
solving?
Why is it hard? – Understanding programs
• Most Time-Consuming &
Challenging Task
• Code written
• By others?
• sometime
Back?
• way Back?
• Increasing Complexity –
Lines of Code
• Code Re-Mix | Syntax
Constructs
• Lost in Translation |
Implicit Context
• Informal Problem World
• Language Expression World
[English, Hindi?]
• Formal Programming
Language World
What if that
program fails?
Who is liable for costs of program
failures?
• According to Bruce Schneier [Security and Law Expert],
• “Today there are no real consequences for having bad
security, or having low-quality software of any kind. Even
worse, the marketplace often rewards low quality. More
precisely, it rewards additional features and timely release
dates, even if they come at the expense of quality.”
• Because Current Programming Languages are
not designed for this purpose
Can you provide
guarantee that
your program
works?
The Key Phases
Specificati
on
Construction
Execution
Verificatio
n
Download