Programming Languages (Ch10) (M2) Flashcards
What is an IDE?
An IDE is software used to write code and create programs
Visual Studio is an example of what?
Visual Studio is an example of an IDE
Give three reasons why IDEs are helpful for programmers
IDEs are helpful, because they:
-Help programmers to produce correctly working and efficient programs
-Help programmers to produce readable and easy to understand code through features such as commenting and indentation.
-Help to solve syntax errors, logic errors and run time errors.
-Reduce the overall time spent creating programs.
-Reduce the overall time spent debugging programs.
-Compile the code and translating it from a high level language like VB, to low level binary for the computer to understand.
What is the purpose of break points?
Break points interrupt a program on a specified line, making it possible to step through, examine variables and find run-time errors
What is the purpose of error diagnostics?
It describes the type of error and identifies errors through colour coding
Describes the error and indicates the line
Feeds back to the user when compilation is unsuccessful
Give 6 features of an IDE that make it useful for programmers
IDE Features:
Coloured keywords in source code
Comment out and indent sections of code
Autocorrector
Run-time environment and output window
Debugging tools
Tracing the value of variables
Project navigation panel
Main menu and toolbar with access to a host of features to help manage the program
Auto-code completion to speed up programming
Errors produced when the compiler translates the program
What does a source code editor do? Why is it useful? Give an example
It is a software application used for writing and editing computer code
It provides programmers with a platform for writing, modifying and testing code
Notepad, Wordpad, Visual Studio
What does autocomplete do? Why is it useful? Give an example
A feature that predicts the rest of a word that a user is typing
Speeds up writing code
Google, Visual Basic
What does bracket matching do? Why is it useful? Give an example
A specific text editor that highlights sets of matching brackets
Helps the programmer to navigate through the code and spot any improper matching
Java, Javascript, C++
What does the debugger do? Why is it useful? Give an example
A debugger locates and then removes bugs or errors in a program
Allows programmers to examine the state of a running program
Visual Studio debugger, Arm DTT, Firefox Javascript debugger
What does the single-stepper do? Why is it useful? Give an example
It is one of the most powerful features of a debugger. It allows reverse engineers to execute a single instruction at a time
Allows a reverse engineer to execute a single instruction at a time before returning control to the debugger
Visual studio, Visual basic
What do breakpoints do? Why are they useful? Give an example
A breakpoint is a point in the program where the code will stop executing
Allows coders to write particular sections of the code without immediate execution
Eclipse, NetBeans, Visual Studio, Visual Basic
What does variable tracing do? Why is it useful? Give an example
Lets the programmer see the changing values of variables as the program runs
Enables the programmer to check that the program is functioning as expected
Visual studio, Visual basic
What does commenting do? Why is it useful? Give an example
Allows you to write extra notes that the computer ignores
Makes the code easier to understand and more maintainable
Visual studio, Visual basic
What does line numbering and indentation do? Why is it useful? Give an example
Line numbering is putting numbers on each line of code.
Indentation is leaving a space on a line, before beginning your code.
Makes the code more readable and maintainable
Visual studio, Visual basic
Give two features of an IDE and explain their use
Source Code Editor
It is a software application used for writing and editing computer code It provides programmers with a platform for writing, modifying and testing code
Autocomplete
A feature that predicts the rest of a word that a user is typing Speeds up writing code
Bracket Matching
A specific text editor that highlights sets of matching brackets Helps the programmer to navigate through the code and spot any improper matching
Debugger
A debugger locates and then removes bugs or errors in a program Allows programmers to examine the state of a running program
Single-stepper
It is one of the most powerful features of a debugger. It allows reverse engineers to execute a single instruction at a time
Allows a reverse engineer to execute a single instruction at a time before returning control to the debugger
Breakpoints
A breakpoint is a point in the program where the code will stop executing Allows coders to write particular sections of the code without immediate execution
Variable Tracing
Lets the programmer see the changing values of variables as the program runs Enables the programmer to check that the program is functioning as expected
Commenting
Allows you to write extra notes that the computer ignores Makes the code easier to understand and more maintainable
Line Numbering and Indentation Line numbering is putting numbers on each line of code. Indentation is leaving a space on a line, before beginning your code.
Makes the code more readable and maintainable
Error Diagnostics
It describes the type of error and identifies errors through colour coding
Describes the error and indicates the line
Feeds back to the user when compilation is unsuccessful
What do error diagnostics do? Why are they useful? Give an example
It describes the type of error and identifies errors through colour coding
Describes the error and indicates the line
Feeds back to the user when compilation is unsuccessful
Helps with debugging code, ensures code is correct
Visual studio, Visual basic
Give two methods of translating high-level source code
Interpreting
Compiling
What is assembly language always translated using?
Assembly languages are always translated into machine code using an assembler.
Describe how a compiler translates the source code into executable code
Translates source code from high-level languages into object code and then into machine code ready to be processed by the CPU.
The whole program is translated into machine code before it is run.
Give two advantages of a compiler
Advantages of a compiler:
-No need for translation software at run-time
-Speed of execution is faster
-Code is usually optimised
-Original source code is kept secret
Give two disadvantages of a compiler
Disadvantages of a compiler:
-Source code is easier to write in a high-level language, but the program will not run with syntax errors which can make it more difficult to write the code
-Code needs to be recompiled when the code is changed
-Designed for a specific type of processor
Describe how an interpreter translates the source code into executable code
Translates source code from high-level languages into machine code ready to be processed by the CPU.
How is the program translated, using an interpreter?
The program is translated line by line as the program is running. It will stop to tell the user of any mistakes.