levo

Software and the Development Environment

Source code files

  • 3 things to know
  • AS Unit 1
Start revising · £5/month

Overview

Source code, comments in a source file and two advantages of splitting a program across several source files.

What you need to know

Answer each one before you reveal it.

Your recallNot started
Process

Why can source code not be run directly by the processor?

Key term

Why is source code portable between machines when an executable often is not?

Key term

In what format is a source file stored, and why does that format matter?

Questions from this subtopic

Each one with the model answer underneath.

  1. 1

    What is source code?

    Model answer

    Source code is the set of statements a programmer writes in a high-level language, expressing the algorithm in a form a person can read.

  2. 2

    In what format is a source file stored, and why does that format matter?

    Model answer

    A source file is stored as plain text, which means any editor can open it, any machine can read it and two versions can be compared line by line.

  3. 3

    Why does a source file carry a language-specific extension such as .java or .py?

    Model answer

    The extension tells the tools and the developer which language the text is written in, so the correct compiler or interpreter is chosen and the editor applies the right syntax rules.

  4. 4

    Why can source code not be run directly by the processor?

    Model answer

    A processor executes only machine-code instructions in its own instruction set, and source code is text written for human readers, so translation by a compiler or an interpreter must happen first.

  5. 5

    What are comments in a source file, and why do comments not affect the running program?

    Model answer

    Comments are notes written for human readers, and the translator discards them before any code is generated, so no instruction in the finished program comes from a comment.

  6. 6

    Explain why source files, rather than the finished executable, are the artefact kept under version control.

    Model answer

    Source files are the definitive statement of what the program does and are the only form a developer can edit meaningfully; the executable can always be rebuilt from them, and a binary cannot be compared line by line.

Other ways to work this

The same content, four other ways.

Everything in your subscription

Runs, plus a mode for every other kind of session.

1Flash
2Imposter
3Fade
4Brain dump

Learn every subtopic in runs of four questions

Facts flash and fade, a wrong word hides in some of them, and a brain dump decides which questions are locked in.

Software and the Development Environment
Defining Data: Types, Variables and Classes
Program Control Structures
Objects, Classes and Data Structures

Cram the night before, weakest topic first

A quick scan finds your weakest topics. Recall each fact you missed three times in a row.

A null is the of one.
absencepresencetype

Blank Blitz consolidates the facts

Rapid timed gap-fills on the terms and numbers you need to recall without thinking.

✓What it iscovered
~Why it happenspartly there
How long it lastsnot there yet

Explain It tests your understanding

Explain a concept in your own words and see which of its points you covered.

An error is the mistake a person made.
TrueFalse

Test It catches misconceptions

Spot the fault in a statement. The faults are the mistakes students make most often.

721941163128510

Brain Breaks between sessions

Short focus games to reset attention, so the next set lands better than the last.

Every question in Software and the Development Environment, on a schedule.

Learn it in runs of four questions, each ending on a brain dump against the clock. Every question you lock in comes back the next day, then at longer gaps, each time just before you would forget it.

Or £46 a year, about £3.83 a month. Cancel anytime.