& ANSWERS(RATED A+)
Why is it important to talk to the end users when compiling specifications for a new
system? - ANSWERThe end users know what they want and what the end result
should look like; prevents confusion and project completion delays.
What were the TWO errors in the Therac code that resulted in a death? -
ANSWERa) The machine couldn't handle all the data as fast as it came in
b) An error resulting from a 1 byte flag
Why is the Therac report of great importance to programmers (i.e., what is the most
important single fact demonstrated by the report that should be of major importance
to the approach that should be taken when software is developed?) - ANSWERBad
software kills people.
What were the TWO detrimental practices carried out by the Therac developers. -
ANSWERa) They did not listen to end user feedback at all
b) They did not properly test the software/there was zero proper documentation
What is one advantage of using recursion for iteration rather than more familiar
language features such as for and while loops? - ANSWERNo need for index
variables
What is ONE use of the make program other than constructing executables of
programs? - ANSWEREnsures the target is up-to-date to current times
True or false? Code written many years ago should never be used in new software. -
ANSWERFalse
What is the effect of the Subversion command "svn import myfiles" -
ANSWERCopies the files into the repository under Subversion control
What is the "cdr" function of Scheme used for? - ANSWERIt retrieves every element
in the list except the first element
What is the primary block of storage managed by Subversion (i.e. what unit of
storage do you get when you check out something from a Subversion repository)? -
ANSWERA working directory
Write a Scheme function that will evaluate to 1 if its parameter is an even integer,
and -1 otherwise. Assume that the parameter passed to the function is a legal
integer. - ANSWER(define is_equal (lambda (x)
(if (even? x) 1 -1
, Why should floating point numbers be tested for equality by using expressions with
Abs and epsilon rather than using if(A == B)? - ANSWERThis is because floating
point numbers are approximations, two floating point numbers could represent the
same real. "Abs" functions and epsilon can give an accurate answer
What is the primary purpose of X-Servers? - ANSWERThey provide/reorder the
graphics
In the context of makefile programming, what is a "phony target"? - ANSWERTWO
DEFINITIONS:
1) It is not really the name of a file, but the name of a RECIPE to be executed
2) A target that cannot be constructed
What does the make program do here?
main.o: main.c helper.h
gcc main.c - ANSWERChecks if both files main.c and helper.h have been modified
recently, if so it compiles main.c
What is the single, most important difference between Subversion and Git? -
ANSWERSubversion has one CENTRAL repository, while Git is distributed
For what purpose was the Algol language invented? - ANSWERTo communicate
algorithms
What commands (other than compiler commands like javac or gcc) can be executed
by the Make program? - ANSWERANY other command line command
What is the difference between Imperative and Declarative programming languages?
- ANSWERImperative: Specify HOW you want to get something
Declarative: Specify WHAT it is that you want, not how to get it
How might Backus-Naur form be used in a business programming environment in a
way other than for definition of the syntax of a programming language? -
ANSWEREnsuring the correct input and output is used for things such as correct
enters inputs for fields
In what country was Therac-25 manufactured? - ANSWERCanada
Recall that reentrant code does not modify itself. Give one example of what this
make possible that would not be possible otherwise. - ANSWERIt allows multiple
users to access the same code at the same time.
Why is the C/C++ programming language a poor choice for programming scientific
applications ? - ANSWERIt does not support complex number arithmetic
Present an example of a situation in which "agile programming" is a good choice of
methodology. - ANSWERFirefighting