SlideShare uma empresa Scribd logo
1 de 31
A Beginner’s Guide to
Programming Logic,
Introductory
Chapter 1

An Overview of Computers and
Programming
Objectives
In this chapter, you will learn about:
• Computer systems
• Simple program logic
• The steps involved in the program development
cycle
• Pseudocode statements and flowchart symbols
• Using a sentinel value to end a program
• Programming and user environments
• The evolution of programming models
A Beginner's Guide to Programming Logic, Introductory

2
Understanding Computer Systems
• Computer system
– Combination of all the components required to
process and store data using a computer

• Hardware
– Equipment associated with a computer

• Software
– Computer instructions
– Tell the hardware what to do
– Programs
• Instructions written by programmers
A Beginner's Guide to Programming Logic, Introductory

3
Understanding Computer Systems
(continued)
• Programming
– Writing software instructions

• Computer hardware and software accomplish three
major operations
– Input
• Data items enter computer

– Processing
• By central processing unit (CPU)

– Output

A Beginner's Guide to Programming Logic, Introductory

4
Understanding Computer Systems
(continued)
• Programming language
– Use to write computer instructions
– Examples
• Visual Basic, C#, C++, or Java

• Syntax
– Rules governing its word usage and punctuation

• Computer memory
– Computer’s temporary, internal storage
– Volatile
A Beginner's Guide to Programming Logic, Introductory

5
Understanding Computer Systems
(continued)
• Permanent storage devices
– Nonvolatile

• Compiler or an interpreter
– Translates program code into machine language
(binary language)
– Checks for syntax errors

• Program executes or runs
– Input will be accepted, some processing will occur,
and results will be output

A Beginner's Guide to Programming Logic, Introductory

6
Understanding Simple Program Logic
• Program with syntax errors cannot execute
• Logical errors
– Errors in program logic
– Produce incorrect output as a result

• Logic of the computer program
– Sequence of specific instructions in specific order

• Variable
– Named memory location whose value can vary

A Beginner's Guide to Programming Logic, Introductory

7
Understanding the Program
Development Cycle
• Program development cycle
–
–
–
–

Understand the problem
Plan the logic
Code the program
Use software (a compiler or interpreter) to translate
the program into machine language
– Test the program
– Put the program into production
– Maintain the program

A Beginner's Guide to Programming Logic, Introductory

8
Understanding the Program
Development Cycle (continued)

Figure 1-1 The program development cycle

A Beginner's Guide to Programming Logic, Introductory

9
Understanding the Problem
• One of the most difficult aspects of programming
• Users or end users
– People for whom program is written

• Documentation
– Supporting paperwork for a program

A Beginner's Guide to Programming Logic, Introductory

10
Planning the Logic
• Heart of the programming process
• Most common planning tools
– Flowcharts
– Pseudocode

• Desk-checking
– Walking through a program’s logic on paper before
you actually write the program

A Beginner's Guide to Programming Logic, Introductory

11
Coding the Program
• Hundreds of programming languages are available
– Choose based on features
– Alike in their basic capabilities

• Easier than planning step

A Beginner's Guide to Programming Logic, Introductory

12
Using Software to Translate the
Program into Machine Language
• Translator program
– Compiler or interpreter
– Changes the programmer’s English-like high-level
programming language into the low-level
machine language

• Syntax error
– Misuse of a language’s grammar rules
– Programmer corrects listed syntax errors
– Might need to recompile the code several times

A Beginner's Guide to Programming Logic, Introductory

13
Using Software to Translate the
Program into Machine Language
(continued)

Figure 1-2 Creating an executable program

A Beginner's Guide to Programming Logic, Introductory

14
Testing the Program
• Logical error
– Use a syntactically correct statement but use the
wrong one for the current context

• Test
– Execute the program with some sample data to see
whether the results are logically correct

• Programs should be tested with many sets of data

A Beginner's Guide to Programming Logic, Introductory

15
Putting the Program into Production
• Process depends on program’s purpose
– May take several months

• Conversion
– Entire set of actions an organization must take to
switch over to using a new program or set of
programs

A Beginner's Guide to Programming Logic, Introductory

16
Maintaining the Program
• Maintenance
– Making changes after program is put into production

• Common first programming job
– Maintaining previously written programs

• Make changes to existing programs
– Repeat the development cycle

A Beginner's Guide to Programming Logic, Introductory

17
Using Pseudocode Statements
and Flowchart Symbols
• Pseudocode
– English-like representation of the logical steps it
takes to solve a problem

