Symmetric Properties
From time to time, you may find it difficult to figure out which component depends on which other one to succeed. Two bits of code may perform opposite actions, such as an encoder and a decoder. You need the encoder to test the decoder, and the decoder to test the encoder. In other cases, you may have a chain of operations that could be made reversible: editing text and undoing changes, translating text from French to English to Spanish and back to French, passing a message across multiple servers until it’s back to its original one, or having a character in a game walking in all directions until it makes its way back to its origin.
Whenever you have a reversible sequence of actions that you can assemble together, you can ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access