levo

Software and the Development Environment

Source code files

  • 3 things to know
  • AS Unit 1

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.

What is inside Levo

Six ways to work the same material.

1Closed book
2Open book
3Closed book

The 3-step method, run for you

Answer cold, learn it, then prove it stuck. Levo tracks the jump between your first attempt and your last.

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

Cram a whole paper in one sitting

Sort every topic into what you know and what you do not, then drill only the weak ones.

A null is the of one.
absencepresencetype

Blank Blitz makes facts automatic

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

AA null means no value has been recorded.
BZero and an empty string are values.
CA null is the absence of a value.

Build It gets the exam shape right

Assemble a full-mark answer from its marking points, in the order an examiner wants them.

An error is the mistake a person made.
TrueFalse

Test It catches misconceptions

Spot the fault in a statement. The traps are the mistakes students actually make.

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.

Attempt a question from memory, write the correct version, then attempt it again. Levo records the jump between your first attempt and your last, and brings each question back on the day you are due to forget it.

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