00:00:00
e
00:00:30
Let me just say, this guy Jonan, I think, is one of the best developers I've ever met. He’s smarter than most humans and certainly more beautiful, as measured by volume.
00:00:35
This is a little presentation called RoboLove. My name is Jonan, and I love Ruby on Ales. Ruby on Ales is all of you, so thank you for coming here and making this conference what it is. It means a lot to me!
00:00:48
I'm just going to continue away from my two laptops as if everything is perfectly normal. This is sometimes what I am known as on the internet. I like the trick where Akira gets to sit here until he gets all the followers he wants on GitHub.
00:01:10
So until everyone here follows me on Twitter, I'm not changing the slide! We're just going to stand here. This is Twitter chicken, people! Actually, unfollow... No, this is the Down with Jonan Corner. Ignore them.
00:01:30
This Twitter handle actually reads 'lebot' for those who speak Le. It might have been a funny joke at some point, but it really wasn’t funny to begin with. Now, it's just kind of old, and no one understood it in the first place.
00:01:47
I've got these numbers; I'm the guy with all the numbers in his Twitter handle and I'm stubborn enough not to change it. If you'd like to type those numbers, we should talk sometime; it'd be fun.
00:02:09
So, I'm from Portland, and I work for a company you probably have heard about. We make internet things—New Relic. Has anyone here used New Relic? If you have New Relic in your apps, that's a solid choice. I once said I would not work at a company that didn’t have New Relic, and that was before I worked there.
00:02:33
I still say that because it’s pretty amazing. I don't think I'm willing to do the job you want me to do if you won’t let me see the data to do it.
00:02:59
If you are interested in maybe also being a Relic or moving into the Portland area, we’re pretty much a local company. If you have dreams of remoting in to work at New Relic, because of our culture, I can espouse on this later.
00:03:13
I think it makes much more sense to have in-office employees, and the company promotes that as the plan. Remote work can be great, but in our case, we're all up in Portland and we would love to have you.
00:03:41
If you're interested in that plan, go to bit.ly/RubyOnData and look at what jobs are available now, or tweet at me if you can remember those numbers... or don’t, that’s fine.
00:03:59
I’m going to talk to you about robots because they’re adorable. My robots have a little bit of Ruby in them, a little bit of Lego, and some Raspberry Pi. They’re pretty fun, and I like them a lot!
00:04:16
But I want to tell you why I did that instead of how I did that. I’m going to tell you how a little bit, but the most motivation for me is more relevant at this particular time in my life.
00:04:33
I apologize for this: this is a quote from Thoreau. I should not talk so much about myself. If there were anybody else whom I knew as well, I would talk about them. But I’m going to talk about myself for a rather long time and I apologize in advance for that, but hopefully you will gain something from this.
00:04:50
I don't know how many of you know my backstory. Some of you might, but I took kind of the long way around to this software stuff.
00:05:01
A lot of people graduated with CS degrees and went straight to work and have been doing this for 15 years. That's not my picture.
00:05:14
So, I wrote a little bit of BASIC when I was a kid. A lot of us did! Who wrote BASIC? Yay BASIC! I wrote a journal in my Apple ][e and password protected it, mocking my sister when she tried to guess the password.
00:05:39
You know, she’d say 'I’ll just turn it off,' because she didn’t know how to save her programs, and I was like 'Noob!' I got owned.
00:05:51
I also programmed one of these calculators. Did anyone program one of these? Calculator programming is interesting because to transfer programs on these—this was long before the internet—we had little cables.
00:06:07
There was actually internet back then; I’m teasing, but it wasn’t like what we have now, right? We had AOL, but that doesn’t count as internet.
00:06:26
So, you would plug your calculators together with these little cables and transfer programs around. There was this weird pre-social network social network that came up around blackjack games in math class.
00:06:46
I wrote a blackjack game, and the science team from South Medford came up with a better blackjack game that put mine to shame. I was so embarrassed, I had to up my game all weekend coding on the calculator.
00:07:05
It was a strange environment. I did a lot of programming like that when I was growing up. I did a little in high school, but really I didn't program much more until I got to the University of Oregon where I studied Java for a couple of years.
00:07:25
Strangely, I quit forever after that. I actually have a friend named Chuck Foos, who’s a really smart and caring man. He has on his Twitter profile, 'Whatever you use to build your dreams is fine with me,' and that embodies how I feel about programming.
00:07:34
If you are living your passion, then I'm cheering for you the whole way. I happened to study some Java at school, looking ahead at a future of cubicle farms.
00:07:54
My friends were having a tough time in 1998-99; things were pretty bumpy for software people, and it looked kind of terrible to me. So, I bailed and got a degree in Japanese.
00:08:07
What do you do with a Japanese degree? As soon as you graduate, you play a lot of Diablo! I don’t know if anyone has played this game, but it's pretty sweet.
00:08:22
If you play for 16 or 18 hours a day, you can amass a lot of items, as it turns out. I started selling those items on the internet and I got into HTML to create a little website to sell hacked game items.
00:08:42
I know, right? Then, as you might remember, in the Diablo 3 patch update—the next time you patch your software, remember that you could just be ruining someone's life—it came out, and they took away all the hacked items.
00:09:06
They closed all the exploits and it was done! My website was killed; my business was over overnight. To be quite honest, this was a pretty unhealthy time in my life.
00:09:20
I spent an unreasonable amount of time playing video games, sitting in front of my computer, typing HTML, and selling things online to barely get by. When all my vast wealth from Diablo II disappeared, I started selling Magic cards online.
00:09:41
This is a Mox Ruby. This little tiny piece of cardboard is worth $1,000, but it’s beat up and not worth that much. These cards are worth a lot of money for a tiny piece of cardboard.
00:09:58
I didn’t sell any Mox Rubies; I was kind of the bargain basement Magic reseller online, but I didn’t have a lot going for me to be quite honest. If I look back at my life objectively, I spent the better part of a year indoors, programming on my HTML site that wasn’t that good.
00:10:15
Sold Magic cards, played Magic, and played Diablo. It was a pretty dark period in my life; I was super depressed. It was not a healthy place for me to be.
00:10:29
And then I met Becky. She's amazing! She came to me and said, 'You should be a grown-up!' So I did!
00:10:44
As part of my adventures in being a grown-up, I started out as a banquet server. It was exactly as you might imagine—serving fine Lords and Ladies at a banquet hall!
00:11:01
I was a Hilton banquet server when I began, and I was making $10 an hour, which I was stoked about! A lot of my friends hooked me up with jobs, and it was great. I got to know a lot of people.
00:11:19
I met someone who I later started bouncing with because I was into security then; that’s what happens when you’re 6 and a half feet tall—someone says, 'Hey, you look like a door! Come with us!'
00:11:36
Again, $10 an hour is not super awesome. We found a Glock in someone's coat one time, and I thought, 'Nope, I’m out!' So, I left bouncing and became the concierge at that same Hilton where I was a banquet server.
00:12:02
It was a sweet gig! I learned to make a martini and pour white wine that I overcharged for, and I also learned to get people tickets and other things I will not announce on video.
00:12:17
I met some people across the street at a bar after work who were running a poker room. One day while we were playing poker, the owner Kelly asked if anyone knew a dealer.
00:12:39
I had just dealt a home game that previous Saturday, so I said, 'Yeah, I got it! I'm a poker dealer, actually! I'm the president of the Poker Dealers Association, probably the best one you’ll ever have!'
00:12:53
So I became a poker dealer, and it was kind of an unawesome time. I was hanging out with a lot of gamblers and playing poker eventually for a living. We went about a year where all of our income came from my playing poker and my wife working at Blockbuster.
00:13:09
We paid the rent, you know— I played online and multi-tabled low stakes hold'em if anyone is interested in that kind of thing.
00:13:28
Then, this happened—this is my daughter Ka. Did someone just say ‘no heart’? Was that you, Zach? You're dead to me!
00:13:42
This is my daughter Ka on her second retake of her second grade first grade picture. We let her choose her clothes in this one; we did not in this one. The moral of the story is: let your children choose their clothes!
00:13:59
Then I found out I was going to have a daughter, and it turns out if you're poor and you're going to have kids, you're going to die on the streets alone.
00:14:29
So, instead of that, I decided to get a job at an actual corporation, because this was a thing you used to have to do if you wanted to get medicine and talk to doctors.
00:14:50
Back in the day you don't have to do that anymore; we have this crazy healthcare stuff going on now! So, I got a job selling cars.
00:15:08
I sold Hondas; this is my favorite car, the Honda Insight. The funny thing about this photo is that the Honda Insight is in the foreground, but the logo in the background is Hyundai, which is the wrong brand!
00:15:25
I sold cars for a long time and I was still dealing poker at this time; I had a real job with health insurance, which was pretty sweet. But I don’t know if anyone here has ever sold cars.
00:15:40
If you’ve sold cars, you need to be there for about 12 or 14 hours a day. You're walking a lot, making minimum wage. You find someone who wants to buy a car, and they demand the lowest price because they found it on the internet.
00:16:03
So, the price is right there, and you make $100 every three hours— right? So, more months than not, you make minimum wage.
00:16:24
During the time I was selling cars, this was during the beginning of the crash. My first month, I sold like 12 cars, but then it was 8, 6, 2... you can see where that went!
00:16:43
So, when you’re selling cars, you work incredibly hard and sometimes make decent commissions, but more often than not it’s not a great job.
00:16:59
While I was doing that, I was working as a poker dealer at that card room and making a little side money and I was making HTML brochureware for little money.
00:17:17
That went terribly, as you might imagine; it was a misguided attempt to be a programmer. I didn’t actually know any programming; I could make HTML things and CSS them, but that’s not a real website!
00:17:36
I also was doing consulting at the Hilton to run their corporate training program and instill the Hilton Spirit in new recruits. I’m serious; that was a real job!
00:17:56
So, I had five jobs and was working about 100 hours a week. I would come home after my family was asleep and wake up before they were awake.
00:18:14
It was really bad. I quit all of it one day and applied for a job at an Indian casino in Florence, Oregon. They contacted me about their background check process, which takes like eight days.
00:18:34
They even needed to know my wife’s great-grandfather’s illnesses! It’s crazy; why do they care that much? I honestly think I could have gotten a job at the NSA more easily than I did.
00:18:54
But I’m just dealing $2 Blackjack, so yeah, a lot was on the line. I got to the casino and was dealing poker and Blackjack.
00:19:11
How many people here have played poker in a casino? What you’ll notice is that the dealers change every half hour. They do this not out of the goodness of their hearts, but because when dealers deal for more than 30 minutes, they start to lose money.
00:19:33
They make mistakes, and when you make mistakes in a big poker hand, that can be pretty expensive for the casino. So, you would get a break every half hour at my casino.
00:19:51
In the back of the house, I would sit down and program and started teaching myself Ruby. Programming this way was actually good for me because it taught me very early on that I loved Pomodoros.
00:20:11
I really liked coding for a half an hour and then doing something else for a half an hour that occupied my attention and wasn’t related to coding.
00:20:26
For me, it was an invaluable introduction to being able to control my attention. When I learned that I could focus for a period of time and then defocus intentionally and come back later, it was a powerful change for me.
00:20:43
As you might guess, I eventually fell in love with Ruby. I think that’s how many people came to it—playing with Ruby and eventually loving it.
00:21:02
Then I parted ways with the casino. I woke up one morning and was doing the HTML brochureware stuff I mentioned earlier.
00:21:20
I was on Craigslist; I had an RSS feed alert system that would tell me when anyone posted about needing HTML brochureware. I was pretty hardcore!
00:21:38
A lot of them said Ruby and Rails in them. So, I woke up one morning and turned to my wife Becky and said, 'So, I’m going to be a Ruby on Rails engineer.' She's like, 'What is that?' I said, 'I have no idea, but these guys make a lot of money!'
00:21:55
And I loved Ruby; I really did! I only wrote a little poker hand simulator; I had no idea what I was getting into.
00:22:12
By now, it should be clear my wife Becky is amazing. Those of you who were here might remember when I stood on stage and shocked my brain for your amusement!
00:22:29
Becky was sitting front center watching that happen. Can you imagine what that feels like? It’s like, 'Oh, let’s don’t lose that brain we depend on for our livelihood, please!'
00:22:45
So please give Becky a hug the next time you see her; I do now! So, Becky changed things a lot for me.
00:23:06
After meeting Becky, I became ambitious and motivated. At one point, I was working 100 hours a week, which was dangerous!
00:23:22
Then I found out I was going to have my son Tavin. This is him with just a couple of books he was going to read before bed.
00:23:43
I think he’s got quite a lot more by now. My son Tavin says every day, 'Daddy, can we read the Spanish book?' and I can't say no; he loves Spanish so much.
00:24:00
I found out I was going to have Tavin and I wanted to be a Ruby on Rails engineer. My son was three weeks old at this point.
00:24:13
So naturally my wife agreed to move the whole family across the state to Bend, Oregon, from Florence. I came to G5 over here, where I met some of my best friends.
00:24:31
G5 was a really good learning experience for me. I started on the frontend there, making Herb templates, which were like that PHP stuff I tried once, but actually not as bad.
00:24:49
I would hang out late at work and work on these Herb templates, writing my CSS.
00:25:00
I stayed late and talked to Chris Krabel, trying to get him to make me a software engineer because I could type HTML and stuff.
00:25:17
Chris eventually fell for it after a while. Eventually, they let me into the house, and the man responsible for that is here tonight: that's Kobe Ranquist.
00:25:33
Kobe made me my first job offer as an apprentice software engineer at G5, which was awesome. I learned so much, talking about how much more than I knew!
00:25:50
It was a great learning experience; honestly, it was the first professional office environment I’d ever worked in. From there, I learned software with some really good friends.
00:26:10
It went reasonably well, except then this guy came along. Anyone know Colton? Colton Fent was hired as an apprentice software engineer because he had done Ruby.
00:26:29
I was an apprentice software engineer, and I could write HTML, which wasn’t going to work for me. I went to Kobe and said, 'Fine, I don’t care about job titles. Why are you being a jerk?'
00:26:45
So he took the apprentice title off my job title and I became a software engineer! Yes, good job me! I probably didn’t deserve it; I had no idea what I was doing.
00:27:00
But they kept paying me, and it was really nice of them. Then I went to a program called Hungry Academy, which was a five-month-long-intensive developer training program at Living Social.
00:27:18
It was a paid program. They had 600 applicants and accepted 24 of us, six who had some programming experience and 18 who did not.
00:27:37
We all sat down, learned to code in true Jonan style: 16 hours a day for five months. This is mostly where I lived—anyone ever seen this?
00:27:56
This is the Subway in DC. I’d hang out here and look at all the people who were sad that they couldn’t become president.
00:28:09
I had been doing that for a long time where I didn’t see my family at all. I would see them one day a week on Saturdays, and I was working in the mornings before they woke up.
00:28:26
I would come home after they were asleep to get my eight hours. I was eating healthy and exercising, but all of it was outside the scope of my real life.
00:28:43
On the weekends, Saturdays were awesome fun, like going to the aquarium, while Sundays were for homework.
00:29:00
It was a pretty tough five months, and I wouldn’t have been able to do it without my Pomodoro friend!
00:29:12
So, those 16 hours a day don’t happen like that. Nobody survives without cutting yourself some slack, without coming up for air and taking breaks.
00:29:34
For me, my breaks have come in many different forms. This is one of them: me on a Pomodoro break with you.
00:29:49
Everything I’ve talked about helps bring me to Ruby on Ales to say you need to cut yourself some slack.
00:30:04
It’s really easy for us, as driven and motivated people, to fill our day to the brim with coding, friends, and community organizing.
00:30:21
I do the same right now; I work at New Relic, and they get their fair share of my time. Then I go off and organize a meetup, speak at a conference, or MC a conference.
00:30:37
My family doesn’t get my fair share of my time, but I’m fixing it—it’s getting better! Part of the way it’s getting better for me is by building useless things.
00:30:53
This is Mousetrap! Did you guys play this board game? I loved Mousetrap! Someone built it at a Maker Fair, and it's a full-size Mousetrap.
00:31:07
So, I want to return to this theme: this is how I relax. This is what I do for no reason.
00:31:23
It’s really important to do things for no reason because for so long I was spun up to a thousand, reading three technical books at a time.
00:31:39
I was online and programming all the time, which made me better—of course, it got me where I am today. But you’ve got to leave room in your life for passion.
00:31:59
My passion lately looks like my robots. I think they’re cute! This is Bobo and Robo, who have a myriad of problems.
00:32:12
Not the least of which is they are narcoleptic—seriously! If they don’t do enough work, the battery turns off.
00:32:30
My solution is to spin up a background Ruby thread that just adds numbers together. So, I don’t know if they’re even moving or working.
00:32:50
This is the old Raspberry Pi I had with one little Wi-Fi adapter. I intended these to have Bluetooth and connect to the Legos.
00:33:06
This Raspberry Pi 2 just came out and is awesome, three times faster. If you take a flash photo of one of these with a Xenon bulb, it resets the whole thing.
00:33:24
I use these Amax Wi-Fi adapters—they're great! If you need a Wi-Fi adapter, you should use those!
00:33:41
The Bluetooth ones I got were cheap; I learned that it does matter. Those who make these will ship you multiple devices with the same MAC address, which is a hassle.
00:33:57
I also use this mic—the Kinobo mic, what the Jasper project is all about—it’s the recommended microphone for Python voice recognition software.
00:34:14
I bought little speakers so they could talk and sing and dance—or at least one of them could. I got these batteries, and I should’ve done it earlier.
00:34:37
There's a $15 option that is three times more powerful but lacks the key-enabled charging pads on the side for wireless charging.
00:34:54
It was super important to me that my robots could charge themselves for the coming apocalypse!
00:35:12
So I got these batteries and attached a wireless charging feature to both the back and front, which are incredibly intelligent.
00:35:28
Do not use these! These are from Keystone. I want my money back!
00:35:48
This is a Pulu sensor I purchased on Adafruit for about $7. I planned to use it for distance sensing to prevent the robots from bumping into something.
00:36:02
I was a professional solderer; I just kept adding solder until it started smoking.
00:36:19
If you have any soldering questions, hit me up! I also used this wiring thing to plug into the GPIO.
00:36:35
If you want GPIO help for Raspberry Pi 2, look at an interactive GPIO pin map—it's pretty cool!
00:36:55
I want to talk about a couple of Ruby gems that are built in there. One of them is PiP hyper, written by Jason Horn; thank you, Jason.
00:37:10
It's event-driven GPIO gem for Ruby, so you can install this PiP Hyper gem to get events from your GPIO pins when they trigger.
00:37:30
This next gem communicates with the Lego brick beneath the robot and drives it around, written by Christian Huler.
00:37:47
I wrote an example piano for it—one of my finest open source contributions! I also open-sourced the code in these robots.
00:38:03
This RoboLove gem wraps around it so I can run the two motors I want, the left and the right motor, for a speed.
00:38:22
I can call forward with no arguments and it just runs the motors for one second and then stops them.
00:38:41
I can use this other project called Seeker Droid to drive the motors, but I have to spin up threads for those motors so that I can kill them.
00:39:02
The robots are supposed to have object avoidance built-in, so when they’re going to run off a cliff, I want to kill that action immediately.
00:39:23
My plan is that when I trigger a red alert, they should have an avoidance procedure to not die.
00:39:39
The red alerts are raised when the robots see something or are about to die; I need to rescue them!
00:39:56
This is another priority queue implementation. When you’re triaging something in a hospital, you prioritize; the same applies here.
00:40:10
Using these priority queues will allow the robots to play hide-and-seek. I needed the robots to have sensors to know when they’re about to bump into something.
00:40:28
Unfortunately, I later found out these sensors don’t work on black surfaces, which might be a challenge for you if you build robots.
00:40:48
I got these Bluetooth dongles to use for RSSI readings, to decide how far apart the robots are, but they ultimately don't help!
00:41:04
The received signal strength indicator does not work well over 40 feet, so that concept of hide and seek is busted.
00:41:22
Then I had a brilliant idea: I’ll use echolocation! One robot will say something cute or play a song while the other locates it.
00:41:40
The challenge here will be taking the maximum amplitude of the sound for one second and determine proximity based on max amplitude.
00:42:01
However, the volume varies wildly throughout a song, so a one-second sample does not guarantee you’re getting closer.
00:42:22
The need for a different implementation method became clear when I realized I couldn’t get consistent sound readings.
00:42:41
The two robots will talk to each other, most likely using a Cleverbot script I built, so they can talk about lovey-dovey things.
00:43:02
Seems like I’ve lost Robo and that's unfortunate because I had a cute little love story to show you!
00:43:19
I was working to SSH into them, connecting the two robots for their little love conversation, but things haven't gone as planned.
00:43:38
So I want to express my gratitude for your time and attention here tonight. I will conclude with a humorous robot conversation!
00:43:54
They might still work together despite their current challenges, and if we could get them moving together, you'd see something really cute!
00:44:11
I appreciate your patience with my presentation; it has been a journey of ups and downs!
00:44:43
Let's celebrate all the wonderful creations made here, powered by love, creativity, and a bit of tech magic!
00:46:05
Thank you all once again for being here tonight! Together, we have celebrated RoboLove and all unconventional journeys we take together!