Creative Coding

Summarized using AI

What If Shakespeare Wrote Ruby?

Adam Cuppy • April 21, 2015 • Atlanta, GA

In the talk titled "What If Shakespeare Wrote Ruby?" presented at RailsConf 2015, Adam Cuppy explores the parallels between Shakespeare's writing techniques and modern software development. He begins by discussing the lack of explicit documentation in Shakespeare's works, which raises the question of how such complexity could be conveyed without it. Cuppy introduces the concept of software writing as a form of art, similar to poetry.

Key points include:
- Audience Engagement: Cuppy emphasizes the importance of audience interaction, similar to the groundlings of Shakespearean theater, highlighting that engagement is essential to both live performance and software development.
- Language and Creativity: He asserts that good software writing involves creativity and expresses that programming languages, like Ruby, can be seen as an expressive medium, akin to poetry.
- Domain-Specific Language (DSL): Cuppy articulates the significance of using expressive conventions in software development, encouraging developers to think of their code as a medium of storytelling.
- Iambic Pentameter: He draws a parallel between the iambic pentameter used by Shakespeare and structured programming patterns. Cuppy explains how understanding these conventions can lead to more expressive and meaningful code.
- Collaboration: The speaker discusses how Shakespeare’s collaborative environment parallels modern software development teams and how this teamwork leads to greater creativity and output.
- Creating Spectacles: Cuppy concludes by urging developers to strive for excellence and to leave behind "spectacles"—memorable, impactful code that reflects artistry and creativity. He reinforces the idea that at its heart, software development is about creating poetry through code.

The main takeaway from the presentation is that software developers should embrace their craft as a form of artistry, striving to create beautiful, engaging, and expressive code, much as Shakespeare did with his plays. Cuppy encourages the audience to view their work as collaborative and meaningful, reminiscent of the expectations and excitement found in Shakespeare's theater.

What If Shakespeare Wrote Ruby?
Adam Cuppy • April 21, 2015 • Atlanta, GA

By, Adam Cuppy
Did you know that Shakespeare wrote almost no direction into his plays? No fight direction. No staging. No notes to the songs. Of the 1700 words he created, there was no official dictionary. That’s right the author of some of the greatest literary works in history, which were filled with situational complexity, fight sequences and music, include NO documentation! How did he do it?

In this talk, we're going "thee and thou." I'm going to give you a crash course in how: Shakespeare writes software.

RailsConf 2015

