 Thank you very much. It's a great honor to be here, especially I want to thank all the organizers. They've done a great job so far, especially one of the organizers who you may know, Terrence. I work with Terrence at Heroku and he spent a lot of time working on Bundler and you know I use Bundler a lot. Who uses Bundler? Yeah it's everyone. Okay and so you know when you use Bundler it's bundle this, bundle that, bundle install bundle update. So whenever I go to a new version of Ruby or you know a new environment I always you know I could never get it into my head. They had to do gem install bundle er instead of just bundle and that just drove me nuts and so I made a gem called bundle and all it does is when you install it it installs bundler and now this is a couple years ago and it seems a lot of people have this problem and if you look at the code for it this is it like it's just a gem spec and so while it's not maybe the you know the best gem in the world probably the most downloads per line of code. So I want to start off with that. I know a little bit of more, not that much more serious but more meatier topic. So I have a project that I wrote almost two years ago called Get Vane and the picture there is from what I put in the read me which is a story about the Vane crow which if you're not familiar with like a parable or like I don't know if it's actually ASAP but something like all those lines where a crow he's hanging out with his crow friends and he's like you know what I you know I don't like these people and he goes over he sees these peacocks he's like oh man these peacocks they're phenomenal and he's trying to hang out with the peacocks and they're like you know they're okay but you know they're kind of like not paying attention to them and they leave and he sees a bunch of their feathers on the ground and so he sticks them on his tail and he goes to his crow friends he's like hey I don't need you anymore I'm an awesome peacock and they're like all right and so he goes over to the peacocks and the peacocks look at him and they're like oh man this is a really ugly peacock we should be nice to him and and he's all like yeah look how great I am and then his feathers fall off and then they're like oh you tricked us so get lost and that's that's the end of the story and so what I wrote is Get Vane and what it lets you do is have make your git shaws and git commits start with like a vanity thing of whatever you want and I guess I'm the crow anyway so to know how you know to know how this works first you have to know how a git commit is actually structured and the way it works is that you have a tree and that points a shot of the actual code change it has a parent and then the shot of your parent commit and if it's a merge it'll be like two or three depending on what the type of merge it was you have your author and committer and then you have two new lines in your message and this message is for I was adding crystal support to Travis CI and I want to take I'm obligated to give a little bit of a plug to crystal it's if you like Ruby and you want it to be you want to compile language that is statically typed the fastest how and it's all self-hosted and you can look again see stuff in like one line this language is amazing so if you want to if you want to hear more about this come meet me after afterwards I'm not going to turn this into a crystal talk but anyway what the so what your actual shot what turns up to be is the is taking this commit file and turning into a shot so this particular commit is a real commit and you can see that I got the prefix to start with cafe and if you look at it so if you're going to start brute forcing through commits you have to look at places where you can change the actual part of the commit you can't change the tree you can't change the parent you know you don't want to change your name or your email address and so the only places you have left or either is either the commit message or those timestamps of when when the commit was so when I was building this I didn't want to annoy my co-workers more than I already do and so I didn't put it at the end of the commit message because I would just put garbage on every single of my commits so the only place left was to start screwing around with the timestamps and so you can either move it you know forward second by second or previous second by second and you got two of them to screw around with so the first version I wrote it on like a long plane ride home and I got it you know kind of working but it had one problem if you do sort of the naive thing of just putting a loop inside a loop and like going over you know one second over for one of the like the commit date and then go you know positive one second negative one second positive two seconds negative two seconds on the author date what you end up hitting is like one of these like red dots way up here which is a valid collision to get your commit to start with cafe but one of your dates just like way off by hours and I really wanted to minimally disrupt the natural order of things and find you know to really decide you know burden my my co-workers and so I wanted to do is find that green dot and the way you do that is like by spiraling out in a thing and I spent a long time trying to figure out how to spiral out but finally up on down at the bottom someone figured out for me and so I just used their code so thank you to 2000 clicks com so getting to like optimization stuff normally you know when I'm working on code you know yeah sure I've optimized things a little bit but once it gets fast enough it's you know sort of irresponsible to keep you know pushing the performance thing this already started out irresponsible and so I could just keep you know diving down on optimizing it and like I haven't had the opportunities to needlessly optimize things like ever so this was actually a lot of fun so you know first thing that was read in C so I could have like real threads and then one of the things you can do with Shaw is you can like pre-compute stuff and then share that context with the other you know iterations of the loop and that sped it up like 50% so I could do what is this 52 million collision checks from 89 seconds to 59 seconds just by saving the context up until that first time stamp and so that was pretty cool and then another thing that was surprising to me so as I have been actually able to start using like some profiling tools and what I did was so all these threads are going all at the same time and I didn't want you know the get like corruption or whatever so when one of the threads found a solution it would set a global flag saying hey I found it and all the other threads when they would start their work they would check that and be like oh no someone else found it I would go away and actually running a profiler I found out that that check just you know checking for that global Boolean was taking up like most of the time after I got rid of some other optimizations and so by pushing that like lock to only check if the lock is taken before like actually doing the work to change the commit and having all the other threads just be even thread a found it threads B and C will just keep working and it just prevents them from clobbering at the end and that you know added another 20% performance I'm not going to go into this in detail but I wanted to show off something cool by using C I was able to find out that this earlier just using sprint f was way too slow and so I ended up just first trying to use I to a which takes an integer to a character array and even that was too slow so I do like can write this so that it would know to use div mod but the only reason I knew this is because I was using a language that had you know years and years and years of great tooling so this is if you haven't checked it out if you haven't if you have a Mac instruments on OS 10 perf is on Linux and it's all right but this instruments on OS 10 is really cool you just you click record and you run your program and then you hit pause and then you get up there you get like those are the actually parts of my program and you can click on it and it dives down to the assembly you can see like that one assembly instruction was 43% and like being able to like see that like was really cool and I'll give my second plug to crystal because it does it looks like Ruby but it compiles straight down to see you can do the same stuff which is really amazing but so like so I've been using this for now two years every single commit that I've made I have screwed with the hash like it's just gotten into my my my fingers I do get commit and then you do get vain some interesting thing is has come up one of them all my commits start with cafe and one of the it's really helpful like if you know if you're just looking at the commits you can tell my co-workers come back oh that's a will commit you don't even have to look at the offer one one thing that was really surprising is that you see that first commit in the screenshot there get already out of the box if those short shaws there's going to be collision it already adds another one and I don't who put that in like what other situation is there going to be for like she conclusions on shots except for someone screwing around with it like this so I'm glad it's there but you can also be more expressive with your commits so one of the things I did was shutting down a project that had you know it was great when it was around and then it kept being around for a while and just caused a lot of pain and so it finally came down to shut it down and so I you know you can use dead as the shots you know add a little more to your commits so one of the things I noticed on the main project one of the main projects that I work on we were getting really close to commit one thousand three hundred thirty seven as like I can't let this opportunity go to pass and so I this is the longest one I've ever searched for this being what is that eight characters it took maybe like 10 to 20 minutes to find that collision but what it was is I took all the comments in our source code and change it to be in lead speak and you know I thought this is pretty good like this comment here at the bottom something like because the current transaction can in fact surpass the target transaction like that's totally readable they ended up not merging it and they didn't give me an explanation but I think maybe it's because some of our ASCII art after we put a database into archive mode it screwed up the edge of the edge of the tombstone there but we could have fixed that anyway so one of it you know the getting the beginning of the commit there that was part of it but I had to actually make sure that I got that Shaw or that GitHub issue the project on the right there was just how to translate all the source codes into lead speak someone else's gem who I should have looked up to thank them but you know this is just sort of like a glorified said on the left though this is a very important project that runs and every once a minute or twice a minute checks to see if you if your project has hit issue one thousand three hundred and six and if it does then it immediately makes a new issue and then later puts it on to be a pull request I want to do in two steps there because I really didn't want something to go wrong and I didn't like snag that issue and it was actually really good that I automated it because it happened to be like right during after Heartbleed hit and so there's a you know a ton of patches going in for like people scrambling to try and fix this so I managed right in the middle of all that people actually working I got this so hopefully it brightened their day but it hasn't always been all good so this you know this is the guy who made crystal he's like hey I noticed all your commits are kind of screwy could just cut it out and so this is reason here was a joke like you know of course there's gonna be enough commits for everyone but he's like you know I'm worried that the tools won't work and you know I showed him my other projects like look you know like the tools continue to work they had the extra letters he's like oh yeah that's okay you can do it but I didn't want to you know push any buttons or like take it farther and so after like 50 or so commits I switched from cafe to code because I think that's more descriptive so you know I'm working on code and maybe if I do a doc patch I'll use like D0C5 for docs that way you can know moving on to more GitHub stuff pretty soon after GitHub launched their commit graph thing you know I took it you know honestly I was like you know what I I don't want people to see how much I work I don't want you know like you know whatever like getting you know streaks or whatever like you know I don't want that to like like I want to work when I want to work I don't want to be motivated by like an external thing and so I figured if people go to my GitHub profile you know they might not notice my name on the left they need to you know know that you know I'm will and so I took I took this like block diagram translated into like little X's like that and then did weird gymnastics to get it because it's you know the dates go down but I needed to go in one line and then from that I had like a mask pattern of dates that needed to be on and dates that needed to be off and as you saw earlier like nothing in a git commit is real so you can just change the date to anything you want and so I went like way back in time and made like on any of those on dates made like 20 commits that were like through the day that were on and then off dates nothing and went like way back in time and then way forward in time and then pushed this one giant repo up that had like hundreds of thousands of commits and it took a little while for GitHub to like parse that through that through but then what I what I got was my my profile was like that and it was really nice because over time it was just like sort of marquee across so like going through so that was nice getting onto more serious topics so like you know I think the discussions about people like really fighting hard to have like zero downtime deploys you know kind of comes and goes a little while ago it was like in vogue again like oh like look at all the awesome work we do to have like zero downtime deploys I note that that I'm like you know like sure for some sites that's super important but for like my site you know no for for your site you really need zero downtime deploys like all the effort that you spend into engineering out like that solution could probably be spent like fixing up your product but still it is pretty in like I understand like it's pretty embarrassing like people go to your site and errors so what you need to do is take the blame from you and give it to your customers so you're redirecting that 500 so it's a 305 hundred to your customer and so the way you do that is you have a web page that sniffs the browser and then shows the your computer can't connect to the internet and this works so so this works really well and also just coincidentally out of nothing Tuesday during lunch one of my coworkers like hey I was going through your get-up in one of your projects the demo site doesn't work I was like are you screaming with me like do you know that I'm given this talk at Tarence Richards conference like no it's just like the site didn't work I'm like which one he's like the blame one I'm like I got you and so actually the way this works is pretty simple so you go through all the different browsers and you go to the inspector and pull out the HTML and then for any of like the assets like the images or CSS or whatever base 64 encode that so you can inline it and then base 64 encode that whole garbage and then so reach browsers is just one thing that you can just hot load in by replacing the internet smell of the whole thing I think I need to update the Chrome one I think they have like a dinosaur now so but like it's still close enough that people it gets a so I so that the last thing the last like big topic they want to talk about is my professional internet webpage and if I my fi is working well let me see if I turned it on yeah alright let's see if this goes I got nice MIDI support so it's pretty good my turn that off it's hard to concentrate with the midi is going so the reason I did this wasn't just to be silly believe it or not the so like I you know I used to know CSS all right I've spent five years like doing infrastructure so I probably can't still make that claim but you know back back then are not not then then but back you know five years ago like I could you know see someone's design and like make it look right but I am not a designer so I couldn't make anything like original myself and so what my my webpage would always be was just constantly you know like a year or two out of style and then I would spend a lot of time and I'd update it and then it would fall out of style and then it would look you know like a programmers block and then you know I do it again and I figured if I just go back I'll never have to update it again and and so what I want to do is build it exactly like I would have built a webpage in that time like you know I see some some things that try to like you know like oh we're a geocities that you know throwback thing it's just like animated gifts in the background and like cursor trails and stuff like like even in 96 I had a little bit more taste in that so like this is what I mean I'm not saying this is great taste but this is what it would have been but there's actually a couple of interesting things that I had to do to get this to work the scrolling marquee there is actually not supposed to do that but in Chrome it screws it up if you go to it in Sapphire Firefox it's a blink tag and the middies of course were awesome and then unfortunately in one of the like mountain lion or snow I think mountain lion Tim Cook took away MIDI support so I had to transcode all of my middies to be mp3s I left the middies there so if you're on like a Linux you can switch it over to be the actual middies but they sound pretty much the same if you can see maybe up yeah way up there at the title is marking across I wanted to get the status bar to marquee because that was more authentic but like status bars don't get shown anymore so I had to go to the title and for a while Google would index it after a couple frames of running so my website title on Google would be like it fission will line up but which which was amusing yeah so I want to show you know a couple things here I can find my cursor you know what can I do this arrangement here suppose all right so so the guest book I'm using actually someone's guest book thing and this in inappropriately slashed thing I didn't type in they they still screwed it up like that it is pretty awesome yeah the hit counter is from a hosted hit counter thing so one of the things I'm going to show you how I've done these things because otherwise there's no way that you can figure it out because I prevent right-clicking of course so one of the things I was actually a lot of work to get to to get working so like the reason we all abandoned frames was because you can't deep link into frame content but I fix that so you can use frames again and with with modern push state every time I click on a link the URL bar switches to the thing and so that is actually a later addition to this and I so I have this blog here of mine that's mostly articles from 2008 and then 2010 and then nothing and I figured the reason that I wasn't writing is because I knew people couldn't deep link to it so I fix this deep link problem but the only thing I wrote about was a fight that I had with a raccoon over a long period of time so I guess it really wasn't I can't believe it on the deep links but the deep links do work so if you like you can't copy the raccoon thing and go to a new thing it goes there and it pops all the frames back on so like if you want to use frames again I'm going to I'm about to show you how a side thing though with the raccoon story is a couple of my co-workers they read this recently and they they're trying to make me believe that there was never a raccoon that my mom was sneaking down at night and like setting off the traps I don't want to believe that so back to the where's the alright so this is if you wanted to use blink now that blink isn't a tag and you don't care about chrome this is like if other browsers this is how it works it's a marquee tag that like scrolls off 300 pixels at a time and the width is 300 pixels so it usually looks like it's blinking and so it would look like this which is me manually moving the slides because keynote also doesn't have a good blink so I mean there's no moral to any of this stuff but if you wanted to have a makeup moral like don't be afraid to do things yourself so so the way that that the frame hopping thing works as I'm quite proud of so you add a global variable to just window calls index is index and then that second junk there is how I do the scrolling marquee title and then you have your good old frame sets and I normally don't type HTML things and all caps but I figured for frame sets I should do it in all caps that felt I felt appropriate and then on the other pages this top bit of JavaScript you do and you check to see if the window is top and I'll forgive you if you don't don't remember that that's the property for if you're the top frame because you know who you probably haven't used frames in a long time and then you check if you're not the index oh you know we need to pop all the frames back on there's another template thing in there and then you use that same trick from redirect blame to just write out the entire inner HTML of the overall document and then later on you just annotate all your frames with a little code to do the push state and that works really well and that's everything with bit vision and the final thing I want to leave you with is the most evil thing that I've ever done and that's this one line method and and so so what this does is so there's a callback hook anytime a method is defined in Ruby and a very low percentage of the time what this does is it immediately undefines the method and so you put this in your soon to be former friends code base and when they run the tests everything's probably fine when they run the tests again one test fails a hundred test fails or they all fail depending on what gets pulled out and when they're when they're scratching their head and like let me rerun that in isolation it's gonna be fine because a different a different method gets undefined it's almost impossible to track down except if you get unlucky and undefined initialize Ruby has this helpful warning saying that might cause serious problems there are serious problems and so if you want to be a little bit more crafty you can make sure that you don't undefine undefined initialize and then it'd be really hard to track down and thank you very much