SlideShare ist ein Scribd-Unternehmen logo
1 von 26
UNIT 1
INTRODUCTION TO PROGRAMMING
   Objectives
   Programming Environment
   Compiling Process
   Errors in Programming
   Debugging Strategies
   At the end of this presentation, you will
    be able to :
    • Explain the system development phase that
      involves programming
    • Explain three types of errors
   Critical task in software development
    phase  where to start?
   WHY do the people feel the need to get
    something right early in the project??
   Software ease to change.
1.   Planning
2.   Analysis
3.   Design
4.   Implementation
     1. Coding
     2. Testing
     3. Installation
5.   Maintenance
   Determine what the system needs to do
    for the organization (requirements
    gathering). Often this means asking
    questions such as...
    •   What do we need this system for?
    •   What will the system do for the organization?
    •   How are we going to make this system?
    •   Who is doing what, when, and how? 
   Analyze any existing system to see what it is
    doing for the organization and how well that
    system is doing it's job. The feasibility of the
    project is also considered, and the group
    has to ask questions such as...
    • Can this system be created with the resources (and
      budget) we have available?
    • Will this system significantly improve the
      organization?
    • Does the old system even need to be replaced?
   Analyzes end-user information needs.
   Software, hardware
   Involves the actual creation and design of
    a system.
   It will include screen layouts, process
    diagrams, pseudocode, flow chart and
    other documentation.
1.   Coding
2.   Testing
3.   Installation
   To ensure the reliability
   Changes and enhancements process
   The process of going from source code
    files to an executable referred as build
    process.
   There are 4 steps involve in building
    your program:
    •   Editing
    •   Compiling
    •   Linking
    •   Running
TOOL        STEP            PRODUCT
Editor     Edit      Source code files (.cpp)
Compiler   Compile   Object program (.obj)
Linker     Link      Executable object (.exe)
           Run       Result/Output
Start


                                       Edit
                                       Your        Source
                                      Source      Program


                                    Compile or
                                     Assemble
                                    Your Source



                              Yes
                                      Errors?       Object
                                                   Program
                                     No


                                       Link
                  Libraries
                  and Other
                    Object
                  Programs                        Executable
                                     Execute        Object




                              No
                                      Results
                                       OK?

                                    Yes

                                      Done

