Presentation is loading. Please wait.

Presentation is loading. Please wait.

Programming. What is a Program ? Sets of instructions that get the computer to do something Instructions are translated, eventually, to machine language.

Similar presentations


Presentation on theme: "Programming. What is a Program ? Sets of instructions that get the computer to do something Instructions are translated, eventually, to machine language."— Presentation transcript:

1 Programming

2 What is a Program ? Sets of instructions that get the computer to do something Instructions are translated, eventually, to machine language using an interpreter or a compiler Programs may be a few lines or millions of lines of code

3 Programming Tasks All computer programs are written so they can take data, manipulate it and then produce a result. This process uses three distinct tasks: – INPUT – getting data from an external source (the user, a database, a file, etc.) – PROCESSING – actual manipulation of the data – OUTPUT – reporting the results of data manipulation back (using the monitor, writing information to a database, etc.)

4 Relationships in Programming Programmer – The person who solves a problem by providing a solution through writing instructions (the program) for the computer. (AKA – The developer) User – Any person who uses a program written by a programmer

5 Programming Languages Machine Language – Binary digits (bits – 1s and 0s) which are translated to electrical impulses that get the computer to do something – “Native” language of computers Assembly Languages – Group of basic commands which are more like English – Tied to specific processors – Still need to be translated to machine language

6 Categories of Languages High Level Languages – In terms of syntax, very close to human language (mostly English) – Lower error rate than writing machine language or assembly language programs – Need to be translated to machine language before execution Compilers Interpreters

7 More on HLL’s Operations common to all HL languages: – Sequential Operations – Operations in which lines of code execute in order, one right after another – Conditional Operations – Operations in which execution depends on the outcome of a previous condition (usually evaluated to be TRUE or FALSE) – Looping Operations – Operations designed to repeat until a given condition is satisfied.

8 Even more on HLL’s Procedural Languages – Early high level languages – Focus on structures – Examples include QuickBasic, Fortran, Pascal, Visual Basic (early versions) Object-Oriented languages (OOP) – More recent development – Focus on data, not structures (Primacy of Data) – Examples include Java, C#, C++, Visual Basic.Net

9 Still More on HLL’s A high-level language program needs to be translated into a lower level language Compiler : software (i.e. a program itself!) that translates a high-level language program (source code) into a lower level language Example: a compiler for the high-level language C translates a C program into a machine language program (executable code) – Why? a computer can only execute machine language instructions …

10 Programming Development Cycle Done after identifying inputs, processing & outputs Steps 1.Analyze the problem 2.Plan a solution to the problem (algorithm) 3.Design the user interface 4.Code the solution 5.Test and debug the solution 6.Complete program documentation 7.Begin to plan for next release (start Cycle again)

11 1. Analyze the Problem Questions to ask: – Who is my intended audience? – What SPECIFIC outcomes does my audience expect? – What business rules is my audience expecting to have incorporated into the solution? – What is the SCOPE of the problem?

12 2. Plan a Solution (Algorithm) What types of programming structures are needed? – Sequential structures – Conditional structures – Looping structures What data structures are needed? – Variables – Lists – Arrays

13 2. Plan a Solution (Algorithm) 1.Identify the Inputs – What data do I need? – How will I get the data? – In what format will the data be? 2.Identify the Processes: – How can I manipulate data to produce meaningful results? 3.Identify Outputs: – What outputs do I need to return to the user? – What format should the outputs take? 4.Identify relevant modules – How can I break larger problems into smaller, more manageable pieces? – What inputs do the modules need? – What processes need to happen in the modules? – What outputs are produced by the modules?

14 3. Design the User Interface AKA – The “UI” Is the UI “learnable”? Is it simple? (Limit user choices) Does the UI promote error-proof use? Is the layout of the UI arranged in a fashion conducive to the user’s culture and expectations?

15 4. Code the Solution Develop an actual program from an algorithm Should be the “easiest” part of the process – all the work should already be done!

16 5. Test and Debug the Solution Alpha Testing – Internal testing done with expected client data (NOT LIVE DATA) Beta Testing – Testing done at the client site with their data (USUALLY LIVE DATA) Try to predict common user errors Test subjects should be Power Users, Normal Users and Neophytes

17 6. Complete Documentation User Documentation: – User Manual – Technical Documentation (for System Administrators) Internal Documentation: – Documentation comments – Code comments – Procedural comments – Should be done while coding!

18 7. Plan Next Release What bugs need to be fixed? – Are bugs “critical”? (Need to be fixed in a minor release) – If bugs are not critical, they can be fixed in next major release What product enhancements do the users want for the next release?


Download ppt "Programming. What is a Program ? Sets of instructions that get the computer to do something Instructions are translated, eventually, to machine language."

Similar presentations


Ads by Google