SlideShare une entreprise Scribd logo
1  sur  59
Outlines
1
History
How did it all begin
2
Software
Program &
Programming
Section
1
Outlines
3
Languages
Programming
Language
4
Source Code
Translation Process
5
Commands
Types of
Programming
Commands
Outlines
6
Commands
Complex Commands
7
Exceptiions
Exception Handling
8
Turing
Turing Compeletness
Outlines
9
DATA
Types of DATA
10
DATA
Type Casting
11
DATA
Complex dATA
Structure
‫تاریخچه‬
‫دارد‬ ‫ای‬ ‫پیچیده‬ ‫و‬ ‫طوالنی‬ ‫تاریخچه‬ ‫امروزی‬ ‫شکل‬ ‫به‬ ‫افزار‬ ‫نرم‬ ‫توسعه‬.‫افزار‬ ‫نرم‬ ‫امروز‬ ‫جایگاه‬ ‫که‬ ‫ندارد‬ ‫تعجبی‬
‫است‬ ‫تاریخ‬ ‫طول‬ ‫در‬ ‫بسیاری‬ ‫متعدد‬ ‫های‬ ‫گام‬ ‫حاصل‬.‫توسعه‬ ‫روند‬ ‫دنیا‬ ‫مختلف‬ ‫های‬ ‫گوشه‬ ‫از‬ ‫بسیاری‬ ‫رویدادهای‬
‫اند‬ ‫برده‬ ‫پیش‬ ‫را‬ ‫کامپیوتر‬.‫است‬ ‫داده‬ ‫رخ‬ ‫نویسی‬ ‫برنامه‬ ‫های‬ ‫زبان‬ ‫توسعه‬ ‫دنبال‬ ‫به‬ ‫افزارها‬ ‫نرم‬ ‫توسعه‬ ‫معموال‬.
‫اند‬ ‫یافته‬ ‫توسعه‬ ‫کامپیوترها‬ ‫و‬ ‫افزارها‬ ‫سخت‬ ‫موازات‬ ‫به‬ ‫نیز‬ ‫نویسی‬ ‫برنامه‬ ‫های‬ ‫زبان‬.
‫شد؟‬ ‫شروع‬ ‫کجا‬ ‫از‬ ‫قصه‬
‫قدیمیترین‬‫نمونه‬‫عملی‬‫از‬‫برنامه‬‫نویسی‬‫به‬‫سال‬1801‫در‬‫کشور‬‫فرانسه‬‫توسط‬‫شخصی‬‫بنام‬
‫جکارد‬‫برمی‬‫گردد‬.‫او‬‫یک‬‫دستگاه‬‫بافندگی‬‫طراحی‬‫کرده‬‫بود‬‫که‬‫می‬‫توانست‬‫اعمال‬‫خاصی‬
‫از‬‫بافندگی‬‫را‬‫که‬‫روی‬‫کارتهای‬‫سوراخ‬‫شده‬(Punched card)‫ثبت‬‫شده‬‫بودند‬‫به‬‫ترتیب‬
‫انجام‬‫دهد‬.‫این‬‫تکنولوژی‬‫اجازه‬‫تولید‬‫بافت‬‫های‬‫پیچیده‬‫و‬‫با‬‫کیفیت‬‫تر‬‫را‬‫به‬
‫کارگران‬‫معمولی‬‫می‬‫داد‬.‫اکنون‬‫به‬‫جای‬‫کارگران‬‫متعدد‬‫و‬،‫ماهر‬‫فقط‬‫یک‬‫نفر‬‫برای‬
‫مدیریت‬‫کل‬‫دستگاه‬‫کافی‬‫بود‬.‫روند‬‫تقریبا‬‫مشابهی‬‫نیز‬‫در‬‫خالل‬‫انقالب‬‫صنعتی‬‫در‬‫انگلیس‬
‫به‬‫وقوع‬‫پیوست‬.‫به‬‫دنبال‬‫استفاده‬‫از‬‫ماشینهای‬‫خودکار‬‫و‬‫کاهش‬‫نیروی‬‫کار‬،‫انسانی‬
‫جنبشی‬‫تحت‬‫عنوان‬‫لودیت‬‫ها‬‫به‬‫راه‬‫افتاد‬.‫این‬‫جنبش‬‫متشکل‬‫بود‬‫از‬‫افرادی‬‫که‬‫مخالف‬
‫توسعه‬‫تکنولوژی‬‫بودند‬‫و‬‫برای‬‫جایگاه‬،‫شغلی‬‫نان‬‫و‬‫رزق‬‫و‬‫روزی‬‫خود‬‫با‬‫تکنولوژی‬‫می‬
‫جنگیدند‬.‫در‬‫این‬،‫دوره‬‫برنامه‬‫نویسی‬‫به‬‫موازات‬‫ساخت‬‫ماشین‬‫های‬‫جدید‬‫توسط‬،‫پاسکال‬
،‫بابیج‬‫شوالتز‬‫و‬...‫توسعه‬‫می‬‫یافت‬.‫برای‬‫حل‬‫هر‬‫مشکلی‬‫یک‬‫ماشین‬‫جدید‬‫ساخته‬‫می‬‫شود‬
‫که‬‫چرخ‬‫دنده‬،‫ها‬‫سیم‬،‫ها‬‫میله‬‫ها‬‫و‬‫دستورات‬‫جدیدتری‬‫نسبت‬‫به‬‫قبل‬
‫داشت‬.
‫در‬‫سال‬1847‫یک‬‫ریاضیدارن‬‫انگلیسی‬‫بنام‬George Boole‫با‬‫ارائه‬‫جبر‬،‫منطقی‬‫ارتباط‬
‫میان‬‫علم‬‫ریاضیات‬‫و‬‫منطق‬‫را‬‫اثبات‬‫کرد‬.‫برای‬‫اولین‬‫بار‬‫او‬‫اثبات‬‫کرد‬‫که‬‫علم‬‫منطق‬
‫بیشتر‬‫بخشی‬‫از‬‫ریاضیات‬‫است‬‫تا‬‫فلسفه‬!‫این‬‫عمل‬‫که‬‫یک‬‫گام‬‫بزرگ‬‫در‬‫تفکر‬‫بشریت‬‫به‬
‫حساب‬‫می‬‫آید‬‫تقریبا‬‫صد‬‫سال‬(‫تا‬‫سال‬1940)‫طول‬‫کشید‬‫تا‬‫در‬‫محاسبات‬‫کامپیوتری‬‫به‬
‫کار‬‫گرفته‬‫شود‬.‫در‬‫دهه‬1940‫اولین‬‫کامپیوتر‬‫الکترونیکی‬‫ساخته‬‫شد‬.‫حافظه‬‫محدود‬‫و‬
‫سرعت‬‫بسیار‬‫پایین‬(‫به‬‫نسبت‬‫سرعت‬‫کامپیوترهای‬‫امروزی‬)‫از‬‫ویژگی‬‫های‬‫بارز‬
‫کامپیوترهای‬‫الکترونیکی‬‫اولیه‬‫بودند‬.‫در‬‫این‬‫سالها‬‫که‬‫به‬‫عصر‬‫اطالعات‬‫معروف‬،‫بود‬
‫اجرای‬‫برنامه‬‫ها‬‫در‬‫کامپیوترها‬‫مستلزم‬‫تنظیم‬،‫کلیدها‬‫سوییچ‬‫ها‬‫و‬‫اتصال‬‫سیم‬‫های‬
‫مختلف‬‫بود‬‫که‬‫منطق‬‫برنامه‬‫را‬‫مشخص‬‫می‬‫کردند‬.
2 1
Major Generations
WHY PROGRAMMING?
Software
WHY PROGRAMMING?
HARDWARE + SOFTWARE =
Body Soul
This is a subtitle. You can change it as you want. This is the subtitle. YouComputing
Layers
Layer 2
Layer 3
Layer 7
Layer 6
Soft Layers
Software Creation
= Prgramming
IDEA
PROGRMMING
COMPUTER
Need - JOB
Programming Language
Machine Language
Evolution Of Langueges
MACHINE LANGUAGE
0 & 1 String typing or Panched
Cards used by String Engeeniers
and Specialists
ASSEMBLY LANGUAGE
Code madules and Registry
Instructions. Label Instructions
Math Tools
HIGH LEVEL LANGUAGES
Multi-Functional Proccenig tools
Object oriented languages And so
many other ....
High Level Languages
C PROGRAMMING LANGUAGE01
C++ PROGRAMMING LANGUAGE02
C# PROGRAMMING LANGUAGE03
JAVA PROGRAMMING LANGUAGE04
PHP PROGRAMMING LANGUAGE05
C C
C
C
F#
C
C
C
C
F#
F#
C#
PascalC# C#
C#
C#
C++
C++
C++
C++
C++Pascal
Pascal
JAVA
JAVA
JAVA
JAVA
PHP
PHP
PHP
R
C
Fortran
Fortran
VB
VB
VB
VB
C++
F#
PROGRAM LIFE CYCLE
APP
SOURCE
CODE
FINAL APPLICATION
End of the process – The
app is ready to use in
multipile machines
NEED TO IDEA
UML Design and forming
the first idea of the need.
BACK TO THE MACHINE
Translate to machine
language for point structure
of the hardware
SECOND COMPILE
Machine read’s the code
and do the task by the
program
WRITING CODE
Forming the syntax part of
the programming and ligical
design.
PRE-PROCESSING
Debug – Analysis –
Normalization & ...
ONLINE , OFFLINE , COMBINED
Translation
process
Translation Methods
PHP C , C++
Java Script
MATLAB C#
JAVA
Online OfflineInterpreter Compiler
Intertermediatlanguage
Programs
Instructions (Commands)
MainTypes of
programming commands
Programming Commands
MainTypes
Do Something
As Defined Before
With Parameters
Operation Call
I/O Operation
Calculate
HOW
WHERE
......
Programming Commands
MainTypes
variable declaration
Memory Assign
Value Assign
Defenition
Assignment
No Operational
Feedback
Programming Commands
MainTypes
Do Something
Return
Announce The
Result
Return
Programming Commands
MainTypes
Jump
Repeat
Conditional
Expantions
Goto
Combined
CONDITIONAL INSTRRUCTION , LOOPS,
EXPANTIONAL CONDITION ...
Complex
Commands
Programming Commands
MainTypes
{ ... }
Simplications
Code Block
Code Block
Programming Commands
#include <stdio.h>
int main()
{
int n, i, flag = 0;
printf("Enter a positive integer: ");
scanf("%d",&n);
for(i=2; i<=n/2; ++i)
{
// condition for nonprime number
if(n%i==0)
{
flag=1;
break;
}
}
if (flag==0)
printf("%d is a prime number.",n);
else
printf("%d is not a prime number.",n);
return 0;
}
{
....
....
....
}
Programming Commands
MainTypes
Do something on
A Condition(s)
IF / Switch
Decision making
& Expantions
IF Statement
Programming Commands
Condition(s)
True False Else
Do Instruction # Skip Statement Do Instruction #
...
...
...
Go to Else
SWITCH Statement
Programming Commands
Conditions
Case [n] Case [n] Case [n]
Do Instruction # Do Instruction # Do Instruction #
...
...
...
......
Programming Commands
MainTypes
Do something
Over & Over
On a Condition
FOR / WHILE
Repeat & loop
FOR Statement
Programming Commands
START
CONDITION
(HOW MANY UNTIL X) TERMINATE
DO THE
INSTRUCTIONS
FALSE
TRUELOOP
BREAK
While Statement
Programming Commands
START
WHILE
CONDITION = TRUE
TERMINATE
INSTRUCTIONS
ELSE
CONDITION = FALSE
DO
CHECK
AGAIN
BREAK
For / IF / ...
Operation call
Code Module
For Operations
Code Module
For Instructions
like IF/For/While
Under The Hood
EXCEPTION
HANDLING
ERROR CONTROLING & MANAGEMENT
While writing the code and before compiling the source
codes. Most compilers can detect these type of errors.
Syntax Error
While compiling the code. Lack of information and data.
Inaccessibility of computer sources such as hardware.
CompileTime Error
While Running the code. Lack of data and devices or
software Smooothing platforms and runtime helpers.
RunTime Error
Type of Exceptions
While Running the code. Miss calculations. Developer
errors and user miss use. Mathemthics error & exceptions.
Logical Error (BUG)
Try { } – Catch { }
Try {
Do Instructions as defined
}
Catch {
Instructions while an ERROR happend
}
TURING
WHAT MAKES A PROGRAMMING
LANGUAGE COMPLETE
COMPLETENESS
Requirements for the completeness of a programming language
01
Order Of
Execution
02
Condition
Expantion
Selection
03
Repeat
Loop
04
GOTO
Program Requirements
Types of
DATA
Types Of Computing DATA
NUMERICAL DATA01
LOGICAL DATA02
TEXT DATA03
NUMERIC
DATA
Types Of DATA
N , R , I , Z , Q , C
Numeric :
LOGICAL
DATA
Types Of DATA
True , False – 0,1
Logical :
STRING
DATA
Types Of DATA
Char , Char String
String :
Type
CASTING
Type CASTING
I = UnsignedN c I c Z c Q
Z = Signed
Q = Floating Point
{ 0 ... 255 } 256 = 2^8 byte = uint8
{-128 ... 127} 256 = 2^8 sbyte = int8
{0 ... 2^16 -1} 2^16 INT (uint16)
{-2^15 ... 2^15 -1} 2^16 INT (int16)
Type CASTING
COMPLEX
DATA Structre
VARIABLE
Used to store and lable information
to be referenced and manipulated
in a computer program.
01
FUNCTION – SUB ROUTINE
Functions are "self contained" modules
of code that accomplish a specific task.
Functions usually "take in" data, process
it, and "return" a result.
02
ARRAYS
Functions are "self contained" modules
of code that accomplish a specific task.
Functions usually "take in" data,
process it, and "return" a result.
03
STRUCTURE
Structure is a collection of variables of
different types under a single name.
04
CLASS
In object-oriented programming,
a class is an extensible program-code-
template for creating objects, providing
initial values for state (member
variables) and implementations of
behavior (member functions or
methods).
05
COMPLEX DATA Structre
VARIABLE
Used to store and lable information
to be referenced and manipulated
in a computer program.
01
COMPLEX DATA Structre
FUNCTION – SUB ROUTINE
Functions are "self contained" modules
of code that accomplish a specific task.
Functions usually "take in" data, process
it, and "return" a result.
02
COMPLEX DATA Structre
ARRAYS
Functions are "self contained" modules
of code that accomplish a specific task.
Functions usually "take in" data,
process it, and "return" a result.
03
COMPLEX DATA Structre
STRUCTURE
Structure is a collection of variables of
different types under a single name.
04
COMPLEX DATA Structre
CLASS
In object-oriented programming,
a class is an extensible program-code-
template for creating objects, providing
initial values for state (member
variables) and implementations of
behavior (member functions or
methods).
05
COMPLEX DATA Structre
THANKS
SAMAN CHITSAZIAN
FOR YOUR
TIME

