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

Free lesson

7.2 (3 of 4): Developer tools and everyday apps

The whole lesson, free. Read it and have a go at the activities. To work the tasks and labs in the real lesson, press Start lab, with no account needed.

45 minutes

A quick check that you are not a bot, then your own lab opens on the interactive lesson.

Already have an account? Sign in

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 that holds the tools for writing code.The tool a student uses to write code
Source codeThe code a person writes.print("hi")
Machine codeThe 1s and 0s a processor can run.The file a compiler makes
CompilerA tool that translates all the source code into machine code before it runs.A tool that makes a program file
InterpreterA tool that translates and runs 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.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 you can search.A list of customers

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

Match the tool to the job

Have a go

Loading…

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

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

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)

Make a free account to save your work and track your progress.

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.

Two ways to translate

flowchart LR
  src1["Source code"] --> comp["Compiler: translate everything"]
  comp --> mc["Machine code file"]
  mc --> run1(["Run the program"])
  src2["Source code"] --> interp["Interpreter: translate one line, run it, repeat"]
  interp --> run2(["Program runs line by 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.

Words from the tools

Have a go

Loading…

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

Extra: Real tools and languages

Visual Studio Code and PyCharm are two IDEs many developers use.

C and C++ usually use a compiler. Python and JavaScript usually use an interpreter.

Real languages often mix the two. For Java, a compiler makes a middle form called bytecode, which then runs. Python makes bytecode too. In the exam, keep to the simple split in the table.

Everyday application software

Application software helps people do their work. Five kinds appear in most offices.

A word processor writes letters and reports. A spreadsheet does sums in a grid. A database stores lots of data. Email sends messages. Project management software tracks who does which job and when.

Extra: Try it: ask a database

Code: sql
SELECT job FROM jobs WHERE owner = 'Sam';

-- Change Sam to Aisha and run it again.

Make a free account to save your work and track your progress.

Five kinds of application

ApplicationWhat it is forExample at work
Word processorWriting and formatting textA letter to a customer
SpreadsheetNumbers, sums and charts in a gridA monthly budget
DatabaseStoring and searching large amounts of dataA list of all customers
EmailSending messages and filesSending an invoice
Project management softwarePlanning tasks, deadlines and who does whatA board of tasks for a team

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

Your turn: debug two functions

Two functions have a bug. Find each bug and fix it. The first function should give the average of two numbers. The second should give the total of a list of prices. Read the code one line at a time. Remember: the computer does the part in brackets first. Press Run Tests to check.

Code: python
def average(a, b):
    # Give back the average of two numbers.
    return a + b / 2


def total(prices):
    # Give back the total of a list of prices.
    total = 0
    for price in prices:
        total = price
    return total

Make a free account to save your work, or press Start lab to work through the whole lesson.

True or false?

Have a go

True or false?

5 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

Final check

Have a go

Final check

5 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

Teach this lesson with your class

On a college account your students work the tasks and the labs as well, and every mark is kept for you.