Programming Concepts - PowerPoint PPT Presentation

1 / 26
About This Presentation
Title:

Programming Concepts

Description:

Programming Concepts David T. Makota Department of Computing & Information Technology (CIT) The Institute of Finance Management Dar Es Salaam, Tanzania – PowerPoint PPT presentation

Number of Views:80
Avg rating:3.0/5.0
Slides: 27
Provided by: MAKW150
Category:

less

Transcript and Presenter's Notes

Title: Programming Concepts


1
Programming Concepts
  • David T. Makota
  • Department of Computing Information Technology
    (CIT)
  • The Institute of Finance Management
  • Dar Es Salaam, Tanzania

2
Contents
  • Computer programs
  • Programming
  • Programmer
  • Programming languages

3
COMPUTER PROGRAMS
  • A computer program is one or more instructions
    that are intended for execution by a computer.
  • Computer programs may result from the compilation
    or interpretation of programming languages,
    direct result of hardware processing, or manually
    input to the central processor of a computer.
  • A computer program does nothing unless its
    instructions are executed by a central processor.

4
Computer programs cont
  • A computer program expressed in a human-readable
    computer programming language is source code.
  • Source code may be converted into an executable
    image by a compiler, or executed immediately with
    the aid of an interpreter.
  • Compiled computer programs are commonly referred
    to as executables, binary images, or simply as
    binaries a reference to the binary file format
    commonly used to store the executable code.

5
Computer programs cont
  • Computer programs are generally specified using
    declarative, imperative, or visual programming
    methods.
  • With the imperative approach, an algorithm is
    specified
  • with the declarative approach, the output is
    specified and the implementation details are
    hidden.
  • With a visual approach, program elements are
    graphically manipulated rather than specified
    textually.

6
Computer programs cont
  • Computer programs may be categorized along
    functional lines. These functional categories
    include application software, operating systems,
    video games, and compilers, among others.
  • Computer programs embedded in hardware devices
    are called firmware.

7
Computer programs cont
  • Program execution
  • Typically, computer programs are stored in
    non-volatile memory until requested either
    directly or indirectly by the computer user to be
    executed.
  • Upon such a request the program is loaded into
    random access memory where it can be accessed
    directly by the central processor.
  • The central processor then executes ("runs") the
    program, instruction by instruction, until
    termination, either by a successful
    self-termination or by either a software or
    hardware error.
  • Modern day multiprocessor computers or computers
    with multicore processors may run multiple
    programs on a single computer simultaneously.

8
Computer programs cont
  • Computer programs can be divided into two
    categories
  • Application software
  • is a subclass of computer software that employs
    the capabilities of a computer directly and
    thoroughly to a task that the user wishes to
    perform.
  • System software
  • is a generic term referring to any computer
    software which manages and controls the hardware
    so that application software can perform a task.

9
Computer programs cont
  • Two Views of a Program

software layers hidden by user interface
user interface
users view
programmers view
10
Computer programs cont
  • Real world examples
  • library catalogue
  • word processor
  • video game
  • ATM

11
PROGRAMMING
  • Computer programming is the iterative process of
    writing or editing source code of computer
    programs, followed by testing, analyzing and
    refining this code.
  • MANY ASPECTS OF PROGRAMMING
  • Programming is controlling
  • computer does exactly what you tell it to
  • Programming is teaching
  • computer can only learn to do new things if you
    tell it how
  • Programming is problem solving
  • always trying to make computer do something
    useful eg finding an optimal travel route

12
Programming cont
  • Many aspects of programming cont
  • Programming is creative
  • must find a good solution out of many
    possibilities
  • Programming is modelling
  • describe salient (relevant) properties and
    behaviours of a system of components (objects)
  • Programming is abstraction
  • identify important features without getting lost
    in detail
  • Programming is concrete
  • must provide detailed instructions to complete
    task

13
PROGRAMMER
  • A programmer or software developer is someone who
    programs computers, that is, one who writes
    computer software.
  • The term computer programmer can refer to a
    specialist in one area of computer programming or
    to a generalist who writes code for many kinds of
    software.
  • One who practices or professes a formal approach
    to programming may also be known as a programmer
    analyst, software engineer, computer scientist,
    or software analyst.

14
Programmer cont
  • Application versus system programming
  • Computer programmers often are grouped into two
    broad types applications programmers and systems
    programmers
  • Applications programmers write programs to handle
    a specific job, such as a program to track
    inventory within an organization.
  • Systems programmers, in contrast, write programs
    to maintain and control computer systems
    software, such as operating systems and database
    management systems.

15
PROGRAMMING LANGUAGES
  • A programming language is an artificial language
    that can be used to control the behavior of a
    machine, particularly a computer.
  • Programming languages, like natural languages,
    are defined by syntactic and semantic rules which
    describe their structure and meaning
  • syntax grammatical rules for forming
    instructions
  • semantics meaning/interpretation of instructions

16
Programming languages cont
  • programming languages allow you to
    expressyourself more precisely than natural
    language
  • as a result, programs cannot be ambiguous

17
Programming languages cont
  • Categories of programming languages
  • Machine language
  • machine is short for computing machine (i.e.,
    computer)
  • computers native language
  • sequence of zeroes and ones (binary)
  • different computers understand different
    sequences
  • hard for humans to understand
  • 01010001...

18
Programming languages cont
  • Categories of programming languages
  • Assembly language
  • mnemonics for machine language
  • low level each instruction is minimal
  • still hard for humans to understand
  • ADD.L d0,d2

19
Programming languages cont
  • Categories of programming languages
  • High-level languages
  • FORTRAN, Pascal, BASIC, C, C, Java, etc.
  • high level each instruction composed of many
    low-level instructions
  • closer to English and algebra
  • easier to read and understand

20
Software Development A 5-Step Process
The Waterfall Model
21
Software Development cont
  • Analysis
  • English description of system models, to meet a
    requirement or specification
  • work with potential users to develop detailed
    specifications
  • May be written by non-programmer

22
Software Development cont
  • Designing the system
  • divide conquer system is composed of smaller
    subsystems which in turn may be composed of even
    smaller subsystems
  • pseudocode somewhere between English and program
    code
  • describe tasks, subtasks, and how they relate
  • hand-simulation desk-check pseudocode by
    stepping through it without using a computer
  • often use diagrams to better communicate the
    structure of the system

23
Software Development cont
  • Implementing the design
  • emphasis on good problem decomposition, well
    structured design, and readable, well-documented
    programming style
  • hand-simulate as you go, may need to backtrack
    and redesign
  • if design is good, most of the hard work should
    be done

24
Software Development cont
  • 4) Testing and Debugging
  • testing submitting input data or sample user
    interactions and seeing if program reacts
    properly
  • typically done in stages, starting with
    individual components and working up to
    subsystems, and eventually the entire program
  • debugging process of removing program bugs
  • bugs errors in code or design

25
Software Development cont
  • 5) Maintenance
  • finally, keep the program working and current
  • in a successful piece of software, maintenance is
    often said to be 80 of the effort
  • Result Working program
  • solves original problem

26
Software Development cont
  • Good program
  • satisfies the specification
  • produced on time and within budget
  • user-centric design
  • uses creativity to solve problem
  • well structured/organized/written/documented
  • can be easily extended and maintained
Write a Comment
User Comments (0)
About PowerShow.com