Contenu connexe

Tendances

JVM bytecode - The secret language behind Java and Scala
JVM bytecode - The secret language behind Java and ScalaJVM bytecode - The secret language behind Java and Scala
JVM bytecode - The secret language behind Java and Scala
Takipi
 
16 -ansi-iso_standards
16  -ansi-iso_standards16  -ansi-iso_standards
16 -ansi-iso_standards
Hector Garzo
 
김재석, C++ 프로그래머를 위한 C#, NDC2011
김재석, C++ 프로그래머를 위한 C#, NDC2011김재석, C++ 프로그래머를 위한 C#, NDC2011
김재석, C++ 프로그래머를 위한 C#, NDC2011
devCAT Studio, NEXON
 
Scripting
ScriptingScripting
Scripting
aztack
 
05 -working_with_the_preproce
05  -working_with_the_preproce05  -working_with_the_preproce
05 -working_with_the_preproce
Hector Garzo
 
Java Bytecode Fundamentals - JUG.lv
Java Bytecode Fundamentals - JUG.lvJava Bytecode Fundamentals - JUG.lv
Java Bytecode Fundamentals - JUG.lv
Anton Arhipov
 
Verilog tutorial
Verilog tutorialVerilog tutorial
Verilog tutorial
Abhiraj Bohra
 

