basics of programming - ilpintcs.blogspot.in.pdf

download basics of programming -  ilpintcs.blogspot.in.pdf

of 210

Transcript of basics of programming - ilpintcs.blogspot.in.pdf

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    1/210

    12/9/13 Basics of Programming -- TATA Consultancy Services Pvt. Ltd.

    https://aspire.tcs.com/aspire/courses/basics_of_programming/index.html 1/3

    Courses

    Course Objective

    The objective of this course is to introduce the concepts ofprogramming, structure and interpretation of computer programs andalgorithms. This course is aimed at participants with little or no programmingexperience. By the end of this course the participant should be justifiablyconfident of their ability to write small programs that allow them toaccomplish useful goals.

    Course Content

    1. Introduction to Programming

    i. What is Programming?

    ii. Why Programming is Required?

    2. Introduction to Computer Programs

    i. Overview of Software Development

    ii. Overview of Problem Solving Techniques

    iii. Phases in the Execution of a Computer Program

    3. Basic Programming Concepts

    i. Introduction to Basic Programming Concepts

    ii. Datatypes

    iii. Introduction to Variables

    iv. Introduction to Operators

    v. Control Structures

    Basics of Programming

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module3/session3.1_introduction-to-basic-programming-concepts.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.3_phases-in-the-execution-of-a-computer-program_1.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.2_why-programming-is-required_1.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module3/session3.5_control-structures_1.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module3/session3.5_control-structures_1.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module3/session3.4_operators.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module3/session3.3_variables_1.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module3/session3.2_datatypes_1.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module3/session3.1_introduction-to-basic-programming-concepts.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module3/session3.1_introduction-to-basic-programming-concepts.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.3_phases-in-the-execution-of-a-computer-program_1.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.2_overview-of-problem-solving-techniques_1.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.1_overview-of-software-development_1.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.1_overview-of-software-development_1.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.2_why-programming-is-required_1.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.1_what-is-programming_1.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.1_what-is-programming_1.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/index.html

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    2/210

    12/9/13 Basics of Programming -- TATA Consultancy Services Pvt. Ltd.

    https://aspire.tcs.com/aspire/courses/basics_of_programming/index.html 2/3

    vi. Introduction to Arrays

    vii. Introduction to Functions

    viii. Composite Datatypes

    4. Introduction to Developing a User Interface

    i. Introduction to Developing a User Interface

    ii. What is the need for a Good UI?

    iii. Basic Steps to be Followed for Developing a Good UI

    5. Programming Approaches

    i. Structured Programming

    ii. Modular Programming

    6. Code Optimization Techniques

    i. Introduction to Optimization

    ii. Code Optimization Strategy

    iii. Standard Techniques List

    iv. Code Optimization Summary

    7. Testing and Debugging

    i. Introduction to Testing

    ii. Who Does Testing

    iii. Testing Approaches

    iv. Levels of Testing

    v. Testing Techniques

    vi. When to Start and Stop Testing

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module7/session7.6_when-to-start-stop-testing_1.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module7/session7.5_testing-techniques_1.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module7/session7.4_levels-of-testing_1.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module7/session7.3_testing-approches.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module7/session7.2_who-does-testing.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module7/session7.1_introduction-to-testing.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module7/session7.1_introduction-to-testing.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module6/session6.4_code-optimization-summary.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module6/session6.3_standard-techniques-list_1.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module6/session6.2_code-optimization-strategy.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module6/session6.1_introduction-to-optimization.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module6/session6.1_introduction-to-optimization.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module5/session5.2_modular-programming_1.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module5/session5.1_structured-programming.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module5/session5.1_structured-programming.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module4/session4.3_basic-steps-to-be-followed-for-developing-a-good-UI_1.htmhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module4/session4.2_what-is-the-need-for-a-good-UI.htmhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module4/session4.1_introduction-to-developing-a-user-interface_1.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module4/session4.1_introduction-to-developing-a-user-interface_1.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module3/session3.8_composite-types_1.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module3/session3.7_functions_1.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module3/session3.6_arrays_1.html

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    3/210

    12/9/13 Basics of Programming -- TATA Consultancy Services Pvt. Ltd.

    https://aspire.tcs.com/aspire/courses/basics_of_programming/index.html 3/3

    vii. Debugging

    8. Introduction to the SDLC and UML

    i. Phases of Software Development Life Cycle

    ii. Introduction to the Unified Modeling Language

    iii. Developing Use-Case Diagrams

    iv. Examining Other UML Diagrams

    Courses

    https://aspire.tcs.com/aspire/courses/basics_of_programming/index.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module8/session8.4_examining-other-uml-diagrams_1.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module8/session8.3_developing-use-case-diagrams_1.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module8/session8.2_introduction-to-the-unified-modeling-language_1.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module8/session8.1_phases-of-software-development-life-cycle_1.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module8/session8.1_phases-of-software-development-life-cycle_1.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module7/session7.7_debugging.html

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    4/210

    12/9/13 Basics of Prog ramming -- TATA Consultancy Services Pvt. Ltd.

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.1_what-is-programming_1.html 1/2

    Course Contents | Prev : Next

    Figure 1.1 : Problem Solving

    1.1 What is Programming?

    A problem is defined as any question, something involving doubt,uncertainty, difficulty or a situation whose solution is not immediatelyobvious. A situation which is a problem for one person may not be a problemfor another person. Figure 1.1 graphically represents the concept of problemsolving.

    A Computer is a tool that can be used to solve problems bywriting programs. Writing a program without knowing the problem that we aretrying to solve is like swinging a knife without knowing what it is that we wantto cut.

    A program is a set of instructions that tells the computer how todo a task. When a computer follows these instructions, we say it executes theprogram.

    A programming language is a computer language thatprogrammers use to develop applications. An application is a set ofinstructions for a computer to execute. A set of rules that provides a way oftelling a computer what operations to perform is called a Program.

    Programming is the process of designing, developing, testing,debugging and maintaining the source code of computer programs. It is usedto create a set of instructions that computers use to perform specificoperations or to exhibit desired behaviors. Source code can be written usingprogramming language such as C++, Java, Python, Smalltalk, C#, etc. Theprocess of writing source code often requires expertise in many different

    Basics of Programming

    Introduction to Programming

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.1_what-is-programming_2.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/index.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/index.html

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    5/210

    12/9/13 Basics of Prog ramming -- TATA Consultancy Services Pvt. Ltd.

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.1_what-is-programming_1.html 2/2

    subjects, including knowledge of the specialized algorithms, applicationdomain and formal logic.

    Within software engineering, programming ( implementation) isconsidered as a phase in the software development process.

    Course Contents | Prev : Next

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.1_what-is-programming_2.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/index.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/index.html

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    6/210

    12/9/13 Basics of Prog ramming -- TATA Consultancy Services Pvt. Ltd.

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.1_what-is-programming_2.html 1/4

    Course Contents | Prev : Next

    1. Defining the problem

    2. Planning the solution

    3. Coding the program

    4. Testing the program

    5. Documenting the program

    Let us discuss each of these steps.

    1. Defining the problem

    As a programmer, you meet with end users from the clientorganization to analyze the problem, or you meet with a systems analyst whooutlines the project. Specifically, the task of defining the problem consists ofidentifying what you know (input-given data), and what you want to obtain(output-the result). Eventually, you create a document agreement that specifies

    the kind of input, processing, and output required to complete the task.

    2. Planning the solution

    There are two ways that are commonly used to plan the solutionto a problem. These are to draw a flowchart and to write pseudo code, or both.

    Pseudo code

    Pseudo code is an English-like non-standard langauge thatpermits you to focus on the program logic without having to be concernedabout the precise syntax of a particular programming language. However,

    1.1.1 The Programming Process

    Developing a program involves different steps similar to anyproblem solving task. There are five main steps in the programming processand are given below:

    Basics of Programming

    Introduction to Programming

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.1_what-is-programming_3.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.1_what-is-programming_1.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/index.html

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    7/210

    12/9/13 Basics of Prog ramming -- TATA Consultancy Services Pvt. Ltd.

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.1_what-is-programming_2.html 2/4

    pseudo code is not executable on the computer. It lets you state your solutionwith more precision than plain English. However psuedo code has lesserprecision than is required when using a formal programming language. Anexample is given below:

    Example : Read number n and print the integers counting up to n.

    Read n

    Initialize the variable i to 1

    while i 'less than or equal to n' do

    Print i

    Increment i

    end while

    Stop

    In the above example, the program enters the while loop only ifthe condition ( i less than or equal to n) is true. Two statements Print i andIncrement i are executed for each iteration. At the end of each iteration, thecondition is evaluated again and the loop continues as long as the condition istrue.

    Flowchart

    It is a pictorial representation of a step-by-step solution to aproblem. It consists of arrows representing the direction the program takesand boxes and other symbols representing actions. It is a map of the stepsinvolved in a program. The American National Standards Institute (ANSI) hascome up with a standard set of flowchart symbols. The following figure showsthe flowchart symbols and how they might be used in a simple flowchart of aeveryday action preparing a letter for mailing.

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    8/210

    12/9/13 Basics of Prog ramming -- TATA Consultancy Services Pvt. Ltd.

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.1_what-is-programming_2.html 3/4

    Figure 1.2 : Flowchart

    Please refer the links below to learn more about pseudo code and

    flow chart.

      http://ceng.anadolu.edu.tr/emrekacmaz/bil158/flowchart-

    pseudocode-examples.pdf

      http://ozark.hendrix.edu/~burch/csbsju/cs/150/sched/pseudo.pdf

      http://www.cosc.canterbury.ac.nz/tim.bell/dt/Tutorial_Pseudocode.pdf

      http://users.csc.calpoly.edu/~jdalbey/SWE/pdl_std.html

    3. Coding the program

    As the programmer, your next step is to code the program toexpress the solution in a programming language. You will translate the logic

    from the flowchart or pseudo code to a programming language. As we havealready discussed, a programming language is a set of rules that provides away of instructing the computer what operations to perform. There are manyprogramming languages such as BASIC, COBOL, Pascal, FORTRAN, C , etc .

    http://users.csc.calpoly.edu/~jdalbey/SWE/pdl_std.htmlhttp://www.cosc.canterbury.ac.nz/tim.bell/dt/Tutorial_Pseudocode.pdfhttp://ozark.hendrix.edu/~burch/csbsju/cs/150/sched/pseudo.pdfhttp://ceng.anadolu.edu.tr/emrekacmaz/bil158/flowchart-pseudocode-examples.pdf

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    9/210

    12/9/13 Basics of Prog ramming -- TATA Consultancy Services Pvt. Ltd.

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.1_what-is-programming_2.html 4/4

    Programming languages are precise like the English language, Toget your program to work, you have to follow exactly the syntax (rules) of thelanguage you are using. However there is no guarantee that your program willwork, because the syntax in programming language is correct. The correctnessof the language is the required first step. Then the program must be keyed,probably using a personal computer, in a form that the computer canunderstand.

    Course Contents | Prev : Next

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.1_what-is-programming_3.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.1_what-is-programming_1.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/index.html

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    10/210

    12/9/13 Basics of Prog ramming -- TATA Consultancy Services Pvt. Ltd.

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.1_what-is-programming_3.html 1/3

    Course Contents | Prev : Next

    4. Testing the program

    Some experts insist that a well designed program can be writtencorrectly the first time and there are mathematical ways to prove that aprogram is correct. Most of the programs may have a few bugs (errors) whenexecuted the first time. This is a bit discouraging at first, since programmerstend to be careful, precise and detail-oriented people who take pride in theirwork. There are many ways in which mistakes or problems may happen in

    programs. You will probably have made some of them. Eventually, aftercoding, we must prepare to test the program on the computer.

    This step involves three phases:

    1. Desk-checking

    2. Translating

    3. Debugging

    Let us discuss each of these phases.

    Desk-checking

    This is similar to proofreading. This phase is sometimes avoided by the developer/programmer who is looking for a shortcut and is eager to run

    the program on the computer once it is written. However, with careful desk-checking we can discover several errors and possibly save our time in the longrun. In desk-checking you simply sit down and mentally  check or trace, thelogic of the program in an attempt to ensure that it is error-free and is inworkable condition. Many organizations take this phase a step further calledas walk through, a process in which a group of programmers review theprogram and make suggestions or comments in a collegial way.

    Translating

    A translator is a program that

    I. checks the syntax of the program to make sure that the

    Basics of Programming

    Introduction to Programming

    https://aspire.tcs.com/aspire/courses/basics_of_programming/index.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.1_what-is-programming_2.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.2_why-programming-is-required_1.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.2_why-programming-is-required_1.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.1_what-is-programming_2.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/index.html

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    11/210

    12/9/13 Basics of Prog ramming -- TATA Consultancy Services Pvt. Ltd.

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.1_what-is-programming_3.html 2/3

    programming language was used correctly, giving you all

    the syntax related error messages, called diagnostics, and

    II. then translates the program into a form which the computer

    can understand. A by-product of the process is that the

    translator tells us if we have improperly used the

    programming language. These types of mistakes are calledas syntax errors. The translator gives descriptive error

    messages.

    Programs are most commonly translated using a compiler. Acompiler translates the entire program at one time. The translation involvesyour original program (Source file) which is transformed by a compiler into anobject module. Pre-written programs from a system library may be added

    during the load/link phase, which results in a load module. The load modulecan then be executed by the computer.

    Debugging

    Debugging is used extensively in programming. It meansdetecting, locating, and correcting bugs (mistakes), by running the program.These bugs are called as logic errors, which tells the computer to repeat anoperation but not telling it how to stop repeating. In this phase we run the

    program using the test data that we devise. We must plan the test datacarefully to make sure we test every part of the program.

    5. Documenting the program

    Documenting is an ongoing process. It is a written detaileddescription of the programming cycle and specific facts about the program.

    Typical program documentation materials include the origin and

    nature of the problem, a brief narrative description of the program, logic toolssuch as pseudo code and flowcharts, program listings, data-recorddescriptions and testing results. Comments in the program are also consideredan essential part of documentation. Many programmers document as theycode.

    A wise programmer continues to document the programthroughout its design, development and testing. Documentation is used tosupplement human memory and to help organize program planning. Also,documentation is critical to communicate with others who have an interest inthe program and may be part of a programming team.

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    12/210

    12/9/13 Basics of Prog ramming -- TATA Consultancy Services Pvt. Ltd.

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.1_what-is-programming_3.html 3/3

    Course Contents | Prev : Next

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.2_why-programming-is-required_1.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.1_what-is-programming_2.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/index.html

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    13/210

    12/9/13 Basics of Prog ramming -- TATA Consultancy Services Pvt. Ltd.

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.2_why-programming-is-required_1.html 1/2

    Course Contents | Prev : Next

    1. Programming helps us to understand computers. If we learn

    how to write simple programs, we will gain more knowledge

    about how a computer works.

    2. Writing a few simple programs increases our confidence

    level. We will find great personal satisfaction in creating a

    set of instructions that solve a problem.

    3. Learning programming lets us find out quickly whether we

    like programming and whether we have the analytical turn

    of mind that programmers need. Even if we decide that

    programming is not for us, understanding the process

    certainly will increase our appreciation of what computers

    and programmers can do.

    1.2 Why programming is required?

    We may already have used software, perhaps for spreadsheets orword processing, or to solve problems. Perhaps now we are curious to learnhow programmers write software. A program is a set of step-by-stepinstructions that directs the computer to do the tasks we want it to do andproduce the results we want.

    There are three good reasons for learning programming:

    What Programmers Do?

    The programmer prepares the set of instructions of a computerprogram and runs those instructions on the computer,tests the program to seeif it is working properly, and makes corrections to the program. Theseactivities are all done for the purpose of helping a user to fill a need, such aspaying employees, admitting students to college or billing customers.

    The programming activities can be done as a solo activity, but a

    programmer typically interacts with a variety of people. For example, if aprogram is part of a system of several programs, the programmer coordinateswith others (other programmers) to make sure that the programs fit togetherwell. If you are a programmer, you might also have coordination meetings withusers, systems analysts, managers, and with peers who evaluate your work

    Basics of Programming

    Introduction to Programming

    https://aspire.tcs.com/aspire/courses/basics_of_programming/index.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.1_what-is-programming_3.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.2_why-programming-is-required_2.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.2_why-programming-is-required_2.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.1_what-is-programming_3.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/index.html

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    14/210

    12/9/13 Basics of Prog ramming -- TATA Consultancy Services Pvt. Ltd.

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.2_why-programming-is-required_1.html 2/2

     just as you evaluate theirs.

    Course Contents | Prev : Next

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.2_why-programming-is-required_2.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.1_what-is-programming_3.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/index.html

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    15/210

    12/9/13 Basics of Prog ramming -- TATA Consultancy Services Pvt. Ltd.

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.2_why-programming-is-required_2.html 1/3

    Course Contents | Prev : Next

    1. Machine languages

    2. Assembly languages

    3. High-level languages

    4. Very high-level languages

    5. Natural languages

    Let us look at each of these categories.

    1. Machine languages

    Humans do not like to deal with numbers alone: they preferletters and words also. machine language consists of numbers. Eeach type ofcomputer has its own machine language. This lowest level of language,represents data and program instructions as 1s and 0s-binary digitscorresponding to the on and off electrical states in the computer. In the earlydays of computing, programmers used rudimentary systems for combiningnumbers to represent instructions such as add or compare. These programsare not convenient for people to read and use and the industry quickly movedto develop assembly languages.

    2. Assembly languages

    Assembly languages are considered as very low level language.

    1.2.1 Levels of Language

    Programming languages can be "lower" or "higher," depending onhow close they are to the language the computer itself uses (0s and 1s = low) orto the language people use (English like high). We will consider five levels oflanguage. These are numbered 1 through 5 to correspond to generations. Interms of ease of use and capabilities, each generation or level is animprovement over its predecessor.

    The five generations of languages are:

    Basics of Programming

    Introduction to Programming

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.2_why-programming-is-required_3.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.2_why-programming-is-required_1.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/index.html

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    16/210

    12/9/13 Basics of Prog ramming -- TATA Consultancy Services Pvt. Ltd.

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.2_why-programming-is-required_2.html 2/3

    They are not as convenient to use as the more recent languages. At the timethey were developed, however, they were considered as a great leap forward.To replace the 1s and 0s used in machine language, assembly languages usemnemonic codes. Mnemonic codes are abbreviations that are easy toremember: A for add, C for compare, MP for Multiply and so on. Althoughthese codes are not English words, they are better accepted than numbers (0sand 1s)alone. Just like machine language, each type of computer has its ownassembly language.

    The programmer who uses an assembly language requires atranslator which is used to convert the assembly language program intomachine language. A translator is required because machine language is theonly language that the computer can actually execute. The translator is anassembler program, which is also referred to as an assembler. It takes theprograms written in assembly language and converts them into machine

    language. Programmers need not worry about the translating aspect, they onlyneed to write programs in assembly language.

    Although assembly languages represent a step forward, they stillhave many disadvantages. A key disadvantage is that assembly language isdetailed to the extreme, making assembly language programming repetitive,error prone and tedious.

    3. High-Level Languages

    The first widespread use of high-level languages in the early1960's transformed programming into something quite different from what ithad been. Programs were written in an English-like manner, thus making themmore easy and convenient to use. A programmer can accomplish more withless effort, and programs can now take care of much more complex tasks.

    These so-called third generation languages spurred a greatincrease in data processing that characterized the 1960's and 1970's. During

    that period, the number of mainframes in use increased from hundreds to tensof thousands.

    A translator is used to translate the symbolic statements of ahigh level language into computer executable machine language, thistranslator is usually called as a compiler. There are many compilers for eachlanguage and one for each type of computer. For example, it is necessary tohave a COBOL compiler for each type of computer on which COBOL programsare to be run. A program can be compiled to different machine language

    versions on different machines, the source program itself, the COBOL versioncan be essentially identical on each machine.

    Some languages are used to serve a specific purpose, such as

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    17/210

    12/9/13 Basics of Prog ramming -- TATA Consultancy Services Pvt. Ltd.

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.2_why-programming-is-required_2.html 3/3

    creating graphics or controlling industrial robots. Many languages areextraordinarily flexible and are considered to be general-purpose languages. Inthe past the majority of programming applications were written in BASIC,COBOL or FORTRAN. All of them are general purpose languages.

    Course Contents | Prev : Next

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.2_why-programming-is-required_3.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.2_why-programming-is-required_1.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/index.html

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    18/210

    12/9/13 Basics of Prog ramming -- TATA Consultancy Services Pvt. Ltd.

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.2_why-programming-is-required_3.html 1/2

    Course Contents | Prev : Next

    4. Very High-Level Languages

    Very high-level languages are often known by their generationnumber, they are called fourth-generation languages or 4GLs. Fourth-generation languages are beneficial because:

    I. They are result-oriented; they emphasize what instead of

    how.

    II. They improve productivity because programs are easy to

    write and modify.

    III. They can be used with minimum training by both

    programmers and non programmers.

    IV. They shield users from needing an awareness of program

    structure and hardware.

    5. Natural Languages

    The word "natural" has become most popular in computingcircles. Fifth generation languages are most often called natural languages

     because of their resemblance to the "natural" spoken English language. Insteadof being forced to key correct commands and data names in correct order, amanager tells the computer what to do by keying in their own words.

    1.2.1.1 Choosing a Language

      In a work environment, the manager may decide that everyone in

    project will use a certain language.

      We may need to use a certain language, particularly in a business

    environment, based on the need to interface with other

    programs. If two programs are to work together, it is easiest if

    they are written in the same language.

      We may choose a language based on its suitability or criteria. For

    Basics of Programming

    Introduction to Programming

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.1_overview-of-software-development_1.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.2_why-programming-is-required_2.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/index.html

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    19/210

    12/9/13 Basics of Prog ramming -- TATA Consultancy Services Pvt. Ltd.

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.2_why-programming-is-required_3.html 2/2

    example, COBOL will be the best option for a business program

    that handles large files .

      If a program is to be run on different computers, it must be

    written in a language that is portable and suitable on each type

    of computer, so that the program needs to be written only once.

      We may be limited by the availability of languages. Not all

    languages are available on all computers and in all installations.

      The language may be limited to the expertise of the programmer.

    The program may have to be written in a language that available

    programmer knows.

     

    http://homepage.cs.uri.edu/faculty/wolfe/book/Readings/Reading13.htm

    Major Programming Languages are FORTRAN (a scientificlanguage), COBOL (a business language), BASIC (simple language used foreducation and business), Pascal (education), Ada (military), and C (generalpurposed), C, C++, Java, and Javascript.

    Please refer the link below to know more about programming.

    Course Contents | Prev : Next

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.1_overview-of-software-development_1.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.2_why-programming-is-required_2.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/index.htmlhttp://homepage.cs.uri.edu/faculty/wolfe/book/Readings/Reading13.htm

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    20/210

    12/9/13 Basics of Prog ramming -- TATA Consultancy Services Pvt. Ltd.

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.1_overview-of-software-development_1.html 1/2

    Course Contents | Prev : Next

    2.1. Overview of Software Development

    Software development is a discipline in the computer science fieldthat focuses on the creation of programs that control computer hardware.These programs, also referred to as 'software applications' or 'apps' in short,are groups of instructions that tell a computer what is to be done. The softwaredevelopment field consists of several computer programming languages, eachdesigned to fulfill various requirements depending on the project at hand.

    It is almost unbelievable to think that a few decades backprogrammers did not even have desktop computers to work on. Instead theyused the process of punching instructions into paper cards to input into amainframe computer centrally located in a "machine room". In those timesthese instructions were written in assembly language or machine code, thenative language used by hardware of the computer. As the development ofsoftware evolved, 'higher level' languages were developed patterning naturallanguages and better reflecting the human problem-solving process. Eventoday, assembly language is still used, especially by low-level engineers

    developing computer components and embedded systems. But, most desktopand web-based development is conducted in high-level languages like ASP,C++, C#, Java, Perl, etc.

    If hundred programmers were asked, 'What do they think is the best programming language for beginners?' you might get one hundred andone answers. Each individual has an opinion. The question is akin to askingwhat is the best vehicle to drive - there is simply no right or wrong answer.Fortunately, some general guidelines exist to get the novice programmer off to

    a good start. However, those who are completely new to computers and unsurewhether they are up to the task (or whether software development will be ofinterest) should start with a language that is designed to teach basic principleswith very minimal complexity. The BASIC and LOGO programming languageswere early attempts to bring computer programming to the masses. Today alanguage like Microsoft's Visual Basic would be ideal for a beginner. VisualBasic helps you to make practical applications with a visual interface in amatter of hours without getting bogged down by the technical details. UnlikeBASIC and LOGO, Visual Basic has practical applications that can be used in

     both casual and commercial environments.

    Those who are technically inclined or already have a fair amountof experience with computers may be prepared for more advanced

    Basics of Programming

    Introduction to Programming

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.1_overview-of-software-development_2.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.2_why-programming-is-required_3.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/index.html

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    21/210

    12/9/13 Basics of Prog ramming -- TATA Consultancy Services Pvt. Ltd.

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.1_overview-of-software-development_1.html 2/2

    programming concepts. For many years, Pascal was considered the entrylanguage for such people, and was generally used in schools and universities toteach programming at a professional level. Nowadays more "practical"languages like C++, C#, and Java are taught, for the reason that they provide amore direct approach to learning how to develop software with tools that aremore commercially viable than Pascal.

    Life Cycle of a Software Development Project

    Software development is a complicated process comprisingdifferent stages. Each stage requires a lot of paperwork and documentation inaddition to the process of development and planning. This is in contrast to thecommon thinking of newcomers to the software industry who believe thatsoftware development is just writing code.

    Every software development project has to go through at least thefollowing stages:

      Requirement gathering

      Writing functional specifications

      Creating architecture and design documents

      Implementation and coding

      Testing and quality assurance

      Software release

      Documentation

      Support and new features

    There may be many additional steps and stages depending uponthe nature and the type of the software product. You may have to go throughmore than one different cycles during the testing phase as software testers findproblems and bugs, and developers fix them before a software product isofficially published or released. Let us go into some detail of these stages.

    Course Contents | Prev : Next

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.1_overview-of-software-development_2.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module1/session1.2_why-programming-is-required_3.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/index.html

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    22/210

    12/9/13 Introduction to Computer Programs

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.1_overview-of-software-development_2.html 1/6

    Course Contents | Prev : Next

    2.1.1 Different Stages of Software Development

    2.1.1.1 Requirement Gathering

    Requirement gathering is usually the first stage of any softwareproduct. This stage officially commences when you are thinking aboutdeveloping software. In this phase, you meet customers or prospectivecustomers, and do a market analysis of the requirements and features that arein demand. You might as well find out if there is a real need in the market for

    the software product you are trying to develop. In this stage, most of the workis done by the marketing and sales people or people who have direct contactwith the customers. These people talk to customers and try to understand whatexactly their requirements are.

    A comprehensive understanding of the customers’ needs andwriting down features of the proposed software product are the keys to successin the requirement gathering phase. This phase is actually a base for the wholedevelopment of the software. If the base is not laid appropriately, the productwill not find a place in the market. If a very good software product which is notrequired in the market is developed, it does not sell no matter how well you

     build it. You can find many instances of software products that failed in themarket because the customers did not require them. The marketing peopleusually create a Marketing Requirement Document or MRD that containsformal data representation of market data gathered. You can also consideryour competitors’ products (if any). This process is called competitiveanalysis.

    Finally, list down the features required by the product.Appropriate consideration must be given to the economics of software creationat this point. Questions that must be asked oneself are: is there a market? Can Imake some profit? Will the revenue justify the cost of development?

    2.1.1.2 Writing Functional Specifications

    Functional specifications may consist of one or more documents.

    These documents show the behavior or functionality of a software product onan abstract level. Assuming the product is a black box, these specificationsdefine its input/output behavior. The product requirements documentation putforward by people who have contact with the end user of the product or the

    Basics of Programming

    Introduction to Computer Programs

    https://aspire.tcs.com/aspire/courses/basics_of_programming/index.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.1_overview-of-software-development_1.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.1_overview-of-software-development_3.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.1_overview-of-software-development_3.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.1_overview-of-software-development_1.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/index.html

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    23/210

    12/9/13 Introduction to Computer Programs

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.1_overview-of-software-development_2.html 2/6

    customers, forms the basis of the functional specifications.

    In larger products, functional specifications may consist ofseparate documents for each feature of the product. For example, if the productis a router, you may have a functional specification document for RIP (RoutingInformation Protocol), another for features on security, and so on. Functionalspecifications are important because developers use them to create designdocuments. The documentation people also use them when they createmanuals for end users. If different groups are working in different physicallocations, functional specifications and architecture documents (discussednext) are also a means to communicate.

    Keep in mind that sometimes during the product developmentphase you may need to amend functional specifications keeping in view newmarketing requirements.

    2.1.1.3 Creating Architecture and Design Documents

    When you have all of the requirements collected and arranged, itis the turn of the technical architects team, which usually consists of highlyqualified technical specialists, to create the architecture of the product. Thisdefines different components of the product and how they interact with eachother. Often, the architecture also defines the technologies used to develop theproduct. While creating the architecture documents, the team also needs to

    consider the timelines of the project. This is the target date when the product isrequired to be on the market. Often excellent products fail because they areeither too early or late to market. The marketing and sales people usuallydecide a suitable time frame to release the product. Based on the timeline, thearchitecture team may drop some features of the product if it is not possible to

     bring the full-featured product to market within the required time limits. Afterdeciding the components of the product and defining their functionalities,interfaces are designed for these components to work together.

    Most often, no component works in isolation; each one has tocoordinate with other components within the project. Interfaces are the rulesand regulations that define how these components will interact with eachother. There maybe major problems down the road if these interfaces are notdesigned properly and appropriately detailed. Different people will work ondifferent components of any large software development project and if theydon’t fully understand how a particular component will communicate withothers, major problems arises during integration. For some products, newhardware is also required to make use of technology advancements. The

    architects of the product also need to consider this aspect of the product. Oncethe architecture, software components and their interfaces are defined, designdocuments are created as the next phase of development. At the architecturelevel, a component is defined as a black box that provides certain functionality.

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    24/210

    12/9/13 Introduction to Computer Programs

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.1_overview-of-software-development_2.html 3/6

    At the design documents stage, you have to define what is in that black box.

    The design documents are usually created by the senior softwaredevelopers and these documents define individual software components to thelevel of functions and procedures. This is the last document completed beforedevelopment of the software starts. These design documents are passed on tosoftware developers as they begin coding. Architecture documents and MRDsusually need to stay in sync, as sales and marketing will work from MRDswhile engineering works from engineering documents.

    2.1.1.4 Implementation and Coding

    The software developers use the design documents anddevelopment tools (editors, compilers, debuggers etc.) and start writingsoftware. This is often the longest phase in the product life cycle. Every

    developer has to write his/her own code and collaborate with other developersto make sure the different components can inter-operate with each other. Arevision control system such as CVS (Concurrent Versions System) is neededin this phase. There are many open source revision control systems as well ascommercial ones. The version control system provides a central repository tostore the individual files. A normal software project may contain anywherefrom hundreds to thousands of files. In larger and complex projects, directoryhierarchy must also be decided beforehand so that files are stored inappropriate locations. During the development cycle, different developers may

    modify files. If the rules are not followed by everybody, this may easily breakthe whole compilation and building process. A typical example is duplicatedefinitions of the same variables causing problems.

    Similarly, if included files are not written properly, loops getcreated easily. Other problems pop up when multiple files are included in asingle file with conflicting definitions of variables and functions. Codingguidelines must also be defined by architects or senior developers. As anexample, if software is intended to be ported to some other platform, it must be

    written on a standard like ANSI. During implementation, developers mustwrite enough comments inside the code so that if anybody starts working onthe code in the future, he/she would be able to understand what has already

     been written. Writing good comments is extremely important as all otherdocuments, no matter how good they are, will be lost eventually. Ten yearssubsequent to the initial work, it's probable that you may find only thatinformation which is in the form of comments, present inside the code.Development tools also play an important role in this phase of the project.

    Good development tools save a lot of time for the developers, plusmoney in terms of improved productivity. In terms of time saving the mostimportant development tools are editors and debuggers. An editor helps adeveloper to write code quickly.

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    25/210

    12/9/13 Introduction to Computer Programs

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.1_overview-of-software-development_2.html 4/6

    A good debugger helps make the code operational in a shortperiod of time. Before the start of the coding process, considerable time must

     be spent in choosing good development tools. During the development phase,review meetings also prove helpful. Potential problems are identified earlier inthe development. Review meetings are also helpful to keep track of whether theproduct is on time or if more effort is needed complete it in the required timeframe. There will be times when you may also need to make some changes inthe design of some components because of new requirements from themarketing and sales team. Review meetings are a great tool to convey thesenew requirements. Here, architecture documents and MRDs are kept in syncwith any changes/problems encountered during development.

    2.1.1.5 Testing

    Testing is probably the most important phase for long-term

    support as well as for the company's reputation. If you don’t control thesoftware quality, it will not be able to compete with other products on themarket. If software crashes at the site of the customer, he loses productivity aswell money and you lose credibility. On most occasions these losses are huge.Unhappy customers will never buy other products from the same vendor andwill not refer other potential customers. You can avoid this situation by doingextensive testing. This testing is often called as Quality Assurance, or QA, inthe software world. Generally testing starts as soon as the initial softwarecomponents are available. There are multiple types of testing. Each of these

    has its own importance.

    1. Unit Testing - Unit testing is testing one part or one componentof the product. The developer generally does this when he/she has completedwriting code for that part of the software. This makes sure that the componentis doing what it is intended to do. This also saves time for software testers aswell as developers by eliminating many cycles of software being passed backand forth between the developer and the tester. When a developer is ready witha particular part of the software, he/she can write test cases to test

    functionality of this part of the software. The component is then passed on tothe testers who run test cases to make sure that the unit is working properly.

    2. Sanity Testing - Sanity testing is a very basic check to see if allsoftware components compile with each other without any problems. This is toensure that developers have not defined conflicting or multiple functions orglobal variable definitions.

    3. Regression or Stress Testing - Regression or stress testing is a

    process done in some projects to carry out a test for a longer time period. Thistype of testing is used to determine behavior of a product when usedcontinuously over a period of time. It can expose some bugs in software like theones related to memory leakage. In some cases developers allocate memory but

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    26/210

    12/9/13 Introduction to Computer Programs

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.1_overview-of-software-development_2.html 5/6

    forget to release it. This is usually referred to as memory leakage. When testinggoes on for many days or weeks, it often results in allocation of all of theavailable memory until no memory is left. This is the point where yoursoftware starts showing abnormal behavior. Another potential problem inlong-term operation is counter overflow. This happens when you increment acounter but forget to decrement it resulting in an overflow when the product isused for long time. The regression testing may be started as soon as somecomponents are ready. This type of testing requires, by its very nature, a verylong period of time. The process should be continued as more components ofthe product are integrated. The process of integration and communicationthrough interfaces may create new bugs in the code.

    4. Functional or System Testing - Functional testing is carried outto make sure that the software is doing exactly what it is supposed to do. Thismust before any software is released to customers. Functional testing is done

     by testers whose primary job is software testing, not the developersthemselves. In small software projects where a company can’t afford dedicatedtesters, other developers may also do functional testing. The key point to keepin mind is that the person who wrote a software component should not be theperson who tested it. A developer will always have a tendency to test thesoftware the way he/she wrote it. He/she may easily miss any problems in thesoftware. The testers need to prepare a testing plan for each component of thesoftware. A testing plan would contain test cases that are run on the software.The tester can prepare these test cases using functional specifications

    documents. The tester may also get assistance from the developer to create testcases. Each test case must include methodology used for testing and expectedresults. Additionally, the tester may also need to create a certain infrastructureor environment to test the functionality of a piece of code. For instance, youmay simulate a network to test routing algorithms that may be part of a router.The next important job of the tester is to create a service request if an anomalyis found. The tester must include as much information in the service request aspossible.

    Typical information included in reporting bugs includes:

      Test case description

      How the test was carried out

      Expected results

      Results obtained

      A description of that environment, If a particular environment

    was created for testing.

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    27/210

    12/9/13 Introduction to Computer Programs

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.1_overview-of-software-development_2.html 6/6

    The bug should be forwarded to the developer so that thedeveloper may correct the problem. Many software packages are available inthe market to track bugs and fix problems in software.

    Course Contents | Prev : Next

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.1_overview-of-software-development_3.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.1_overview-of-software-development_1.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/index.html

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    28/210

    12/9/13 Introduction to Computer Programs

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.1_overview-of-software-development_3.html 1/3

    Course Contents | Prev : Next

    2.1.1.6 Software Releases

    Any software product is officially released, before you startselling it. This means that you create a state of the software in your repository,ensure that it has been tested for functionality and the code is frozen. Aversion number is assigned to released software. After releasing, developmentmay continue but it will not make any change in the released software. Thedevelopment is often carried on in a new branch and it may contain new

    features. The released software is updated only if a bug fixed version isreleased. Generally companies assign incremental version numbers followingsome scheme when the next release of the software is sent to market. Theversion number change depends on whether the new software contains a majorchange to the previous version or it contains bug fixes and enhancement toexisting functionality. Software releases are also important because they aretypically compiled versions of a particular code version, and thus provide astable set of binaries for testing.

    1. Branches - In almost all serious software development projects,a version control system is used. This system keeps a record of changes insource code files and is usually built in a tree-like structure. During the releaseof the software, the state of each file that is part of the release should berecorded. By creating branches to this state, future developments can be made.Sometimes special branches may also be created that are solely used for bugfixing.

    2. Release Notes  - Every software version contains release notes.

    These are prepared by people releasing the software version with thedevelopers' help. Release notes show what happened in this software version.

    Typically the information includes:

      Bug fixes

      New functionality

      Details of new features added to the software

      Any bugs that are not yet fixed

    Basics of Programming

    Introduction to Computer Programs

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.2_overview-of-problem-solving-techniques_1.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.1_overview-of-software-development_2.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/index.html

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    29/210

    12/9/13 Introduction to Computer Programs

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.1_overview-of-software-development_3.html 2/3

      Future enhancements

      If a user needs a change in the configuration process, it is also

    mentioned

    Generally a user must be given enough information tounderstand the new release enhancements and decide whether an upgrade isrequired or not.

    2.1.1.7 Documentation

    There are broadly three categories of documentation related tosoftware development processes

      Technical documentation developed during the development

    process, such as the architecture, functional and design

    documents.

      Technical documentation prepared for technical support staff,

    including technical manuals that support staff use to provide

    customer support.

      End-user manuals and guides. This is the documentation for theend user to assist the user getting started with the product and

    using it.

    All three types of documents are necessary for different aspectsof the support of the product. Technical documents are necessary for futuredevelopment, bug fixes, and adding new features. Documentation for technicalsupport staff contains information that is too complicated for the end user to

    understand and use. The support team needs this information in addition touser manuals to better support customers. Finally each product should havethe user manuals. Technical writers often develop user manuals which are

     based on functional specifications. In the timelines of most softwaredevelopment projects, even before the start of code development, functionalspecifications are prepared. So the technical writers can start writing usermanuals while developers write the code. So when the product is ready, theuser manuals is almost completed.

    2.1.1.8 Support and New Features

    Your customers need support when you sell a product. This istrue regardless of the size of the product, and even for non-software related

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    30/210

    12/9/13 Introduction to Computer Programs

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.1_overview-of-software-development_3.html 3/3

    products.

    Most common support requests from customers are related toone of the following:

      Help in installation and getting started.

      To release a patch or update to the whole product.

      A new feature is required by the customer.

    In addition to that, you may also want to add new features to theproduct for the next release because competitor products have other features.Better support will increase your customer loyalty and will create referral

     business. You may adopt two strategies to add new features. You may providean upgrade to the current release as a patch, or wait till you have developed alist of new features and make a new version. Both strategies are usefuldepending how urgent the requirement for new features is.

    Course Contents | Prev : Next

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.2_overview-of-problem-solving-techniques_1.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.1_overview-of-software-development_2.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/index.html

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    31/210

    12/9/13 Introduction to Computer Programs

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.2_overview-of-problem-solving-techniques_1.html 1/2

    Course Contents | Prev : Next

    2.2. Overview of problem solving Techniques

    Good problem solving skills empower managers in theirprofessional and personal lives. Good problem solving skills seldom comenaturally; they are consciously learnt and nurtured. Good problem solvingskills should include:

      developing innovative and creative solutions;

      developing solutions which are practical;

      showing independence and initiative in identifying problems and

    solving them;

      applying a range of strategies to problem-solving;

      applying problem-solving strategies across a range of areas;

    What is a Problem?

    A problem can be defined as an opportunity for improvement.“Every problem has a gift for you in its hands,” says Richard Bach. Anoptimist looks at challenging or problematic events as potential opportunitiesfor improvement. He will be always seeking answers for the questions such as:

      Is there more than one probortunity? "Probortunity” – a synonym by combining the words “problem” and “opportunity”.

      Is it my personal probortunity or Is it the probortunity of the

    organization?

      Is it an annoyance or an actual probortunity?

      Is this the real probortunity, or merely a symptom of a larger

    one?

    A problem can be defined as the difference between the actual

    Basics of Programming

    Introduction to Computer Programs

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.2_overview-of-problem-solving-techniques_2.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.1_overview-of-software-development_3.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/index.html

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    32/210

    12/9/13 Introduction to Computer Programs

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.2_overview-of-problem-solving-techniques_1.html 2/2

    state and desired state. A problem could also be the result of the knowledgethat there is a gap between the actual and desired or ideal state of objectives.Clarity of the problem is determined by the clarity of the knowledge which oneprecisely wants and which one has. Greater clarity of the problem will help infinding a better and an effective solution.

    A problem can also result from the recognition of an imperfectpresent and the belief in the possibility of a better future. The belief that one’shopes can be achieved will give one the will to aim towards a better future.

    Course Contents | Prev : Next

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.2_overview-of-problem-solving-techniques_2.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.1_overview-of-software-development_3.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/index.html

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    33/210

    12/9/13 Introduction to Computer Programs

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.2_overview-of-problem-solving-techniques_2.html 1/3

    Course Contents | Prev : Next

    Key approaches to Problem solving

    There are different ways of problem solving – each has its ownadvantages and disadvantages. The process an individual adopts as a managerwill be influenced by organizational policies, his/her own personality andcommunication style and the kind of information available about the problem.Broadly, there are 2 problem solving models available to a manager.

    A. Rational Problem-Solving

    Rational problem solving rests on the following principles (R. K.Wagner - “Learning to solve practical problems”):

      Problems are identified by comparing actual performance with

    an expected standard performance

      Problems are deviations in actual performance from the expected

    standard

      A precise and complete description of the problem is needed to

    identify a solution:

      What is happening?

      Where is it happening?

      When is it happening?

      To what extent is it happening?

      The cause of the problem can be found by comparing the

    problem and non-problem situations.

      Recent problems are due to the result of some change in the

    situation that has caused an unwanted deviation fromexpectations.

    The Rational Decision-Making Model requires the following steps

    Basics of Programming

    Introduction to Computer Programs

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.2_overview-of-problem-solving-techniques_3.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.2_overview-of-problem-solving-techniques_1.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/index.html

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    34/210

    12/9/13 Introduction to Computer Programs

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.2_overview-of-problem-solving-techniques_2.html 2/3

    which, if followed, are assumed to lead to “value-maximizing choices.” Thesteps are as follows:

      need to define the problem,

      identify the decision criteria,

      weigh the criteria which can be used to determine rank of

    importance,

      generate alternative solutions,

      rate each alternative on a different criteria, and

      compute the optimal decision.

    B. Lateral or Creative Problem-Solving

    Lateral or creative problem solving does not follow any standardset of procedures. It is a ‘subconscious process based on past distilledexperiences’. It is based more on the gut feeling of the manager than on anobjective process of weighing alternatives.

    There are a set of conditions and it is accepted that under thoseconditions intuitive approach is generally preferred to rational approach.Intuitive method is preferred when:

      there is a high level of uncertainty,

      little precedence to draw on exists,

      variables are not that easily predictable,

      facts are limited or facts are contradictory,

      analytical data are not much of use,

      there are several plausible solutions; and

      decision needs to be made in a short period of time

    The creative/lateral problem solving is very flexible. So it can beused to examine real problems and issues.

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    35/210

    12/9/13 Introduction to Computer Programs

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.2_overview-of-problem-solving-techniques_2.html 3/3

    Course Contents | Prev : Next

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.2_overview-of-problem-solving-techniques_3.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.2_overview-of-problem-solving-techniques_1.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/index.html

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    36/210

    12/9/13 Introduction to Computer Programs

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.2_overview-of-problem-solving-techniques_3.html 1/4

    Course Contents | Prev : Next

    2.1 : Seven-Step Problem Solving Process

    1. Identifying the Problem: The first step in the problem solvingprocess is sizing up the situation to identify the problem. This may soundsimple enough, but sometimes managers might be uncertain about even whatthe problem is; they might just be feeling anxiety or be confused about what is

    getting in the way of their objectives. If that is the case, they can askthemselves or consult with their friends or a professional expert. Other usefultechniques for identifying the problem include-

    Problem solving process

    There are a variety of problem-solving processes. But eachprocess consists of a series of steps – which include identifying the problem,searching for possible solutions, selecting the most optimal solution andimplementing a possible solution. It is useful to view problem solving as acycle because, sometimes, a problem needs several attempts to solve it or attimes the problem itself changes. The diagram below shows a seven-stepproblem solving process.

    Basics of Programming

    Introduction to Computer Programs

    https://aspire.tcs.com/aspire/courses/basics_of_programming/index.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.2_overview-of-problem-solving-techniques_4.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.2_overview-of-problem-solving-techniques_2.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/index.html

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    37/210

    12/9/13 Introduction to Computer Programs

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.2_overview-of-problem-solving-techniques_3.html 2/4

      Comparison with others

      Monitor for weak signals

      Brainstorming

      Checklists

      Comparison of current performance with objectives or past

    performance

      Listing complaints & role playing

    2. Exploring the Problem:  Having identified the problem,

    managers should analyze the problem to see what is the root cause for it. Oftenpeople get caught up in symptoms or effects of a problem or issue and neverdrill down to the real cause. They get mad at someone’s attitude, anger, oractions, which are not the real cause of the problem. The key here is to focus onanalyzing the problem for the real root cause without being affected byemotional issues. Seeking answers for questions such as the following will helpexplore the problem:

    Identify the Problem – Ask Who?

      Who says that this is a problem?

      Who caused or is causing the problem?

      Whom does it or will it affect?

      Who has done something about the problem?

      What happened or will happen?

      What are the symptoms?

      What are the consequences for others?

      What circumstances surround the occurrence of the problem?

      What is not functioning as desired?

    Identify the Problem – Ask What?

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    38/210

    12/9/13 Introduction to Computer Programs

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.2_overview-of-problem-solving-techniques_3.html 3/4

      Did it or will it happen?

      Why did it happen?

      When did it first occur?

    Identify the Problem – Ask Where?

      Where is the problem occurring?

      Did it or will it have an impact?

      Where did it have an impact?

    Identify the Problem – Ask Why?

      Why is this, a problem?

      Did it or will it occur?

      Why did it occur?

      Why was nothing done to prevent the problem from occurring?

      Why did no one recognize and do something about the problem

    at the earliest?

      Why is a response needed now?

    Identify the Problem – Ask How?

      How should the process be working?

      How are others dealing with this or similar problems?

      How do you know this is a problem; what supporting informationdo you have?

    Once the root cause is found, plans can be made to fix it.

    Identify the Problem – Ask When?

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    39/210

    12/9/13 Introduction to Computer Programs

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.2_overview-of-problem-solving-techniques_3.html 4/4

    Analyzing implies gathering information. If there is not enough information,they should find some ways to research and collect it

    Course Contents | Prev : Next

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.2_overview-of-problem-solving-techniques_4.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.2_overview-of-problem-solving-techniques_2.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/index.html

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    40/210

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    41/210

    12/9/13 Introduction to Computer Programs

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.2_overview-of-problem-solving-techniques_4.html 2/2

    The idea is to collect as many alternative solutions as possible.Mind mapping is another technique that can be used for finding alternativesolutions. Mind mapping uses pictures and/or word phrases to organize anddevelop thoughts in a non-linear fashion. It helps people see a problem and itssolution.

    Here’s how to do mind mapping:

      Take a sheet of plain paper and turn it sideways (if using

    flipchart paper you don’t need to turn it sideways - it is large

    enough); Using colored felt pens, draw a small picture (or write

    a phrase) in the centre of the paper representing the issue you

    want to solve; Draw lines out from the main problem (it helps to

    use different colors for each line).

      Each line should represent a different aspect of your problem or

    issue;

      Write down what each line represents either on top of or on the

    line;

      Add other lines flowing off these main lines;

      Write a word or short phrase on the smaller lines indicating what

    each new line represents (you may find that mind mapping

    works best for you if you write down the phrases or draw the

    images first and then connect them with the lines); and

      If you want, add images next to your main line that illustrate

    what each line means to you (some people think better with

    pictures, others with words).

    Course Contents | Prev : Next

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.2_overview-of-problem-solving-techniques_5.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.2_overview-of-problem-solving-techniques_3.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/index.html

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    42/210

    12/9/13 Introduction to Computer Programs

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.2_overview-of-problem-solving-techniques_5.html 1/2

    Course Contents | Prev : Next

    5. Select the best solution: Now that there are a wide variety ofpossible solutions available, it is time to select the best solution from amongthem to fix the problem, given the circumstances, resources and otherconsiderations. Here the managers are trying to figure out what exactly wouldwork best given the nature of the problem. There are always a number ofthings that can affect a solution, for instance, money, time, resources,procedures, rules, policies, and so on. All of these factors must be thoughtabout. Managers should prioritize the solutions by their effectiveness. This is a

    slow process of elimination. There may be some possible suggestions that mayneed to be immediately eliminated. Eventually, managers should narrow downthe choices to one best possible solution which will promise them the best oroptimal outcomes.

    6. Implementation:  Implementation is a crucial part of problem-solving process. In order to implement the solutions chosen, managers musthave an action plan and communicate it to those people who are directly andindirectly affected. Gemmy Allen (“Problem-Solving & Decision-Making”) says

    that communication is most effective when it precedes action and events. Inthis way, events conform to plans and events happen when, and in the way,they should happen. Managers should answer the below vital questions beforethey are asked, like –

      What should be communicated?

      What is the possible reason for the decision?

      Whom all will it affect and how?

      What are the benefits expected for the individual, department,

    and the organization as a whole?

      What adjustments will be required in terms of how work will be

    done?

      What is each individual’s role in implementing the decision?

      What are the results expected from each individual?

    Basics of Programming

    Introduction to Computer Programs

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.2_overview-of-problem-solving-techniques_6.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.2_overview-of-problem-solving-techniques_4.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/index.html

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    43/210

    12/9/13 Introduction to Computer Programs

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.2_overview-of-problem-solving-techniques_5.html 2/2

      When does the action called for by the decision go into effect?

    7. Evaluation:  This is the final step in the problem-solvingprocess. Managers should review the effectiveness of the solution againstdesired outcomes. Questions like did the solution work? If not, why? Whatwent right, and what went wrong? What adjustments do they have to make toensure that the solution will work better? This stage will require carefulanalysis that improves upon the best solution.

    The review of your progress can help a manager identify anyproblem. Steps may need to be revised or new steps need to be added. One mayneed to consider a different solution, if the current one, with which he/she has

     been, is not helping.

    Course Contents | Prev : Next

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.2_overview-of-problem-solving-techniques_6.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.2_overview-of-problem-solving-techniques_4.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/index.html

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    44/210

    12/9/13 Introduction to Computer Programs

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.2_overview-of-problem-solving-techniques_6.html 1/2

    Course Contents | Prev : Next

    Essentials of Effective Problem Solving

      Clear description of the problem

      Description of the negative or limiting factors involved in the

    problem

      A description of the positive or the constructive factors involved

    in the problem

      A clear delineation of the “ownership” of the problem - Whose

    problem is it: mine, yours, the other guy’s, my boss’, my

    spouse’s, my child’s, my parents’, my teacher’s?

      Scope of the problem need to be clearly defined: How extensive a

    problem is it? How long has this problem existed? How many

    people are affected by this?

      A clear description of the consequences if the problem were not

    solved - What is the possible impact on my family, job, life in

    this community, etc., if this problem isn’t solved? What is the

    worst possible thing that could happen if this problem isn’t

    solved?

      A list of brainstormed solutions to the problem, with each

    alternative analyzed as to its reality, its benefits, and theconsequences for following each one.

      A system of ranking each solution to finalize the decision-making

    process - A rating system for analyzing each solution is

    developed, e.g., 100% chance of success, 75% chance of success,

    50% chance of success.

      A clear description of myself as a problem-solver - When it comesto this problem, am I procrastinating? Am I avoiding the

    problem? Am I denying the problem? Am I shutting down or

     blocking my creativity on this problem? Am I ignoring it, hoping

    Basics of Programming

    Introduction to Computer Programs

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.3_phases-in-the-execution-of-a-computer-program_1.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.2_overview-of-problem-solving-techniques_5.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/index.html

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    45/210

    12/9/13 Introduction to Computer Programs

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.2_overview-of-problem-solving-techniques_6.html 2/2

    it will go away? Am I using magical and/or fantasy thinking in

    addressing the problem?

      Determination to follow through on the solution decided upon

     jointly. This will involve full motivation to “take the risk” and

    pursue the solution to its fullest

      www.cls.utk.edu/pdf/ls/Week3_Lesson21.pdf

      www.pitt.edu/~groups/probsolv.html

    For further reading you may refer the websites below.

    Course Contents | Prev : Next

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.3_phases-in-the-execution-of-a-computer-program_1.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.2_overview-of-problem-solving-techniques_5.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/index.htmlhttp://www.pitt.edu/~groups/probsolv.htmlhttp://www.cls.utk.edu/pdf/ls/Week3_Lesson21.pdf

  • 8/18/2019 basics of programming - ilpintcs.blogspot.in.pdf

    46/210

    12/9/13 Introduction to Computer Programs

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.3_phases-in-the-execution-of-a-computer-program_1.html 1/2

    Course Contents | Prev : Next

    2.3. Phases in the Execution of a Computer Program

    In computer science, a computer program specifies behavior thatis invoked as some point, causing that behavior to be exhibited by a runningprogram. That means, a program has a lifetime that includes distinct phases,starting with editing the code that specifies the behavior, and extending till theexecution of the code, which exhibits the specified behavior. The major phasesof a program's lifecycle are edit time, compile time, distribution time,installation time, link time, load time, and run time.

    It is important to be aware that these phases do not necessarilyhappen in a linear order. But, they can be intertwined in various ways. Forinstance, during development of the program, edit time and compile time arerepeatedly performed, without any link, load, or execution.

    Edit time  is the phase during which the code of the program is being edited. During this phase, the code may not be finalised. The editing isusually performed by a human programmer.

    Compile time is the phase during which the edited program or thesource code is translated into machine code by a compiler.

    A compiler is a computer program (or set of programs) thattransforms source code written in a programming language into anothercomputer language (often having a binary form known as object code). Thereason for wanting to transform source code is to create an executableprogram. The name "compiler" is primarily used for programs that translate

    source code from a high-level programming language to a lower level language(e.g., assembly language or machine code).

    The operations performed at compile time usually include syntaxanalysis, various kinds of semantic analysis (e.g., type checks and instantiationof template) and code generation. Programming language definitions usuallyspecify compile time requirements that source code must meet to compilesuccessfully. For example, that the amount of storage required by types andvariable can be deduced.

    Distribution time  is the phase during which the program is sentfrom the entity that created it, to the one that will invoke it. The format istypically an executable file, but sometimes source code, especially in the case

    Basics of Programming

    Introduction to Computer Programs

    https://aspire.tcs.com/aspire/courses/basics_of_programming/module3/session3.1_introduction-to-basic-programming-concepts.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/module2/session2.2_overview-of-problem-solving-techniques_6.htmlhttps://aspire.tcs.com/aspire/courses/basics_of_programming/index.html

  • 8/1