Computer Programming
By mukul on Oct 28, 2007 in Career Hotline
Computer programming (often shortened to programming or coding) is the process of writing, testing, and maintaining the source code of computer programs. The source code is written in a programming language. This code may be a modification of an existing source or something completely new, the purpose being to create a program that exhibits the desired behavior (customization). The process of writing source codes requires expertise in many different subjects, including knowledge of the application domain, specialized algorithms, and formal logic.
Within software engineering, programming (the implementation) is regarded as one phase in a software development process.
In some specialist applications or extreme situations a program may be written or modified (known as patching) by directly storing the numeric values of the machine code instructions to be executed into memory.
There is an ongoing debate on the extent to which the writing of programs is an art, a craft or an engineering discipline. Good programming is generally considered to be the measured application of all three, with the goal of producing an efficient and maintainable software solution (the criteria for “efficient” and “maintainable” vary considerably). The discipline differs from many other technical professions in that programmers generally do not need to be licensed or pass any standardized (or governmentally regulated) certification tests in order to call themselves “programmers” or even “software engineers”.
Another ongoing debate is the extent to which the programming language used in writing programs affects the form that the final program takes. This debate is analogous to that surrounding the Sapir-Whorf hypothesis in linguistics.
Programmers:-
- See Computer programmer to learn more about the process of computer programming.
Computer programmers are those who write computer software. Their job usually involves:
- Requirements analysis
- Specification
- Software architecture
- Coding
- Compilation
- Software testing
- Documentation
- Digital Integration
- Soft ware Maintenance
Programming languages:
Different programming languages support different styles of programming (called programming paradigms). The choice of language used is subject to many considerations, such as company policy, suitability to task, availability of third-party packages, or individual preference. Ideally, the programming language best suited for the task at hand will be selected. Trade-offs from this ideal involve finding enough programmers who know the language to build a team, the availability of compilers for that language, and the efficiency with which programs written in a given language execute.
Allen Downey, in his book “How To Think Like A Computer Scientist” wrote:
The details look different in different languages, but a few basic instructions appear in just about every language: input: Get data from the keyboard, a file, or some other device. output: Display data on the screen or send data to a file or other device. math: Perform basic mathematical operations like addition and multiplication. conditional execution: Check for certain conditions and execute the appropriate sequence of statements. repetition: Perform some action repeatedly, usually with some variation.
Modern programming:-
Quality requirements
Whatever be the approach to the software development, the program must finally satisfy some fundamental properties; bearing them in mind while programming reduces the costs in terms of time and/or money due to debugging, further development and user support. Although quality programming can be achieved in a number of ways, following five properties are among the most relevant:
- Efficiency: it is referred to the system resource consumption (computer processor, memory, slow devices, networks and to some extent even user interaction) which must be the lowest possible.
- Reliability: the results of the program must be correct, which not only implies a correct code implementation but also reduction of err propagation (e.g. resulting from data conversion) and prevention of typical errors (overflow, underflow or zero division).
- Robustness: a program must anticipate situations of data type conflict and all other incompatibilities which result in run time errors and stop of the program. The focus of this aspect is the interaction with the user and the handling of error messages.
- Portability: it should work as it is in any software and hardware environment, or at least without relevant reprogramming.
- Readability: the purpose of the main program and of each subroutine must be clearly defined with appropriate comments and self explanatory chose of symbolic names (constants, variables, function names, classes, methods, …).
Algorithmic Complexity:-
The academic field and engineering practice of computer programming are largely concerned with discovering and implementing the most efficient algorithms for a given class of problem. For this purpose, algorithms are classified into orders using so-called Big O notation, O(n), which expresses resource use, such as execution time and memory consumption, in terms of the size of an input. Expert programmers are familiar with a variety of well-established algorithms and their respective complexities and use this knowledge to choose algorithms that are best suited to their circumstances.
Research in computer programming includes investigation into the unsolved proposition that P, the class of algorithms which can be deterministically solved in polynomial time with respect to an input, is not equal to NP, the class of algorithms for which no polynomial-time solutions are known. Work has shown that many NP algorithms can be transformed, in polynomial time, into others, such as the Travelling salesman problem, thus establishing a large class of “hard” problems which are for the purposes of analysis, equivalent.
Methodologies
The first step in every software development project should be requirements analysis, followed by modeling, implementation, and failure elimination(debugging). There exist a lot of differing approaches for each of those tasks. One approach popular for requirements analysis is Use Case analysis.
Popular modeling techniques include Object-Oriented Analysis and Design (OOAD) and Model-Driven Architecture (MDA). The Unified Modeling Language (UML) is a notation used for both OOAD and MDA.
A similar technique used for database design is Entity-Relationship Modeling (ER Modeling).
Implementation techniques include imperative languages (object-oriented or procedural), functional languages, and logic languages.
Debugging is most often done with IDEs like Visual Studio, NetBeans, and Eclipse. Separate debuggers like gdb are also used.
Measuring language usage
It is very difficult to determine what are the most popular of modern programming languages. Some languages are very popular for particular kinds of applications (e.g., COBOL is still strong in the corporate data center, often on large mainframes, FORTRAN in engineering applications, and C in embedded applications), while some languages are regularly used to write many different kinds of applications.
Methods of measuring language popularity include: counting the number of job advertisements that mention the language the number of books teaching the language that are sold (this overestimates the importance of newer languages), and estimates of the number of existing lines of code written in the language (this underestimates the number of users of business languages such as COBOL).
Debugging
Debugging is a very important task for every programmer, because an erroneous program is often useless. Languages like C++ and Assembler are very challenging even to expert programmers because of failure modes like buffer overruns, bad pointers or uninitialized memory. A buffer overrun can damage adjacent memory regions and cause a failure in a totally different program line. Because of those memory issues tools like Valgrind, Purify or Boundschecker are virtually a necessity for modern software development in the C++ language. Languages such as Java, C#, PHP and Python protect the programmer from most of these runtime failure modes, but this may come at the price of a dramatically lower execution speed of the resulting program. This is acceptable for applications where execution speed is determined by other considerations such as database access or file I/O. The exact cost will depend upon specific implementation details. Modern Java virtual machines and .NET Common Language Runtime, for example, use a variety of sophisticated optimizations, including runtime conversion of interpreted instructions to native machine code.
Source:http://en.wikipedia.org/wiki/Computer_programming