00:00:11.759 Down there, we're way out there, or way in here. The first thing I'm going to have to do is stand up. Come on, use those feet. All right, here's what we're going to start with. I just want you to raise your hands and yawn. Oh, okay, hang over to your left or your right.
00:00:39.280 The next thing we're going to do—very important—is get friendly with your neighbor. Um, so that we all remember from when we were in China, and that's lava. And on the outside, there's lava, so move in. There's love on the outside. Don't touch it! Get close, come on, this is good. All right, very good. Now, while you're doing that, I'll introduce who I am. My name is Zach McCubby. I am a member of a company called Zeal. We are a consultancy, and we specialize in a handful of things, but the thing I want to be known for ultimately is an amazing experience. My job here today is to do exactly that: give you an amazing experience.
00:01:19.680 And you're going to be the judges of that. I'm perfectly accepting of that. But the best way for you to show me whether or not you're actually out there and ready to engage is I want you to go very good to the other ones. Have you ever heard of a PowerPoint? Right? Okay, and it goes something like this. And one, okay, and one very good. Also known as the power cloud, you might have heard that before. So this is entirely meant to be a very interactive experience. Right now, if you remember, it's like, oh maybe you don't. None of you remember, but way back in the day—talking four, five, six hundred years ago—any of you remember? Just out of curiosity?
00:01:50.640 So uh, if you remember, way back in the day, especially at the Cedar Globe in London, the center of it was filled with the groundlings. The groundlings had very cheap seats. But here's what's cool about the cheap seats back then: they were totally interactive! It was expected that you would react and engage, right? That's the beauty of live theater. If it was anything other than that, guess what? You have what we now call DVDs. That's the beauty of this. This is meant to be engaging and interactive. Fight the urge to dive into that technology for just a moment, okay? Everything just happens. That's all I'm going to ask.
00:02:39.840 Now, again, I want to tell you a little bit about myself. This is me, this is my serious space. It's the only time you will see it. If you ever see my serious face—I’m actually joking. I'm also an actor. I've worked professionally for a good amount of years before I was in software, and even during software, I found a really awesome balance between the two. This is a two-person show I did where I played 15 out of 16 characters, ranging anywhere from a 10-year-old boy to a 10-year-old girl to the grandparents. It was very, very fun. It was called 'Mrs. Manderley.'
00:03:07.360 This is when I played Don Lockwood in 'Singing in the Rain,' where literally on the last night, the beauty of live theater rained, because it was an outdoor theater. When I say I'm singing in the rain, everybody applauded just like this. And one of my most favorite shows, I am the third one over from the left, second over from the right. I was a counter, and there are a few people in this audience that actually saw this show. This was also at an outdoor theater. I was wearing head-to-toe not only makeup but a full polyester costume, and it was in the middle of summer. I just about sweat to death. But I’ll tell you this: an amazing thing is what the energy of an audience gives me. It's truly incredible.
00:03:52.000 So this is another reminder that you feed this presentation more than anything else. I want to make that really clear: every level of your engagement is critical to live theater. It's absolutely critical. I'm going to try to show you how we can divide in the middle—a type of interaction, a perspective on software development that is very fulfilling. We get more of ourselves than we could ever did before, right? That’s the beauty of what we do. I'm going to talk about a handful of different things. Oh god, sorry for those of you who are married, but I do like to read, and I'm also 11.
00:04:41.680 So in case you’re wondering, I just went, clearly, here's my contact information. Last but not least, you can find me on both GitHub and Twitter. I'm a very approachable guy; I hope you know that. I absolutely love to engage. There’s no question you can ask me. I’ll answer just about anything, and it’s because I fundamentally believe that if I can help you in some way, shape, or form, then I’ve done my job.
00:05:50.480 And the last thing I want to convey is the purpose of this presentation. Very recently, I decided to create a very abstract but very simple model to live by, and I would encourage everybody here to do the same thing. My motto that I chose was something that I can define for myself but is also very altruistic and giving. I decided to pick this: "Amplified Greatness." Now, the reason why I'm telling you this today, for this purpose, is to illustrate one goal I have for today: you are great! You are sitting here because you have something very, very valuable to give. You are great! Whether you're junior, senior, or anything in between, you are great.
00:06:18.560 So, my responsibility here in this presentation is one simple thing: to make it a little bit better, right? Okay, now we're through that stuff. Now let's get to the fun things! Last year, anybody see that announcement? DHH, during his keynote last year, made the claim that ultimately—we're going to summarize it a bit—but he said that we are software writers.
00:06:41.440 And this was something that I think caught a lot of people off guard. Some people were like, 'We’ve always been there!' The reason why—I've got this from just the basic Google dictionary, which is totally accurate—is that, if you look through the words, it boils down to just trade skills, activities—simple activities. One plus one equals two, stuff like that. It was like it boils down to just kind of this simple stuff. You know, and I would worry, except for those of you who aren't familiar with English, so this is kind of a convention that’s used in English, which is totally jacked up. But, you know, it's similar to that: we're meant to just put thoughts together.
00:08:01.120 And I think that the reason that there was such an emotional reaction to it was because it felt like it just lacked purpose and meaning. Right? I mean, I want to do something that really matters, you know? I came up with this realization: language is powerful—very, very powerful. It has a lot of meaning in our lives. The words I use, and how I use them for you, and you to other people, have a lot of influence.
00:08:38.560 So the notion of being just a software writer was just like, you know, that’s not wrong. The reality is that we’re talking about something that is very brilliant. I mean, think about it for a second: we’re talking about Ruby, right? And what is a Ruby? A Ruby is brilliant! So there’s something about that that really has value. It speaks to a lot of us, even if we’re like, 'Yeah, yeah, right.' I think that’s very real. So coming back to the software writers, I wanted to focus here on the writers, and really, I was like, 'You know what? I just wanted to be sexy.' I mean, that’s all I want in my life.
00:09:38.720 I just want this to be sexy. So looking back at 'writer,' I noticed that if you expand, there’s a synonym. I was like, 'Okay, well, what does that mean?' And I looked in here, and I was like, 'Ah, public.' That seems simple. Then I noticed this little gem down at the bottom: 'special powers of imagination and expression.' I want special powers! That’s what we’re talking about. So I’m playing—a poet—that's it! Right? I have special powers of imagination.
00:10:26.080 Now, the natural question is, 'So how can I be powerless?' Right? I mean, how could I be this thing? And so it’s like, okay, let’s start from the beginning and ask ourselves a really core fundamental question: who exemplifies the things I want to be? Right? And I was like, 'Well, there are a lot of models out there.' There are many times that we’re going to meet, especially here in this conference, some celebrities in our trade or craft that really kind of represent who we want to be. That’s a beautiful and wonderful thing.
00:11:04.799 I realized that as an actor, who spent a good amount of time actually having a degree in it—I don't have a degree in computer science! Yeah, I have a theater degree, and I did a lot of studying of this guy. For those of you who don’t know, this is William Shakespeare. And, for those of you who don't know, he wrote a lot of this! Now, to put it in perspective, that's a picture of this book, which is approximately 3,500 pages of, I don't know exactly what the paper is called, but I call it Bible paper, because it's some of the thinnest stuff in the world. You can see through like five pages.
00:11:48.560 But this sucker is filled with art. But more importantly, it's filled with expression. I was like, 'Yeah, I want that!' This is the rap cast that I'm building, ran on Shakespeare's tags, and it’s plotted this text. Now we try to put meaning and purpose on it. This is what's beautiful; this is where the Ruby—the software engineering of mine—comes in. This guy Shakespeare created over 1,700 different word forms. He wrote code. That's what he wrote! He created a whole new language to speak about the beauty of the world around him, and the relationships and the things around us. How beautiful and vibrant and brilliant is that?
00:12:15.760 So the question becomes, well, okay, you know, let’s take a look here. There’s nothing—is that the command? Okay. Right? So it’s like, okay, let’s take a look here: what did Shakespeare do? Ultimately, it boiled down—there were many, many things, and I would love to talk about it. I realized there’s a lot more that got a lot of merit, because of the expressional side of the event, you know? Let’s just start with a couple of things.
00:12:40.880 First, we’re going to start with domain-specific language. Right? Now I know what a few of you are thinking: 'Not another DSL! Please, don’t do that to me!' I mean, nobody actually wants that. But it’s a really important concept. I read it—I read Mark Fowler’s book on domain-specific languages to try and understand a little bit better what the values and fundamentals of that mean and how we can apply it. So I was like, okay, if this is really true...no, not more! I don’t want any more of that. I was like, okay, okay!
00:13:11.679 Then let’s call it something different, right? Ultimately, what I came up with was this: expressive conventions. It’s like, yeah, I mean, really, that’s what we’re talking about, right? If you think about our specs, for example, we’re like 'describe this' to 'do this'; it does 'this.' Expect to be done, right? I mean, we’re expressing intent. We’re expressing in a convention, and ultimately what we’re trying to do is boil it down to something consumable, digestible, and understandable. And that’s really what it is. It’s a convention that establishes an expectation.
00:13:57.119 Ultimately, that’s what it is. We’re going to use the English language as syntax. Think of Ruby and all the programming languages out there: you can’t just write them however you want to. Just like, 'It’s okay!' I mean, there are syntax errors that get thrown up! You can’t do that. So there are domain-specific languages, and there are patterns that exist throughout all the things we do. And so we are going to redefine this a little bit. If we look at the dictionary definition of 'expressive,' and you know I’m a theater guy, I like this, it says it effectively conveys thought or feeling.
00:14:35.680 Now we’ve been somewhere, right? Effectively conveying through feeling. Does that really work? But I was like, okay, now we’re getting somewhere. This is good: when we’re talking about the poetry of what we do, the art of the craftsmanship of what we do, ultimately, what we're doing is taking something of ourselves—something so valuable, something that means something—and infusing it into the work we do. It’s my belief that when there’s a separation between the two—when you’re stifled, and you’re no longer allowed to do such a beautiful thing—that’s when you begin to hate it. I think that's when we start to—there are other factors, it’s like, ah, I don’t like that anymore! That’s horrible! I can’t be myself!
00:15:28.000 I feel this desire for craftsmanship and a drive to deliver something, but I just can’t seem to find enough! Right? Would you agree? Absolutely! Totally! I mean, I would say that if you didn’t believe in your craft, unless you're just visiting your company and say you're going to go to RailsConf and love it or hate it? I don’t really care; I don’t think you would be here. Am I right? Yeah, absolutely! I’m always right.
00:16:13.120 So, ultimately, it comes down to this: something that is meaningful, that is demonstrated, that is suggestive, and is revealing. There’s an argument here that we can really start to confuse this into the things we do, and I fundamentally believe that. Now, let’s get back to some conventions that are used. Let’s talk about conventions—things that illustrate this sort of stuff: you know, that’s something we can all point to. Right? Down means away! I mean, it’s simple; it’s an expressive convention. Right? Expressing down means away! I mean, it's basic stuff you see in your life!
00:16:50.240 And if it's really that simple, I mean, you can teach a dog to do it, right? Isn’t it true? Isn’t it true? Here’s the beauty of it: once you establish a pattern, then you have the ability to expound upon that pattern with very little transition. So think about it in terms of software development. Raise your hand if you've ever come onto an existing project where it would be legacy code to you! I mean, look around the room. I don’t think anyone’s not raising their hand! Right? So we’ve all had this sort of experience where we have to infuse ourselves into our work for a moment.
00:17:42.080 You see how awesome that is? Um, I’ve been working on this for this time, and so we have this opportunity to really kind of infuse that into ourselves. But we run into this issue where we have to discover—we have to go through an onboarding phase, right? Or an inception? And ultimately what it tends to be is that it tends to be learn our conventions—or lack of them! Right? That tends to happen. It kind of feels like this happened a little bit. Right? Ultimately, I always feel like this when I experience this.
00:18:40.640 I mean, right? Isn’t the convention totally clear? You’re like, 'Yeah, totally!' Right means big flush. That means p-flush. You have to learn these things! Right? It’s not like totally clear. But it’s! Let’s talk about restrictions. The strictures might be you know, we can convert that into something like a design pattern. Let’s say that’s a loose way to think about it. How many of you read pretty regularly? Maybe even considered Apple readers? Right? Now here’s something that’s very common that a lot of people I’ve heard from avid readers find is that they learn to love an author.
00:19:26.560 I think it’s a contributing factor to different things. One of them is they like the stories they tell, but they like the storytelling maybe even more so than the story itself. The storytelling, that aspect of it—the conveyance of the idea, the way in which that’s done, the mechanisms that are used—that's really the patterns we’re talking about. I think if you can infuse that same sort of conveyance into our software, think about it like that: if I have somebody else, I’m going to have a— I love training brand new people on a project! Love it! And the reason is that I love to find the ways in which they’re going to interpret the patterns and conventions that are being used.
00:20:11.040 I think that's just so cool! So, so, so cool! And this is one of the things that’s very common for a lot of poets, especially those from 500 years ago. But it is very much used inside of Shakespeare's text, and it's called iambic pentameter. An iamb is a block; pentameter represents five in sequence, in a meter, right? It’s a writing scheme. Basically, if you were to break it down to something like this...
00:20:51.680 Right? There’s an emphasis on the second syllable is what happens—or at least the second word. Ready? So you’re all very intelligent people. We’re going to do this together! Okay, ready? Three, one, two, three! So when you break it down into an actual line, it looks like this. Now here’s what’s important. The reason why iambic pentameter exists is for kind of two purposes—well, many purposes, but I’m going to point out two.
00:21:14.880 One of them is that it’s very much in alignment with the English language. So say a sentence and put the emphasis on the second word. It’s like, 'When I do count the clock that tells the time.' It’s very much in alignment with that, whereas other languages follow a very different meter. Right? The reason why this gets used a lot in poetry is because there’s a degree of relatability that’s kind of baked into the text and into the language.
00:21:56.200 That’s kind of a value, right? Again, this is the meter! This is the power of the convention you’re utilizing! Does that make sense? Right? Yes? Yes? Okay. Now, here’s the great thing. Remember I was talking about it is that once you establish a pattern, you have the ability to send messages through that pattern. When you violate or alter the pattern, here's an example. This is from 'Hamlet,' one of the most famous speeches out there: 'To be or not to be.' Pause. 'That is the question!'
00:22:27.440 Here’s the message that’s actually getting centered, and this is why there are a lot of scholars really studying Shakespeare, because there are hidden messages that are baked into here that help inform the performers and the directors what the meaning and intention was. Let me explain what that is: it puts emphasis on 'be not' and 'be.' There’s a pause in there, the emphasis on that, right? It’s a reference back to 'to be,' which is to live or not to live, that is the question. Then on a diminished state—the diminished is actually an 11-beat. If you break it down over the course of the entire three amounts to be, that’s the question of whether it’s never alone in the mindset of slings and arrows.
00:23:27.400 If you break it down all the way into that entire speech, you'll find that the diminished tone at the very end is meant to leave the actor and the audience with a sense that he is uncertain. That's the purpose of it. If you read through the text, there’s an immense amount of crazy usage, where he’ll pull the tenth off and it’ll just leave it on the knife! Right? It gives a sense of expediency! Right? So there are patterns, this is convention; that's all that’s done here, right? Into the language, these are the messages that we can send. Not just—We're not just talking about messages between objects, no, no—we’re talking about messages between people! Humans! Right?
00:24:09.840 And what that means and how that sets up, and if we break this down and look at the various conventions that are used, we can see this already done in France. So here’s a very simple example, right? I mean, we’ve got that, right? What’s the expectation? Vocal becomes 'belongs to.' Right? It’s not exactly the ribbon; it's a collection!
00:24:35.840 This isn’t just basic convention. So when you dive into the framework and you’re building with this application, I mean, you’ve got conventions that are baked into it that are established for you, and all you do is follow them. Right? By following, it helps inform you: 'Oh yeah, I don’t have to look through the source to know how to implement this all the time!' It’s okay! I can kind of forget, and that’s sort of alright.
00:25:05.040 And it continues this way across! Uh, there are some arguments against this, but I believe this is—you know, the app-specific code sits in the app, and there’s non-specific that sits in the lib. We can kind of see it elsewhere, right? This sort of convention of where this DSL that Daryl is providing, I mean this is all convention; it's all layered, it’s very exciting! Alright, or we look at this example, right? I mean again, just for convention, right? This is all like to communicate that there’s intent, right? What happens in the first example of user create?
00:25:41.680 What does it return? And nothing! Right? It just returns false! Right? Whereas the second one down the list turns, well, it raises an exception, right? Okay, alright, so it’s time for that, people! Okay, guys, stand up! Alright, alright! Here’s what I want to do! Alright, I’m going to need four volunteers: one, two, three, four. Alright, the four of you, come up!
00:26:21.280 Now here’s the beautiful thing, if you didn’t know this: thank you, e4! Uh, if you didn’t know this, in Shakespeare’s time, for the most part, all roles were performed by men—even women’s roles! So we’re going to embrace this fully and say that all roles can be performed by men or women. Yay! Alright! So if you haven’t picked this up, we’re going to do some acting!
00:26:42.640 Excellent! These are my options, ladies and gentlemen. Gentlemen, all come to the front. Now as my science performers—oh! And by the way, I’m going to tell you another cool thing that’s what this is about. Issues! Another cool thing is that you know there were printing presses, and stuff would just use wildly across the board. So oftentimes what would happen is that they would hand out what are called foul papers. A foul paper is literally a handwritten document with just one side of it, right? Imagine scribble, scribble, scribble, scribble! That’s not necessarily what these are because I have old sides on here for your benefit.
00:27:30.560 But at Shakespeare’s time, they would only receive one copy. Now because of that—yes! Oh! Podium, okay! So of course, what would happen is, part of the challenge—to title all this maker—was that you would end up with a situation where they just had papers everywhere! Right? They were trying to compile them down later to create the actual completed works! Right? So if you didn’t know this, over time, there were different versions that had been created, and as a result, when certain pages were missing, sometimes whoever was compiling that would make it up; as a result, a lot of times, they would find the papers and insert them again back into the text!
00:28:08.320 So this is for you, fine sir! You will be Gregory. This is for you, fine sir! You will be Samson. This is for you, soon-to-be sir! You will be Abraham; and this is for you, soon-to-be sir! You will be Benvolio. Okay, alright! So here’s what I want you to do. I want you to just say your lines, okay? You’re just going to say your lines, but give it attention. So here’s how this works. This is what they did in Shakespeare’s time. I did a lot of research on this. Anytime you were going to fight, you would do this!
00:28:57.280 Anytime you made any stoic speech, so anything more than two lines, you were required to do this. You know, you’re doing that right now! You’re still expecting to get longer too! Okay? And then anytime you were really pissed, you started to twirl, right? That’s right! Okay, very good! Simple enough, right? You’re now actors! Okay, one more time! Talk to the very back of the room—right? You have to project! Talk to the very background! It doesn't mean yell, it means projecting!
00:30:04.640 Okay, everybody has to hear you! Okay, now you’re the groundling, so I want you to react. Can you react? Yes? Absolutely! We are reacting like groundlings, so you want to react to the words that you hear, yes? Yes? Very good! Okay, beginning, 'Tis well! How are not fish if thou had? Thou had spent poor John, draw my tools!
00:30:56.720 But! My! All yeah! All right! Ow! Turn like back and run! Fear me not! No, Mary! I fear thee! Let us take the law of our sides! Let them begin! I will frown as I pass by! Which means [This is an extra improv line]. Do you bite your thumb at us, sir? No sir! I do not bite my thumb! I bite my thumb, sir, but I do not bite my fist at you, sir! If you do, I am for you! I serve as good a man as you! Go well, sir! Say better, here comes one of my masters! Kinsmen, yes!
00:31:58.560 Gregory! Remember that squashing blow? Hart! Fools! Put up your words! You know not what you do! Oh! And then there's a temple, uh, which is this one. Come on!
00:32:44.080 Oh my god! Ahem, okay, so that was fun! Alright! So here’s what the lesson is: a couple of different things. Number one, pantomimes are hard to put on! Um, but here’s the great thing: we’re ultimately talking about a couple of things. One of them is that there are, of course, patterns and communities that are used, and a couple of things that I want to point out in the text that are really kind of valuable and important.
00:33:04.920 Number one: there’s a lot of descriptive language! Right? There’s a lot of anticipatory language that exists: things that set the scene, let’s say! Right? Explain the background! Understand the landscape! None of that’s like necessarily happening in the background, and I think the correlation I can draw into is how you define and explain a public spacing method within the method. How do you explain that underlying sort of code—that's what's happening under the hood—because what's happening under the hood is that level of expression—the why of why this is done.
00:33:51.680 The public interface is giving us that kind of dialogue to occur, but we still have to describe the beginnings of that. Oftentimes, I’ll see a text where there’s a lot that's embedded in that public method itself, which makes it almost as confusing. You’re like, 'I don’t fully understand what my options are here. I don't understand how—I want to understand how to use it, I want to send these messages properly, but I can’t understand enough!' Right? So ultimately, we’re trying to do that.
00:34:22.320 The other big messages in here is a discussion that’s happening a lot um, has happened for many years, and there actually is somebody in the room that speaks a lot on this topic, and that is the messaging that happens back and forth between objects. So if we look at this and we’re going to break this down, let’s just make a very simple DSL—again, you know, I don’t want this to be highly criticized, you may have an opinion on it, and that’s perfectly fine!
00:34:51.200 But I just want to give you an example of what I mean: something like this. Right? So as an example, here’s what happens oftentimes is that you have your object that’s in play, and you allow that object to take control of the reaction of another object, right? And this kind of becomes problematic because there’s a coupling that inevitably occurs at that point. And ultimately, that’s what we’re speaking to—just slightly—is that what we can learn from the form of a play is that the way in which observations and reactions occur are very important to remember.
00:35:27.920 So in this very simple example, we're specifying that when this event occurs, there’s a reaction that Samson doesn’t control, but he’s positive, right? That’s kind of an important distinction. I think that’s something that we can sort of point out. Now, as we start to build in this kind of pattern, you’ll notice some of this is happening—especially things like—it’s the RSpec DSL, right? And you’re starting to see again, you know, don’t highly criticize the example, but I’m just trying to illustrate a point.
00:36:08.640 There’s something along this line where you’re starting to think how to call and relay the expectations—the messaging now we’re starting to observe other things, and as a result of those observations, you're starting to tie these objects together, right? In a way where the objects are not controlling the reactions of one another, but there's an interface for them to illustrate that, right? And so I think this is something that you can really understand a little bit more.
00:36:50.240 So now the next point that I want to kind of point out, um, and another big key lesson here is harmony. Right? So this, when we think, if this was an application—there are 800 thousand words, right? Another line—it’s like a million lines of code! There’s a lot more words! Right? When you think about it like this, it’s a very daunting thing! Right? We look at this and we're like: when we enter a codebase that’s huge, and you know, the entire repository is many, many bags. Like, we go into the situation and we’re like, 'Oh, I can’t understand!'
00:37:29.680 And I think the important message is that if we break it down to very small interactions and understand the reasons of those interactions, then it’s much easier for us to understand the harmony that emerges out of that examiner, right? So here’s what I'm going to want to do. We're going to do our best to do this. We need to be very sensitive with the cables! So this is a landing from forgiveness, not permission! Okay? So what we’re going to do is I’m going to take a little stack of grouping of these chairs, and I’m going to clear an area right here.
00:38:20.560 Be very cautious under the cables! Just clear an area of the chairs in the middle section right here. Very good! Very good! Very good! Okay! Don’t worry, that looks not good! Okay, I’ll just clear that out of the way! Okay, very good! So the rest of you, you’re going to need to stand on your chairs and do it safely! If you can, if you can totally understand, we’ll just scooch around the outside! Okay, so I need 20 volunteers: 1 through 20. Just come into a group right here! You're not going to do any acting, don't worry! One, two, three, four, five, six! Seven, eight, nine, ten, eleven, twelve, thirteen, fourteen!
00:39:01.440 Uh, something like that! And I want you to form a circle, a big circle! Alright! Very good! Everybody, pay very close attention! I have a ball! Okay! All I’m going to do is I’m going to hand somebody the ball. Now, the rules of the game—not slice game, but activity, are such that you can’t hold on to the ball. Okay? You can’t pass the ball back to the person that passed it to you! And you can’t—you have to pass it more than one, right? So I can’t do this!
00:39:50.560 Does that make sense? Simple, simple premise! Right? And I’m going to add this ball, and that’s it! It’s that simple! Just pass it around! You can't hold on to it! You have to immediately pass it on! You can’t pass it back and you can’t pass it next to you! Yes? Yes? Okay, ready? Is that simple? Go ahead—keep going! Here’s another one…and another one!
00:40:51.760 Okay, now hold on, hold on! It's a little complicated, doesn’t it? Okay, I want three volunteers. Everybody else, you’ve got to scooter out to the side. I want three volunteers for my triangle, distant from each other—just, uh, there we go! Okay! And we’re going to start with the big one, go ahead and I’ll hold that one! And I want you to do the same exercise! Go ahead, minus the next few parts. So go ahead!
00:41:52.080 Okay! Now you before remember yourselves and go step aside—come on! Four! Okay! Another group of three! How many? You might have two…three…seven…ten! Very good! And go ahead! Very good, okay! Now, remember you three, now step aside! What’s the other one I’m missing? There’s a very good golf ball! Okay! Do not throw that!
00:42:24.000 Okay! I’ll have 20 people, but that was only okay? Very good! About three—how would you roll across the ground to each other? That’s it! That’s simple! And remember the three of you! Okay! Go ahead! Step aside! Are there any other…any other balls? Who has not passed the ball around? You? One? Two? Three? And four, behind the stage!
00:43:24.400 Okay, alright! So the last four! Here’s this ball! There you go! And go ahead! Alright! So pull it up! Okay? Very good! Now go off to your areas, and remember which ball was tossed to you? Okay?
00:44:02.560 Now here’s what I want you to do: we’re going to try this, and all I want you to do, okay, is we’re going to start with this ball here, and I want you to do the exact same exercise. Pass it only to the people that were in your group! Does everybody remember who was in your group?
00:44:45.520 Here we go! Okay! Do you remember the color of the ball? Of course, okay! There we go! So here’s a way to do this, okay? Only focus on the ball that you are going to be passed or would get passed, right? Wait! Or would be passed to you. Do not focus on the other balls! Okay? Make sense?
00:45:23.680 Okay, we’re going to see if we can do this! You can do this slowly, and I saw some of you do this. You don’t have to double-check! Just take it and pass it—take it back! Okay, let’s see if we can do this! If you have a golf ball, roll it, if not…find a pattern! Okay, so you’re ready? And on the count of three, go!
00:46:09.520 If your pattern collides, find another pattern. All you need to focus on is the ball that you are responsible for—that’s it! Don’t focus on the other balls!
00:46:47.920 Here’s the message! And the message is that there are messages, right? That if you’re out there building your applications, where you have a scenario where you’re not understanding the simplicity, that layers together ultimately creates the target, then you run into this real big collision of state! Right? I think that’s ultimately what gets discussed a lot!
00:47:23.680 So if you think about like what are the very simple lines of communication that are occurring, build your objects in your software so that they're focused on very simple lines of communication, and then the harmony will emerge. Here’s the thing that happens, and it happens every time this exercise is done: the balls start taking one another! So what do you do? What is that a representation of? Callbacks? It’s a representation then of the rails!
00:48:03.760 So what happens is you have to adjust, right? You’re going to have a collision, and so what do you do? This is the modification, iteration that your applications go through, and that’s okay! But focus on the simple lines of communication! Simple lines of communication, and your software will be beautiful! It can grow to millions and millions of lines of code in harmony.
00:48:42.160 Alright, very good! Okay, if you’re in the middle, sit on the floor! Okay, there are a couple of things, and that is this: I believe fundamentally that we all have a great opportunity as artisans, as craftsmen, craftspeople, excuse me, that we can create spectacles! What does that mean? Well, I don’t entirely know! But I do know—I do know it when I see it! So think about that! Like, as a poet of software, as a poet of the code, this being your article, this being the pen and paper—think about how you want to leave the spectacle behind!
00:49:14.560 Maybe your spectacle you want to leave is an error handling; maybe it’s in the actual public interface, or the performance aspect, or security! But create a spectacle! Create something that’s just awe-inspiring! Right? And I think that’s something that’s really up to you to decide.
00:49:56.000 Now of course, in every good talk about movies, you have to talk about the band! Right! And uh, this comes from Max, and it often—people focus on the machines. They think by doing this, the machine will run more effectively. But in fact, we need to focus on humans! On how humans care about doing programming. We are the masters. They are the slaves! How will Shakespeare write Ruby? I don’t know exactly; but what I do know is this: He would create poetry!
00:50:22.400 Create poetry! That’s what we’re here for! That’s what this language was created for, and that’s what these were are known for: his poetry! Create something! Be the poet! And of course, like any good analogy, that’s become an emotional tone! We end with a legit cage!
00:51:08.160 So this is ultimately what you can be left with: write great code! Be the craftsman! Be the poet! Love your art! Everything that I showed you today is going to be on Speaker Deck! Um, again as a reminder, I’m online! That’s who I am: I am Adam Cuppy, working from Zeal! Um, the last thing that I want to show you is something I’m very proud of. A part of our consultancy is that we only work on projects that are available. So we only work four out of five days, like a lot of companies do. And on the fifth day, everybody is left to be totally self-organized! They can create anything they want.
00:51:38.240 And what emerged was something that really warms my heart, and it’s this! It’s very simple, but it means a lot. That is, they created this very, very basic app that sends stellar high fives to other people in their current...I mean, how simple is that? But what it means is—it’s poetry! This is the art form! This is why I think we do what we do! And so that’s what it's all about! Um, this is Zeal, uh, this is who we are. This is the experience we've provided.
00:52:27.600 And I hope if nothing else I amplify greatness today! Thank you guys very much!
Explore all talks recorded at RailsConf 2015
+122