List of Tables

Chapter 1. Software qualities and a problem to solve

Table 1.1. Typical interactions between code qualities: ↓ stands for “hurts” and - for “no interaction.” Inspired by Figure 20-1 in Code Complete (see the Further reading section at the end of this chapter).

Chapter 2. Reference implementation

Table 2.1. Memory requirements of Reference in two conventional scenarios

Table 2.2. Common complexity bounds in big-O notation

Table 2.3. Time complexities for Reference, with n standing for the total number of containers

Chapter 3. Need for speed: Time efficiency

Table 3.1. Time complexities of Speed1, where n is the total number of containers

Table 3.2. Time complexities of Speed2, where n is the total number of containers

Table 3.3. Worst-case time complexities of Speed3, where n is the total number of containers

Table 3.4. Amortized time complexity for Speed3, where α(·) is the inverse Ackermann function

Table 3.5. First experiment: Running times in milliseconds for a balanced use case involving 20,000 containers

Table 3.6. Second experiment: Running times in milliseconds for a use case involving 20,000 containers and a single call to getAmount

Table 3.7. The worst-case time complexity of the three versions from this chapter and Reference from chapter 2

Chapter 4. Precious memory: Space efficiency

Table 4.1. Memory requirements of Memory1

Table 4.2. Time complexities for Memory1, where n is the total number of containers. These complexities coincide with those of Reference.

Table 4.3. Memory requirements of Memory2

Table 4.4. Memory requirements of common collections, assuming that the capacity of the ArrayList and the HashSet is equal to their size. The second column is tagged “barebone” instead of “empty” because it doesn’t take into account the default initial capacity of that collection.

Table 4.5. Time complexities for Memory2, where n is the total number of containers. These complexities coincide with those of Reference.

Table 4.6. Memory requirements of Memory3

Table 4.7. Comparing the uninterrupted integer range of primitive types. The uninterrupted integer range is the set of (non-negative) integers that can be represented exactly and without gaps.

Table 4.8. Memory requirements of Memory4

Table 4.9. Time complexities of Memory4

Table 4.10. Memory requirements of all implementations from this chapter, plus Reference. Recall that Memory3 and Memory4 expose a different, object-less API.

Chapter 5. Self-conscious code: Reliability through monitoring

Table 5.1. Contracts for the methods of Container

Table 5.2. The four methods used to check the postcondition of connectTo

Table 5.3. What each method modifies and which invariants it could break

Chapter 6. Lie to me: Reliability through testing

Table 6.1. Standard characteristics for common types of inputs, aka type-based characteristics

Table 6.2. The two characteristics chosen for testing addWater

Table 6.3. Characteristics chosen for testing connectTo

Table 6.4. Number of passed tests for different implementations. Results don’t depend on having assertions enabled or disabled.

Table 6.5. Code coverage measures for various implementations. Here, “assert on/off” refers to the Java assert statement, not to JUnit assertions.

Table 6.6. Characteristics chosen for testing the method add of bounded sets

Table 6.7. Three possible characteristics for a “date” data type

Table 6.8. Characteristics for the input n of getDivisors

Table 6.9. Characteristics chosen for testing indexOf

Table 6.10. Characteristics chosen for testing interleaveLists

Chapter 7. Coding aloud: Readability

Table 7.1. Summary of structural code features affecting readability

Table 7.2. Summary of exterior code features affecting readability

Table 7.3. Summary of common Javadoc tags

Table 7.4. Summary of common Javadoc-compatible HTML tags

Chapter 8. Many cooks in the kitchen: Thread safety

Table 8.1. Common concurrency policies for a class, ordered by increasing amount of concurrency allowed. The second column describes the operations that are allowed to proceed simultaneously. The third column identifies the locks that are needed to implement that policy.

Chapter 9. Please recycle: Reusability

Table 9.1. Relationships between the methods of generic containers and the methods of the Attribute interface

Table 9.2. Functional interfaces mutable collectors use. They’re among the more than 40 functional interfaces in the java.util.function package.

Table 9.3. Comparing the signatures and types of the method StringBuilder::append and the functional interface BiConsumer. SB is short for StringBuilder.

Table 9.4. Comparing the signatures and types of the method StringBuilder::append and the functional interface BinaryOperator. SB is short for StringBuilder.

Table 9.5. Some limitations of Java generics, compared to C#, of what you can do with a type parameter T. Note that the first example requires the type constraint “ where T: new()” to be correct C#.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.119.148