Programming Basics

Basic Programming Terminology

Developer: Person who is writing the code or programs to develop software.  The aim of developer is defining the communication between the system and the end-user.

End-User/Client: person who want to use software for his specific need, while the software is already developed and ready to use in the system.

Program: set of instructions given to computer to complete a given task.

Instruction Vs Command: Command is asking to do something while instruction is the guideline in the process of explaining how to complete the given command.

Software: collection of programs working together for a specific purpose or common goal.

User Interface: The environment providing by the software from where the end-user can communicate with the system.

What is software project?

Software project is the contract accepted to computerize the transactions of client’s business.  The person or firm that takes up the project of developing the software is known as Software Developer.

 

In short, any Software project can be initiated by General Purpose(developer’s thought) or User Specific (client requirement).  Each software product has been built up to provide a solution for the user problem.

Eg: Automation of Banking System, Accounting System and Billing System etc.

 

SOFTWARE DEVELOPMENT PROCESS

  1. Problem Identification
  2. Requirements gathering and analysis
  3. Designing of a Model
  4. Feasibility Study
  5. Coding
  6. Testing and Debugging
  7. Implementation
  8. Support and Maintenance

The Language of Computer System

System can only read, write or store information in the form of 1 or 0.  No other language can be understandable by it.  Hence, memory of Computer system can be measured in terms of Bytes.

 

According to ASCII (American Standard Code for Information Interchange) Standard the characters, numbers and symbols are 256.  Since 28 = 256, we use 8 bits to store a single character.

 

0 or 1 = 1 bit (Binary Digit)

4 bits = 1 nibble

8 bits = 1 byte

1024 bytes = 1 Kilo byte

1024 KB = 1 Mega byte

1024 MB = 1 Giga byte

1024 GB = 1 Tera byte

Types of Programming Languages

Being an electronic device, Computer cannot understand any human language.  In order to write programs to develop software we need a programming language.  Basically, there are two types of programming languages:

  1. Low level
    1. Machine
    2. Assembly
  2. High level

 

Low level languages require less translation and executes fast.  Low level languages are non-portable.  They are hard to learn by human beings.  Error detection and rectification is complex task.

Machine Language instructions execute fast since no translation required.  Assembly language instructions require simple translation using Assembler.  But a program written in assembly language is constrained to system on which they had been developed.

 

High level languages are user friendly.  People can easily learn and write their programs using these languages.  These are portable languages.  The programs written high level languages require complete translation into machine code by means of Compiler or Interpreters.

Eg: Pascal, COBOL, FORTRAN, C, C++, Java etc

 

Language Translator is a program that is used to translate the program written in some programming language into machine code.

  1. Compiler: Used to translate the high level programming code into machine code.  It converts entire program into machine code then sends it for execution.
  2. Interpreter: Used to translate the high level programming code into machine code.  It converts instruction by instruction into machine code then sends it for execution.
  3. Assembler: Used to translate the Assembly language code into machine code.

Integrated Development Environment

Developing of program in any Programming Language requires the following steps:

  1. Entering the Source Code into system and save it using any text editor software like notepad, notepad++, sublime etc.
  2. Convert the source code into machine language using Language Translator
  3. Link the pre-defined or library routines of language, to our machine code using Linker program
  4. Testing and debug the program using any testing utilities
  5. Make executable code(app) to hand over to the client.

 

If any software is providing all the above facilities for the development of a program in a single environment it is known as IDE (Integrated Development Environment)

Eg: TurboC, Eclipse, Code Blocks, NetBeans etc

ALGORITHMS, PSEUDOCODES & FLOW CHARTS

Problem is unwanted or uncomfortable situation that should be avoided.  Solution for the problem guides how to come out from the situation.

 

Computer is an electronic machine which can’t find out any solution for the problem on its own.  But it can solve the problem with lightening speed when guided properly.

 

Solving problems through computer requires a series of steps to be followed:

  1. Understand and Analyze the problem
  2. Write an Algorithm or Pseudo code
  3. Draw a Flow Chart
  4. Write the Algorithm using any programming language
  5. Translate the program into machine language
  6. Test and Debug the program

 

Algorithm is a plan written in plain language which shows the steps to solve the problem.  Pseudo code looks similar to program written in any programming language.

Previous programming knowledge is not necessary to understand an algorithm but is required for Pseudo code.

 

Algorithm to add two given numbers:

Start

Accept 2 numbers

Do addition

Display Result

Stop

 

Pseudo code:

Start

Read a, b;

Sum:= a+b

Write Sum;

Stop

Flow Chart is a pictorial representation that shows how the flow of control is moving within a program.  It enhances the understanding of program and useful to rectify errors.

Practice:

  1. write pseudocode and draw flowchart to display product of entered 2 numbers
  2. write pseudocode and draw flowchart to calculate area of rectangle.
  3. write pseudocode and draw flowchart to calculate area of circle.
  4. Write pseudocode and draw flowchart to calculate simple interest
  5. write pseudocode and draw flowchart to calculate average of 3 numbers
  6. Write pseudocode and draw flowchart to accept two numbers and say which is big.
  7. write pseudocode and draw flowchart to decide the shape as rectangle or square and displays its area and perimeter.
  8. Write pseudocode and draw flowchart to decide whether given number is even or odd.
  9. write pseudocode and draw flowchart to ask numerator and denominator and perform division only if denominator was entered non-zero.
  10. Pseudocode to determine given number is divisible by 5
  11. pseudocode to accept three numbers and determine which is big.

You cannot copy content of this page