Implementation of Software Solutions Flashcards
What do you have to conisder when choosing the language for a program
the nature of the project
the intended environment including, hardware, operating and network use
The experience of the programmers
Event driven or sequential approach
Maintainability
What are the two types of metalanguages
EBNF and Railroad diagrams
What are the symbols for EBNF
<> for non terminal (rules to be defined elsewhere)
= (this is defined as)
[] optional
{} a repetition that is repeated zero or more times to make it one or more put a symbol infront of the loop
() for grouping
Terminal symbols are just words
| for a choice between alternatives
How to read Railroad diagrams
Read the diagram as if it was a train on a railroad track
What is meta languages
it describes the syntax of programming languages
What is Translation
It is the process of converting high-level code or source code into machine executable codes.
What are the two common methods of translation
Interpretation and Compilation
What is interpretation
It is a translation method that translates each line or statement of the source code into machine code and then immediately executes it. If errors exist then it will cause a halt to the execution once encountered.
What is a disadvatnage of interpretation
it slows down the process of execution significantly because each statement must be translated into executable code before it is executed.
Users must also have a copy of the interpreter installed on their machines for execution to take place which eequires further costs and memory overheads.
The developer has limited control over his intellectual rights because the users can easily access the code becase it is distributed to users.
What is the main advantage of Interpretation
Developers use it during the coding to allow them to execute small fragrments of code quickly and helps debug/test the system.
What is compilation
It is when the source code as its entirety is translated into executable code. They can later be executed without any need for the translater. Errors encountered during the compilation process are relayed as a series of messages to the programmer.
What is the main difference between Compiler and interpretation
A compiler does not produce any actual machine code until the entire source code is known to be correct in terms of the syntax of the source code.
What is advantages of compilers
they are used to produce executable code for the majority of commercial applications because it runs faster and more efficiently thant interpretated products.
The intellectual rights of the author are protected as the code is not available to users
it is easier to provide quality support because they know the precise workings of the application as users can’t modify the code.
What is the disadvantage of Compiler
It is harder to understand the details of the original source code, and the source code is not available to the users.
What is requried to translate source code into object code
lexical analysis
syntactical analysis
code generation
What is lexical analysis
it is the process of examining each word to ensure it is a valid part of the language. It achieves this through the use of a table of symbols or tokens. It gets the identifiers and constants to add them into a predefined table which serves as a dictionary to check if the words are correct and becomes tokenised.
What is syntactical analysis
It is the process of checking the syntax of sentences and phrases is correct in terms of the grammatical rules of the language.
what is parsing
it is the process of checking the syntax of a sentence.
What is a Dynamic Link Library (DLL)
A file containing object code subroutines that add extra functionality to a high-level language. DLLs need to be distributed with applications.
What is code generation
it is after when the processes of lexical analysis and syntactical analysis have completed without error then the machine code can be generated. It involves converting each token or series of tokens into their respective machine code instructions. Because we know that the tokens are correct and are in the correct order, no errors will be found during code generation.
What is a register
A temporary storage location within the central processing unit. The size of a register is the same as the word size of the processor.
What is machine code
it is the native language of the CPU. it is written in a string of 1s and 0s.
What is a flag in relation to a CPU
In relation to the CPU, a flag is a single bit stored within a register. Flags are used to
indicate an event has occurred within the CPU.
what is interrupt in a CPU
In relation to the CPU an interrupt is a call to an outside device. The device responds by
reading or writing to the accumulator
What are the stages in the FETCH Execute cycle
Fetch instruction from primary memory and place in the instruction register.
Set the program counter to the next instruction’s address. As instructions are stored sequentially this step merely increments the program counter by 1.
Decode the instruction. This is performed by the control unit. Involves determining the nature of the instruction.
Load operands from memory (if required) into a register. For example, an add instruction will include an operand that is a number. A store instruction will include an operand that is a memory address. Some instructions, such as increment, have no operands.
Execute the instruction and store the result. The ALU usually performs this task. Normally the result is stored in the accumulator. Some tasks require more than one result so other locations are used. For example, an add with carry will store the main result in the accumulator and set the carry flag appropriately.
Reset the fetch-execute counter back to one ready to commence the process again from step 1.
What are some debugging tools
Breakpoints
Resetting variable contents
Program traces
Single line stepping
Watch expressions
What are some Error detection/correction techniques
Stubs
Drivers
Flags
Debugging output statements
peer checking
desk checking
Structured walkthrough
use of expected output
What are Good program practices
Use of a clear modular structure: refers to the top down desing of the project.
one logical task per subroutine
Quality of solution: it refers to how superior it is in performance, design and matainability to other solutions.
Appropriate use of control and data structures
Writing for subsequent maintenance.
Version control and regular backup
Recognition of relevant social and ethical issues
What are the types of error in software solutions
Syntax
Logic
Runtime
what is a syntax error
it is an error that prevents the translator from converting high-level code into object code because of incorrect use of high-level lanugage. it can result from both the lexical analysis and the syntactical analysis.
What are logic errors
They are the result of syntactically correct code that does not complete the required task.
What are runtime errors
They are errors are errors detected by the
computer whilst a program is executing. There are many possible reasons for the system to generate a runtime error. The error, or bug, can be linked to either hardware or software problems
What is a Bug
An error or defect in software or hardware that causes a program to malfunction.
What is a crash
A serious computer failure. The computer itself stops working or an application aborts unexpectedly. Caused by hardware malfunction or a serious software bug.
what is a stub
A stub is a small subroutine used in place of a yet to be coded subroutine. The use of stubs allows higher-level subroutines to be tested. Stubs do not perform any real processing; rather they aim to simulate the processing that will occur in the final subroutine they replace
What is a driver
A driver is a subroutine written to test the operation of one or more other subroutines. Commonly, drivers set the value of any required variables, call the subroutine to be tested and output the results of the subroutine call
What are flags used for debugging
flags are used to check if certain sections of code have been executed or certain conditions have been met. A flag is used to indicate that a certain condition has been met. Usually a Flag is set to either true or false, that is, most flags are Boolean variables.
What are debugging output statements
Strategic placement of temporary output statements can help to isolate the source of errors. By placing output statements within called subroutines, the programmer can determine which subroutines have been called.
What is peer checking
Peer checking involves other team members in the task of analysing each other’s work to detect and correct errors.
What is desk checking
the process of working through an algorithm or piece of source code by hand. A table with a column for each variable is used. As the algorithm or code is worked through by hand, changes to variables are made by writing the new value under the appropriate identifier.
What are structured walk through
Structured walk throughs, as the name suggests, are more formal than peer checks. The developer or team of developers present their work to a group of interested parties. This group may include representatives from management, marketing and potential users, with the aim being to present the software and formally work through its functionality
What is the use of expected output
When initial test data items are created the expected output from these inputs should be calculated by hand. Once the subroutine has been coded, the test data is entered and the output from the subroutine is compared to the expected outputs.
What are break points
Breakpoints are used to temporarily halt the execution of the code. Once execution has stopped it is possible to examine the current value of each variable. By adding breakpoints at strategic points within the code, it is possible to locate the source of the error.
What is resetting variable contents
Altering the value of variables during the execution of code can be useful in determining the nature of an error. The ability to alter a variable’s contents can also allow the programmer to determine which values are causing errors without the need for the variable to actually attain that value as a consequence of execution.
What are program traces
Tracing, in terms of error detection, refers to tracking some aspect of the software. A program trace enables the order of execution of statements to be tracked or the changing contents of variables to be tracked. Both these types of trace involve analysing and following the flow of execution.
What is single line stepping
Single line stepping is the process of halting
execution after each statement is executed. Each statement is highlighted as it is executed.
What are watch expressions
A watch expression is an expression whose
value is updated in the watch window as
execution continues. Usually watch expressions are variable names
What is user documentation
Users are the final operators of the product. Documentation targeted at users needs to be directed at their level of knowledge and expertise.
What is an installation guide
Installation guides should provide the user with sufficient information to successfully install the software product on their machine(s). Hardware and software requirements will be included together with step-by-step instructions to guide the user through the set-up process.
What is a User manual
user manuals aim to provide concise and accurate information in regard to the operation and purpose of software. Topics in user manuals describe what tasks the software can complete, why these tasks are required and how these tasks are completed using the software. The information needs to be presented using a format that is appealing, accessible and consistent. Often much of the information traditionally contained in a user manual will be included in help files that are accessible directly from within the application.
What is a reference manual
Reference manuals are designed to be an efficient source of information. In terms of
software, a reference manual should succinctly describe each command within the application. Reference manuals are not designed to be read from start to finish, rather they will be read in random order as needs arise.
What are tutorials
Tutorials provide instruction in the use of software products using example scenarios. The user is lead step-by-step through the processes included in the product. The user performs the tasks under the direction of the tutorial. Tutorials are designed so users can experience real world use of the application before using their own data.
What is online help
It is documentatino that is provided online rather than printed manuals.
What are the types of user doccumentation
Installation guide
User manual
reference manual
Tutorials
Online help
What is Technical doccumentation
it is doccumentation designed fro an audience who are proficient and knowledgeable in regard to the subject matter. In terms of software products, technical documentation primarily describes the structure and engineering behind a product.
What are the types of technical doccumentation
Log Books (or process diaries)
Source code doccumentation
models and diagrams.
What is a log book
A log book records the systematic series of actions that have occurred during the development of a project. Log books or process diaries are often utilised during the design and development of products in many industries. Maintaining a log book is a method of chronologically recording the processes undertaken to develop a final product
What is source code doccumentation
it is the documentation of the code
What are the two types of internal/source code doccumentation
Comments and intrinsic doccumentation
What are comments
Comments provide information for future programmers. The translator ignores comments, or remark statements, within the code. Each procedure, function and logical process within the code should be preceded by a comment. They explain what section of code does rather than how it does it.
What is Intrinsic doccumentation
Intrinsic documentation is therefore
documentation that is part of the code by its very nature. In other words, the code is
self-documenting. There are two main types of intrinsic documentation: the use of meaningful identifiers and indenting of code. Identifiers should describe the purpose of the element it represents and indenting improves readibilitiy.