Practical Programming

Practical Programming

Programming is the process of creating a set of instructions that tell a computer how to perform a task.

  • High-level Languages: These are coding languages that are designed to be easily understood by humans. Examples include Python, JavaScript, and C++.

  • Low-level Languages: These are closer to machine language, making them more difficult for humans to understand but potentially more efficient for the computer to execute.

  • Source Code: This is the version of computer software as it is originally written by a human in plain text.

  • Variables: These are used to store data which can be changed or manipulated throughout the code. Their values are mutable.

  • Constants: These are like variables but their values remain the same throughout the program. Their values are immutable.

Coding Constructs

There are certain constructs or structures that form the basis of most programming languages.

  • Sequence: This involves executing instructions line by line, in a sequence.

  • Selection (or conditional): This involves using IF, ELSE and ELSE IF statements to make decisions in the code depending on whether certain conditions are met.

  • Iteration (or loop): This involves repeating a section of code a certain number of times, either for a set number of times (FOR loop), while a condition is true (WHILE loop), or until a condition becomes true (DO WHILE loop).

Functions and Procedures

  • Function: This is a mini-program or sub-routine within your main program. It can return a value.

  • Procedure: This is also a mini-program or sub-routine within your main program. It completes a task but does not return a value.

Programming Principles

  • An algorithm: This is a series of steps for a program to follow.

  • Testing: This ensures that your program runs correctly. Testing might involve creating dummy data and seeing if your program handles it properly.

  • Debugging: This is the process of locating and fixing or bypassing bugs (errors) in computer program code.

  • Validation: This ensures that the data entered into a system conforms to specified criteria.

Software Development Approaches

Different methods can be used to undertake the development of software:

  • Waterfall Model: This is a linear development cycle, progressing through stages of analysis, design, coding, testing and maintenance.

  • Agile Development: This is a flexible development approach that focuses on continual iterative changes and updates throughout development.