Question: (PLS MENTION what information needed) CASE STUDY The case study involves a detailed, professional-quality code review. Students should take some time to find the source

(PLS MENTION what information needed)

CASE STUDY

The case study involves a detailed, professional-quality code review. Students should take some time to find the source code (not written by them) they wish to review. (This is a great opportunity to participate in open source development; you can review some code found on GitHub (or elsewhere), and if you find any improvements, you can submit them as pull-requests.)

Some sites you can search that host open-source projects include:

BitBucket.org (Links to an external site.)

search> projectworlds

CodePlex (Links to an external site.) (no longer active but you can still search the archive)

FreeCode (Links to an external site.)

GitHub (Links to an external site.)

Google Opensource (Links to an external site.)

Google Code (Links to an external site.) (no longer active but you can still search the archive)

Launchpad (Links to an external site.)

SourceForge (Links to an external site.)

Search: projectworld

The student is expected to review the code, noting both positive (advantages) and negative aspects, of areas such as

design,

comments (and other documentation),

code readability,

safety,

security,

performance,

test code,

logging,

metric generation, and

compliance.

Not all projects will have all of these aspects, but if (for example) logging is missing, and you feel that the code should include logging, you must make note of that in your review. Likewise, if some objects are added to a collection, make sure those classes are correctly designed, with appropriate methods. (In Java, that would be equals, hashCode, and toString, as well as correctly implementing all appropriate interfaces such as Comparable or Cloneable.) Code should be designed with best practices, for the given implementation language. For example, in most object-oriented languages, you should prefer to create immutable classes when appropriate.

Note each area has several points; for example, code readability includes the use of proper naming conventions (and no names you can't figure out, e.g. RsFadCtl or "x01"), proper use of white space, appropriately short methods, no commented-out code (that's what revision control systems such as Git are for), no sign of copy-and-paste, no magic numbers in the code (use named constants instead), and so on. Test code might include unit (regression) test suites, possibly including integration tests, implementation testing (e.g., in Java, use of assert statements), etc. Security includes appropriate testing of method arguments (pre-conditions), not trusting user data directly in an SQL statement, appropriate use of exceptions, correctly accessing files and other external resources, and so on. You should also consider the quality of the test code.

Try a Google search for Code Review Checklist or similar, for more items to examine in your review. Several code review links are included in the code review resources (Links to an external site.). projectworlds

(Of course, your textbook is a good resource as well.)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!