More vibrant Go in 3 moves

January 25, 2014 Abhijit Hiremagalur

Move 1: Describe interactions with roles

Go’s interfaces are satisfied implicitly, making it incredibly easy to create role interfaces.

Describing new roles as we implement a method lets us postpone deciding how we’ll meet its needs. Conveniently, our method is specific about what we know and open to what we might learn.

Move 2: Extend existing code with adapters

The humble adapter finds new utility in existing code without modifying it. Leaving existing code unmodified also avoids rippling changes through its existing consumers.

Adapters turn out to be especially powerful at the boundaries of our applications. They can shift the shape of an open source library and shield the internals of an application from changes to these libraries.

Last Move: Keep creation and interaction apart

When interaction is independent of creation, an implementor can be replaced with another without affecting the interaction.

This lets us change the behavior of our system more easily, has immediate benefits in test isolation, and also leaves room to discover uses our younger selves might not have imagined.

In combination, these 3 simple moves let us reconnect existing dots to draw new pictures. Each picture apt for its time.

About the Author

Biography

More Content by Abhijit Hiremagalur
Previous
Telco 2020 Vision: The 4 Characteristics of Underlying Technologies (Part 1)
Telco 2020 Vision: The 4 Characteristics of Underlying Technologies (Part 1)

In part one of a two-part series, Pivotal CTO for Telecommunications, Paul Davey, speaks directly to CEOs, ...

Next
Volatility for Product Managers
Volatility for Product Managers

Historically, if a client asks when a certain set of stories will be completed, we point to the Tracker bac...