• Flowchart
– Pictorial representation of the logical steps it takes to
solve a problem

A Beginner's Guide to Programming Logic, Introductory

18
Writing Pseudocode
• Pseudocode representation of a number-doubling
problem
start
input myNumber
set myAnswer = myNumber * 2
output myAnswer

stop

A Beginner's Guide to Programming Logic, Introductory

19
Writing Pseudocode (continued)
• Programmers preface their pseudocode with a
beginning statement like start and end it with a
terminating statement like stop
• Flexible because it is a planning tool

A Beginner's Guide to Programming Logic, Introductory

20
Drawing Flowcharts
• Create a flowchart
– Draw geometric shapes that contain the individual
statements
– Connect shapes with arrows

• Input symbol
– Indicates input operation
– Parallelogram

• Processing symbol
– Processing statements such as arithmetic
– Rectangle
A Beginner's Guide to Programming Logic, Introductory

21
Drawing Flowcharts (continued)
• Output symbol
– Represents output statements
– Parallelogram

• Flowlines
– Arrows that connect steps

• Terminal symbols
– Start/stop symbols
– Shaped like a racetrack
– Also called lozenge
A Beginner's Guide to Programming Logic, Introductory

22
Drawing Flowcharts (continued)

Figure 1-6 Flowchart and pseudocode of program that doubles a number

A Beginner's Guide to Programming Logic, Introductory

23
Understanding Programming
Environments
• Use a keyboard to type program statements into an
editor
– Plain text editor
• Similar to a word processor but without as many
features

– Text editor that is part of an integrated
development environment (IDE)
• Software package that provides an editor, compiler,
and other programming tools

A Beginner's Guide to Programming Logic, Introductory

31
Understanding Programming
Environments (continued)

Figure 1-12 A C# number-doubling program in Visual Studio
A Beginner's Guide to Programming Logic, Introductory

32
Understanding User Environments
• Command line
– Location on your computer screen at which you type
text entries to communicate with the computer’s
operating system

• Graphical user interface (GUI)
– Allows users to interact with a program in a graphical
environment

A Beginner's Guide to Programming Logic, Introductory

33
Understanding User Environments
(continued)

Figure 1-13 Executing a number-doubling program
in a command-line environment

A Beginner's Guide to Programming Logic, Introductory

34
Understanding User Environments
(continued)

Figure 1-14 Executing a number-doubling program in a GUI environment

A Beginner's Guide to Programming Logic, Introductory

35
Understanding the Evolution
of Programming Models
• People have been writing modern computer
programs since the 1940s
• Newer programming languages
– Look much more like natural language
– Easier to use
– Create self-contained modules or program segments
that can be pieced together in a variety of ways

A Beginner's Guide to Programming Logic, Introductory

36
Understanding the Evolution
of Programming Models (continued)
• Major models or paradigms used by programmers
– Procedural programming
• Focuses on the procedures that programmers create

– Object-oriented programming
• Focuses on objects, or “things,” and describes their
features (or attributes) and their behaviors

– Major difference
• Focus the programmer takes during the earliest
planning stages of a project

A Beginner's Guide to Programming Logic, Introductory

37
Summary
• Computer programming
– Requires specific syntax
– Must develop correct logic

• Programmer’s job
– Understanding the problem, planning the logic,
coding the program, translating the program into
machine language, testing the program, putting the
program into production, and maintaining it

• Procedural and object-oriented programmers
approach problems differently
A Beginner's Guide to Programming Logic, Introductory

38

Mais conteúdo relacionado

Mais procurados

0 introduction to computer architecture
0 introduction to computer architecture0 introduction to computer architecture
0 introduction to computer architectureaamc1100
 
Types of computer networks
Types of computer networksTypes of computer networks
Types of computer networkshemant Hrhemant5
 
9626 GCE A2 Information Technology Chapter 11
9626 GCE A2 Information Technology Chapter 119626 GCE A2 Information Technology Chapter 11
9626 GCE A2 Information Technology Chapter 11Anthi Aristotelous
 
Intro to Bits, Bytes, and Storage
Intro to Bits, Bytes, and StorageIntro to Bits, Bytes, and Storage
Intro to Bits, Bytes, and StorageJohn Goldsworthy
 
Network analysis-design-and-implementation-part-a2252
Network analysis-design-and-implementation-part-a2252Network analysis-design-and-implementation-part-a2252
Network analysis-design-and-implementation-part-a2252Michelle Quizon
 
