ALTERNATE UNIVERSE DEV

Iteration Podcast

New Book: Practical Object Oriented Design

A weekly podcast about development and design through the lens of amazing books, chapter-by-chapter.

Pivot a bit: Less agnostic, more useful to just lean into the technologies we use every day for a while.

We’ll do our best to keep the information generally useful to all software developers.

Moving forward this is a Web Development Podcast covering Ruby on Rails, Javascript and React.

New book:

Practical Object-Oriented Design in Ruby by Sandi Metz

Also known as POODR

About the Author:

Sandi Metz: She is one of the foremost thought leaders in clean code.

If you want some amazing programming talks just look up Sandi Metz on YouTube.

About the book:

“The Complete Guide to Writing Maintainable, Manageable, Pleasing, and Powerful Object-Oriented Applications”

About Object-Oriented Design:

Object-oriented applications are made up of objects and the messages that pass between them. Messages will turn out to be the more important of the two, but in this brief introduction (and in the first few chapters of the book) the concepts will get equal weight.

“In a world of objects, new arrangements of behavior emerge naturally. You don’t have to explicitly write code for the spouse_steps_on_cat procedure, all you need is a spouse object that takes steps and a cat object that does not like being stepped on. Put these two objects into a room together and unanticipated combinations of behavior will appear.”

“Unfortunately, something will change. It always does. The customers didn’t know what they wanted, they didn’t say what they meant…. Even applications that are perfect in every way… change is ubiquitous and omnipresent”

WHY IS CHANGE SO HARD!?

Dependencies stand in the way of change

Object Oriented Design is about Managing Dependencies

“In the absence of design, unmanaged dependencies wreak havoc because objects know too much about one another.”

“Part of the difficulty of design is that every problem has two components. You must not only write code for the feature you plan to deliver today, you must also create code that is amenable to being changed later.”

Design Principles

  • SOLID - design:
    • Single Responsibility - Do one thing well.
    • Open-Closed - You should be able to extend without modifying. Consistent interface.
    • Liskov Substitution (Swap out code underneath methods) - squares and rectangles
    • Interface Segregation - specific interfaces
    • Dependency Inversion - High-level modules should not depend upon low-level modules. Both should depend upon abstractions.
  • DRY - Don’t Repeat Yourself
  • LoD - Law of Demeter - Talk only to closely related objects- the principle of least knowledge

Design Patterns

Service Objects, Factory, Adapter, Decorator - This book doesn’t cover these.

Big Up Front Design Pitfalls

Design takes time

Next Chapter - we really get our hands dirty

Sandi Metz Links:

https://www.youtube.com/watch?v=npOGOmkxuio&t=1841s

https://www.youtube.com/watch?v=29MAL8pJImQ

https://www.youtube.com/watch?v=8bZh5LMaSmE&t=1s

Pick:

JP: https://testingjavascript.com/ 

John: SOLID Design Patterns in Javascript

https://www.youtube.com/watch?v=GtZtQ2VFweA&feature=share

- - - - -

New Book: Practical Object-Oriented Design

Episode source