15
Software Development Integrated Software Environment

Software Development - Weeblyfon10.weebly.com/uploads/1/3/4/7/13472506/9_softwaredev.pdf · or application software, it is usually in the form of compiled object code and the source

Embed Size (px)

Citation preview

Software Development

Integrated Software Environment

Source Code vs. Machine Code

What is source code?Source code and object code refer to the "before" and "after" versions of a computer program that is compiled before it is ready to run in a computer. The source code consists of the programming statements that are created by a programmer with a text editor or a visual programming tool and then saved in a file.

For example, a programmer using the C language types in a desired sequence of C language statements using a text editor and then saves them as a named file. This file is said to contain the source code. It is now ready to be compiled with a C compiler and the resulting output, the compiled file, is often referred to as object code.

The object code file contains a sequence of instructions that the processor can understand but that is difficult for a human to read or modify. For this reason and because even debugged programs often need some later enhancement, the source code is the most permanent form of the program.

When you purchase or receive operating system or application software, it is usually in the form of compiled object code and the source code is not included. Proprietary software vendors usually don't want you to try to improve their code since this may create additional service costs for them. There is a movement to develop software (Linux is an example) that is open to further improvement and here the source code is provided. (Android SDK is another example)

In large program development environments, there are often management systems that help programmers separate and keep track of different states and levels of code files. NOTE: For script (noncompiled or interpreted) program languages, such as JavaScript, the terms source code and object code do not apply since there is only one form of the code.

What is machine code?Machine code, also called machine language, is a computer language that is directly understandable by a computer's CPU, and it is the language into which all programs must be converted before they can be run. Each CPU type has its own machine language, although they are basically fairly similar.

After the source code for a program has been written by one or more humans in a programming language (e.g., C or C++), it is compiled (i.e., converted) into machine code by a specialized program called a compiler, or by an assembler in the case of assembly language. This machine code is then stored as an executable file (i.e., a ready-to-run program) and can be executed (i.e., run) by the operating system any time it is instructed to do so by another program or by a user.

Machine code is extremely difficult for humans to read because it consists merely of patterns of bits (i.e., zeros and ones). Thus, programmers who want to work at the machine code level instead usually use assembly language, which is a human-readable notation for the machine language in which the instructions represented by patterns of zeros and ones are replaced with alphanumeric symbols (called mnemonics) in order to make it easier to remember and work with them (including reducing the chances of making errors).

In contrast to high-level languages (e.g., C, C++, Java, Perl and Python), there is a nearly one to one correspondence between a simple assembly language and its corresponding machine language.Programs for the first electronic computers were written directly in machine code. However, the development of assembly language from the 1950s led to a large increase in programmer productivity.

Initially, programs written in assembly language programs were hand-translated into machine code, but this tedious task was later eliminated by the development of assemblers to automate the translations.

What is a Compiler?

A compiler is a program that translates human readable source code into computer executable machine code. To do this successfully the human readable code must comply with the syntax rules of whichever programming language it is written in. The compiler is only a program and cannot fix your programs for you. If you make a mistake, you have to correct the syntax or it won't compile.

What is an Interpreter?

In computing, an interpreter is a computer program that reads the source code of another computer program and executes that program.Because it is interpreted line by line, it is a much slower way of running a program than one that has been compiled but is easier for learners because the program can be stopped, modified and rerun without time-consuming compiles.

What is a Programming Language?A programming language is used to write computer programs such as

Applications Utilities Servers Systems Programs

A program is written as a series of human understandable computer instructions that can be read by a compiler and linker, and translated into machine code so that a computer can understand and run it.

What is Software?

It is the combination of Instructions and Data, known as machine code that forms the building blocks of applications such as Word Processor, Computer Game or Spreadsheet. This machine code lives in the memory of the computer as billions of little on off switches. Exactly the same as a number in a calculator.