Exercises and Discussion Topics
-
How can a metric like the maintainability index
be used profitably within the software development process,
without creating the wrong incentives for programmers?
-
Go through the project you've been working on and tighten
the access control so that all elements (classes, class members, functions)
are declared with the most conservative visibility.
-
Write a test harness to test your system's random number generator.
How ``random'' are the numbers it provides?
-
Download the
ckjm (Chidamber and Kemerer Java Metrics)
metrics tool,
and apply it to code in your environment.
Select some classes that would be flagged using the criteria we described
and explain whether there is indeed a problem with their design, and,
if there is, how you propose to improve it.