Speakerline
Speakers
Proposals
Events
Tags
Edit a proposal
Adam Cuppy
Ahmed Omran
Alan Ridlehoover
Amit Zur
Andrew Mason
Andrew Nesbitt
Andy Andrea
Andy Croll
Asia Hoe
Avdi Grimm
Ben Greenberg
Bhavani Ravi
Brandon Carlson
Brittany Martin
Caleb Thompson
Caren Chang
Chiu-Ki Chan
Christine Seeman
Cody Norman
Devon Estes
Eileen Uchitelle
Emily Giurleo
Emily Samp
Enrico Grillo
Espartaco Palma
Fito von Zastrow
Frances Coronel
Hilary Stohs-Krause
Jalem Raj Rohit
Jemma Issroff
Jenny Shih
Joel Chippindale
Justin Searls
Katrina Owen
Kevin Murphy
Kudakwashe Paradzayi
Kylie Stradley
Maeve Revels
Maryann Bell
Matt Bee
Mayra Lucia Navarro
Molly Struve
Nadia Odunayo
Nickolas Means
Noah Gibbs
Olivier Lacan
Ramón Huidobro
Richard Schneeman
Rizky Ariestiyansyah
Saron Yitbarek
Sean Moran-Richards
Shem Magnezi
Srushith Repakula
Stefanni Brasil
Stephanie Minn
Sweta Sanghavi
Syed Faraaz Ahmad
Tekin Suleyman
Thomas Carr
Tom Stuart
Ufuk Kayserilioglu
Valentino Stoll
Victoria Gonda
Vladimir Dementyev
Title
Tags (comma-separated, max 3)
Body
### Abstract When can you benefit from extracting a micro-library? And, how do you build and publish that code into a RubyGem? I’ll go through the process, from A to Z. ### Description How many times have you written the same bits of code, over and over, and thought, “You know, if only this was big enough to be a gem, I would pluck it out.” Often, we think of a RubyGem as a larger library of code that we “bolt on” to an app. And, these smaller code blobs become a hassle to distribute to the multiple apps that use them. A small micro-library, done the right way, at the right time, can greatly improve an app. But, when can you benefit from extracting a micro-library? And, how do you build and publish that code into a RubyGem? I’ll go through the process, from A to Z. ### Notes Core audience is a beginner/intermediate engineer who may not have a lot of experience extracting code into reusable gems. Comparing hashes has always been a common challenge; however the code, over all is simple. So, the implementation went from excessive duplication to a file in lib being copied into each project to extracting it into a public gem. The code never grew by much, but in containing it within gem, we could simplify the distribution to our apps. Extracting the gem took about 15 - 30 minutes, being that we already had the code and the tests. **Objective** Empower beginner and intermediate engineers to better understand the patterns of abstraction by extracting out redundant code into micro-libraries (less than 100 lines total). **Outline** This should be fun to do. It’s easy to get board with a code base. Mental exercises, such as this, reinvigorate the creative centers of the mind, encourage collaboration, and improve code quality. Win/win. The kata is broken into a five parts: 1. Identify an opportunity (to remove/reduce duplication); 1. Containerize (so it can exist safely in its own namespace); 1. Simplify (down to the bare essentials); 1. Integrate (into the codebase); and, 1. Publish (to the world, if you can) Micro-libraries are rarely a concern for a client and require very little overhead. These are an awesome way to contribute to the community without the pressure of maintaining some large OSS contribution: a way to get your feet wet. The library can be found: https://github.com/CodingZeal/hash_diff
Back to Speaker Directory