CSC 322.01, Class 09: Rethinking object-oriented design (1)
Overview
- Preliminaries
- Notes and news
- Upcoming work
- Extra credit
- Questions
- Object-oriented design fundamentals
- Multiple models
- Broadening our perspective
- Learning OO thought processes
Preliminaries
Notes and news
- Alumni mentors visit next Wednesday. Please try to clear lunch time, 4pm for their talk, (and 1pm and 2pm, if possible).
- We’ll have a design thinking workshop on Monday.
Upcoming work
- Weekly reports TODAY
- No current homework. Work on your projects.
Good things to do: Academic
- Megan Goering talk Tuesday
- CS Mentor talk Wednesday
Good things to do: Miscellaneous
Friday PSA
Questions
About the alumni mentors
- Bring in people who understand the ins and outs of building software for real people to serve as advisors.
- Rails in practice is different than rails in theory. They can help bridget the gap.
- This course is partially about professional development. Interacting with these folks is PD. You can also ask them for advice.
- Initiative for “Alumni in the classroom”
- Alums really do care.
- This class is about soft skills
- A team
- A non-technical client
- A (distant) leader (not on site)
- One clueless high-level supervisor (pointy haired boss)
Object-oriented design fundamentals
We teach you that OOD exists to help make better software.
- Remove dependencies between parts.
- Keep code DRY
OOD helps
- Encapsulation reduces dependencies
- Inheritance reduces code duplication
- Polymorphism reduces code duplcation
- Subtype polymorphism: Reduce duplication of procedures
- Parametric polymorphism: Reduce duplcation of data structures
Multiple models
- Different views on inheritance.
- Single inheritance vs. multiple inheritance
- Class inheritance vs Object inheritance
- Normal mechanism: Make a new object, change some property
- Different views on typing
- Static
- Duck
Broadening our perspective
- Designing software for reuse
- Planning for the future
- Using more tools than just encapsulation, inheritance, and polymorphism
- Design patterns
- Way too many principles, most of whose names I forget
Learning OO thought processes
- Bad: Contrived examples.
- Good: Real example, developed from practice.
- Happens on real projects
- Acceptable: Carefully designed examples based on realistic project
- Start with code you might have written.
- Look at ways to improve it.
- You best understand concepts when you apply them (or fail to apply them) (or encounter them)
- Even if I ask bad questions, spend time with Metz.
- Read the code
- Pay attention to the changes
- Try to understand what the changes mean.