programming languages

Cards (34)

  • high level language
    uses words closer to English so humans can understand and write it
  • high level characteristics
    The code can be portable 
    Higher level of abstraction from the hardware 
  • assembly language / low level
    Interacts with the computers hardware and optimizes performance for specific tasks
  • assembly characteristics 

    More difficult to read as it uses mnemonics
    Efficient as it provides more control over hardware resources.
    Also hardware specific  
  • machine code/ low level
    Instructs the CPU on how to perform operations 
  • machine code characteristics 

    The cpu can understand 
    Very difficult to write for humans 
    Hardware specific as it is dependent on specific cpu architecture
  • compiler
    Translate the code in one go. It creates an executable file and reports all the errors at the end. Customers cannot see nor edit the code. 
  • interpreter
    Translates one line at a time and stops when there's an error. Customers will be able to see the code. 
  • compiler benefits 

    The file created can be run on any computer without the translator being present . 
    Optimised code can be generated by the computer leading to faster execution times. 
  • compiler drawbacks 

    Can take a long time to compile source code as the translator will often have to convert the instructions into various sets of machine code as different CPUs will understand instructions with different machine code from one another. Slower compilation: The entire program needs to be recompiled for any changes, which can be time-consuming.
  • interpreter benefits
    Easier debugging: Allows for easier debugging and interactive development, as the program can be stopped and examined at any point. interpreter drawbacks
    Platform independence (sometimes): Some interpreters can run on different platforms without the need for recompilation.
  • interpreter drawbacks
    Slower execution: Line-by-line interpretation can be slower than executing compiled code.
    Less optimised code: Interpreters generally don't produce as optimised code as compilers.
  • What type of language does Jack write his program in?
    High level language
  • Why does Jack's program need to be translated?
    To be executed on a computer
  • What is used to translate high level language into machine code?
    A translator
  • What is the function of an interpreter?
    Converts and executes one line of code
  • What happens when an interpreter encounters an error?
    It stops and continues after correction
  • How is an interpreter helpful during debugging?
    It allows for line-by-line execution
  • What does a compiler do with the code?
    Converts all code and produces an error report
  • When will the code run when using a compiler?
    When there are no errors
  • What can be done with the executable file produced by a compiler?

    It can be run without the compiler
  • What are the differences between an interpreter and a compiler?
    • Interpreter:
    • Converts one line at a time
    • Stops on errors and resumes after correction
    • Compiler:
    • Converts all code at once
    • Produces an error report before execution
  • IDE
    integrated development environments
  • IDE source code editor
    A source code editor is a special text editor that provides support when you are writing and editing source code for a program.
  • source code editor features
    Syntax Highlighting – Your program is colour coded with different programming terms highlighted in particular colours. 
    Autocomplete 
    Some source code editors can predict a word without the user needing to type it in completely.
    Bracket Matching
    Some source code editors highlight matching brackets or quote marks. This helps you to make sure you have the correct number of opening and closing brackets or quote marks.
    Auto Indentation
    When you type a line of code that requires indentation, the program indents the code automatically.
  • IDE error diagnostics tool
    Error diagnostics tools or debugging tools help to find errors in programs. They locate and identifying syntax problems with the code that the programmer has written.
  • What is the purpose of a debugger in programming?
    It locates bugs and explains errors
  • How does the single step tool assist in debugging?
    It runs code one line at a time
  • When would you use a breakpoint tool in debugging?
    To check program function at a specific point
  • What does the variable tracing tool allow a programmer to do?
    See variable values at each program stage
  • In what scenario might variable tracing be particularly useful?
    During a count controlled loop
  • What are the main features of error diagnostics tools in programming?
    • Debugger: Locates bugs and explains errors
    • Single step tool: Runs code line by line
    • Breakpoint tool: Checks function at specific points
    • Variable tracing tool: Monitors variable values during execution
  • IDE: A Run-Time Environment
    A runtime environment allows you to run the code to see what happens. When you execute the program code it is said to be in a  runtime state.  The program sends instructions to the CPU and accesses the computer’s RAM and other computer resources, this allows the program to be tested whilst it is running. 
    If the program crashes the RTE software keeps running and can provide information about why the crash occurred.
  • IDE translators
    compiler and interpreter