EE5440 – Computer Architecture - Lecture 1
EE5440 – Computer Architecture - Lecture 1EE5440 – Computer Architecture - Lecture 1
EE5440 – Computer Architecture - Lecture 1Dilawar Khan
 
Software and hardware
Software and hardwareSoftware and hardware
Software and hardwaremeryy21
 
Computer Systems
Computer SystemsComputer Systems
Computer Systemsdrs
 
HNS L5 Curriculum.pdf
HNS L5 Curriculum.pdfHNS L5 Curriculum.pdf
HNS L5 Curriculum.pdfteshomeneguse
 
Basic overview of information technology and uses
Basic overview of information technology and usesBasic overview of information technology and uses
Basic overview of information technology and usesEbtissam Al-Madi
 
Internet Service Provider-ISP
Internet Service Provider-ISPInternet Service Provider-ISP
Internet Service Provider-ISPJaya Kamnani
 
computer misuse n criminal law
computer misuse n criminal lawcomputer misuse n criminal law
computer misuse n criminal lawHamza Cheema
 
Von neumann Architecture | Computer Science
Von neumann Architecture | Computer ScienceVon neumann Architecture | Computer Science
Von neumann Architecture | Computer ScienceTransweb Global Inc
 
Powerpoint on Software Concept (ClassXI)
Powerpoint on Software Concept (ClassXI)Powerpoint on Software Concept (ClassXI)
Powerpoint on Software Concept (ClassXI)Fernando Torres
 
Information on protocols-email protocols
Information on protocols-email protocolsInformation on protocols-email protocols
Information on protocols-email protocolsPriyanka Shinde
 

Mais procurados (20)

0 introduction to computer architecture
0 introduction to computer architecture0 introduction to computer architecture
0 introduction to computer architecture
 
Types of computer networks
Types of computer networksTypes of computer networks
Types of computer networks
 
Programming Design Tools
Programming Design ToolsProgramming Design Tools
Programming Design Tools
 
9626 GCE A2 Information Technology Chapter 11
9626 GCE A2 Information Technology Chapter 119626 GCE A2 Information Technology Chapter 11
9626 GCE A2 Information Technology Chapter 11
 
Basic Concepts Of Information Technology (It)
Basic Concepts Of Information Technology (It)Basic Concepts Of Information Technology (It)
Basic Concepts Of Information Technology (It)
 
Intro to Bits, Bytes, and Storage
Intro to Bits, Bytes, and StorageIntro to Bits, Bytes, and Storage
Intro to Bits, Bytes, and Storage
 
Network analysis-design-and-implementation-part-a2252
Network analysis-design-and-implementation-part-a2252Network analysis-design-and-implementation-part-a2252
Network analysis-design-and-implementation-part-a2252
 
EE5440 – Computer Architecture - Lecture 1
EE5440 – Computer Architecture - Lecture 1EE5440 – Computer Architecture - Lecture 1
EE5440 – Computer Architecture - Lecture 1
 
Software and hardware
Software and hardwareSoftware and hardware
Software and hardware
 
IGCSE ICT Theory
IGCSE ICT Theory IGCSE ICT Theory
IGCSE ICT Theory
 
Computer Systems
Computer SystemsComputer Systems
Computer Systems
 
HNS L5 Curriculum.pdf
HNS L5 Curriculum.pdfHNS L5 Curriculum.pdf
HNS L5 Curriculum.pdf
 
Basic overview of information technology and uses
Basic overview of information technology and usesBasic overview of information technology and uses
Basic overview of information technology and uses
 
Internet Service Provider-ISP
Internet Service Provider-ISPInternet Service Provider-ISP
Internet Service Provider-ISP
 
computer misuse n criminal law
computer misuse n criminal lawcomputer misuse n criminal law
computer misuse n criminal law
 
Von neumann Architecture | Computer Science
Von neumann Architecture | Computer ScienceVon neumann Architecture | Computer Science
Von neumann Architecture | Computer Science
 
Powerpoint on Software Concept (ClassXI)
Powerpoint on Software Concept (ClassXI)Powerpoint on Software Concept (ClassXI)
Powerpoint on Software Concept (ClassXI)
 
Osi model
Osi modelOsi model
Osi model
 
Software Evolution
Software EvolutionSoftware Evolution
Software Evolution
 
Information on protocols-email protocols
Information on protocols-email protocolsInformation on protocols-email protocols
Information on protocols-email protocols
 

Semelhante a Chap1