Tendances (20)

Scala qq
Scala qqScala qq
Scala qq
 
Développer un moteur d'exécution symbolique en partant de rien
Développer un moteur d'exécution symbolique en partant de rienDévelopper un moteur d'exécution symbolique en partant de rien
Développer un moteur d'exécution symbolique en partant de rien
 
OpenGurukul : Language : C++ Programming
OpenGurukul : Language : C++ ProgrammingOpenGurukul : Language : C++ Programming
OpenGurukul : Language : C++ Programming
 
Verilog 語法教學
Verilog 語法教學 Verilog 語法教學
Verilog 語法教學
 
VHDL Subprograms and Packages
VHDL Subprograms and PackagesVHDL Subprograms and Packages
VHDL Subprograms and Packages
 
Verilog overview
Verilog overviewVerilog overview
Verilog overview
 
Improving Java performance at JBCNConf 2015
Improving Java performance at JBCNConf 2015Improving Java performance at JBCNConf 2015
Improving Java performance at JBCNConf 2015
 
JVM bytecode - The secret language behind Java and Scala
JVM bytecode - The secret language behind Java and ScalaJVM bytecode - The secret language behind Java and Scala
JVM bytecode - The secret language behind Java and Scala
 
VHDL - Enumerated Types (Part 3)
VHDL - Enumerated Types (Part 3)VHDL - Enumerated Types (Part 3)
VHDL - Enumerated Types (Part 3)
 