www.calpoly.edu
   Compilation
    • the compiler translate C++ instruction in the source
      code file into machine language instructions.
    • this process will produce an 'object' file but doesn't
      create anything the user can actually run.
    • eg:
      if you compile (but don't link) three separate files, you will have three
       object files created as output, each with the name <filename>.obj.
      each of these files contains a translation of your source code file into a
       machine language file -- but you can't run them yet!
      you need to turn them into executables your operating system can use
       and that's when the linker comes in.
   The creation of a single executable file
    from multiple object files.
    A linker is typically used to generate
    an executable or library by combining
    parts of object files.
   Compile time error
   Run time error
   Logical error
   Syntax errors
    • Errors that prevent your program from running.
    • Also called design-time error.
    • Caused by mistakes that you make when typing
      code such as incorrect grammar, vocabulary, or
      spelling.
    • These are usually easy to find and correct.
    • Common compile errors:
      missing semicolon
      extra parenthesis
      keyword typo error
   Errors that occur while your program runs.
   Occur when your program attempts an operation that is
    impossible to carry out.
   Errors not caught at entry but which involve an incorrect
    statement or bad data.
   The code appear has no syntax errors, but it will not execute.
   More difficult to correct than syntax errors
   You can fix most run-time errors by rewriting the faulty code,
    and then recompiling and rerunning it.
   common run time errors including:
     undefined functions (commonly, main itself).
       during compilation, if the compiler could not find the definition for a particular function, it
        would just assume that the function was defined in another file.
       if this isn't the case, there's no way the compiler would know since it doesn't look at the contents
        of more than one file at a time.
       linker, on the other hand, may look at multiple files and try to find references for the functions
        that weren't mentioned.
     dividing by zero and out of memory.
   Errors that prevent your program from
    doing what you intended it to do.
   Your code may compile and run without
    error, but produce a result that you did
    not expect.
   For example:
    • char name[2]
    • int month = 11
   These are the hardest to find because it is
    not always clear where they originate.
   During the stages of compilation, linking, and
    running, error messages may occur that require
    the programmer to make corrections to the
    program source (debugging).
   Debugging is a black art. Some things to go
    over, though, so they’ll be concrete in our brains:
    •   relation to testing
    •   why debugging is hard
    •   process
    •   techniques
    •   avoiding bugs
   Testing and debugging go together like
    peas in a pod:
    Testing finds errors; debugging repairs
     them.
    Together these form the “testing/debugging
     cycle”: we test, then debug, then repeat.
   There may be no obvious relationship between the external
    manifestation(s) of an error and its internal cause(s).
   Symptom and cause may be in remote parts of the program.
   Changes (new features, bug fixes) in program may mask (or
    modify) bugs.
   Symptom may be due to human mistake or
    misunderstanding that is difficult to trace.
   Bug may be triggered by rare or difficult to reproduce input
    sequence, program timing (threads) or other external
    causes.
   Bug may depend on other software/system state, things
    others did to your systems weeks/months ago.
   Execution tracing
    • running the program
    • print
    • trace utilities
   Interface checking
    • check procedure parameter number/type (if not
      enforced by compiler) and value
    • defensive programming: check inputs/results from
      other modules
   Skipping code: comment out suspect code,
    then check if error remains.
   Coding style: use clear, consistent style and
    useful naming standards.
   Document everything, from architecture and
    interface specification documents to comments
    on code lines.
   Hold code reviews.
   Program defensively.
   Use/implement exception handling liberally;
    think constantly about anomalous conditions.
   Be suspicious of cut/paste.
   Consider using an integrated development
    environment (IDE) with dynamic syntax
    checking.
Fp201 unit1 1

Weitere ähnliche Inhalte

Was ist angesagt?

API workshop: Introduction to APIs (TC Camp)
API workshop: Introduction to APIs (TC Camp)API workshop: Introduction to APIs (TC Camp)
API workshop: Introduction to APIs (TC Camp)Tom Johnson
 
Open Source Software Testing Tools
Open Source Software Testing ToolsOpen Source Software Testing Tools
Open Source Software Testing ToolsVaruna Harshana
 
Automated Test Case Generation and Execution from Models
Automated Test Case Generation and Execution from ModelsAutomated Test Case Generation and Execution from Models
Automated Test Case Generation and Execution from ModelsDharmalingam Ganesan
 
Types of test tools
Types of test toolsTypes of test tools
Types of test toolsVaibhav Dash
 
Testy dymne, integracyjne i jednostkowe w Laravel
Testy dymne, integracyjne i jednostkowe w LaravelTesty dymne, integracyjne i jednostkowe w Laravel
Testy dymne, integracyjne i jednostkowe w LaravelLaravel Poland MeetUp
 
Software testing tools (free and open source)
Software testing tools (free and open source)Software testing tools (free and open source)
Software testing tools (free and open source)Wael Mansour
 
Software testing tools
Software testing toolsSoftware testing tools
Software testing toolsGaurav Paliwal
 
Cis247 a ilab 1 of 7 creating a user interface
Cis247 a ilab 1 of 7 creating a user interfaceCis247 a ilab 1 of 7 creating a user interface
Cis247 a ilab 1 of 7 creating a user interfacecis247
 
An introduction to unit testing
An introduction to unit testingAn introduction to unit testing
An introduction to unit testingAdam Stephensen
 
API Workshop: Deep dive into code samples
API Workshop: Deep dive into code samplesAPI Workshop: Deep dive into code samples
API Workshop: Deep dive into code samplesTom Johnson
 
Writing code samples for API/SDK documentation
Writing code samples for API/SDK documentationWriting code samples for API/SDK documentation
Writing code samples for API/SDK documentationTom Johnson
 
API Documentation Workshop tcworld India 2015
API Documentation Workshop tcworld India 2015API Documentation Workshop tcworld India 2015
API Documentation Workshop tcworld India 2015Tom Johnson
 
R&D on PVS-Studio
R&D on PVS-StudioR&D on PVS-Studio
R&D on PVS-StudioPVS-Studio
 
Model-based Testing using Microsoft’s Spec Explorer Tool: A Case Study
Model-based Testing using Microsoft’s Spec Explorer Tool: A Case StudyModel-based Testing using Microsoft’s Spec Explorer Tool: A Case Study
Model-based Testing using Microsoft’s Spec Explorer Tool: A Case StudyDharmalingam Ganesan
 
[Webinar] Continuous Testing Done Right: Test Automation at the World's Leadi...
[Webinar] Continuous Testing Done Right: Test Automation at the World's Leadi...[Webinar] Continuous Testing Done Right: Test Automation at the World's Leadi...
[Webinar] Continuous Testing Done Right: Test Automation at the World's Leadi...Applitools
 
Testing Tool Evaluation Criteria
Testing Tool Evaluation CriteriaTesting Tool Evaluation Criteria
Testing Tool Evaluation Criteriabasma_iti_1984
 
Software Testing - Tool support for testing (CAST) - Mazenet Solution
Software Testing - Tool support for testing (CAST) - Mazenet SolutionSoftware Testing - Tool support for testing (CAST) - Mazenet Solution
Software Testing - Tool support for testing (CAST) - Mazenet SolutionMazenetsolution
 
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...Tom Johnson
 

Was ist angesagt? (19)

API workshop: Introduction to APIs (TC Camp)
API workshop: Introduction to APIs (TC Camp)API workshop: Introduction to APIs (TC Camp)
API workshop: Introduction to APIs (TC Camp)
 
Ss debuggers
Ss debuggersSs debuggers
Ss debuggers
 
Open Source Software Testing Tools
Open Source Software Testing ToolsOpen Source Software Testing Tools
Open Source Software Testing Tools
 
Automated Test Case Generation and Execution from Models
Automated Test Case Generation and Execution from ModelsAutomated Test Case Generation and Execution from Models
Automated Test Case Generation and Execution from Models
 
Types of test tools
Types of test toolsTypes of test tools
Types of test tools
 
Testy dymne, integracyjne i jednostkowe w Laravel
Testy dymne, integracyjne i jednostkowe w LaravelTesty dymne, integracyjne i jednostkowe w Laravel
Testy dymne, integracyjne i jednostkowe w Laravel
 
Software testing tools (free and open source)
Software testing tools (free and open source)Software testing tools (free and open source)
Software testing tools (free and open source)
 
Software testing tools
Software testing toolsSoftware testing tools
Software testing tools
 
Cis247 a ilab 1 of 7 creating a user interface
Cis247 a ilab 1 of 7 creating a user interfaceCis247 a ilab 1 of 7 creating a user interface
Cis247 a ilab 1 of 7 creating a user interface
 
An introduction to unit testing
An introduction to unit testingAn introduction to unit testing
An introduction to unit testing
 
API Workshop: Deep dive into code samples
API Workshop: Deep dive into code samplesAPI Workshop: Deep dive into code samples
API Workshop: Deep dive into code samples
 
Writing code samples for API/SDK documentation
Writing code samples for API/SDK documentationWriting code samples for API/SDK documentation
Writing code samples for API/SDK documentation
 
API Documentation Workshop tcworld India 2015
API Documentation Workshop tcworld India 2015API Documentation Workshop tcworld India 2015
API Documentation Workshop tcworld India 2015
 
R&D on PVS-Studio
R&D on PVS-StudioR&D on PVS-Studio
R&D on PVS-Studio
 
Model-based Testing using Microsoft’s Spec Explorer Tool: A Case Study
Model-based Testing using Microsoft’s Spec Explorer Tool: A Case StudyModel-based Testing using Microsoft’s Spec Explorer Tool: A Case Study
Model-based Testing using Microsoft’s Spec Explorer Tool: A Case Study
 
[Webinar] Continuous Testing Done Right: Test Automation at the World's Leadi...
[Webinar] Continuous Testing Done Right: Test Automation at the World's Leadi...[Webinar] Continuous Testing Done Right: Test Automation at the World's Leadi...
[Webinar] Continuous Testing Done Right: Test Automation at the World's Leadi...
 
Testing Tool Evaluation Criteria
Testing Tool Evaluation CriteriaTesting Tool Evaluation Criteria
Testing Tool Evaluation Criteria
 
Software Testing - Tool support for testing (CAST) - Mazenet Solution
Software Testing - Tool support for testing (CAST) - Mazenet SolutionSoftware Testing - Tool support for testing (CAST) - Mazenet Solution
Software Testing - Tool support for testing (CAST) - Mazenet Solution
 
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
 

Andere mochten auch

FP 201 Unit 3
FP 201 Unit 3 FP 201 Unit 3
FP 201 Unit 3 rohassanie
 
FP 201 - Unit4 Part 2
FP 201 - Unit4 Part 2FP 201 - Unit4 Part 2
FP 201 - Unit4 Part 2rohassanie
 
FP 201 - Unit 6
FP 201 - Unit 6FP 201 - Unit 6
FP 201 - Unit 6rohassanie
 
FP 201 Unit 2 - Part 3
FP 201 Unit 2 - Part 3FP 201 Unit 2 - Part 3
FP 201 Unit 2 - Part 3rohassanie
 
FP 201 - Unit 3 Part 2
FP 201 - Unit 3 Part 2FP 201 - Unit 3 Part 2
FP 201 - Unit 3 Part 2rohassanie
 
FP 201 Unit 2 - Part 2
FP 201 Unit 2 - Part 2FP 201 Unit 2 - Part 2
FP 201 Unit 2 - Part 2rohassanie
 

Andere mochten auch (12)

FP 201 Unit 3
FP 201 Unit 3 FP 201 Unit 3
FP 201 Unit 3
 
Fp201 unit4
Fp201 unit4Fp201 unit4
Fp201 unit4
 
FP 201 - Unit4 Part 2
FP 201 - Unit4 Part 2FP 201 - Unit4 Part 2
FP 201 - Unit4 Part 2
 
FP 201 - Unit 6
FP 201 - Unit 6FP 201 - Unit 6
FP 201 - Unit 6
 
FP 201 Unit 2 - Part 3
FP 201 Unit 2 - Part 3FP 201 Unit 2 - Part 3
FP 201 Unit 2 - Part 3
 
Fp201 unit5 1
Fp201 unit5 1Fp201 unit5 1
Fp201 unit5 1
 
FP 201 - Unit 3 Part 2
FP 201 - Unit 3 Part 2FP 201 - Unit 3 Part 2
FP 201 - Unit 3 Part 2
 
FP 201 Unit 2 - Part 2
FP 201 Unit 2 - Part 2FP 201 Unit 2 - Part 2
FP 201 Unit 2 - Part 2
 
Unit 1
Unit 1Unit 1
Unit 1
 
Unit 3
Unit 3Unit 3
Unit 3
 
Unit 2
Unit 2Unit 2
Unit 2
 
Fp201 unit2 1
Fp201 unit2 1Fp201 unit2 1
Fp201 unit2 1
 

Ähnlich wie Fp201 unit1 1

Contents Pre-requisites Approximate .docx
   Contents Pre-requisites  Approximate .docx   Contents Pre-requisites  Approximate .docx
Contents Pre-requisites Approximate .docxShiraPrater50
 
debugging (1).ppt
debugging (1).pptdebugging (1).ppt
debugging (1).pptjerlinS1
 
An important characteristic of a test suite that is computed by a dynamic ana...
An important characteristic of a test suite that is computed by a dynamic ana...An important characteristic of a test suite that is computed by a dynamic ana...
An important characteristic of a test suite that is computed by a dynamic ana...jeyasrig
 
Stnotes doc 5
Stnotes doc 5Stnotes doc 5
Stnotes doc 5Alok Jain
 
Topic production code
Topic production codeTopic production code
Topic production codeKavi Kumar
 
Testing & should i do it
Testing & should i do itTesting & should i do it
Testing & should i do itMartin Sykora
 
Programming Paradigm & Languages
Programming Paradigm & LanguagesProgramming Paradigm & Languages
Programming Paradigm & LanguagesGaditek
 
Programming Paradigm & Languages
Programming Paradigm & LanguagesProgramming Paradigm & Languages
Programming Paradigm & LanguagesGaditek
 
javabasics_ programming development chapter01
javabasics_ programming development chapter01javabasics_ programming development chapter01
javabasics_ programming development chapter01Udeshg90
 
Hm system programming class 1
Hm system programming class 1Hm system programming class 1
Hm system programming class 1Hitesh Mohapatra
 
Discovery Life Project Portfolio
Discovery Life Project PortfolioDiscovery Life Project Portfolio
Discovery Life Project PortfolioJaco Koekemoer
 
Interactive Development Environments
Interactive Development EnvironmentsInteractive Development Environments
Interactive Development EnvironmentsPhilip Johnson
 

Ähnlich wie Fp201 unit1 1 (20)

Chapter 1
Chapter 1Chapter 1
Chapter 1
 
Drupal 7 ci and testing
Drupal 7 ci and testingDrupal 7 ci and testing
Drupal 7 ci and testing
 
PHP - Introduction to PHP Bugs - Debugging
PHP -  Introduction to  PHP Bugs - DebuggingPHP -  Introduction to  PHP Bugs - Debugging
PHP - Introduction to PHP Bugs - Debugging
 
Contents Pre-requisites Approximate .docx
   Contents Pre-requisites  Approximate .docx   Contents Pre-requisites  Approximate .docx
Contents Pre-requisites Approximate .docx
 
debugging (1).ppt
debugging (1).pptdebugging (1).ppt
debugging (1).ppt
 
An important characteristic of a test suite that is computed by a dynamic ana...
An important characteristic of a test suite that is computed by a dynamic ana...An important characteristic of a test suite that is computed by a dynamic ana...
An important characteristic of a test suite that is computed by a dynamic ana...
 
Stnotes doc 5
Stnotes doc 5Stnotes doc 5
Stnotes doc 5
 
Topic production code
Topic production codeTopic production code
Topic production code
 
C++ l 1
C++ l 1C++ l 1
C++ l 1
 
Ex11 mini project
Ex11 mini projectEx11 mini project
Ex11 mini project
 
Testing & should i do it
Testing & should i do itTesting & should i do it
Testing & should i do it
 
Programming Paradigm & Languages
Programming Paradigm & LanguagesProgramming Paradigm & Languages
Programming Paradigm & Languages
 
Programming Paradigm & Languages
Programming Paradigm & LanguagesProgramming Paradigm & Languages
Programming Paradigm & Languages
 
javabasics_ programming development chapter01
javabasics_ programming development chapter01javabasics_ programming development chapter01
javabasics_ programming development chapter01
 
Ic lecture8
Ic lecture8 Ic lecture8
Ic lecture8
 
Hm system programming class 1
Hm system programming class 1Hm system programming class 1
Hm system programming class 1
 
PROBLEM SOLVING
PROBLEM SOLVINGPROBLEM SOLVING
PROBLEM SOLVING
 
Discovery Life Project Portfolio
Discovery Life Project PortfolioDiscovery Life Project Portfolio
Discovery Life Project Portfolio
 
Selenium Training in Chennai
Selenium Training in ChennaiSelenium Training in Chennai
Selenium Training in Chennai
 
Interactive Development Environments
Interactive Development EnvironmentsInteractive Development Environments
Interactive Development Environments
 

Mehr von rohassanie

Course outline FP202 - Dis 2012
Course outline FP202 - Dis 2012Course outline FP202 - Dis 2012
Course outline FP202 - Dis 2012rohassanie
 
FP 202 - Chapter 5
FP 202 - Chapter 5FP 202 - Chapter 5
FP 202 - Chapter 5rohassanie
 
Chapter 3 part 2
Chapter 3 part 2Chapter 3 part 2
Chapter 3 part 2rohassanie
 
Chapter 3 part 1
Chapter 3 part 1Chapter 3 part 1
Chapter 3 part 1rohassanie
 
FP 202 Chapter 2 - Part 3
FP 202 Chapter 2 - Part 3FP 202 Chapter 2 - Part 3
FP 202 Chapter 2 - Part 3rohassanie
 
Chapter 2 (Part 2)
Chapter 2 (Part 2) Chapter 2 (Part 2)
Chapter 2 (Part 2) rohassanie
 
Labsheet 7 FP 201
Labsheet 7 FP 201Labsheet 7 FP 201
Labsheet 7 FP 201rohassanie
 
Labsheet 6 - FP 201
Labsheet 6 - FP 201Labsheet 6 - FP 201
Labsheet 6 - FP 201rohassanie
 
Jadual Waktu Sesi JUN 2012
Jadual Waktu Sesi JUN 2012Jadual Waktu Sesi JUN 2012
Jadual Waktu Sesi JUN 2012rohassanie
 
Chapter 2 part 1
Chapter 2 part 1Chapter 2 part 1
Chapter 2 part 1rohassanie
 
Labsheet2 stud
Labsheet2 studLabsheet2 stud
Labsheet2 studrohassanie
 
Labsheet1 stud
Labsheet1 studLabsheet1 stud
Labsheet1 studrohassanie
 
Chapter 1 part 3
Chapter 1 part 3Chapter 1 part 3
Chapter 1 part 3rohassanie
 
Chapter 1 part 2
Chapter 1 part 2Chapter 1 part 2
Chapter 1 part 2rohassanie
 
Chapter 1 part 1
Chapter 1 part 1Chapter 1 part 1
Chapter 1 part 1rohassanie
 
Introduction to C++
Introduction to C++Introduction to C++
Introduction to C++rohassanie
 

Mehr von rohassanie (20)

Course outline FP202 - Dis 2012
Course outline FP202 - Dis 2012Course outline FP202 - Dis 2012
Course outline FP202 - Dis 2012
 
FP 202 - Chapter 5
FP 202 - Chapter 5FP 202 - Chapter 5
FP 202 - Chapter 5
 
Chapter 3 part 2
Chapter 3 part 2Chapter 3 part 2
Chapter 3 part 2
 
Chapter 3 part 1
Chapter 3 part 1Chapter 3 part 1
Chapter 3 part 1
 
FP 202 Chapter 2 - Part 3
FP 202 Chapter 2 - Part 3FP 202 Chapter 2 - Part 3
FP 202 Chapter 2 - Part 3
 
Lab ex 1
Lab ex 1Lab ex 1
Lab ex 1
 
Chapter 2 (Part 2)
Chapter 2 (Part 2) Chapter 2 (Part 2)
Chapter 2 (Part 2)
 
Labsheet 7 FP 201
Labsheet 7 FP 201Labsheet 7 FP 201
Labsheet 7 FP 201
 
Labsheet 6 - FP 201
Labsheet 6 - FP 201Labsheet 6 - FP 201
Labsheet 6 - FP 201
 
Jadual Waktu Sesi JUN 2012
Jadual Waktu Sesi JUN 2012Jadual Waktu Sesi JUN 2012
Jadual Waktu Sesi JUN 2012
 
Labsheet 5
Labsheet 5Labsheet 5
Labsheet 5
 
Labsheet 4
Labsheet 4Labsheet 4
Labsheet 4
 
Chapter 2 part 1
Chapter 2 part 1Chapter 2 part 1
Chapter 2 part 1
 
Labsheet_3
Labsheet_3Labsheet_3
Labsheet_3
 
Labsheet2 stud
Labsheet2 studLabsheet2 stud
Labsheet2 stud
 
Labsheet1 stud
Labsheet1 studLabsheet1 stud
Labsheet1 stud
 
Chapter 1 part 3
Chapter 1 part 3Chapter 1 part 3
Chapter 1 part 3
 
Chapter 1 part 2
Chapter 1 part 2Chapter 1 part 2
Chapter 1 part 2
 
Chapter 1 part 1
Chapter 1 part 1Chapter 1 part 1
Chapter 1 part 1
 
Introduction to C++
Introduction to C++Introduction to C++
Introduction to C++
 

Kürzlich hochgeladen

Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 

Kürzlich hochgeladen (20)

Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 

Fp201 unit1 1

  • 2. Objectives  Programming Environment  Compiling Process  Errors in Programming  Debugging Strategies
  • 3. At the end of this presentation, you will be able to : • Explain the system development phase that involves programming • Explain three types of errors
  • 4. Critical task in software development phase  where to start?  WHY do the people feel the need to get something right early in the project??  Software ease to change.
  • 5. 1. Planning 2. Analysis 3. Design 4. Implementation 1. Coding 2. Testing 3. Installation 5. Maintenance
  • 6. Determine what the system needs to do for the organization (requirements gathering). Often this means asking questions such as... • What do we need this system for? • What will the system do for the organization? • How are we going to make this system? • Who is doing what, when, and how? 
  • 7. Analyze any existing system to see what it is doing for the organization and how well that system is doing it's job. The feasibility of the project is also considered, and the group has to ask questions such as... • Can this system be created with the resources (and budget) we have available? • Will this system significantly improve the organization? • Does the old system even need to be replaced?  Analyzes end-user information needs.  Software, hardware
  • 8. Involves the actual creation and design of a system.  It will include screen layouts, process diagrams, pseudocode, flow chart and other documentation.
  • 9. 1. Coding 2. Testing 3. Installation
  • 10. To ensure the reliability  Changes and enhancements process
  • 11. The process of going from source code files to an executable referred as build process.  There are 4 steps involve in building your program: • Editing • Compiling • Linking • Running
  • 12. TOOL STEP PRODUCT Editor Edit Source code files (.cpp) Compiler Compile Object program (.obj) Linker Link Executable object (.exe) Run Result/Output
  • 13. Start Edit Your Source Source Program Compile or Assemble Your Source Yes Errors? Object Program No Link Libraries and Other Object Programs Executable Execute Object No Results OK? Yes Done www.calpoly.edu
  • 14. Compilation • the compiler translate C++ instruction in the source code file into machine language instructions. • this process will produce an 'object' file but doesn't create anything the user can actually run. • eg:  if you compile (but don't link) three separate files, you will have three object files created as output, each with the name <filename>.obj.  each of these files contains a translation of your source code file into a machine language file -- but you can't run them yet!  you need to turn them into executables your operating system can use and that's when the linker comes in.
  • 15. The creation of a single executable file from multiple object files.   A linker is typically used to generate an executable or library by combining parts of object files.
  • 16.
  • 17. Compile time error  Run time error  Logical error
  • 18. Syntax errors • Errors that prevent your program from running. • Also called design-time error. • Caused by mistakes that you make when typing code such as incorrect grammar, vocabulary, or spelling. • These are usually easy to find and correct. • Common compile errors:  missing semicolon  extra parenthesis  keyword typo error
  • 19. Errors that occur while your program runs.  Occur when your program attempts an operation that is impossible to carry out.  Errors not caught at entry but which involve an incorrect statement or bad data.  The code appear has no syntax errors, but it will not execute.  More difficult to correct than syntax errors  You can fix most run-time errors by rewriting the faulty code, and then recompiling and rerunning it.  common run time errors including:  undefined functions (commonly, main itself).  during compilation, if the compiler could not find the definition for a particular function, it would just assume that the function was defined in another file.  if this isn't the case, there's no way the compiler would know since it doesn't look at the contents of more than one file at a time.  linker, on the other hand, may look at multiple files and try to find references for the functions that weren't mentioned.  dividing by zero and out of memory.
  • 20. Errors that prevent your program from doing what you intended it to do.  Your code may compile and run without error, but produce a result that you did not expect.  For example: • char name[2] • int month = 11  These are the hardest to find because it is not always clear where they originate.
  • 21. During the stages of compilation, linking, and running, error messages may occur that require the programmer to make corrections to the program source (debugging).  Debugging is a black art. Some things to go over, though, so they’ll be concrete in our brains: • relation to testing • why debugging is hard • process • techniques • avoiding bugs
  • 22. Testing and debugging go together like peas in a pod: Testing finds errors; debugging repairs them. Together these form the “testing/debugging cycle”: we test, then debug, then repeat.
  • 23. There may be no obvious relationship between the external manifestation(s) of an error and its internal cause(s).  Symptom and cause may be in remote parts of the program.  Changes (new features, bug fixes) in program may mask (or modify) bugs.  Symptom may be due to human mistake or misunderstanding that is difficult to trace.  Bug may be triggered by rare or difficult to reproduce input sequence, program timing (threads) or other external causes.  Bug may depend on other software/system state, things others did to your systems weeks/months ago.
  • 24. Execution tracing • running the program • print • trace utilities  Interface checking • check procedure parameter number/type (if not enforced by compiler) and value • defensive programming: check inputs/results from other modules  Skipping code: comment out suspect code, then check if error remains.
  • 25. Coding style: use clear, consistent style and useful naming standards.  Document everything, from architecture and interface specification documents to comments on code lines.  Hold code reviews.  Program defensively.  Use/implement exception handling liberally; think constantly about anomalous conditions.  Be suspicious of cut/paste.  Consider using an integrated development environment (IDE) with dynamic syntax checking.

Hinweis der Redaktion

  1.   object file format  is a computer file format used for the storage of object code and related data typically produced by a compiler or assembler.
  2.   A linker is typically used to generate an executable or library by combining parts of object files.