###Chapter 14: Dependencies on Libraries Are Killing Me###
- Avoid promiscuously calling on libraries throughout your code. (ActiveRecord??)
- “Every hard-coded use of a library class is a place where you could have had a seam.”
- Is there any relevance for the language feature enforced design constraints in Ruby? Objective-C?
###Chapter 15: My Application Is All API Calls###
- Don't test if your app is all API calls?
- ActiveRecord must be one the best tested libraries in existence
- We often test validations, associations, etc.
- The above ususually have "special" options but are still straight AR calls.
- Sorting out a mess:
- “The first step is to identify the computational core of code: What is this chunk of code really doing for us?”
- There are essentially two approaches:
- Skin and Wrap the API
- Responsibility-Based Extraction
- Skin and Wrap
- Create a wrapper to be used in place of the API
- Make an interface to closely match the API
- Good when
- The API is relatively small.
- You want to completely separate out dependencies on a third-party library.
- You don’t have tests, and you can’t write them because you can’t test through the API.
- Responsibility-Based Extraction
- The API is more complicated.
- You have a tool that provides a safe extract method support or you feel confident that you can do the extractions safely by hand.
###Chapter 16: I Don’t Understand the Code Well Enough to Change It###
- Notes/Sketching
- Printing out the code
- Seperating responsibilites
- Undertand method structure
- Line up the blocks
- Extract methods
- Understand the effects of change
- Scratch refactoring
- Deleting un-used code
###Chapter 17: My Application Has No Structure###
- Telling the story
- “What is the architecture of the system?”
- Naked CRC
- “Class, Responsibility, and Collaborations”
- Conversation Scrutiny