Encryption Decryption Java Project by Devansh Koolwal
Encryption Decryption Java Project by Devansh KoolwalEncryption Decryption Java Project by Devansh Koolwal
Encryption Decryption Java Project by Devansh Koolwal
 
12. Java Exceptions and error handling
12. Java Exceptions and error handling12. Java Exceptions and error handling
12. Java Exceptions and error handling
 
Python lecture 03
Python lecture 03Python lecture 03
Python lecture 03
 
16 -ansi-iso_standards
16  -ansi-iso_standards16  -ansi-iso_standards
16 -ansi-iso_standards
 
김재석, C++ 프로그래머를 위한 C#, NDC2011
김재석, C++ 프로그래머를 위한 C#, NDC2011김재석, C++ 프로그래머를 위한 C#, NDC2011
김재석, C++ 프로그래머를 위한 C#, NDC2011
 
PPT ON VHDL subprogram,package,alias,use,generate and concurrent statments an...
PPT ON VHDL subprogram,package,alias,use,generate and concurrent statments an...PPT ON VHDL subprogram,package,alias,use,generate and concurrent statments an...
PPT ON VHDL subprogram,package,alias,use,generate and concurrent statments an...
 
Scripting
ScriptingScripting
Scripting
 
The bytecode mumbo-jumbo
The bytecode mumbo-jumboThe bytecode mumbo-jumbo
The bytecode mumbo-jumbo
 
