0% found this document useful (0 votes)
23 views

Readings - Software Construction - Electrical Engineering and Computer Science - MIT OpenCourseWare

The document outlines readings for a course on software construction. It lists 9 readings covering topics like static checking, testing, version control, specifications, avoiding debugging, and mutability. For each reading, it provides a brief description of the topics covered.

Uploaded by

Karan Kumar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views

Readings - Software Construction - Electrical Engineering and Computer Science - MIT OpenCourseWare

The document outlines readings for a course on software construction. It lists 9 readings covering topics like static checking, testing, version control, specifications, avoiding debugging, and mutability. For each reading, it provides a brief description of the topics covered.

Uploaded by

Karan Kumar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

9/12/23, 8:41 PM Readings | Software Construction | Electrical Engineering and Computer Science | MIT OpenCourseWare

menu

6.005 | Spring 2016 | Undergraduate

Software Construction

Menu More Info

Readings

Example code for some readings can be found on the 6.005 Github page.

READING TOPICS

Types
Static Checking vs Dynamic Checking
Arrays and Collections
Iterating
1: Static Checking
Methods
Mutating Variables vs Reassigning Variables
Documenting Assumptions

Snapshot Diagrams
Java Collections
2: Basic Java
Java API Documentation

Validation
Test-first Programming
Choosing Test Cases by Partitioning
Blackbox and Whitebox Testing
3: Testing Documenting Testing Strategies
Coverage
Unit Testing and Stubs
Automated Testing and Regression Testing

Don’t Repeat Yourself


Comments Where Needed
Fail Fast
Avoid Magic Numbers
One Purpose for Each Variable
4: Code Review
Use Good Names
Use Whitespace to Help the Reader
Don’t Use Global Variables
Methods Should Return Results, Not Print Them

Inventing Version Control


5: Version Control Git: Copy, Commit, Pull, Push, Merge

Why Specifications?
Behavioral Equivalence
Specification Structure
Null References
Feedback

What a Specification May Talk About


Testing and Specifications
Specifications for Mutating Methods
6: Specifications
Exceptions for Signaling Bugs
Exceptions for Special Results
Checked and Unchecked Exceptions
Throwable Hierarchy
Exception Design Considerations
Abuse of Exceptions

https://ocw.mit.edu/courses/6-005-software-construction-spring-2016/pages/readings/ 1/4
9/12/23, 8:41 PM Readings | Software Construction | Electrical Engineering and Computer Science | MIT OpenCourseWare

READING TOPICS

Deterministic vs Undertermined Specs


Declarative vs Operational Specs
Stronger vs Weaker Specs
Diagramming Specifications
7: Designing Specifications Designing Good Specifications
Precondition or Postcondition?
About Access Control
About Static vs Instance Methods

First Defense: Making Bugs Impossible


Second Defense: Localizing Bugs
Assertions
What to Assert
8: Avoiding Debugging
What Not to Assert
Incremental Development
Modularity and Encapsulation

Mutability
Risks of Mutation
Aliasing is What Makes Mutation Risky
Specifications for Mutating Methods
9: Mutability and Immutability Iterating Over Arrays and Lists
Mutation Undermines an Iterator
Mutation and Contracts
Useful Implementation Types

Choosing the Right Decomposition For a Problem


Structure of Recursive Implementations
Helper Methods
Choosing the Right Recursive Subproblem
10: Recursion Recursive Problem vs Recursive Data
Reentrant Code
When to Use Recursion Rather Than Iteration
Common Mistakes in Recursive Implementations

Reproduce the Bug


Understand the Location and Cause of the Bug
11: Debugging
Fix the Bug

What Abstraction Means


Classifying Types and Operations
Designing Abstract Type
12: Abstract Data Types Representation Independence
Realizing ADT Concepts in Java
Testing and Abstract Data Type

Invariants
Rep Invariant and Abstraction Function
13: Abstraction Functions and Rep Invariants Documenting the AF, RI, and Safety from Rep Exposure
ADT Invariants Replace Preconditions

Interfaces
Subtypes
Example: MyString
Example: Set
14: Interfaces
Generic Interfaces
Why Interfaces?
Realizing ADT Concepts in Java, Part II

Three Ways to Regard Equality


== vs. equals()
Equality of Immutable Types
15: Equality The Object Contract
Equality of Mutable Types
The Final Rule for Equals() and hashCode()

https://ocw.mit.edu/courses/6-005-software-construction-spring-2016/pages/readings/ 2/4
9/12/23, 8:41 PM Readings | Software Construction | Electrical Engineering and Computer Science | MIT OpenCourseWare

READING TOPICS

Recursive Functions
Immutable Lists
Recursive Datatype Definitions
Functions Over Recursive Datatypes
Tuning the Rep

16: Recursive Data Types Null vs Empty


Declared Type vs Actual Type
Example: Boolean Formulas
Writing a Program with ADTs
Recipes for Programming with ADTs
Example: Matrix Multiplication

Grammars
17: Regular Expressions and Grammars Regular Expressions

Parser Generators
An Antlr Grammar
Generating the Parser

18: Parser Generators Calling the Parser


Traversing the Parse Tree
Constructing an Abstract Syntax Tree
Handling Errors

Two Models for Concurrent Programming


Processes, Threads, Time-Slicing
Example: Shared Memory
Interleaving

19: Concurrency Race Condition


Tweaking the Code Won’t Help
Reordering
Example: Message Passing
Concurrency is Hard to Test and Debug

What Threadsafe Means


Strategy 1: Confinement
Strategy 2: Immutability
20: Thread Saftey
Strategy 3: Using Threadsafe Data Types
How to Make A Safety Argument

Client/Server Design Pattern


Network Sockets
I/O
Blocking
21: Sockets and Networking
Using Network Sockets
Wire Protocols
Testing Client/Server Code

Two Models for Concurrency


Message Passing with Threads

22: Queues and Message-Passing Implementing Message Passing with Queues


Stopping
Thread Safety Arguments with Message Passing

Synchronization
Deadlock
Developing a ThreadSafe Abstract Data Type
Locking
Monitor Pattern
Thread Safety Argument with Synchronization
23: Locks and Synchronization
Atomic Operations
Designing a Data Type for Concurrency
Deadlock Rears its Ugly Head
Goals of Concurrent Program Design
Concurrency in Practice

https://ocw.mit.edu/courses/6-005-software-construction-spring-2016/pages/readings/ 3/4
9/12/23, 8:41 PM Readings | Software Construction | Electrical Engineering and Computer Science | MIT OpenCourseWare

READING TOPICS

View Tree
How the View Tree is Used
Input Handling
24: Graphical User Interfaces
Separating Frontend from Backend
Background Processing in Graphical User Interfaces

Abstracting Out Control Flow


Map
Functions as Values
Filter

25: Map, Filter, Reduce Reduce


Benefits of Abstracting Out Control
First-class Functions in Java
Map/Filter/Reduce in Java
Higher-order Functions in Java

Representing Code as Data


26: Little Languages Building Languages to Solve Problems
Music Language

Git Workflow
Viewing Commit History
27: Team Version Control Graph of Commits
Using Version Control as a Team

Over 2,500 courses & materials


Freely sharing knowledge with learners and educators around the world. Learn more

Accessibility

Creative Commons License Proud member of:


Terms and Conditions

© 2001–2023 Massachusetts Institute of Technology

https://ocw.mit.edu/courses/6-005-software-construction-spring-2016/pages/readings/ 4/4

You might also like