Text files

Interactive Development Environment

An Interactive Development Environment (IDE) is used to write programs.

Since most1 programs are written in text, and that source code is stored as text files, an IDE always includes a text editor.

In fact, some IDEs are little more than text editors that “know” about the language you are working in. Others are much more sophisticated and include tools for debugging, compiling, testing, building and reformatting your code.

By definition, IDEs can provide language-specific features in addition to the text-editing features. This is why IDEs are so useful for programmers.

If you are going to be doing any programming, learn to use a suitable IDE. Often you’re free to pick one you like — many are free. Experiment with different IDEs but as soon as you’ve settled on one learn to use it.

Common features of IDEs include:

  • syntax colouring

    The IDE can colour keywords, variable names, literals (basically, different types of thing in your program) differently. This helps you read your code more quickly, but is also useful for spotting errors.

  • error highlighting

    The IDE may also be able to indicate mistakes (including, but not limited to, syntax errors) as you are typing.

  • auto-formatting

    Some IDEs provide auto-formatting tools that layout your code neatly, according to standards for the language (which you can often override).

  • auto-suggest, auto-complete

    IDEs often provide tools to help you enter program code (often you use the tab key to accept suggestions). This is useful both for speed and also for avoiding typing errors. Basic IDEs do this with the keywords of the programming language you’re working in. But more powerful IDEs also offer the variable and method names you’ve declared in your program.

  • commenting

    It’s common to be able to select a some code and comment it out. This works because the IDE knows how to indicate a comment in the language you’re working in. If the IDE has this feature, you’ll also be able to un-comment too.

1 There are exceptions. For example, Scratch and LEGO robotics have graphical programming environments that do not use text editors.