An integrated development environment (IDE) is one program with the tools for writing, translating, running and fixing code. You meet its common functions: the code editor, the run-time environment, the translators, error diagnostics, auto-completion, auto-correction and prettyprint.
about 25 min1 simulation1 practice question
Lesson 3 of 3Show all lessonsHide
Try the code and the simulations beside the lesson.
A workshop for programmers
A carpenter keeps the saw, the drill and the measuring tape on one bench, so everything is close at hand. An integrated development environment (IDE) does this for a programmer. It is one program that holds the tools to write code, translate it, run it and find its mistakes. "Integrated" means that the tools are joined together in one place.
A sketch of an IDE window. On the left, a code editor with line numbers 1 to 6, keywords such as WHILE shown in colour and the lines inside the loop indented (prettyprint). A small box at the top right shows the letters Tot and offers TotalPrice and TotalItems (auto-completion). Line 4 is underlined in red with the message missing bracket (error diagnostics). Along the top are a Run button (run-time environment) and a Translate button (translators). At the bottom is an output and input panel showing Price? 4.
The common functions of an IDE
The syllabus lists seven.
Code editor. The window where you type and change your code. It usually shows line numbers, so an error report such as "line 12" is easy to find.
Run-time environment. Lets you run the program inside the IDE and see its output and its inputs, without leaving the IDE.
Translators. The IDE has a compiler or an interpreter (or both) built in, so one button translates the code.
Error diagnostics. Finds errors and reports them: it highlights the line, says what is wrong, and may suggest a fix. Some errors are shown while you type.
Auto-completion. After you type the first letters of a keyword or an identifier, it offers the rest. You press one key to accept it. This saves typing and stops spelling mistakes.
Auto-correction. Corrects some common typing mistakes by itself, such as a keyword typed with two letters swapped.
Prettyprint. Shows the code in a way that is easy to read: keywords in colour, and the lines indented to show the structure.
Why an IDE helps
Each tool saves time or prevents a mistake. Auto-completion means a long, clear identifier such as NumberOfPlayers costs few key presses, so programmers are happy to use good names. Prettyprint shows the structure of the code at a glance. Error diagnostics point straight at the line that needs fixing.
The code boxes on this site are a very small IDE. They have an editor with colours, a Run button that runs your code with an interpreter, and error messages with line numbers.
Saving key presses
In the exam. "Explain the role of an IDE" wants the idea of one program with the tools to write, translate, test and debug code. For "describe two functions", name each function and say what it does for the programmer.
Practise with new numbers
Try it in Python
The program copies two IDE tools in a few lines. It offers the names that start with the letters typed so far, as auto-completion does, and it reports each line with a missing bracket, as error diagnostics do.
Common mistakes
Mixing up auto-completion and auto-correction. Auto-completion finishes what you start typing. Auto-correction fixes a mistake you have made.
Saying prettyprint prints the code on paper. It shows the code on the screen in colours and indents.
Saying an IDE is a translator. An IDE contains a translator, with many other tools.
Saying the run-time environment translates the code. It runs the program and shows its input and output.
Remember these
An IDE is one program with the tools to write, translate, run and debug code.
Its common functions: code editor, run-time environment, translators, error diagnostics, auto-completion, auto-correction, prettyprint.
Each function saves time or helps prevent or find mistakes.
Check yourself
Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.
What does IDE stand for?
Which function of an IDE shows keywords in colour and indents the code?
You type Tot and the IDE offers TotalPrice. Which function is this?
How do error diagnostics help a programmer?
What is the run-time environment of an IDE for?
Enroll free in Programming Languages, Translators and IDEs
Every lesson is open to read. Enrolling also lets you:
Mark lessons done and carry on where you stopped.
Take the tests of this lesson and its course.
Count the course towards the certificate for its chapter.