05 -working_with_the_preproce
05  -working_with_the_preproce05  -working_with_the_preproce
05 -working_with_the_preproce
 
Java Bytecode Fundamentals - JUG.lv
Java Bytecode Fundamentals - JUG.lvJava Bytecode Fundamentals - JUG.lv
Java Bytecode Fundamentals - JUG.lv
 
Verilog tutorial
Verilog tutorialVerilog tutorial
Verilog tutorial
 

Similaire à Fundamental of programming - مقدمات برنامه نویسی

[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...
[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...
[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...
Sang Don Kim
 
Unmanaged Parallelization via P/Invoke
Unmanaged Parallelization via P/InvokeUnmanaged Parallelization via P/Invoke
Unmanaged Parallelization via P/Invoke
Dmitri Nesteruk
 

Similaire à Fundamental of programming - مقدمات برنامه نویسی (20)

Skiron - Experiments in CPU Design in D
Skiron - Experiments in CPU Design in DSkiron - Experiments in CPU Design in D
Skiron - Experiments in CPU Design in D
 
មេរៀនៈ Data Structure and Algorithm in C/C++
មេរៀនៈ Data Structure and Algorithm in C/C++មេរៀនៈ Data Structure and Algorithm in C/C++
មេរៀនៈ Data Structure and Algorithm in C/C++
 
Unit1 C
Unit1 CUnit1 C
Unit1 C
 
Unit1 C
Unit1 CUnit1 C
Unit1 C
 
[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...
[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...
[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...
 
Object Oriented Technologies
Object Oriented TechnologiesObject Oriented Technologies
Object Oriented Technologies
 
Build 2016 - B880 - Top 6 Reasons to Move Your C++ Code to Visual Studio 2015
Build 2016 - B880 - Top 6 Reasons to Move Your C++ Code to Visual Studio 2015Build 2016 - B880 - Top 6 Reasons to Move Your C++ Code to Visual Studio 2015
Build 2016 - B880 - Top 6 Reasons to Move Your C++ Code to Visual Studio 2015
 
.NET Foundation, Future of .NET and C#
.NET Foundation, Future of .NET and C#.NET Foundation, Future of .NET and C#
.NET Foundation, Future of .NET and C#
 
Unmanaged Parallelization via P/Invoke
Unmanaged Parallelization via P/InvokeUnmanaged Parallelization via P/Invoke
Unmanaged Parallelization via P/Invoke
 
Ip project visual mobile
Ip project visual mobileIp project visual mobile
Ip project visual mobile
 
Getting started cpp full
Getting started cpp   fullGetting started cpp   full
Getting started cpp full
 
Compiler
CompilerCompiler
Compiler
 
Design problem
Design problemDesign problem
Design problem
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programming
 
C programming language tutorial
C programming language tutorial C programming language tutorial
C programming language tutorial
 
App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...
App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...
App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programming
 
Activity 5
Activity 5Activity 5
Activity 5
 
System programmin practical file
System programmin practical fileSystem programmin practical file
System programmin practical file
 
Hello world! Intro to C++
Hello world! Intro to C++Hello world! Intro to C++
Hello world! Intro to C++
 

Dernier

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 

Dernier (20)

The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 

Fundamental of programming - مقدمات برنامه نویسی

  • 1.
  • 2. Outlines 1 History How did it all begin 2 Software Program & Programming Section 1
  • 5. Outlines 9 DATA Types of DATA 10 DATA Type Casting 11 DATA Complex dATA Structure
  • 6. ‫تاریخچه‬ ‫دارد‬ ‫ای‬ ‫پیچیده‬ ‫و‬ ‫طوالنی‬ ‫تاریخچه‬ ‫امروزی‬ ‫شکل‬ ‫به‬ ‫افزار‬ ‫نرم‬ ‫توسعه‬.‫افزار‬ ‫نرم‬ ‫امروز‬ ‫جایگاه‬ ‫که‬ ‫ندارد‬ ‫تعجبی‬ ‫است‬ ‫تاریخ‬ ‫طول‬ ‫در‬ ‫بسیاری‬ ‫متعدد‬ ‫های‬ ‫گام‬ ‫حاصل‬.‫توسعه‬ ‫روند‬ ‫دنیا‬ ‫مختلف‬ ‫های‬ ‫گوشه‬ ‫از‬ ‫بسیاری‬ ‫رویدادهای‬ ‫اند‬ ‫برده‬ ‫پیش‬ ‫را‬ ‫کامپیوتر‬.‫است‬ ‫داده‬ ‫رخ‬ ‫نویسی‬ ‫برنامه‬ ‫های‬ ‫زبان‬ ‫توسعه‬ ‫دنبال‬ ‫به‬ ‫افزارها‬ ‫نرم‬ ‫توسعه‬ ‫معموال‬. ‫اند‬ ‫یافته‬ ‫توسعه‬ ‫کامپیوترها‬ ‫و‬ ‫افزارها‬ ‫سخت‬ ‫موازات‬ ‫به‬ ‫نیز‬ ‫نویسی‬ ‫برنامه‬ ‫های‬ ‫زبان‬. ‫شد؟‬ ‫شروع‬ ‫کجا‬ ‫از‬ ‫قصه‬ ‫قدیمیترین‬‫نمونه‬‫عملی‬‫از‬‫برنامه‬‫نویسی‬‫به‬‫سال‬1801‫در‬‫کشور‬‫فرانسه‬‫توسط‬‫شخصی‬‫بنام‬ ‫جکارد‬‫برمی‬‫گردد‬.‫او‬‫یک‬‫دستگاه‬‫بافندگی‬‫طراحی‬‫کرده‬‫بود‬‫که‬‫می‬‫توانست‬‫اعمال‬‫خاصی‬ ‫از‬‫بافندگی‬‫را‬‫که‬‫روی‬‫کارتهای‬‫سوراخ‬‫شده‬(Punched card)‫ثبت‬‫شده‬‫بودند‬‫به‬‫ترتیب‬ ‫انجام‬‫دهد‬.‫این‬‫تکنولوژی‬‫اجازه‬‫تولید‬‫بافت‬‫های‬‫پیچیده‬‫و‬‫با‬‫کیفیت‬‫تر‬‫را‬‫به‬ ‫کارگران‬‫معمولی‬‫می‬‫داد‬.‫اکنون‬‫به‬‫جای‬‫کارگران‬‫متعدد‬‫و‬،‫ماهر‬‫فقط‬‫یک‬‫نفر‬‫برای‬ ‫مدیریت‬‫کل‬‫دستگاه‬‫کافی‬‫بود‬.‫روند‬‫تقریبا‬‫مشابهی‬‫نیز‬‫در‬‫خالل‬‫انقالب‬‫صنعتی‬‫در‬‫انگلیس‬ ‫به‬‫وقوع‬‫پیوست‬.‫به‬‫دنبال‬‫استفاده‬‫از‬‫ماشینهای‬‫خودکار‬‫و‬‫کاهش‬‫نیروی‬‫کار‬،‫انسانی‬ ‫جنبشی‬‫تحت‬‫عنوان‬‫لودیت‬‫ها‬‫به‬‫راه‬‫افتاد‬.‫این‬‫جنبش‬‫متشکل‬‫بود‬‫از‬‫افرادی‬‫که‬‫مخالف‬ ‫توسعه‬‫تکنولوژی‬‫بودند‬‫و‬‫برای‬‫جایگاه‬،‫شغلی‬‫نان‬‫و‬‫رزق‬‫و‬‫روزی‬‫خود‬‫با‬‫تکنولوژی‬‫می‬ ‫جنگیدند‬.‫در‬‫این‬،‫دوره‬‫برنامه‬‫نویسی‬‫به‬‫موازات‬‫ساخت‬‫ماشین‬‫های‬‫جدید‬‫توسط‬،‫پاسکال‬ ،‫بابیج‬‫شوالتز‬‫و‬...‫توسعه‬‫می‬‫یافت‬.‫برای‬‫حل‬‫هر‬‫مشکلی‬‫یک‬‫ماشین‬‫جدید‬‫ساخته‬‫می‬‫شود‬ ‫که‬‫چرخ‬‫دنده‬،‫ها‬‫سیم‬،‫ها‬‫میله‬‫ها‬‫و‬‫دستورات‬‫جدیدتری‬‫نسبت‬‫به‬‫قبل‬ ‫داشت‬. ‫در‬‫سال‬1847‫یک‬‫ریاضیدارن‬‫انگلیسی‬‫بنام‬George Boole‫با‬‫ارائه‬‫جبر‬،‫منطقی‬‫ارتباط‬ ‫میان‬‫علم‬‫ریاضیات‬‫و‬‫منطق‬‫را‬‫اثبات‬‫کرد‬.‫برای‬‫اولین‬‫بار‬‫او‬‫اثبات‬‫کرد‬‫که‬‫علم‬‫منطق‬ ‫بیشتر‬‫بخشی‬‫از‬‫ریاضیات‬‫است‬‫تا‬‫فلسفه‬!‫این‬‫عمل‬‫که‬‫یک‬‫گام‬‫بزرگ‬‫در‬‫تفکر‬‫بشریت‬‫به‬ ‫حساب‬‫می‬‫آید‬‫تقریبا‬‫صد‬‫سال‬(‫تا‬‫سال‬1940)‫طول‬‫کشید‬‫تا‬‫در‬‫محاسبات‬‫کامپیوتری‬‫به‬ ‫کار‬‫گرفته‬‫شود‬.‫در‬‫دهه‬1940‫اولین‬‫کامپیوتر‬‫الکترونیکی‬‫ساخته‬‫شد‬.‫حافظه‬‫محدود‬‫و‬ ‫سرعت‬‫بسیار‬‫پایین‬(‫به‬‫نسبت‬‫سرعت‬‫کامپیوترهای‬‫امروزی‬)‫از‬‫ویژگی‬‫های‬‫بارز‬ ‫کامپیوترهای‬‫الکترونیکی‬‫اولیه‬‫بودند‬.‫در‬‫این‬‫سالها‬‫که‬‫به‬‫عصر‬‫اطالعات‬‫معروف‬،‫بود‬ ‫اجرای‬‫برنامه‬‫ها‬‫در‬‫کامپیوترها‬‫مستلزم‬‫تنظیم‬،‫کلیدها‬‫سوییچ‬‫ها‬‫و‬‫اتصال‬‫سیم‬‫های‬ ‫مختلف‬‫بود‬‫که‬‫منطق‬‫برنامه‬‫را‬‫مشخص‬‫می‬‫کردند‬. 2 1
  • 9. WHY PROGRAMMING? HARDWARE + SOFTWARE = Body Soul
  • 10. This is a subtitle. You can change it as you want. This is the subtitle. YouComputing Layers
  • 11. Layer 2 Layer 3 Layer 7 Layer 6 Soft Layers
  • 15. Evolution Of Langueges MACHINE LANGUAGE 0 & 1 String typing or Panched Cards used by String Engeeniers and Specialists ASSEMBLY LANGUAGE Code madules and Registry Instructions. Label Instructions Math Tools HIGH LEVEL LANGUAGES Multi-Functional Proccenig tools Object oriented languages And so many other ....
  • 16. High Level Languages C PROGRAMMING LANGUAGE01 C++ PROGRAMMING LANGUAGE02 C# PROGRAMMING LANGUAGE03 JAVA PROGRAMMING LANGUAGE04 PHP PROGRAMMING LANGUAGE05 C C C C F# C C C C F# F# C# PascalC# C# C# C# C++ C++ C++ C++ C++Pascal Pascal JAVA JAVA JAVA JAVA PHP PHP PHP R C Fortran Fortran VB VB VB VB C++ F#
  • 17. PROGRAM LIFE CYCLE APP SOURCE CODE FINAL APPLICATION End of the process – The app is ready to use in multipile machines NEED TO IDEA UML Design and forming the first idea of the need. BACK TO THE MACHINE Translate to machine language for point structure of the hardware SECOND COMPILE Machine read’s the code and do the task by the program WRITING CODE Forming the syntax part of the programming and ligical design. PRE-PROCESSING Debug – Analysis – Normalization & ...
  • 18. ONLINE , OFFLINE , COMBINED Translation process
  • 19. Translation Methods PHP C , C++ Java Script MATLAB C# JAVA Online OfflineInterpreter Compiler Intertermediatlanguage
  • 21. Programming Commands MainTypes Do Something As Defined Before With Parameters Operation Call I/O Operation Calculate HOW WHERE ......
  • 22. Programming Commands MainTypes variable declaration Memory Assign Value Assign Defenition Assignment No Operational Feedback
  • 25. Combined CONDITIONAL INSTRRUCTION , LOOPS, EXPANTIONAL CONDITION ... Complex Commands
  • 26. Programming Commands MainTypes { ... } Simplications Code Block
  • 27. Code Block Programming Commands #include <stdio.h> int main() { int n, i, flag = 0; printf("Enter a positive integer: "); scanf("%d",&n); for(i=2; i<=n/2; ++i) { // condition for nonprime number if(n%i==0) { flag=1; break; } } if (flag==0) printf("%d is a prime number.",n); else printf("%d is not a prime number.",n); return 0; } { .... .... .... }
  • 28. Programming Commands MainTypes Do something on A Condition(s) IF / Switch Decision making & Expantions
  • 29. IF Statement Programming Commands Condition(s) True False Else Do Instruction # Skip Statement Do Instruction # ... ... ... Go to Else
  • 30. SWITCH Statement Programming Commands Conditions Case [n] Case [n] Case [n] Do Instruction # Do Instruction # Do Instruction # ... ... ... ......
  • 31. Programming Commands MainTypes Do something Over & Over On a Condition FOR / WHILE Repeat & loop
  • 32. FOR Statement Programming Commands START CONDITION (HOW MANY UNTIL X) TERMINATE DO THE INSTRUCTIONS FALSE TRUELOOP BREAK
  • 33. While Statement Programming Commands START WHILE CONDITION = TRUE TERMINATE INSTRUCTIONS ELSE CONDITION = FALSE DO CHECK AGAIN BREAK
  • 34. For / IF / ... Operation call Code Module For Operations Code Module For Instructions like IF/For/While Under The Hood
  • 36. While writing the code and before compiling the source codes. Most compilers can detect these type of errors. Syntax Error While compiling the code. Lack of information and data. Inaccessibility of computer sources such as hardware. CompileTime Error While Running the code. Lack of data and devices or software Smooothing platforms and runtime helpers. RunTime Error Type of Exceptions While Running the code. Miss calculations. Developer errors and user miss use. Mathemthics error & exceptions. Logical Error (BUG)
  • 37. Try { } – Catch { } Try { Do Instructions as defined } Catch { Instructions while an ERROR happend }
  • 38. TURING WHAT MAKES A PROGRAMMING LANGUAGE COMPLETE COMPLETENESS
  • 39. Requirements for the completeness of a programming language 01 Order Of Execution 02 Condition Expantion Selection 03 Repeat Loop 04 GOTO
  • 42. Types Of Computing DATA NUMERICAL DATA01 LOGICAL DATA02 TEXT DATA03
  • 44. Types Of DATA N , R , I , Z , Q , C Numeric :
  • 46. Types Of DATA True , False – 0,1 Logical :
  • 48. Types Of DATA Char , Char String String :
  • 50. Type CASTING I = UnsignedN c I c Z c Q Z = Signed Q = Floating Point
  • 51. { 0 ... 255 } 256 = 2^8 byte = uint8 {-128 ... 127} 256 = 2^8 sbyte = int8 {0 ... 2^16 -1} 2^16 INT (uint16) {-2^15 ... 2^15 -1} 2^16 INT (int16) Type CASTING
  • 53. VARIABLE Used to store and lable information to be referenced and manipulated in a computer program. 01 FUNCTION – SUB ROUTINE Functions are "self contained" modules of code that accomplish a specific task. Functions usually "take in" data, process it, and "return" a result. 02 ARRAYS Functions are "self contained" modules of code that accomplish a specific task. Functions usually "take in" data, process it, and "return" a result. 03 STRUCTURE Structure is a collection of variables of different types under a single name. 04 CLASS In object-oriented programming, a class is an extensible program-code- template for creating objects, providing initial values for state (member variables) and implementations of behavior (member functions or methods). 05 COMPLEX DATA Structre
  • 54. VARIABLE Used to store and lable information to be referenced and manipulated in a computer program. 01 COMPLEX DATA Structre
  • 55. FUNCTION – SUB ROUTINE Functions are "self contained" modules of code that accomplish a specific task. Functions usually "take in" data, process it, and "return" a result. 02 COMPLEX DATA Structre
  • 56. ARRAYS Functions are "self contained" modules of code that accomplish a specific task. Functions usually "take in" data, process it, and "return" a result. 03 COMPLEX DATA Structre
  • 57. STRUCTURE Structure is a collection of variables of different types under a single name. 04 COMPLEX DATA Structre
  • 58. CLASS In object-oriented programming, a class is an extensible program-code- template for creating objects, providing initial values for state (member variables) and implementations of behavior (member functions or methods). 05 COMPLEX DATA Structre