Sunteți pe pagina 1din 26

Programming Fundamental Course

Chapter 3 - Introduction to Computer Programming Language

Subsidiary Company of ACE Data Systems


Reflection
➢ AnyQuestion?
➢ Why do we need to learn about network?
➢ Which network topology type is widely using now ?
➢ Why do we use data center?
➢ Why people are using cloud?
➢ Why ubiquitous accessibility is important?

2 Programming Fundamental Course


Objectives
➢ After this lesson, you should be able to understand
➢ Programming Languages & Computer Program
➢ Different programming languages
➢ Compilation & Execution Process
➢ Program Development Process
➢ Criteria of a good program

3 Programming Fundamental Course


Question?
➢ Why do you want to be a programmer?
➢ What is a programming language?
➢ Why there are so many programming languages?
➢ What programming language (name) do you know?

4 Programming Fundamental Course


What is a Programming Language
➢A language designed to communicate instructions to a computer
➢ Human Language – Human to Human interaction
➢ Grammatical Rules
➢ English, French, Japanese, Chinese, Burmese,…
➢ Programming Language – Human to Computer interaction
➢ Syntax Rules
➢ Java, .NET, PHP,…
➢ Instructions = Step by step process to solve problem
➢ What is 1 + 1 ?
➢ Where the Cyclone is heading?
➢ Computer can setup instruction by themselves?

5 Programming Fundamental Course


Why So Many Programming Languages?
➢ Programming language evolutions
➢ Improvement & new features
➢ Specific Devices
➢ Mainframe
➢ Personal Computer
➢ Mobile
➢ Special Devices(FingerPrint, Biometric,..)
➢ Specific Functions
➢ Web Page
➢ Graphic
➢ Game
➢ Specific Process
➢ Distributed Computing
➢ Centralized Computing

6 Programming Fundamental Course


What is a Computer Program?
➢A set of instructions written in a specific language
➢ To perform a specific task.

➢ Computer Programs are also named as Software, Application,


Apps

➢ one file or million of files combine

7 Programming Fundamental Course


Types of Computer Program
➢ Application
➢ Business Application Software
➢ Banking, Restaurant, Supermarket,…
➢ Utilities and Productivity Software
➢ Word, Excel, Powerpoint, Zip, Notepad,…
➢ Program Development Software
➢ .NET, Java, PHP,…
➢ Operating System
➢ Win 9x, 2000, Unix, Linux, Mac(iOS), Android, FireOS, Embedded
OS, Kernal, Drivers
8 Programming Fundamental Course
Types of Programming Language
➢ Low level (processor dependent)
➢ Machine code, assembler
➢ High level: structured, procedural
➢ Fortran, C, Pascal…
➢ High level: object oriented
➢ C++, Java, C#, Perl, Objective-C…
➢ Virtual machines
➢ Java, C#…
➢ Scripting
➢ Perl, Python, JavaScript…

9 Programming Fundamental Course


Types of Programming Language
➢ Low level
➢ Direct memory, hardware access
➢ Good performance
➢ Processor dependence

➢ High level
➢ Automatic resource management
➢ Normal Performance
➢ Processor independence
➢ Object & Class

➢ Virtual machines
➢ Isolated from OS
➢ Processor independence

➢ Scripting
➢ Special purpose programming
➢ Not strong like Java, .NET

10 Programming Fundamental Course


Programming Language Syntax
➢ To Print “Test” and accept data in different programming language

C C++ Java .NET


printf(“Text”); cout<<”Test”; System.out.println(“Test”); System.Console.Write(“Test”);
scanf(“%10s”,data); cin>>data; data = System.in.read(); Data = System.Console.Read();

11 Programming Fundamental Course


Compiler & Interpreter
➢ Compiler is a specific software that gets the whole Source Code (Computer
program written in human understandable form) and translates it into Object
Code (Computer Program that is in machine understandable form) all at a
time.

➢ Interpreter is translating and executing one statement (command of


Computer Program) of Source Code into Object Code at a time. (It means,
interpreters translate and execute computer programs line by line).

12 Programming Fundamental Course


Execution of a Program with Compiler
Using Compiler:

Execute
Source Code Compiler Object Code
Program

Execute
Java Code Java Compiler Machine Code
Program

13 Programming Fundamental Course


Execution of a Program with Interpreter
How Compile Works:
Execute
Source Code Compiler Object Code
Program

How Interpreter Works:

Execute a line
Source Code Interpreter
of Program

14 Programming Fundamental Course


Types of Errors.
➢ Error = Wrong Instruction

➢ Syntax Errors: Violation of syntactic rules generates syntax errors.


➢ Effect? Interpreter or Compiler finds it in Syntax Check Phase.

➢ Semantic Errors: Doing logical mistakes causes semantic errors


➢ Effect? Interpreters and Compilers can not notice them, but on execution, they causes
unexpected results.

➢ Run-time Errors: Occur on program execution. Mostly caused by invalid data


entry or use of non existence resources.
➢ Effect? It occurs on run time and may crash(stop) the program execution

15 Programming Fundamental Course


Program Development Process

Define

Maintain/Improve Design

Test/
Develop
Debug

16 Programming Fundamental Course


1 Define
➢ Input
➢ Input(s) are available in what form?
➢ User key-in
➢ Export file
➢ Webcam/Sensor/Barcode Reader
➢ Output
➢ What do you want to achieve?
➢ Process
➢ Are these input(s) has enough data to process?
➢ What are the formula/steps to get the output?

17 Programming Fundamental Course


2 Design(not appearance)
➢ How program will be construct
➢ Small task/Sub Program/Breakdown
➢ Step by step instruction

18 Programming Fundamental Course


3 Develop
➢ WritingProgram Code according to Design
➢ Standards, Guidelines, Rules

19 Programming Fundamental Course


4 Test/Debug/Modify
➢ Defined vs Result
➢ Eliminate error or bugs

20 Programming Fundamental Course


5 Maintain/Improve
➢ Stability and Improvement

21 Programming Fundamental Course


What determines a “good” language
➢ Formerly: Run-time performance
➢ Computers were more expensive than programmers
➢ Now: Life cycle (human) cost is more important
➢ Ease of designing, coding
➢ Debugging
➢ Maintenance
➢ Reusability

22 Programming Fundamental Course


Criteria of a good program
➢ Readability
➢ How easy is the program for another developer to read and understand

➢ Maintainability
➢ How easy is it to maintain, modify the program
➢ How it design the whole application

➢ Reusability
➢ How it allow program part to be re-use

➢ Scalability
➢ Can scale up or down when necessary

➢ Followed Do & Don’t

23 Programming Fundamental Course


Quiz?
➢ Why there is so many programming languages?
➢ What are program development process?
➢ Does all the program run on any devices?

24 Programming Fundamental Course


Typing Test
➢ Typing
➢ 30 -+-+Word Per Minutes(100 to 150 characters per minutes)

➢ http://thetypingcat.com/typing-speed-test/1m

➢ http://thetypingcat.com/typing-courses/basic/

25 Programming Fundamental Course


Thank you!!
Q&As

S-ar putea să vă placă și