ANSWERS(RATED A+)
What kind of machine was the Therac-25 (i.e, what was the machine used for)? -
ANSWERX-ray and radiation machine used to treat cancer patients.
What was one error in the Therac Software that resulted in a death? - ANSWER•
Machine couldn't handle data as fast as it was being put in; characters would get
lost.
• There was an overflow caused by a 1 byte flag.
The Therac programmers engaged in several practices that either
failed to prevent errors from being included in production code or
failed to repair programming errors when incorrect program
behavior was detected. Briefly state what two of those detrimental
practices were - ANSWER• Never listened to user feedback
• Never tested the software.
• Don't ignore errors reported by users, every user complaint must be investigated.
• Why is the Therac report of great importance of programmers (i.e., what is the 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 is the first task to be completed when beginning a major software project (after
basic management and programmer teams are associated)? - ANSWERAsk the end
user what is required and what they want.
What is that PERT charts show? - ANSWERPERT charts provide a visual
representation of one aspect of a large project.
What is the purpose of the Subversion system (and similar systems), i.e., what are
they used for? - ANSWER• It is a repository that stores code that can be updated
and compared with previous versions.
• Keeps a history of all the changes in the code.
What is the effect of the Subversion command svn add myfile.c? - ANSWERIt tracks
and queue's the file to be added to the repository.
It doesn't add the changes until they are committed.
In class we mentioned several different programming methodologies, such as
declarative programming and HIPO charts. What is the only one that has been
almost-somewhat succeeded? - ANSWERSuccessive Refinement
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.
, In class we mentioned several different programming methodologies, such as
declarative programming and HIPO charts. What is the only one that has been
almost-somewhat succeeded? - ANSWERSuccessive Refinement
Here are two lines from a makefile:
Main.o: main.c helper.h
Gcc -c main.c
What actions, if any, will be taken by the makefile upon reading the above 2 lines? -
ANSWERIt will check if any of the timestamps of the dependencies (main.c or
helper.h) are later than the timestamp of the target file (Main.o).
If so, it will execute the second line and compile main.c to a.out
What is the main purpose of the Make program? - ANSWERTo create a program
from independently compiled components and to ensure that the components are
current and up to date.
What does the Subversion program do when it discovers that two programmers have
made different changes to the same line of code while that code is not in the
repository? - ANSWERIt keeps the original code before the changes and returns an
error with options on how to fix the error.
Imagine, for that instant, that you are the manager of a major project with a number
of programming groups. In one of the groups, there is an irreconcilable conflict
between the group leader and the group's "little old lady".
Which one should be replaced to maximize the benefit to the group?
And why did you choose the one you did? - ANSWER• You would fire the group
leader. Group leaders are a dime-a-dozen.
• The little old lady helps keeps everyone checks.
• The little old lady in the group cares about the attention to detail.
What commands (other than, e.g., gcc) can be executed by the Make program? -
ANSWER• Any command can be executed by the make program
• rm, cp, g++
Why, contrary to all too frequent popular opinion, are Fortran, Cobol and Prolog not
"dead languages", despite their age? - ANSWERBecause they do their job well. A
language that does something well will never die.
Functional languages? - ANSWERFunctions can be used as variables (Haskell,
scheme)
Why must you use the right tools for the application? - ANSWER• Using C for
scientific programming is BAD because it doesn't support complex numbers
• Using C for business applications is BAD because it doesn't support decimal
arithmetic.
hat is an example for why programs are NOT just a set of instructions? -
ANSWERDeclarative programs have no instructions! (Ex: excel)