![]() |
Collaborative Mind Map |
The Experiment: Collaborative Review
Being that it's one of those few times that I actually study for an exam, I thought it would be interesting to try out new approaches. What if, instead of meeting in a group and discuss possible exam problems, we do so online? Each person would do a self-review of the materials, and post 5 possible questions and answers to their blog and share them:
What are the benefits of that? Well, for one, we gain more perspectives on the materials. Instead of reviewing from our point of view alone, we get to see others' subjective point of views as well (i.e. what they think were important materials and should be on the exam.) See the mind map above for what we have merged together so far!
Here are my review questions and answers:
1. Why should you indent your code with two spaces instead of using the tab character?
A: We indent code with two spaces to ensure readability without taking up too much space.
2. Give an example of a CheckStyle error
A: Although it is difficult to differentiate between PMD and CheckStyle errors, one can generalize CheckStyle errors to those relating to the style/format of the source code. For example, CheckStyle would recognize the following as errors:
a) Use of tab characters instead of spaces for indentation
b) Not ending the first sentence in a documentation block with a period
c) Line is longer than 100 characters
3. Give an example of a PMD error
A: Although it is difficult to differentiate between PMD and CheckStyle errors, PMD errors are usually more focused on source code semantics. For example, PMD would recognize the following as errors:
a) An if() statement is always true or always false
b) A method is empty
c) An implementation type is used instead of the interface type (i.e. ArrayList instead of List)
4. Give an example of a FindBugs error
A: FindBugs checks the compiled bytecode for possible performance and correctness issues. Possible problems/errors that it reports on are:
a) Declared class data fields that are never used in the class
b) Using Math.round() to round an integer-casted floating point value
c) Using incompatible bit masks in a comparison that always yields the same result
5. Give an example when an IDE could be "bad" for you
A: An IDE can rarely be "bad" for you, but the lack of an IDE, or too much dependence on the IDE, could potentially cause you to mess up a job interview. For example, the FizzBuzz program is usually used to evaluate a potential interviewee's programming capability. The question is, can you write a fully compilable version of the code without the help of an IDE? Or will you need to go through multiple revisions to iron out syntax bugs which the IDE usually flags and correct for you?
Here are my review questions and answers:
1. Why should you indent your code with two spaces instead of using the tab character?
A: We indent code with two spaces to ensure readability without taking up too much space.
2. Give an example of a CheckStyle error
A: Although it is difficult to differentiate between PMD and CheckStyle errors, one can generalize CheckStyle errors to those relating to the style/format of the source code. For example, CheckStyle would recognize the following as errors:
a) Use of tab characters instead of spaces for indentation
b) Not ending the first sentence in a documentation block with a period
c) Line is longer than 100 characters
3. Give an example of a PMD error
A: Although it is difficult to differentiate between PMD and CheckStyle errors, PMD errors are usually more focused on source code semantics. For example, PMD would recognize the following as errors:
a) An if() statement is always true or always false
b) A method is empty
c) An implementation type is used instead of the interface type (i.e. ArrayList instead of List)
4. Give an example of a FindBugs error
A: FindBugs checks the compiled bytecode for possible performance and correctness issues. Possible problems/errors that it reports on are:
a) Declared class data fields that are never used in the class
b) Using Math.round() to round an integer-casted floating point value
c) Using incompatible bit masks in a comparison that always yields the same result
5. Give an example when an IDE could be "bad" for you
A: An IDE can rarely be "bad" for you, but the lack of an IDE, or too much dependence on the IDE, could potentially cause you to mess up a job interview. For example, the FizzBuzz program is usually used to evaluate a potential interviewee's programming capability. The question is, can you write a fully compilable version of the code without the help of an IDE? Or will you need to go through multiple revisions to iron out syntax bugs which the IDE usually flags and correct for you?
0 comments:
Post a Comment