 One, the built-in backwards was really fine. And the second one is those of you who, if this is your first RubyConf, not once in a RubyConf, turn to somebody who's been here before and ask them, why do I need Photoshop? So, I think if you didn't have to follow Zed Shaw on six hours to notice, this would go for no reason. So, so here we go. Mike tells me last night, yeah, so he crashed the speakers dinner and then roomed with the conference organizer and then he gets a cancellation at 10.30 at night, there's a downside to being his roommate. So, in more words than my friend Charlie Sheen, I'm fine. This is, it's not a rehash, it's a complete retelling of the talk that I gave at Azure Roots last year. And let's start with who am I? And you don't need to turn this over here because they say you're not supposed to pace because it's like nervous energy, but screw that, I'm gonna pace if you guys have a problem with it. Sorry. So, I'm David Grady, G-Grady on Twitter, ratgeyser at gmail.com. I'm currently conducting an in-depth experiment in pair programming remotely, so if you're interested in doing that with me, please send me an email, I'd love to hang out with you online and figure out how to do pair programming with you remotely. I have been an amateur student of messing with my brain for years, this is from my Twitter feed over a year ago. Absolutely true, absolutely true, there's nothing left, there's no native code left in my brain. You really can monkey-patch your brain. If you do it this long, you end up with a different brain. And in my particular case, I do the world in very much in parallel. A lot of people tend to be very deaf first, I'm very parallel first. If you give my team two modules, A and B, and they communicate with each other, I drive my team, it's crazy. They wanna open up box one, they just take it and figure out what does it do, what does it do, now open up box B, what does it do, what does it do. Okay, now how do they talk to each other? I'm not that way. I totally come at this and say, no, no, no, no, tell me how they interact, tell me what the interests are, tell me how they cooperate with each other, then only then do I care about what's actually inside the boxes, and again, this makes me the hard person on the team to deal with. So, this is my rehearsal for the talk, so if it sucks, this is it, all right, so. So, when I gave this talk in Agile Roots, I told people, I'm gonna hack your brain. I'm gonna, you're gonna walk out of this beat, it was anyway, who's that at Agile Roots? Got a few hands, got a few hands going out. Okay, so about the hacking your brain part, and I hope nobody actually peed on their shoes, but I just wanna say, I'm sorry, for those of you, but that does not mean I'm not gonna do it again. So, let's just actually dive right into monkey-patching your brain. So, the first thing I need to say is that I am eminently unqualified to speak about monkey-patching your brain. I don't have a degree in neuroscience, I do not, I don't have a degree in anything, actually. But, here's some people who do. Again, I like tying ideas together, and here's some people, Daniel Coyle wrote the talent code, absolutely brilliant book for drilling yourself on developing specifically better skills, not just practice makes perfect, but perfect practice makes perfect, that kind of thing. Outlier than about the black ball, it establishes this concept of the 10,000-hour expert that you really put in, five years of something full-time, 2,000 hours a year, you can become an expert on it. The most important book for monkey-patching your brain, I think it's probably Brain Rules by John Medina. He's got like two or three degrees, and I can't remember what they are, he is at least a doctor, he's got a couple of degrees at the Neuroscience. Because I'm going to be stealing ideas from these guys, and then patching them together in weird ways. And because we're going to talk about medical programming in your own brain, I absolutely need you guys to participate. So, sit forward, engage with this, and just remember, life is like a sewer. What you put into it, depends on what you get out of it. The vice versa. What you get out of it is all what you put into it. And this talk is the same way. So, I want to talk about three things for monkey-patching your brain. First thing I'm going to talk about is optimization. This is the hardware. When we talk about the neuroscience, the actual neurons in your body, the axons, the physical, chemical, neural system, there's not actually much of an API that we can get ahold of to monkey-patching. There's not too many access points, but there are some. And you can, in fact, work harder, not smarter, at the neurochemical level, the neurophysical level. And I'm actually doing one of them. I'm not actually pacing because I'm nervous. I'm pacing because I want to piss off the people that have to wear the cameras. I'm pacing because if you start moving your quadriceps, this starts forcing oxygen exchange in your body. And this is the same blood splice as your brain. Now, we all know that IQ is BX, right? There's this thing called executive function, which is, well, IQ is BX, but what can we measure? And psychiatrists have spent 20, 30 years trying to figure out well, what can we measure? Reaction time, the ability to inhibit emotions, the ability to rationally think things through, the ability to draw UML diagrams, basically everything that we can actually categorize, like if IQ was not bullshit, it would be called executive function, okay? And oxygenating your blood with a little bit of cardiovascular exercise in one of the best ways to raise executive function. 10, 15% just by walking. So this is a pathway to elevate your executive function, okay? But the next time, you used to first take away from the top for hacking your brain. The next time you've got to spend three hours in front of a whiteboard with your team, drawing UML diagrams and trying to remember the error when the circle will close down, right? That kind of stuff. Don't do it. The first thing you should do is grab your crew walkers and go for a walk or get some other exercise with them. I prefer walking because you can talk about the problem. Spend 15 minutes walking and talking about the problem that you're gonna be putting on the whiteboard. You will be astonished. I promise you, you will be astonished at how much of that whiteboard session you accomplished while you're walking. For two reasons. The first is that you can't draw anything. So you have to reduce your ideas down to something simple enough to be communicated verbally while you're heaving and panting, right? And the second reason is because you just decreased your executive function by 15 to 20%. I know I said 10, 15, I'm not explaining this. It's a sandwich. But increasing your executive function as you do this. Okay? The second thing that you can do in metaprogramming your brain is, okay, put your chub in there. It is unit testing. How do you unit test your brain? Okay? If you've been hacking your brain as long as I have and you've lost any concept of who you are, unit tests are the only thing that can save you. I no longer have a statically compiled brain. Okay? My brain is not strongly typed. But unit tests can save you. What are unit tests in the brain? Any ideas? Any thinkers? Math problems? Maybe. Maybe. Find me the hackfest. I will throw it in the same category as scriptures, if you're religious. We can throw this to that. But for live, moment to moment unit testing, habits. Habits are absolutely wonderful because we're now looking up out of the neurochemical region of the body. We're no longer talking about biology and medicine. Now we're talking about psychiatry. Not psychology, psychiatry. We're actually talking about neurochemistry affecting the way things work. Habits are really, really interesting things. They're fast. They execute unconsciously. You don't have to think about them. They're very, very efficient. Habits also have a very bad problem. They're fast. They're efficient. You can't think about them because they're unconscious, right? So habits are kind of tricky little things. If there's one piece of advice for you to take away, it's that you should go take a walk. But if the second, if you're gonna take two pieces of advice, I'm gonna push my luck here. If you're gonna take two pieces of advice from my talk, the second one should be, figure out when you should be using a habit and when you should be thinking about things. One of the first XP books talks about the principle of don't ask me, ask the system. If it's astonishing how much people will argue about something when they could just spend, they'll spend half an hour arguing about how the system should work, when they could spend 30 seconds writing a test to see how the system can work. Your habits work exactly the same way, okay? How long does it take for you to form a habit? 30 days, 40 days? It can depend on the person? That's the smartest answer I've heard. The answer is it depends, okay? What's the habit? Uh-oh, it's a thing you wear with a nun, but wear with a nun, right? I can do one of those in 15 minutes for somebody's bright time. And if a nun is, can't run fast. Um. But if you've got, depending on a habit. Okay, let's classify a habit as something you will do unconsciously at a specific point in time, without you thinking about it. If that is the definition that you will permit me, then you can set a habit in 30 seconds. Then we're gonna hack your brain in this talk. By the end of this talk, there will be a debug break point that I have put in your brain that will fire at a point of my choosing. Now the really cool thing about this is that depending on your attitude, this is either crazy and awesome, or just crazy. And for some people, it's just indistinguishable from brain damage. And I'm really excited to find out who's who. So the cool thing about habits, of course, is that you can do them even while you're napping. So the F-18 coming, absolutely be appropriate. I want to clarify that habits are not routines. This is the thing that hangs us up all the time, is that we get caught up on this notion of, well, I'm trying to start a habit of, it's a good example of that. I'm trying to start a habit of doing test-driven development. That's not a habit, okay? You, TPD, okay? Okay, the urge to do TPD if you have it, but TPD itself, not a habit. Way too complex, okay? It's a process, it's a routine. It's a series of things that you have to do, okay? But you can form a habit of wanting to do TPD. You can form a habit that when I sit down and start typing in the keyboard, that what I want to do is write a test first. That's a habit you can form. Something very specific, okay? And 20 minutes left, 20 minutes in. Woo-hoo, the adrenaline's got me moving. Okay, I only have two more slides. So. Okay, okay, all right, so let's just, let's start, I'm gonna tell you exactly how to form a habit. I'm gonna show you how to form a habit in 10 seconds. This is actually how I discovered this technique. I just landed my dream job. It's my first day on the job. I get up, I panic, I'm frank, I'm excited, I'm eager. I head out the door, I pull the door closed behind me and it locks and my car keys are in the house with my house keys. Oh crap, what do I do now, what do I do? It's my first day on the job, you know what I do? I keep the door in, okay? Demolish the wood frame or completely destroy it, okay? I go in, I get my keys. I call my wife on the cell phone, honey, I destroy the part of the house. When you get home, don't tell the landlady. I will talk to her. So I go to work, I come home, I get out from the landlady, I get a taxi, I promise I will fix this, I will make it okay, but I'm stewing all day about this one event. Next morning, I get up, I go to the front door. What do I do? Check her home, check her house. I mean, what I'm gonna do is I laugh at you treating all of them like this, right? No, you could say that I spent all day preparing for that happens, but no. That five seconds when I kicked in that door, actually the five seconds leading up to the decision to kick in the door, when I'm fully engaged with adrenaline, when I'm just totally fired up and freaked out, okay? My brain is rewiring itself. My brain is going, oh shit, this is a threat. Put this in the regular expression, parser, so that if we see this again, we react this way again and form a habit in five seconds, okay? Now, how you use that habit, you can ignore it. I repair the wall. I remaking never mind, I did a fantastic job. The landlady was actually so impressed with how well I repaired the door that she actually paid me for supply. Really awesome landlady. But I made a decision to use that energy in a positive way, to find a way to use this energy in a way that would help me. And I thought, well, how am I gonna use this? I've got this alarm bell that's going on. Every time I walk out the front door, how am I gonna use this? I know. I'm never gonna lock the door and not the game. I'm gonna lock the door with the dead boys. Why? Because you can't do it without the key, all right? You cannot lock yourself out of the house with a dead boy, right? So, gosh, this was 15 years ago. I've never locked myself out of the house since. Locked myself out of the park a couple of times, but we'll talk about that in a minute. This is your brain. There's a downside to what I'm about to do to you. Last night, Mike told me that I was speaking and I knew I was too tired to prepare my talk. I said, I'm gonna review all my notes. I'm gonna load all the memory, everything I've been around, and I'm gonna give myself a good night's sleep, right? This is just good, smart, left, right brain integration, right? I'm gonna load this all in my brain, but I don't like to get up in the morning. I like to sleep down. I'm a slow mover. So, I said a deep, up, great point in my brain. I said, when I wake up, I'm going to wake all the way up. Actually, I wrote in my journal, big words, wake, on, wake, which is a keyword that I use to tell myself, when I wake up, I gotta wake up. Can you see that up there? That's too bad. Okay, this is- Ninja key. All you can see are the claws coming down on this poor cat. So, it's back up. So, this is me, this is my brain, 48 a.m. when I had to get up and go eat, and did not actually need to get up, but I hit woken up. That was my self-conscious, and that was my poor brain. So, I've been up since 448 this morning, okay? So, use your power for good or for awesome, okay? But use it very, very carefully. At some groups, I did this to people. I basically walked through, here's how you do it, and then I walked through, and I think God helped me use an illusion in which I met people imagining they're sticking their hand up in all of his ass. It's pretty early in the morning. You have to do, to set a debug waveform in your brain, is to simulate the environment in which you want the debug to occur, right? You're about to get in the car, or you're about to get out of the car, right? And the keys are in the ignition, you're about to get out, you're about to get out. And what you need to do is you need to somehow trigger that response that says, oh my gosh, this is in my regular expression pattern for threats, this is in my freakout behavior, something really weird, okay? So the next time you go to get out of your car and you don't want a lot of keys in the ignition, I want you to think about kittens. The weirder the image is, the harder it will imprint on your subconscious. The more disgusting the hardware it will imprint on your subconscious. The more just weird stretch, the funnier it is. If you can tell yourself a hilarious joke on the man, it's a rare skill because usually you know what your punch lines are gonna be. It can work. Why this works is, again, your brain is required for powerful reaction and pattern matching. And this is just an amazing, amazing skill that you can use. Are we doing it for time out? I'll turn this left, turn this left. I'm gonna tell you a story when my friend Randy is going to kill me. I'm gonna tell you a story of how I learned this technique, formally. So my friend Randy will be Y.U., bringing up the university. Owned by the L.S. Church. They have an honor code. The students there are taught in a morality, chastity and proper behavior with the ladies. And Randy's roommate had a really smoking opera around and he really liked it but she really liked him. And he was feeling so bad. He's like, I feel so bad just, I'm gonna go on a date with her. Don't we're gonna end up breaking out and I'm gonna feel so guilty. And he said, I have all your problems solved. His friend was standing there and just got out of the shower and he's wearing boxers. He says, I can help you. Because what's going to happen to you is you're gonna be in the car with her and you're gonna put your arm around her and you're gonna lean in for that kiss and just when you're right here, you're gonna see this. Shoo! Shoo! Shoo! Shoo! Shoo! Shoo! And then he slams at 11.30 p.m. Damn! Full story out of his friend. He had moved in to kiss her. And just when he got right here, your tests need to be green before you commit your code. Get by second, well thank you. You'll understand when you're older if you don't understand that. But for now, your tests need to be green before you commit. You are committed, you're about to commit your code, you're about to push your code. You're about to push it to my repo. What I want you to think of as you're pushing that repo. You know what I'm talking about. You know what I'm talking about. Is that image, right? Oh please don't let them have clothing on underneath the arm. If you take an image and make it strong, your brain will use it. And you can harness this power, you can use it for good, you can use it for awesome. You can use it for waking yourself up at 4.48 in the morning whether you want to or not. All that winning. And that's actually how you look at your brain. Hope, I hope this is useful to you or at least entertain you. Thank you very much. One, two, three.