 My name is Adam Cuppey. I gave a talk yesterday, and so now I'm gonna abuse your time again today. This talk is about what if Shakespeare wrote Ruby? And if you want to, you can tweet at me at this address right here, Adam Cuppey on the Twitters, or you can do that on Instagram or whatever, wherever you'd like. Hit me up, I'd love to hear how your experience went. So, first and foremost, I wanna relay a couple of important things to you, and that is my objective here, and I had some help with the Chinese translation. So, if any of these are wrong, blame me not at all. Blame Mark entirely. Okay, in fact, I have no idea what that says. He could say something, he could say anything, and I'd be like, yeah, I'm like, I'm American. And I'm like, yeah, totally. I have no idea, yes. But my objective is very simple today. My objective is to bring joy to you. Okay, that's what this talk ultimately is about, is about joy. When I made the decision long ago to become an engineer, well, I'll actually take a big step backwards. When I started, I actually started as a professional actor. I actually have a degree in acting. I didn't take a single class and never have in any form of computer science or computer engineering or anything along those lines. So, all the talks about education and so forth, totally resonate for me because I actually have a degree in theater, and more specifically, I actually studied and worked professionally at a Shakespeare festival. So, I'm a very qualifiable party when it comes to this. But here's the thing that I learned, and I learned fast, and that's this, that everything we do in life is meant to create an experience for someone or something else. And so today, I'm gonna create an experience that brings you joy. Fair enough? Very good. See, the thing is, is that we've got people in our life that we care very deeply about, and there's friends and so forth that we care about, and some of them are our Ruby friends that we have. Some of them are random people that we meet in Times Square and I have no idea what their names were. And then there's people that we meet here today, right? And these are our Ruby friends. These are the people that relate to us, the ones that I'm gonna bring joy to today in my life. And then there's very important and very special people in our lives. And if you notice at the back of the room, the lady in this photo is my wife right there, who came with me. Yep, she's a sucker. Okay. And then there's this. I am that guy, if you didn't realize it. I actually, this is a production that I did at a children's theater, and that's my wife right there, Julia. We met doing theater. It wasn't this show specifically, but that's what we met doing. But anyway, as a professional actor, I had the great opportunity of playing the cowardly lion in the Wizard of Oz. Now to give a little bit of background, that is a head to toe polyester body suit with full makeup. It was done outdoors in the middle of the summer. It was on average 95 degrees outside. Sorry, I don't know what that translates to centigrade, but it's probably really high up there. Okay, very, very high. In fact, I would sweat so heavily that I literally would soak through the costume, entirely just sweat, and they could wring the costume out, and it would drip. In fact, it was got so sweaty that the next night it would still be wet. So quite disgusting. Now again, there's a lot of things that bring joy to our life, right? The people around us and the relationships that we have. So I just want to hear from all of you, who has people in your life that bring joy? Say I, I, how about sunshine? Does that bring you joy? How about Taiwan? Monkeys, dogs, dolphins, these bring us joy, right? How about ice cream, wine, beer, coffee or tea? Computers, it brings us joy. How about ruby? Can I hear it for ruby? Absolutely, and sushi? Who doesn't love sushi or music or lollipops or cake? Who doesn't love cake? And who doesn't like smiley poo? Everybody loves smiley poo. How about movies, yes? How about documentation? No, nobody likes documentation. Nobody, because documentation is hell. Documentation is a liar just like you. See, documentation sucks for a multitude of reasons. The first is it's rarely up to date. There's a little or no incentive to write it and there's never enough. In fact, for me, here's a graph that diagrams my love and hate of documentation. On the bottom you'll see this is the time spent writing docs and on the right it's how much I want to punch someone. So as you see, as the more time I spend writing docs, you know, I'm happy in the beginning, I kind of get a little sad and by the end, I'm pretty much ready to rage quit, flip a desk and punch you in the face. But interestingly enough, as it continues along, I actually find that the more time I spend it, the more fulfilling it happens to be and I end up becoming pretty happy about this thing. Well, I don't actually end up happy, I just became okay with it. See, here's the thing is when we look at the code in front of us, see, the chunk there is the implementation and that's the what, right? We spend a lot of our time doing that part, what it's to be doing, right? And we come up with naming conventions and so forth about that and then there's this chunk up there that generally is where the documentation go and this is the how, right? How am I supposed to be doing this? Well, the thing is is that the what takes a lot of time and the how takes a lot of time but we're generally okay with doing a lot of the what yet the how is a total pain in the ass, right? We absolutely hate doing the how. That's because documentation sucks, it's a hard thing to do. Now, changing topics just a little bit, let's talk about this and that is that language is powerful. It's incredibly powerful. We know this because and I know this intimately because I'm from America. I come over here into your beautiful country. I'm speaking one language, you're speaking in another for most of you and we kind of find a common bond in the middle. Language is incredibly powerful. Well, so is documentation. Documentation is really powerful but documentation is a pain, right? It's a total pain. We absolutely hate it. Now, in the middle there's this thing called poetry, right? Poetry. Now, what is that? It's an interesting hybrid of the two. If you think about it, right? Poetry is the expression of a feeling or emotion through language, right? This is poetry. So in a way, it's like poetry is documented language in its own way. It's expressing, it's very declarative by nature. Well, I don't know if you remember this but a few years ago there was a man by DHH, David Hannah Meyer Hansen, who does not know who this is, it's okay? Crazy there. Well, in 2014 at RailsConf he said that we should be considered software writers and a lot of people wanted to burn their computer and throw things at them as a result of that for whatever reasons. And I thought about this a little bit and thought, why would that be so concerning and care? Why would so many people care about that? Well, let's look at this. We're gonna look at this very systematically and so I went online and I looked up what is the definition of writer? And I was like, ah, yes. A person who has written a particular text. Yes, very clear. That is exactly what we do. Absolutely. But there's nothing sexy about that, right? I mean, there's nothing enjoyable about writing. I mean, there's much more elegant words and we look down here and we see synonyms, right? And we're like, ah, yes, author, ah, wordsmith. Yes, wordsmith. Now we're getting somewhere, pen-minovalist. And then I noticed this little word right there, poet. I thought, well, heck yeah, I like poet. I looked up the definition of poet and it says somebody with magical powers. And I was like, heck yeah, I want magical powers. I'm now a software poet. This is amazing. I finally determined what it is that I love, right? So it wasn't a matter of not being a software writer. It was the wrong word choice, right? Language is powerful. Well, as I went through and kind of dove down this rabbit hole a little bit further, I wanted to look at some great poets. Let's define this a little bit. And I found this guy, Mr. William Shakespeare. Now William Shakespeare was one of the greatest poets of our time. In fact, if you do a little bit of research in it, you'll see that this book here is the complete works of Shakespeare. Now I didn't get a chance to bring that because I would have to check another bag and it would go over the limited price because it cost me $75 to bring it to you today. But this book, when you look at it, that's cute. See, this is like a rake task I ran. None of that's real. I actually typed all that out. It was a pain in the ass. Please appreciate this graphic. I'm spending a lot of time on it. Anyway, you'll notice that of Shakespeare's language, there is 800,000 words, 800,000 words. Now, of those 800,000 words, take a guess, and I want you to guess how many new word forms do you think he created in 800,000 words? And what I mean by that is how many new phrases or words did he just create out of the air that had never been used beforehand? How many do you think, the number? 1,000, how many? 200, none, 1,700. Okay, now, of 800,000 words, Shakespeare, the poet, created 1,700 new word forms, things that had never been used to reference something else before, right? It's not that he just created words out of thin air but he used poetry, right? He expressed these. Now, here's what's interesting about it. Of all of that, take a guess as to how much documentation exists. None. I was like, wait a second. So basically what he did was he created an application of 800,000 lines, right? And he didn't document any of it. So one of the greatest poets in history, especially English history, created complex fight sequences. He has musical interludes and 17 undefined words and he wrote no documentation. Now, that's not entirely true. There's a little bit of documentation but you'll find that of the documentation he wrote, it's incredibly sparse and more often than not, that documentation is poetry in and of itself. He's not saying somebody uses their right arm or they go down to the left side of the stage, does none of that, right? So how did this happen? What can we learn from Shakespeare and what if Shakespeare wrote code? Well, let's start with this. If I could, somebody raised their hand. Somebody raised their hand. Okay, somebody, yeah, okay, there. Keep your hand raised. Somebody else raise your hand. Okay, well, hold on one second. Raise your, okay, two. I need two other, three and one, four. Okay, and four. Four of you, come on up here, if you could. Come on up, come on up. All four of you, come on up. I would now like you to give a round of applause for the Taiwan RailsConf players. Come on, a round of applause. These are our players. Today they will be performing a scene from Romeo and Juliet. But luckily, this guy had a translation of Chinese produced. So you are now going to play the role of Samson. You are going to play the role of Gregory. You are going to play the role of Abraham and you will play the role of Tybalt and I will somehow intermix the role of Benvolio in English. Anyway, so one more round of applause for our players. Now a couple of things for you today. Although all of the individuals in front of us are gentlemen, I want to bring to your attention that at the time of the Elizabethan era of Shakespeare, all of the roles were done by men, even the women, right? So for today, there are no women in this scene that we are reading. It is not Romeo and Juliet as in Romeo and Juliet, but it is of a few different people. But here's the important thing, players, that you must recognize. First and foremost is, you must speak with great, great authority, right? You can look ridiculous and it's totally okay. Okay, so you want to speak with great authority. You are not going to be judged on this because we are a supportive audience, yes? Absolutely. So you can do no wrong, trust me on this one. Okay, but you must speak with great authority, okay? And at the point in which there is a moment where you are supposed to thrust or advance to somebody else, you can do that, that's just fine. Okay, ready? One more hand for our players. You can do this, you can do this, you can do this, you can do this. Ready? So what do you want? Please rise, so you are being recorded, running fast. The dog of the house can raise me, and we will go back to the house no matter the man or woman in the house. That means you are a weak talent. I hope they stay in the house. That's right, so women are weak, it's best to go back to the house. So we must go back to the man in the house, and I will go back to the house next time. But hatred and hatred will only be with the owner and the man. It's all the same, I want to be a soldier. If I fight with the man, it will be very cruel to fight with the woman. It's important to fight with the woman, it's the word of the woman. It's important to fight with the woman. Yes, it's important to fight with the woman. It's my duty to take care of you. How do they take care of you? How do they feel? I stop, they feel that I eat a lot of meat. Let the law stand by our side, they do it first. But I will take care of them when they want to eat meat. See if they dare. I want to bite my mother-in-law. If they endure, it's over. You are biting my mother-in-law. Sir, I bite my mother-in-law. You bite your mother-in-law. But I do bite my mother-in-law. Sir, do you want to quarrel? Let's quarrel. No, no, sir. Do you want to quarrel with me? Do you want to quarrel with me? I don't want to quarrel with you. You don't have much to quarrel with me. My father-in-law is here. You are very strong, sir. You are lying. It's a good man. Take off your sword. Gregory, remember to use your hands. Put up your swords. Put up your swords. You know not what you do. Put up your swords. Put up your swords. Put up my swords. Or manage to part these men with me. Put up your swords. I hate this word. I hate hell. I hate all the stupid family. Yes, and scene. I don't understand most of it. But having a really good time, let's start with this. What if Shakespeare wrote Ruby? Well, first and foremost, we talk about this, which is expressive convention. In other words, patterns with meaning to them. The first one we'll talk about is this. It's called Iambic pentameter. It's also known as a metered verse. So here's what it sounds or looks like. Now, bear in mind that this is the traditional English language is phrased in a way that Iambic pentameter works with it. And the way Iambic pentameter works is that it's broken into five IAMs, or five IAMs, which is a beat, a beat combination. So ba-boom, ba-boom, ba-boom, ba-boom. And there's five of those for a total of 10 syllables. So this is very much like the English language. So do it with me. It would be like ba-boom, ba-boom, ba-boom, ba-boom, ba-boom. Do it with me. Ba-boom, ba-boom, ba-boom, ba-boom, ba-boom. Now, when you take it and you put it against the text, it would look and emphasize something like this. When I do count the clock that tells the time, this is the metered verse. This is the pattern that's actually built into the language itself, right? Well, this is from Hamlet. You may have read or seen this before. To be or not to be, that is the question. But here's what's interesting. We'll do the same thing. To be or not to be, that is the question. But what you'll notice is a couple of important things. First is that right here, it's inverted. It's flipped, see? To be or not to be, that is the question, right? And you'll also notice at the end here, that there's actually an 11th beat. To be or not to be, that is the question. Here's what's interesting about it. Here's why it matters. Is in terms of iamic pentameter, when Shakespeare wrote the text and he used this structure, the dun, the dun, the dun, the dun, the dun, when he broke the structure, violated it, changed it, it left a clue. The clue is what informed the actor, the informed the actor, the audience, and the director and everybody involved, that there's something interesting right now that you should pay attention to. Now, in context of Hamlet, here's what's going on, is this is the point which Hamlet is very unsure of himself. As a result of that, this is to tell the actor that this is not a phrase that he ends with, yes, absolutely, totally believe in that, but in fact, he does not believe in it, right? This is a time of real concern or concern in his own life. So to be or not to be, that is the question, right? I don't know what to do about this. I don't know how to understand it. I don't know how to process this. That's what's being said inside the text. There's no documentation that says, oh, by the way, Hamlet is really struggling right now. It's actually written into the text itself. The next thing we'll talk about briefly is metaphor or abstraction, right? And we see this a lot in our code. Now, the translation, okay, at one point was my naked weapon, right? And obviously this has a connotation in innuendo, and that's by design. Again, we're talking about the metaphor, right? What is the metaphor? Well, it's my unsheathed sword. Now, the importance of this inside of the language is to say a couple of things, and that is that number one, you can interpret this in many ways, but the essence of it stays the same. Does that make sense, right? When we write our code, the same rules can apply. Oftentimes we'll apply an abstraction layer, a layer on top that expresses what we're about to do with this code, yet the implementation detail, what's baked into the method itself or contained within private methods, expresses that in a more imperative manner, right? But the interface, the public interface sitting atop that is effectively an abstraction or a metaphor, right? How that gets interpreted is left up to design. Or of course, like we just talked about, to be or not to be, in other words, to live or to die, right? Very similarly, we can see that there's a subtraction layer that lives atop the poetry that expresses the essence or intent of what it is to be, yet at the same time, you can be interpreted in many different ways. Last we'll talk about is this, harmony, which is also layered composition. Now, oftentimes when we start building applications, the application starts pretty small, right? Really simple, the interactions are easy, the notes on the page, we'll say, are very simple. And surely that starts to get a little bit more complicated as the application grows and we start to add more and more features, but for the most part it becomes manageable. And then all hell breaks loose, right? And it becomes a total chaotic mess that we have to then deal with and figure out, well, here's what's important to remember is that this never goes away, that never goes away. And that is actually all perspective, right? Let's try this again. Nobody's gonna have to act here, but I would like to get, let's do 10 volunteers. You won't have to act, trust me on this one, so 10 people. One, two, I'm gonna need eight more, eight more. Three, go ahead, come on. Four, I'm gonna start to select people if you don't put your hands up, I'm just saying. Four, I need six more, six more. Five, six, you're five, you're five, yes, you. Okay, five, okay, a few more, go ahead, raise your hand, raise your hand. Go ahead, one, what are we up to now? Five, six, yes, you drink water very quick, slowly, maybe he'll forget. No, I have not forgotten, okay. How many over two, six, let's do four more. Two, we'll do it again. Three, yep, you, no, you, no, don't you turn around. Yep, yep, yep, and sitting next to him. Four, yes, yep, yep, yep, yep, yep, yep, yep, yep. This smiley, come now, come now, you, yep. Yes, yes, yes, come, come, come, okay. So we're at, that works. So here's what I want you to do. And everybody, if you want to, for this, you can actually move a little bit because I'm gonna put them in a circle. So you can go ahead and stand up or move if you can't see. So go ahead and form a circle right here. Just a, even circle, for these, actually, no, I'm just getting, okay, spread out just a little bit, just a little bit. Okay, the name of the game is simple. All you have to do is keep the ball in the air. That's it, right? Once you receive the ball, you have to toss it to somebody else. If somebody tosses it, you just take it and toss it to somebody else, okay? You cannot toss it to the person next to you, right? So I can't toss it to you and I can't toss it to you but I could toss it to you, right? Makes sense? And you cannot toss it back to the same person so you can't toss it back. So in other words, if I throw it to you, you have to throw it to somebody else, throw it to somebody else, so on and so forth, right? Okay, all right, so it's simple, simple name of the game, right? Okay, here you go. And there's another one. Keep going, come on. Hey, there, you lose the balls here. Okay, you lose the balls, okay. Okay, and pause, okay, and stop. All right, very good. All right, so here's what I want you to do. We lost the ball over here. All right, whoops. Okay, so there's 10 of you. So can I have three, three of you? One, two, and three, okay? So just the three of you. So let me give all the balls, okay? Yes. Oh, these are my balls? Yes, all right, so these are the three of you, ready? Okay, here's, all I want you to do is this. I want you to toss it to her, and I want you to toss it to him. Yes, and I want you to toss it back. That's all I want you to do, okay? Go. All right, perfect. Gotta give him a round of applause. And stop. Okay, one, two, and three, same thing. And the three of you, go ahead. And stop, good, very good, a round of applause. One, two, and did I miss anybody? Is everybody, oh, one, right? Anybody else am I missing? Okay, so I want you to toss with him as well, and to toss with her as well, okay? But here's the thing is, keep in mind, you can roll it, right? You don't all have to toss it, right? You don't have to toss it in the air, makes sense? Okay, so go ahead, go ahead. Yes, you're all very skillful, she's very good, those are very good. Okay, all right, very good, and again. Oh, geez, okay. So all I want you to do is do it all at the same time. All you have to focus on is the person that you're gonna receive the ball from and who you're gonna toss it to, that's it, right? Keep in mind, just focus on that, don't focus on anything else but that, except for the two of you, that'll focus on two people, okay? That's it, work together, but only focus on the simple, simple thing, ready? And go. So when you keep the lines of communication very simple inside of an application, it starts to work in harmony very, very quickly, right? Sometimes you'll have bugs, all right, very good, okay, and good, and a round of applause. Yeah, yeah, we're good, all right, you can go sit down. Okay, and there's that one, there's that one, all right, and that one, okay, and we'll go, and long, and oh, yes, and good, and okay. And then we've got those two, all this, all this, oh, baseball, no, let's skip that. And that one, there we go, okay, so. The thing to keep in mind is that even though the application, all of our applications can get really complicated, the end of the day, it's important to remember that this is actually the same as that. The only difference is that they're harmonizing, right? We've layered things together and created complexity as a result of that, or perceived complexity, right? But the complexity is just the perception of things that are actually really simple. We've heard this many times before if you've read practical object-oriented design, right? By Sandy Metz, remember the name of the book is? Totally forgot. She talks a lot about this, right? Because this matters. When our applications get really large, oftentimes it just blows up because we don't keep the communication between entities really, really simple, right? So it's really important to do that, okay? And we can learn that from here. When we look at the scene, just the simple scene from Shakespeare, from Romeo and Juliet, you can see the same thing, the same pattern going on. Even when there are six people on the stage, or five people on the stage, in reality, it's only one person talking to somebody else, right? It's just the combination of that, plus that, plus that, plus that, that creates the scene, okay? And this is just cute, okay? Now you might feel a little bit like this and that's totally understandable, right? Because at the end of the day, it's kind of like, well, what is all this supposed to mean and why and how and all that sort of stuff? And I totally understand that, right? But it's really essential to remember that the simple things are, in fact, the obvious, right? And that ultimately, if you ask yourself, well, what if Shakespeare wrote Ruby, right? What would it look like? What would a poet do? They would do a handful of things, right? They would harmonize, right? They would work through metaphor and abstraction, right? And they would keep the conversation very simple and very direct, right? Ultimately, it's to establish the intention, like what's the intention being laid here? Now, visiting back to this, which is, remember that language is very powerful. And, yes, talk a lot about language that relates to things inside the code and poetry and what happens in our life and all that sort of stuff, but language across the board is incredibly a powerful tool. It can motivate and it can demotivate as well, right? And so setting aside this entire thing and going to the soft skill, right? The team dynamic, the same rules apply. If we take the poetry that's baked in there and have very simple relationships and very simple dynamics, then that could create complexity and that complexity is very engaging and fun. This is from Matt's himself. 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 and how humans care about doing programming. We are the masters and they are the slaves. So, my final question to you before we call this a finito and fin, is did I bring joy to your day? Great. Then I've done what I was meant here to do and thank you very, very much. Now you can find all of this on Speaker Deck. It probably won't do you a lot of good, but I've done the talk before. It'll be on call freaks so you can see it there if you missed anything. That's totally good. Before I go, is there any questions at all? It's okay, I'm not gonna call you after. You're like, I'm not raising my hand. All right, very good, cool. My name's Adam Cuppey. You'll find me online. I hope to talk to all of you before we go. Thank you again. Thank you.