Principles of Software Construction

Principles of Software Construction

Sathish Gopalakrishnan
Buy on Leanpub

Table of Contents

Introduction to Java›

  • An Introduction to Java
    • Objectives of CPEN 221
    • Objectives for this Reading
    • What is Java?
    • Java Programs and the JVM
    • Hello World! in Java
    • Of Classes and Objects

Static Checking, Testing and Code Reviews›

  • Static Checking
    • Objectives for This Reading
    • Hailstone Sequence
    • Types
    • Static Typing
    • Static Checking, Dynamic Checking, No Checking
    • The Goal of CPEN 221
    • Why we use Java in this course
  • Testing and Code Review
    • Validation
    • Putting on Your Testing Hat
    • Test-first Programming
    • Why Software Testing is Hard
    • Choosing Test Cases by Partitioning
    • Blackbox and Whitebox Testing
    • Automated Testing and Regression Testing
    • Code Review
    • Smelly Example #1
    • Smelly Example #2
    • Smelly Example #3
    • Summary

Specifications›

  • Need for Specifications
    • Why Specifications?
    • The Role of a Specification
    • The Structure of a Specification
    • Testing and Specifications
    • Specifications for Mutating Methods
  • Exceptions
    • Exceptions for Signalling Bugs
    • Exceptions for Special Results
    • Checked and Unchecked Exceptions
    • Throwable Hierarchy
    • Exception Design Considerations
    • Abuse of Exceptions
    • Test Yourself
  • Designing Specifications
    • Deterministic vs. Underdetermined specs
    • Declarative vs. operational specs
    • Stronger vs. Weaker Specifications
    • Diagramming Specifications
    • Designing Good Specifications
    • Precondition or Postcondition?
    • About Static vs. Instance methods
    • Summary

Debugging›

  • How To Avoid Debugging
    • Objectives
    • First Defense: Make Bugs Impossible
    • Second Defense: Localize Bugs
    • Assertions
    • What to Assert
    • What Not to Assert
    • Incremental Development
    • Modularity & Encapsulation
    • Summary
    • Test Yourself
  • How to Debug
    • Instance Diagrams
    • Debug Systematically
    • Fix the Bug
    • Summary
  • Mutability and Immutability
    • Risks of Mutation
    • Specifications for mutating methods
    • Iterating over arrays and lists
    • Mutation undermines an iterator
    • Mutation and contracts
    • Useful immutable types
    • Summary

Abstract Data Types›

  • Abstract Data Types
    • What Abstraction Means
    • User-Defined Types
    • Classifying Types and Operations
    • Designing an Abstract Type
    • Representation Independence
    • Why Interfaces?
    • Testing an Abstract Data Type
    • Invariants
    • Immutability
    • How to Establish Invariants
    • Summary
  • Rep Invariants and Abstraction Functions
    • Rep Invariant and Abstraction Function
    • Checking the Rep Invariant
    • Summary
  • Interfaces
    • Interfaces
    • Example: MyString
    • Example: Set
  • Subtypes
    • Subtyping
    • Subclassing
    • Subtyping vs. Subclassing
    • Summary
    • Test Yourself
  • Equality
    • Abstraction Function and Equality
    • Three Ways to Regard Equality
    • == vs. equals()
    • Equality of Immutable Types
    • The Object Contract
    • Equality of Mutable Types
    • The Final Rule for equals and hashCode()
    • Expressing Ordering
    • Summary

Notes›

    Principles of Software Construction/overview

    Principles of Software Construction

    course_overview

    count_parts
    ·
    count_chapters
    begin_reading
    download
    part_count

    Introduction to Java1 chapters

    Begin part ›
    1. An Introduction to Java

    part_count

    Static Checking, Testing and Code Reviews2 chapters

    Begin part ›
    1. Static Checking

    2. Testing and Code Review

    part_count

    Specifications3 chapters

    Begin part ›
    1. Need for Specifications

    2. Exceptions

    3. Designing Specifications

    part_count

    Debugging3 chapters

    Begin part ›
    1. How To Avoid Debugging

    2. How to Debug

    3. Mutability and Immutability

    part_count

    Abstract Data Types5 chapters

    Begin part ›
    1. Abstract Data Types

    2. Rep Invariants and Abstraction Functions

    3. Interfaces

    4. Subtypes

    5. Equality

    part_count

    Notes0 chapters

    Begin part ›