chapter1-161229182113 (1).pdf
chapter1-161229182113 (1).pdfchapter1-161229182113 (1).pdf
chapter1-161229182113 (1).pdfBernardVelasco1
 
CIS110 Computer Programming Design Chapter (1)
CIS110 Computer Programming Design Chapter  (1)CIS110 Computer Programming Design Chapter  (1)
CIS110 Computer Programming Design Chapter (1)Dr. Ahmed Al Zaidy
 
ProgFund_Lecture_1_Introduction_to_Programming.pdf
ProgFund_Lecture_1_Introduction_to_Programming.pdfProgFund_Lecture_1_Introduction_to_Programming.pdf
ProgFund_Lecture_1_Introduction_to_Programming.pdflailoesakhan
 
Understanding Computers: Today and Tomorrow, 13th Edition Chapter 13 - Progra...
Understanding Computers: Today and Tomorrow, 13th Edition Chapter 13 - Progra...Understanding Computers: Today and Tomorrow, 13th Edition Chapter 13 - Progra...
Understanding Computers: Today and Tomorrow, 13th Edition Chapter 13 - Progra...yaminohime
 
CHAPTER-1.ppt
CHAPTER-1.pptCHAPTER-1.ppt
CHAPTER-1.pptTekle12
 
LESSON__1-15 C-PROGRAMMING.p algorithm df
LESSON__1-15 C-PROGRAMMING.p algorithm dfLESSON__1-15 C-PROGRAMMING.p algorithm df
LESSON__1-15 C-PROGRAMMING.p algorithm dfAparnaPriyadarsiniMe
 
Programming requirements for beginning in software engineering.pptx
Programming requirements for beginning in software engineering.pptxProgramming requirements for beginning in software engineering.pptx
Programming requirements for beginning in software engineering.pptxTeddyDaka
 
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptxCOMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptxSherinRappai1
 
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptxCOMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptxSherinRappai
 
programming and languages (chapter 14)
programming and languages (chapter 14)programming and languages (chapter 14)
programming and languages (chapter 14)Fadilah Badari
 
computer sciencecompiler Introduction Lecture notes
computer sciencecompiler Introduction Lecture notescomputer sciencecompiler Introduction Lecture notes
computer sciencecompiler Introduction Lecture notesamandemarvin
 
Unit 1 program development cycle
Unit 1 program development cycleUnit 1 program development cycle
Unit 1 program development cycleDhana malar
 
Uc14 chap13
Uc14 chap13Uc14 chap13
Uc14 chap13ayahye
 

Semelhante a Chap1 (20)

chapter1-161229182113 (1).pdf
chapter1-161229182113 (1).pdfchapter1-161229182113 (1).pdf
chapter1-161229182113 (1).pdf
 
CIS110 Computer Programming Design Chapter (1)
CIS110 Computer Programming Design Chapter  (1)CIS110 Computer Programming Design Chapter  (1)
CIS110 Computer Programming Design Chapter (1)
 
ProgFund_Lecture_1_Introduction_to_Programming.pdf
ProgFund_Lecture_1_Introduction_to_Programming.pdfProgFund_Lecture_1_Introduction_to_Programming.pdf
ProgFund_Lecture_1_Introduction_to_Programming.pdf
 
Cs111 ch01 v4
Cs111 ch01 v4Cs111 ch01 v4
Cs111 ch01 v4
 
Understanding Computers: Today and Tomorrow, 13th Edition Chapter 13 - Progra...
Understanding Computers: Today and Tomorrow, 13th Edition Chapter 13 - Progra...Understanding Computers: Today and Tomorrow, 13th Edition Chapter 13 - Progra...
Understanding Computers: Today and Tomorrow, 13th Edition Chapter 13 - Progra...
 
Uc13.chapter.13
Uc13.chapter.13Uc13.chapter.13
Uc13.chapter.13
 
CHAPTER-1.ppt
CHAPTER-1.pptCHAPTER-1.ppt
CHAPTER-1.ppt
 
Chapter 4 computer language
Chapter 4 computer languageChapter 4 computer language
Chapter 4 computer language
 
DMA113 Chap1
DMA113 Chap1DMA113 Chap1
DMA113 Chap1
 
LESSON__1-15 C-PROGRAMMING.p algorithm df
LESSON__1-15 C-PROGRAMMING.p algorithm dfLESSON__1-15 C-PROGRAMMING.p algorithm df
LESSON__1-15 C-PROGRAMMING.p algorithm df
 
