Session
The Unbreakable Code Whose Breaking Won WWII
== Briefly
After the last carrier pigeon but before digital encryption algorithms, there was the Enigma machine. An ingenious piece of pre-atomic age technology encoded German military secrets during World War II, baffling code-breakers with mere physical rotors, and switches, without elliptic curves or private keys.
Delve into object-oriented programming and bring the Enigma machine back to life with an emulator built in Ruby. Unravel the secrets of this nigh-unbreakable cipher device, witness OO principles unlock its mysteries, discover the power and versatility of the patterns we use as developers and how they mirror the Enigma's inner workings.
== The Details
“Object Oriented Programming’s touted strength lies in its ability to model the real world”. That’s all well and good, but finding practical examples where all the moving parts relate to objects “in the real world” can be tricky.
Enter the object that is the Enigma device. Famous because of its involvement in World War II, it was invented in the 1910s, requiring real moving parts and physical mechanisms working together in a system to produce its outcome. Looking at pictures of the actual historical devices can help gather requirements without abstraction or indirection.
It exists as a physical object that performs an operation (encryption) that would be typically handled completely digitally today therefore Enigma has a unique connection between physical and digital processes, making it easier to understand and manage.
First:
I’ll introduce the story of the device, its beginnings as a commercial product through adoption by the German military and its involvement in WWII. Finally, the team of code-breakers at Bletchley Park where the Allies eventually built a system for decrypting the messages.
Although the history section will be comparatively short, I will nevertheless highlight the role of women code-breakers whose efforts at Bletchley are so often passed over. Their involvement was instrumental in the group’s success, and the story of Enigma’s downfall would never have been written without them.
Secondly:
I’ll demonstrate how Enigma works. The machine is fairly uncomplicated, and there is no prerequisite knowledge required to be able to understand its operation and inner workings after a brief primer. Extensive illustration will provide enough visual context and support for the audience to be able to imagine how the physical mechanisms operate.
Enigma consisted of a “keyboard” whose keys, when pressed, would send a signal through the inner workings and light up a small bulb indicating the letter resulting from encryption. Between the key and the light, it sent the signal through a series of rotors, each changing the input character to another. The rotors would advance on each key press, changing the path the signal took through the device and, therefore, the output character. It’s these simple components that we’ll be replicating in code.
Third:
Recreate the machine in code! We’ll build out the components of an Enigma machine (depending on time in the session, hopefully demonstrating the test suite as well) to convey examples of OO priciples and practices such as--
* single responsibility
* encapsulation
* dependency management and coupling
* inheritance
* interfaces and duck typing
A la the bicycle in POODR (Practical Object Oriented Design in Ruby), this simple machine will allow us a framework from which to explore how objects and their messages can be composed in an extensible and maintainable way through the application of OO design philosophies.
== Intended Audience
Someone still new to the concepts behind OO Programming. They may have heard some of the terminology, or perhaps some of the axioms involved...but haven't yet assimilated the WHYs and HOWs into their understanding. As Sandi Metz says in POODR, "This books assumes that you have at least tried to write object-oriented software. It is not necessary that you feel you succeeded, just that you made the attempt.
There might be some folks who are familiar with OO principles and design concepts that could use a refresher or another approach to understanding.
Those interested in the history of computing and how past events could inform or relate to what we do today.
== Outcomes
* better understanding of OO principles
* see the concepts at work
* for those more experienced:
* a refresher on the fundamentals
* a new perspective on known concepts
* fun takeaways
* If they didn't know about Bletchley Park, they will have enough of an introduction to look into it more
* a new idea for a early-into-a-new-language project.
* a shoutout to the women of Bletchley Park that did so much of the work and get none of the credit. Also an opportunity to celebrate the queer man at the epicenter of early computing theory.
== The Pitch
The subject has a unique connection between kinesthetically understandible physical operation of the mechanism (easy to grasp) and a digital data transformation process (more abstract, but common to our work as developers)
It allows for a less contrived metaphor for demonstrating OOP that comes from a complete system whose entirety can be kept in the mind at once.
It's an interesting and compelling story, spycraft and danger. It's more exciting to explore.
I’ve been in tech for a handful of years now, but I’ve been a speaker and communicator for well over a decade. I’ve taken the stage at corporate conferences and trade shows, as well as theatres and circus rings. I try to bring a lightness and excitement to my talks to share the excitement I feel about the topics I cover.
First Public Delivery: RubyConf 2023 (San Diego, USA)
Aji Slater
Development Team Lead, thoughtbot
Chicago, Illinois, United States
Links
Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.
Jump to top