Saturday, October 17, 2009

Some fundamental Questions

Here are some questions I think software engineers should know. These are also important because they are part of the topics I've been studying this semester in class.

1. What are some things you can do to prepare for a question about problem in the forums?
Answer:
Research and understanding the problem beforehand can better clarify your problem to responders to your post.

2. Why must your first statement in a method or class documentation comment be written in a complete sentence?
Answer:
Documentation about your program is derived from the first sentence of your documentation comments. If it is not in a complete sentence, it may be ignored.

3. What is one of the things an Ant build.xml file must do first to ensure software congruity?
Answer:
The version of the users current package software must be check so that problems may not arise later on. It stops the process there, to alert the user to update first.

4. What character must never be written into programs?
Answer:
The hard tab is a bad character to use. Using it is a bad practice.

5. What is wrong with this statement and why?
try {
FileOutputStream outputFile=new FileOutputStream("good.txt");
OutputStreamWriter outStream= new OutputStreamWriter(outputFile);
for (int i = 0; i < accounts.size(); i++)
{
Object outputAcct = accounts.get(i);
String toWrite = ((Account)outputAcct).fieldData();
outStream.write(toWrite + "\n");
}
outStream.close();
} catch (IOException e) {
}
Answer:
-no indentation
-the catch statement implements no action should the exception be called

6. Why are the anti-pattern happy tests inadequate?
Answer:
Testing for a "happy test" does not check for errors in your methodology. This type of test, does not
account for errors that may result from bad programming.

7. If a problem comes up during the commit process in subversion
what will happen to the changes already made and why?
Answer:
There will be no commit. Any error in any of the transactions will result in a fail for all transactions.

8. The following can cause problems if it is not instantiated.
Which of these programs will find an error with this statement below during an Ant
verify run and why only this program?
PMD/FindBug/CHeckStyle
String foo;
Answer:
FindBug looks for errors such as this in the bytecode of your program.

9. Open Source Software is a recent term. when was it first used?
What group coined it?
Answer:
In 1998 the Open Source initiative created it to differentiate it from the more ambiguous term "free."

10. Give a couple of disadvantages to Open Source Software.
Answer:
-Testing is not as rigorous, and only at the pleasure of the developer; for those that are not working for monetary gain.
-The quality may suffer from bad documentation and hard to understand source code.

No comments:

Post a Comment