Programming requirements for beginning in software engineering.pptx
Programming requirements for beginning in software engineering.pptxProgramming requirements for beginning in software engineering.pptx
Programming requirements for beginning in software engineering.pptx
 
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptxCOMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
 
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptxCOMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
COMPUTING AND PROGRAMMING FUNDAMENTAL.pptx
 
Nota (first)
Nota (first)Nota (first)
Nota (first)
 
programming and languages (chapter 14)
programming and languages (chapter 14)programming and languages (chapter 14)
programming and languages (chapter 14)
 
Introduction to Compiler design
Introduction to Compiler design Introduction to Compiler design
Introduction to Compiler design
 
computer sciencecompiler Introduction Lecture notes
computer sciencecompiler Introduction Lecture notescomputer sciencecompiler Introduction Lecture notes
computer sciencecompiler Introduction Lecture notes
 
Unit 1 program development cycle
Unit 1 program development cycleUnit 1 program development cycle
Unit 1 program development cycle
 
Uc14 chap13
Uc14 chap13Uc14 chap13
Uc14 chap13
 
Uc14 chap13
Uc14 chap13Uc14 chap13
Uc14 chap13
 

Último

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 

Último (20)

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 

Chap1

  • 1. A Beginner’s Guide to Programming Logic, Introductory Chapter 1 An Overview of Computers and Programming
  • 2. Objectives In this chapter, you will learn about: • Computer systems • Simple program logic • The steps involved in the program development cycle • Pseudocode statements and flowchart symbols • Using a sentinel value to end a program • Programming and user environments • The evolution of programming models A Beginner's Guide to Programming Logic, Introductory 2
  • 3. Understanding Computer Systems • Computer system – Combination of all the components required to process and store data using a computer • Hardware – Equipment associated with a computer • Software – Computer instructions – Tell the hardware what to do – Programs • Instructions written by programmers A Beginner's Guide to Programming Logic, Introductory 3
  • 4. Understanding Computer Systems (continued) • Programming – Writing software instructions • Computer hardware and software accomplish three major operations – Input • Data items enter computer – Processing • By central processing unit (CPU) – Output A Beginner's Guide to Programming Logic, Introductory 4
  • 5. Understanding Computer Systems (continued) • Programming language – Use to write computer instructions – Examples • Visual Basic, C#, C++, or Java • Syntax – Rules governing its word usage and punctuation • Computer memory – Computer’s temporary, internal storage – Volatile A Beginner's Guide to Programming Logic, Introductory 5
  • 6. Understanding Computer Systems (continued) • Permanent storage devices – Nonvolatile • Compiler or an interpreter – Translates program code into machine language (binary language) – Checks for syntax errors • Program executes or runs – Input will be accepted, some processing will occur, and results will be output A Beginner's Guide to Programming Logic, Introductory 6
  • 7. Understanding Simple Program Logic • Program with syntax errors cannot execute • Logical errors – Errors in program logic – Produce incorrect output as a result • Logic of the computer program – Sequence of specific instructions in specific order • Variable – Named memory location whose value can vary A Beginner's Guide to Programming Logic, Introductory 7
  • 8. Understanding the Program Development Cycle • Program development cycle – – – – Understand the problem Plan the logic Code the program Use software (a compiler or interpreter) to translate the program into machine language – Test the program – Put the program into production – Maintain the program A Beginner's Guide to Programming Logic, Introductory 8
  • 9. Understanding the Program Development Cycle (continued) Figure 1-1 The program development cycle A Beginner's Guide to Programming Logic, Introductory 9
  • 10. Understanding the Problem • One of the most difficult aspects of programming • Users or end users – People for whom program is written • Documentation – Supporting paperwork for a program A Beginner's Guide to Programming Logic, Introductory 10
  • 11. Planning the Logic • Heart of the programming process • Most common planning tools – Flowcharts – Pseudocode • Desk-checking – Walking through a program’s logic on paper before you actually write the program A Beginner's Guide to Programming Logic, Introductory 11
  • 12. Coding the Program • Hundreds of programming languages are available – Choose based on features – Alike in their basic capabilities • Easier than planning step A Beginner's Guide to Programming Logic, Introductory 12
  • 13. Using Software to Translate the Program into Machine Language • Translator program – Compiler or interpreter – Changes the programmer’s English-like high-level programming language into the low-level machine language • Syntax error – Misuse of a language’s grammar rules – Programmer corrects listed syntax errors – Might need to recompile the code several times A Beginner's Guide to Programming Logic, Introductory 13
  • 14. Using Software to Translate the Program into Machine Language (continued) Figure 1-2 Creating an executable program A Beginner's Guide to Programming Logic, Introductory 14
  • 15. Testing the Program • Logical error – Use a syntactically correct statement but use the wrong one for the current context • Test – Execute the program with some sample data to see whether the results are logically correct • Programs should be tested with many sets of data A Beginner's Guide to Programming Logic, Introductory 15
  • 16. Putting the Program into Production • Process depends on program’s purpose – May take several months • Conversion – Entire set of actions an organization must take to switch over to using a new program or set of programs A Beginner's Guide to Programming Logic, Introductory 16
  • 17. Maintaining the Program • Maintenance – Making changes after program is put into production • Common first programming job – Maintaining previously written programs • Make changes to existing programs – Repeat the development cycle A Beginner's Guide to Programming Logic, Introductory 17
  • 18. Using Pseudocode Statements and Flowchart Symbols • Pseudocode – English-like representation of the logical steps it takes to solve a problem • Flowchart – Pictorial representation of the logical steps it takes to solve a problem A Beginner's Guide to Programming Logic, Introductory 18
  • 19. Writing Pseudocode • Pseudocode representation of a number-doubling problem start input myNumber set myAnswer = myNumber * 2 output myAnswer stop A Beginner's Guide to Programming Logic, Introductory 19
  • 20. Writing Pseudocode (continued) • Programmers preface their pseudocode with a beginning statement like start and end it with a terminating statement like stop • Flexible because it is a planning tool A Beginner's Guide to Programming Logic, Introductory 20
  • 21. Drawing Flowcharts • Create a flowchart – Draw geometric shapes that contain the individual statements – Connect shapes with arrows • Input symbol – Indicates input operation – Parallelogram • Processing symbol – Processing statements such as arithmetic – Rectangle A Beginner's Guide to Programming Logic, Introductory 21
  • 22. Drawing Flowcharts (continued) • Output symbol – Represents output statements – Parallelogram • Flowlines – Arrows that connect steps • Terminal symbols – Start/stop symbols – Shaped like a racetrack – Also called lozenge A Beginner's Guide to Programming Logic, Introductory 22
  • 23. Drawing Flowcharts (continued) Figure 1-6 Flowchart and pseudocode of program that doubles a number A Beginner's Guide to Programming Logic, Introductory 23
  • 24. Understanding Programming Environments • Use a keyboard to type program statements into an editor – Plain text editor • Similar to a word processor but without as many features – Text editor that is part of an integrated development environment (IDE) • Software package that provides an editor, compiler, and other programming tools A Beginner's Guide to Programming Logic, Introductory 31
  • 25. Understanding Programming Environments (continued) Figure 1-12 A C# number-doubling program in Visual Studio A Beginner's Guide to Programming Logic, Introductory 32
  • 26. Understanding User Environments • Command line – Location on your computer screen at which you type text entries to communicate with the computer’s operating system • Graphical user interface (GUI) – Allows users to interact with a program in a graphical environment A Beginner's Guide to Programming Logic, Introductory 33
  • 27. Understanding User Environments (continued) Figure 1-13 Executing a number-doubling program in a command-line environment A Beginner's Guide to Programming Logic, Introductory 34
  • 28. Understanding User Environments (continued) Figure 1-14 Executing a number-doubling program in a GUI environment A Beginner's Guide to Programming Logic, Introductory 35
  • 29. Understanding the Evolution of Programming Models • People have been writing modern computer programs since the 1940s • Newer programming languages – Look much more like natural language – Easier to use – Create self-contained modules or program segments that can be pieced together in a variety of ways A Beginner's Guide to Programming Logic, Introductory 36
  • 30. Understanding the Evolution of Programming Models (continued) • Major models or paradigms used by programmers – Procedural programming • Focuses on the procedures that programmers create – Object-oriented programming • Focuses on objects, or “things,” and describes their features (or attributes) and their behaviors – Major difference • Focus the programmer takes during the earliest planning stages of a project A Beginner's Guide to Programming Logic, Introductory 37
  • 31. Summary • Computer programming – Requires specific syntax – Must develop correct logic • Programmer’s job – Understanding the problem, planning the logic, coding the program, translating the program into machine language, testing the program, putting the program into production, and maintaining it • Procedural and object-oriented programmers approach problems differently A Beginner's Guide to Programming Logic, Introductory 38