Integrated Development Environments are applications used to build and code software projects.
IDEs have a number of tools that aim to make programming easier for programmers.
Tool 1: Code Editors
The biggest feature of an IDE is its code or text editor - this is the section that programmers will type code into. Not all text editors are IDEs - if they cannot compile code, they are just editor
‣
1. Line numbers
To identify where each programming statement is.
Can help the programmer communicate where code or errors can be found when communicating with team members.
‣
2. Syntax highlighting
Aka auto-colour coding.
To help identify common data types and concepts (strings, subroutines, syntax).
Can help the programmer instantly see if they have made a typing mistake.
‣
3. Code folding
To minimise sections of the code that aren't relevant to the view.
Can help the programmer focus on their current problem and decrease visual clutter.
‣
4. Variable watching
To keep track of the values held by variables as the code is executed.
Can help the programmer trace the code and detect logic errors.
‣
5. Auto-complete
To fill in known variable/function names and predict what the programmer will type, often using the tab key.
Can help the programmer write code more efficiently to speed up their job.
‣
6. Auto-documentation
To provide quick-reference documentation about relevant subroutines and data types used.
Can help the programmer work out the correct function to use and relevant parameters, leading to them solving problems more efficiently.
Tool 2: Error Diagnostics
IDEs should provide accurate and detailed error reports when code does not compile or an error is detected. Errors can be detected at runtime (i.e. when the code is executed) or during development.
‣
1. Debugging
When errors are produced, debugging tools help locate them by line number and often suggest ways to fix them. A good IDE will have relevant error messages to identify what type of error it is (e.g. Type error, Indentation error).
‣
2. Breakpoints
Set by the programmer, to stop execution at a specific point in order to examine the code in more detail. e.g. what is the variable holding at this point? Useful in diagnosing logic errors.
‣
3. Stepping
Slow down the execution of the code by executing line by line at the programmer's pace. "Stepping through the code" will execute statement 1, stop, then programmer can step and execute statement 2, stop... Similar to breakpoints but allow for more detailed examination.
Tool 3: Run-time Environment
The run-time environment allows a programmer to test their code by running it.
If the program crashes, the run-time environment can see what happened and give useful information to the programmer.
‣
1. Translator (integrated compiler or interpreter, or both)
A translator translates the source code (e.g. Python) into machine code (that the computer understands, such as binary). If the IDE contains a translator, coded algorithms can be executed within the IDE, allowing the programmer to test and run code quickly and with ease.
‣
2. Version control
Keep track of different versions of the code incase an error is made. The programmer can revert the script back to a previous version to restore previously coded functionality. Can also be used to track changes to work out when a bug was introduced into the code.
‣
3. Output window
The output window displays the product of the code, after is has been compiled. Execute the code using the "start" or "run" button to see what the code produces.