Unit 10: Programming Languages and Programming Process
Table of Contents
1. Categories of Programming Languages
Programming languages are the tools used to write instructions for computers. They are generally categorized into three generations or levels based on how close they are to the computer hardware versus human language.
- Low-Level Languages: Closely tied to the hardware and architecture of the computer.
- High-Level Languages: More abstracted from hardware, easier for humans to read and write.
2. Machine and Assembly Language
Machine Language (First Generation)
Machine language is the only language that a computer can understand directly. It consists entirely of binary strings (0s and 1s).
- Execution: Very fast since no translation is needed.
- Difficulty: Highly difficult for humans to write, read, or debug.
- Portability: Machine-dependent; code written for one CPU will not run on another.
Assembly Language (Second Generation)
Assembly language replaces binary codes with symbolic names called Mnemonics (e.g., ADD, SUB, MOV).
- Translator: Requires a program called an Assembler to convert assembly code into machine code.
- Advantage: Easier than machine language but still allows direct hardware control.
3. Higher Level Languages
High-level languages (HLL) use English-like words and mathematical symbols (e.g., C, C++, Java, Python).
- Portability: Machine-independent; the same code can run on different platforms with minimal changes.
- Translators: Use Compilers or Interpreters to convert code into machine language.
- Efficiency: Slightly slower execution than low-level languages but much higher programmer productivity.
4. WWW Development Languages
These are specialized languages used to create content and logic for the World Wide Web.
- HTML (HyperText Markup Language): Used for structuring the layout of web pages.
- Client-Side Scripting: Languages like JavaScript that run in the user's browser.
- Server-Side Scripting: Languages like PHP or Python that run on a web server.
5. The SDLC of Programming
The Software Development Life Cycle (SDLC) is a systematic process used to design, develop, and test high-quality software.
| Phase | Description |
|---|---|
| Problem Analysis | Understanding the user requirements and the goal of the software. |
| Program Design | Planning the logic using tools like algorithms and flowcharts. |
| Coding | Writing the actual instructions in a specific programming language. |
| Testing & Debugging | Finding and fixing errors (bugs) to ensure the program works correctly. |
| Documentation | Writing manuals and comments for future maintenance. |
| Maintenance | Updating the software to fix new issues or add features. |
6. Exam Focus Enhancements
- Mnemonic: Remember the SDLC phases with the phrase: "Please Always Design If Tested Daily" (Planning, Analysis, Design, Implementation, Testing, Deployment).
- Portability: If asked why High-Level Languages are popular, focus on Machine Independence and Ease of Use.
- Translators: Be clear on the difference: Assemblers (for Assembly), Compilers/Interpreters (for HLL).
- Thinking HTML is a programming language. It is a Markup Language used for structure, not logic.
- Confusion between Machine and Assembly. Remember: Machine = 1s and 0s; Assembly = Words/Mnemonics.
- Skipping the Maintenance phase. In the SDLC, software is never "done"βit requires ongoing updates.
Q: Why can't the computer understand High-Level Languages directly?
A: CPUs are built with digital logic circuits that only recognize binary signals (electrical pulses). HLLs must be translated into these pulses (Machine Code) to work.
Q: What is the main benefit of the SDLC?
A: It provides a disciplined approach that ensures software is delivered on time, within budget, and meets user needs.