Easier to read with cream paper, a tint, more contrast or larger text? Choose your colours and text, once, for every page.

Preview

Developer tools and everyday apps

This is the first page of the lesson. Read it and have a go at the activities. The rest is in the full lesson.

45 minutes

You press Run and it breaks

You write 10 lines of code. You press Run. A red error appears and you do not know why.

A builder has a hammer, a tape measure and a plan. A developer has tools too. Some tools help you write code. Some help you find mistakes. Some turn your code into a program the computer can run.

Other programs, such as email and spreadsheets, help everybody at work.

Key words

WordWhat it meansExample
IDEIntegrated development environment. One program with an editor, a debugger and more tools for writing code.The tool a student uses to write code
Source codeThe code a person writes, in a language like Python.print("hi")
Machine codeThe 1s and 0s a processor can run.The file a compiler makes
CompilerTranslates all the source code into machine code before the program runs.A tool that makes a program file
InterpreterTranslates and runs the source code one line at a time.The Python interpreter
DebugTo find and fix mistakes in a program.Run one line, then stop
BreakpointA place where the debugger pauses the program, so you can look.Pause at line 12
SyntaxThe spelling and grammar rules of a programming language.A missing closing bracket )
VariableA name that holds a value.total = 0
DatabaseAn organised store of data that you can search.A list of customers

The cells students fill in are left blank in this preview.

What is inside an IDE?

PartWhat it doesHow it helps you
Code editing toolsColour the code, suggest words, find and replace, check the syntax as you typeFewer typing mistakes and faster work
Debugging toolsPause the program, run one line at a time, show the value of each variableYou find where the mistake is
Screen design toolsDrag buttons, boxes and text onto a window and see a previewYou build a screen without writing every line

The cells students fill in are left blank in this preview.

Quick check: the IDE

Have a go

Quick check: the IDE

3 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Your answers are marked here and are not kept. A college account keeps every student’s marks.

Try it: find the bug

Code: python
# This program has a mistake. Run it and read the error message.
prices = [2.5, 3.0, 1.5]
total = 0
for price in prices:
    total = total + price
print("The total is " + total)

# Fix it: change the last line to print("The total is", total)

Compiler or interpreter?

Your source code is words. A processor only runs machine code. Something must translate.

A compiler translates the whole program first. Then you run the result. An interpreter translates one line, runs it, then moves to the next line.

Compiler and interpreter compared

CompilerInterpreter
TranslatesAll the code firstOne line at a time
Speed of the finished programUsually fasterUsually slower
ErrorsReported for the whole program before it runsFound when that line is reached
Good forLarge programs that must run fastLearning, testing and quick changes

The cells students fill in are left blank in this preview.

The lesson goes on

8 more parts of this lesson are in the full curriculum, with the tasks, the final check and the labs. A college account gives your students all of it.