Skip to the content. Back to Chapter 1

Programming Techniques

Use of an IDE to develop/debug a program

Dexter is leading a programming team who are creating a computer program that will simulate an accident and emergency room to train hospital staff.
Dexter's team is using an integrated development environment (IDE).
Describe how the programmers could make use of the following IDE tools:

A programmer is developing an ordering system for a fast food restaurant. When a member of staff inputs an order, it is added to a linked list for completion by the chefs. The programmer is writing the program using an IDE.
Identify three features of an IDE that the programmer would use when writing the code and describe how the features benefit the programmer.

  1. Autocomplete
    • The IDE will suggest the most commonly used functions, methods, and attributes, as well as automatically completing certain constructs, as the programmer types; this reduces the cognitive load on the programmer, as well as the amount of time spent writing boilerplate code
  2. Code linting and analysis
    • Code linting is where the IDE checks the code for syntax and type errors, and reports these to the developer; this will reduce the number of possible bugs before the program is ever compiled or run, so that they can be fixed even if they are in obscure code paths
  3. Integrated version control
    • Version control allows multiple versions of the same program to be tracked, without requiring a separate file for each version; this allows the programmer to revert certain changes, or determine when a bug was introduced. Having this integrated into the IDE allows the programmer to consult the tree more easily, and commit changes more often

Describe what is meant by the term IDE (Integrated Development Environment)

An IDE is a piece of software which includes a multitude of tools which help the programmer write code faster and reduce the number of mistakes the programmer makes. It has tools such as automatic word completion, automatic code formatting, and code analysis, which both speed up writing code and reduce the number of errors introduced

A games company has developed a game called Kidz Arrowz. The players throw an arrow at a target board and are awarded different points depending on in which circle the arrow lands. Fig. 1 shows the board.

Fig. 1

A computer program is required to keep track of the scores for each competition. The user will enter the number of players, and the name of each player, in that competition (to a maximum of 10).

The programmer uses an Integrated Development Environment (IDE) to develop the program.

Describe how the IDE could be used to create the Kidz Arrows program.

The IDE will aid the programmer in creating the program, as it will use a version control system such as git to track each change to the files, and will be able to revert individual changes if they are known to introduce bugs. Additionally, the IDE will be able to analyse the programmer's code and determine if syntax or type errors are made, before the programmer compiles their code; meaning that they will be able to correct these issues much faster. Finally, the IDE will allow the programmer to step through their program's code and inspect the memory as it runs, in addition to viewing the path the program takes through its logic.