Programming tools: editors, compilers and online environments

Lesson 4 of 9 · Resources

To write and run a program you need an editor (where you type the code), a compiler (which turns the code into a program) and a way to run the program. Here are the free tools we recommend to students – for working at home, at school and for preparing for competitions.

Before you start: required prior knowledge – C++.
How to read: the page is an overview for students and teachers; at the end there is a short quiz, and the links lead to lessons on this site where the topic is learned in detail.

What is what

TermWhat it doesExample
editoryou write the code (text) in itVS Code, Notepad++
compilerturns C/C++ code into an executable programg++ (GCC), clang
interpreterruns the code line by linePython
IDE (development environment)editor + compiler + running + finding errors in one placeCode::Blocks, Visual Studio, IntelliJ, Thonny
online environmenteverything works in the browser, without installationPetlja, OnlineGDB, Replit

For C++ and competitions

ToolFor whomNote
Code::Blocksbeginners, Windowsdownload the "mingw-setup" version – the g++ compiler comes with it
Visual Studio Codemore advanceda light editor; for C++ you need to install g++ and the C/C++ extension
Petljaeveryonetasks with automatic checking and competitions (in Serbia) – works in the browser
OnlineGDBwhen nothing is installedrunning C, C++, Java and Python in the browser
Compiler Explorerthe curiousshows how the compiler translates the code
A tip for competitors: practise in an environment similar to the one at the competition – write the whole program yourself, run it on the examples and check it on Petlja. Learn to read the compiler's error messages; they almost always say exactly which line the problem is in.

For other languages

LanguageRecommendation
PythonThonny (for beginners, has step-by-step execution), IDLE, VS Code
JavaProcessing (graphics and animations), IntelliJ IDEA Community, NetBeans
web (HTML, CSS, JavaScript)VS Code + a browser (Chrome/Firefox, the "Inspect" tool)
micro:bitMakeCode (blocks), micro:bit Python editor
Arduino, ESP32Arduino IDE; MicroPython with Thonny

See how a program runs

The site Python Tutor (it also works for C, C++ and Java) runs a program step by step and draws the variables, arrays and function calls. It is excellent for understanding loops, recursion and pointers – and for finding an error when you "do not know why" the program gives a wrong result.

Keeping code: Git and GitHub

When projects grow, it is useful to keep the history of changes. Git remembers every version of the code (you can go back to yesterday's), and GitHub keeps the code on the internet and makes teamwork possible. Three commands are enough to start:

git add .                      # prepare all changed files
git commit -m "Add task 3"     # remember the version with a description
git push                       # send it to GitHub

GitHub offers free benefits for students and teachers through the GitHub Education program.

Common mistakes and tips
  • For C++ on Windows install Code::Blocks with the compiler included (mingw).
  • Keep your code files in a separate folder, with clear names (e.g. task_03_loops.cpp).
  • Learn the editor's shortcuts: running (F9 in Code::Blocks), saving (Ctrl+S), comment (Ctrl+/ in VS Code).

Check your knowledge

Open the quiz

Programming tools

1. What does a compiler do?




2. Which tool shows how a program runs step by step?




3. What is Git for?