Merken

Closing Keynote by Patterson

Zitierlink des Filmsegments
Embed Code

Automatisierte Medienanalyse

Beta
Erkannte Entitäten
Sprachtranskript
the and the human mind hello hello hello welcome to icons that it has half of that at all my within the top implicates that this is a a year I didn't expect so many of you to stick around so thank you thank you very much Hello rails got hello everybody uh I yeah so so I am going to introduce myself because I think that there are many people here who don't know who I am in a way that I found out is because I kept trying to drop you my cat indeed declined it I yeah so that was me if it happens to hi I'm tender love that is my my given name of this they are I look a bit different than I do online this is my this is my online
persona and I guess is just and says this has to be my Brandon stuck with this for the rest of the lights and stop at the end of I work for a company called I
get home I it so website where you can go and share code has hit by it's a it's a widget company to work for
the this is a I I went to the office in the Office is actually called would you tell me what for French people OK that that that that that that at the time of the Elves courts even also the Ruby caught the and I have some cats this is 1 of them this is uh
SeaTac airport Facebook YouTube on Instagram Snapchat's as a fully we call her to to for short if this is
Gorbachev puff of under worse if 3rd of he is not a very good conversationalist frequently e ends up just making mistakes and putting his
foot in his own mouth but so I have I have
stickers of my cat and hopefully you got them from me because this is the very last stock and I don't know if all be around but I have stickers of them so if you like to come see me on but are and what's what's move on a little bit here also speaking speaking of things that are orange and white to few common for I wanna take a minute to talk about Hacker
News I and so I drew I drew this slide in that the at the so I'll I I like to be on the internet I'm on the internet on the Twitter is in a lot of the people I follow they think that they think that happens sucks always in news sites sucks and I like part this is so actually reading it is that is that if you so bad wire you really it is less effort is the is like I actually like to I like to browse Hacker News and read the comments and stuff I read them so you have to buy the but the reason I read that is because I like to think about I like to think about how they got it wrong and how they can fix that so recently like recently there was that there was an article that was like why they
why slack is inappropriate for Open Source communications and why it is a matter of us was reading the comments and 1 of the comments was you know we're temporarily in a kind of dark ages for end user open-source software has like we are it's actually true in fact the other day my friend he is he got it he
got bit by a rat and he actually died of the plague it literally the dark ages really the dark ages and drew that's the thing that I it's still a another another article that I read was electron is electron is flashed for the
desktop 1 really last for the desktop and and slack and often idols of 5 per cent of our CPU the use of 5 per cent is the view all the time and I was thinking interesting so I would say you have here what
say you have a CPU and slack is chewing up 5 per cent that CPU will 1 way to solve this problem is actually to purchase a large receive you use it you can see clearly now that it uses much less than 5 per cent of the head of the lesson here is biased beers
CPU domain and the effect it is I mean if Alan turning worries columns Sudanese soul mate you need turning in integrated would
he is a real person in this but and so now I read another another article about language features that I thought was I thought was interesting and said no no generics know some types of there's about go or something they're there no these are ground no other groundbreaking features and the net amount so that means that if your language doesn't have generics it means you languages of failure means your language is failure and actually this comet is true it's totally true and the reason this comment is true because insurance companies only cover generics so so if you take your programming language to get to the hospital they're just going to say no I'm sorry your language has been denied it will not they will not take that went through that that that so anyway this is this is all I have to
say all I have to say about Hacker News just don't read it I mean unless you want to know all the future episodes of silicon valley it so I'm from I'm from Seattle
where espacio had a 5th if it has and I'm I'm a huge fan I'm a really huge fan of supporting local businesses I love the support local businesses and in Seattle my favorite thing to do is I would I like to drink local
coffee and so I was trying to find out about different local things to do here in Arizona so I I when I decided to try out some your local brew of which is a Arizona the so so I actually had a go at 3 different convenience stores grow into 3 different convenience stores and none of them had Arizona t there was so I started to think like will maybe in Arizona just call it you know I can't I can't actually you can actually by here that I found out it was for sale CDs so enthusiasm purchased some of them I looked on the back of it turns out it's actually need in New York and and I ask that I ask the tell about a maker always made New York but there's a Arizona like in Arizona thing in the and she said no no only like only tourists during that had an effect on it get it it by majority of 8 so I wanna get to that when we get to the next section representations of 1 of my favorite favorite parts of presentation every year when I give you know I like I like to have a section on my talk
which is the trolling degage sections of the manual and you'll this unfortunately unfortunately this year really hard is very is very hard covered with ideas because of that I think like the main points of DET just talk was that you know he's he's gotten older and as he's gotten older he's learned that other people also have valid opinions I and the there's not much that you can say about that so as I know I didn't know what to do about this but OK I you know I'm gonna so little bit of doubt here so the question question for all of you but if rails is so good then how come there isn't a city named after this has that is the other the other thing that he mentioned in his talk was that there's no way there's no way to scientifically prove which language is best and actually this is completely wrong the totally wrong statement just ask any hostile developer and
they will tell you is a mathematical way to prove that have schools of correct language used anyway I'm so I'm of the face
programmer some that I every day every day I say the programmers prayer and if I had that I also I also religiously with
to George might look at and the other thing I was wrong with this presentation is the clearly did not put the link up with the clearly the winner of the causal warrants which was the new
geo this this like this is the winner it had 24 bit audio and I was
16 at wild problem on anyway so I realize I realize this year that i've been doing i've been doing rails for over 10 years but I got my 1st real job in 2006 that's when I started started doing real professionally and I want to tell you wanna tell you a story about my 1st not not rails programmer from Ruby program on my 1st like real review program of my 1st real program I wrote in 2003 so this is 2003 2003 and this year this year Lord of the Rings coming out
laundering return the king and I was really excited about this as exciting you'll notice a release date on that December 17 OK now my birthday is December 16 and they're coming out with this movie this movie they're gonna play this 1 in all the other 2 back-to-back in a movie theater so it's like 10 hours of movies right and I have the energy a day earlier my birthday so I really want to see but I really want to see it now at a time I was a GATE Developer and all this is a secret so I thought I thought the only interview my 5 best friends in the audience I wasn't I wasn't a sailor Part I used to do GATE development and it would take about like you know 10 minutes to compile code and like I have an extremely short attention span so 10 minutes I might I I forgot what I was doing but anyway I like what it what you know what to do with this tenants of 10 minutes of
free time I thought to myself well you know i wanna buy these on by these tickets in I go to the website try to bite chartered by the movie tickets in the website breaks so the work it's like crashing under load on its 2003 people did not know how to sell tickets online stuff but so I like OK well i've got 10 minutes and the emitted try writing a Ruby program that will go buy the tickets for me OK so I wrote this Ruby program during my compile-time that would go to the website enter enter all the information including my credit card number and the effect that the her and try to purchase tickets and the thing is I knew so I knew what would happen when it fails when website fail right so I would go to the website and fill it out and new with the page look like when it failed and but I didn't know what a success case look like because I couldn't buy the tickets so what I did was essentially is like a like OK if I don't get a failure by Duncan a failure to understand a lot a message good and I thought well see it in the terminal all see that in the terminal and then I'll know I going to go check out see what's up so I go back to writing some geosphere whatever it was like probably configuring some XML files I n later on I notice like I know this 0 my god the the the L parameter roles different was going on and i see i see all sudden like it had actually been succeeding his and I scroll up through the terminal and like all my guess I could spend uh the so I like what I do what I do how many how many movie tickets that I buy and sell assets I called I called the credit card company and I ask them with the most I don't know where knowledge it question ever I like I I I was wondering how many times of a charged my credit card today it at a class that is that I mean if there's a suspicious question that is that is 1 of those and so the you know the person was very helpful is that all you well you've only charge your credit card once like OK great just once OK so I want to make sure that actually at the movie tickets so I called the I call the movie theater on I don't know like looking back on this I don't know how they actually have this data but they didn't so that I have some like a I tried to buy some movie tickets from you and I'm just wondering if you know your site was down just wondering the transaction actually went through and if I actually get the movie tickets and a person looks at the data for me and say yeah I yeah you you're were able buy some tickets that it looks like we're trying to charge a credit card hundreds of times it suggested I like the authorial she the and uh the Bejo blurry do it was like I was hitting racetracks and are I take up up up up up so that was my that was my very 1st serious review program was bad back back then OK so I wanna talk what's talk a little bit about technical that and I should move a little faster 1 slides here so was talk a little bit about technical that just and talk a little bit about evidence in his talk but I wanna talk about a new strategy for cheap dealing with technical that so I have come up with so we know that developers wanna pay technical debt so as a developer you wanna pay off technical that but you know many of us in the Ruby community have grown up and become managers I've been and remain community for at an extremely long time and managers don't actually want payoff technical them right because it takes it takes time away they'd rather be adding features or whatever it is that they want you know they watch ships so what's happening is we've got this community that's growing up in or ending up with all these people who used to be developers and now the managers and published all these gems and all these gems have some sort of technical that in so what I wanna do my idea is I wanna Korea metagenome is manageable actually package up all of these gems have technical that in them it will were going to do is we're actually call this metagenome a bond and this now these bonds are made of genomes that have classes and these classes have extremely low Fico scores so it will end-user red take those classes Morgana shopping around to different company is like a 5th like test double if testable won't give us good Fico scores and will go will go to a different go different insolvency is the 1 down the road's if we get a better get a better score so worried that were a package all those gems try to get them better scorers gender as we call them tranches yeah it it is so the other my my other strategy for this is that you know what we can do is we can take we can take a dependencies from all the other communities for example younger communities with the JavaScript community they have newer developers and they wanna pay off the technical debt more quickly so these the package is a probably triple-a-rated so we wanna do is stop pointing at things like web pack for example which has a good you know good credit ratings so we can actually sell these cell these gems little bit easier now what I think this is doing I you know I I don't wanna be too forward about this but basically what this is doing is when we do when we depend on these younger communities that actually helping us feed off the blood of young people and I think that the 0 sorry
rather than doing our rather than being able to focus on our that we want depend on these younger communities so that we can focus on our core competencies which is concatenating about distributed this right so so if that is so earlier today 0 was talking about how other different talks at rails come for going to be you know we have laid of forests and forest and trees is and we you know getting into the weeds individual discussions are getting into the weeds sure thinking OK well you know and from the northwest saw probably have you know this
beautiful like beautiful looking for us for anaphora stock here since this is a keynote but as I go on with this I'm afraid you're going to see that we we might start getting into the
weeds there really get into the weeds of the stock but but what I really really wanted know is that this is actually a forest stock OK this is a forest park it's just that it's a dead Forest Park OK it's it's a
dead for a stock and you'll realizes that the end of talk hopefully what I want you to take away from this stock at the end of it is where did my 40 minutes go and give me back my time here and that so before before we go to further this is not a joke I need to do
part of knowledge of OK so 5 5
5 dollar 5 dollar
fluent no OK artifacts topic 5 . 1 rails 501 I
I'm very pleased to announce the rails 5 . 1 is
out at the time on it in the 1st of the new to denotes the real reason I wanna say thank you thank you to the rest of you think do contributors especially thank you to Rafael but you did so much work to make this happen so the 3rd so I originally wanted the title was part of I don't have time for this is wanna talk about things that I would like to do I don't have time to do and I like this title because it's its noncommittal I don't you know who you know its just some things that are not enough time and there's something that like to ride on of time it's also a humorous use of a common phrase which I think is good but the problem the the problem that is that when you're a keynote speaker that that organizers tell you know all that you can talk about whatever you want to there's no pressure is low pressure of course whenever anybody says that to me I it just means that all the
pressure for me it's just extreme pressure an extreme amount of pressure in fact I actually took the cereals Briggs that's and somehow
my result was stressed I don't I so that is so I you know I I'm thinking I want this you know like the subtitle but that over I'm overcome by fear and self-doubt I just think to myself you know what if I totally screw up and the sound like right and a Salacoa's here again we're and prepare for the talk you know I didn't do enough work so I thought OK well what if I say it with my colleague 5 things I don't have time to do so to get to that so it's more concrete people know what to expect but then then I I got even more worried about what if I what if I don't actually have tighter presented 5 things or what if I wanna talk about things I do have time for noun limiting myself watch what can I title also the real the real title this presentation some
things that I don't have time to do but you should do them to me like 3 things by I have time to do other things so that's the actual final top arrive splitted into 2 2 left the segments being the probably important segment and the definitely not important segments so when it goes to the probably important segment in and after that I wanted to also your brains off and just relax because trust me this presentation is a huge waste of your time so it's not about a http to
and rock and minaret for 2 is each do from now on is the thing that I do have time for let's talk about what is what is age 2 H 2 well it's a version of HTTP that's 1 better than 8 1 most of us I realize most of you using HTTP 1 . 1 so it's actually . 9 better than that but it's still better still improvement so really really what it is is on this list of stuff that's a binary protocol and multiplexes which means you can you request response of the same by TCP connection I secure it only works over as a cell that is not technically true it'll work over a plain-text connection but all the old or an unencrypted connection but all the major browser vendors only supported over over SSL and the other major thing use push responses and I'm not gonna talk about the 1st 3 because they don't really impact us as web developers I'm just gonna talk about the last 1 because that's the major change for OS as application developers so push response flow in normal in a normal H 1 application your request and response looks something like this have an HTML page on that HTML page hits returned it depends on j query say my cat CSS files right so we have to go back and forth and get all these now with H 2 when a user requests that index that HTML page we know that they're going to need J. query or in the CSS file so we can do is we can say OK i'll when you make a request to index xhtml I'm also gonna push down these other assets as well there come down along with it without you needing to request so we're saving time by pushing these needed resources down to down to the point now unfortunately this has a problem there is there's some problems with H 2 and the problem is that H 2 stateless in the same way that HTTP 1 is so we don't necessarily know whether or not somebody has received that asset so we we have a problem where maybe we send those assets down to the user and they already have their have Jake or so in that particular case the client may it may actually cancel so laughter will send an index it tries to send and J. query tries to send them the CSS file the client actually have to say no no I don't want that I don't want that in some cases it may not say all I don't want that images take the asset and now you've actually said the acid to the client wants so the client cancel or we may actually reason assets both of these are problems with this type of push and push service so the solution is that H 2 O and salt the and I feel on your pain it energizes me the no OK really that the solution is a stone cookies are so let's talk about H 2 O H 2 0 is a NDS is an annoying neural that is example with L as the number 1 OK the yeah I know right but anyway show it shows a proxy it's an HTTP to a web server it's a proxy server I'm going to talk about the solution that it uses for dealing with this as a problem and it sits in front of your application just like say engine would for
example of so we have a client here in the client talks or proxy or into a proxy and the proxy talks are application server now the proxy speaks H 1 to our app server and it speaks H 2 to acquire so if we wanted to H 2 questions we actually can within each 1 web server and
the way that we do that is we can use the link with following Qatar's so we saw when we send the response of for example this response of the proxy will actually get the response look at these link tags and say OK I'm gonna push those assets down the client so in this particular flow our
server responds with some value like that is sends it over to the proxy the proxy says but OK I it I am going this push these assets down the client now H 2 o what it does for the Web server does it actually makes a fingerprint of those those assets and stores them in a cookie now if you've already pushed those assets down to the client but it won't push them again so it knows it knows whether or not it needs actually push those push those assets down to the client and this is extremely nice for us because it means that in our application we don't have to do any
state track we can just say I'm just gonna push down nodes and indexing and send you the link Link headers i you deal with it so the proxy takes care of all that for us now there is 1 problem with this response and that's that but if you look at the response here so we actually have to send the Link header after we calculate the response code so what if we don't actually know that it's a 200 year what we wanna sense assets regardless of what the response coders so the way that we can do that is with a new rule there is a new proposal being so uh proposed the birds where I called the 103 early response early
hints response and what this is just a new response code that basically has no body in a looks like this we just start following Qatar's into that so in that previous example would change to this so we can send a 1 0 3 0 1 0 3 with the wink wink header and then go on into the rest of our page processing and I is to understands understands this 103 response so this allows us to send responses without calculating status code so let's talk about rack support and this is going to come interact 3 . 0 all the main thing that we're missing from rack is were missing this push the push response so essentially what we're going to do is add another Hastie theres no that as a yes no I'm not very excited about this solution but because I I don't really like the API of just passing patches and stuff everywhere but the way that we get from this is that I backwards compatible you'll be able to upgrade your applications without breaking anything and you can actually gracefully upgrade your application so we can say I I wanted I'm ready to take advantage of pushes so I can do what I can do that now of my web server and this is all coming rack 3 . 0 but if hold on a 2nd to the little dry here the at a local team the support local actually anonymous at this down here and all of that the I like the joke but I don't like enough to the rumor laptops at that time time so I was this was the part that you had to pay attention to now feel free to shut off your brains for the rest of the presentation of our talk about code smells so what I wanna talk about code smells so I've I've been working on a project at home I've been collecting a lot of data and this is this is some data that I've been acquiring have digital signal that I've been collecting a home and I apologize the signal is it's not very good the date is the date is going to grab on and I wanna do some I wanna do some analysis on this data OK so what is a processing on and I've been trying to do the processing and now unfortunately I if a lot of data I've been recording and the recording a datapoint every 2nd sense what is that on January 23rd this year so it's still recording as we speak and I've been trying to do data processing on it but I need to do a lot of math unlike a way to increase our speed up mathematical operations in review so I was thinking lately about doing some Ruby VM tracks and the show them to show you what I've been thinking about doing today so 1st you talk about how works the other way the works it's pretty easy we have we have a
program and there's a stack and then there's a program counter this program counter always pushes the the next instruction to execute so the way these instructions workers they just manipulate the stack so 1st will push on a number 4 to the stack them will push number 3 under this fact then will add in the way and works as it pops the 2 values off the stack and which is the new value on the stack so we get 7 now the way this is actually implemented is something like this we have a
list of instructions and we have a loop we loop over the instructions we get the next 1 and we look up what then the method for that next 1 and then we execute that method and we just keep running through this loop over and over again now there is a way that we can actually speed this up and we can we can actually eliminate this loop that loops really instructions and we can do that by generating the virtual machine so if we if we generate the virtual machine we can generate a bunch of functions in each function each function represents the instruction sequence that we're going to execute so this is what the idea might look like we have a couple instructions employer a few instructions implemented there and we have a small bit of code at the end of each function that's been generated that bit of code right there's generated and what that does at the end of each function is it looks up the next instruction to execute and then just call that 1 so were able to eliminate that infinitely this technique is what's called a threaded virtual machine so you can think of it as threading were going through 1 function popping out that function into the next 1 and we keep going and going source threading through the instructions rather than doing a live now there's a problem with these function calls the problem of function calls is that we can end up with a very deep stack so all we like to do is eliminate these function calls so we can actually do that by getting rid of the getting rid of the function look up so we say here is we say OK this is our normal are normal lookup process we actually look up the function we call center Nikos and calls a function instead what we can do in this a trick that you can't do in review to trick you have to do in C is wastes end up with a switch statement like this a label a label with about to go to use I use the word job because that is um I don't know I guess is more socially acceptable and go to but so what we do is we actually look up the address of the place that we need to jump to so we have this we have is generated bit right here so we say ah I ran generators will look up the address we need to jump to and we jump to that's we don't actually have to we have we have to call function anymore we still have a problem here there's a way we can speed up the and even further and that eliminating that table lookup we can get rid of that table so instead of instead of looking at the address that we need to jump to instead we embed that address into the byte code itself so when were compiling your code we embed that address into the instruction sequences so then when we look at up we just say OK jump to the sabbath directly we don't have that jumped 1 more and this is what is called the direct threat the and this is this is this is the view and it's used in Ruby MRI today where the interesting thing is that these addresses are just images that is arbitrary integers inside of your computer's memory and we just jump to the so arise EM is direct threat and so what I would like to do is create custom instructions built from the she and build machine code at run time since those instructions are just images just places to jump to we could actually just insert our own our own avarice and jump to that thing inhabit execute that of this so I put together a very simple example best of we use really carefully there's actually uses LVM to assemble machine code and we can execute that machine code for Ruby the only thing that's missing here is actually disassembling the the of code inserting our own integer jump to so my 1st idea of stuff that I don't have time for is creating custom instructions the runtime that we can actually speed up a mathematical operations so OK we've got 1 way we can speed this up but now back to back to the data about you know a faster VM would definitely help analyzes data but the fast began isn't gonna do us any good unless we have algorithms that can help us deal with that help us deal with analyzing this data so in order to analyze this digital signal I would actually like to build a police scanner so now you know I am I am 36 0 6 years old I am soon to be a I'm now homeowner I need to be sitting on my front porch listening to a police scanner because as old people do it is yes you will be in in the future I'm sorry so I I all of
these this is a very neat tool it is a software-defined radio that you can a radio you can plug in your but now I'm going to give you an any given
example what this offer actually looks like when users sire computer I looks like this this is
alive I'm actually scanning doing some police scanning right now that bar in the center there is a digital signal of the digital signal it indicates what channel people or broadcasting on so the digital signal is used to coordinate between different channels is what's called a trunking scan so you can see up there I'm actually manually moving that moving the signal left and right so the audio voices are
actually analog and that the thing that coordinates which frequencies analog signals are on is that digital signal is there and you press so you get an idea you get an idea what we're dealing with here is you can move it back and forth but this is an example of an FM band
FM band radio so you can see a little bit wider this narrow found that police
use this is what it looks like in the middle there is a digital signal are digital trunking signal an over on these little these little bars the you can see jumping around those are audio signals that we need to listen so we have to be able to decode that digital signal in order to find the audio signals listen to so to do this we do digital signal
processing and this is actually split into 2 different 2 different signals of 2 types of signals and continuous signals in discrete signals I continuous signals are like maybe the light is coming to you right you see wider your music a discrete signal is what we deal with on the computer because we actually have to take samples of the things we can't store an infinite an infinite number of points on the computer so we deal with discrete discrete compute discrete signals so and I made this personified people who use appreciate those thank you I worked very hard on that also discrete signals are
just a list of points so again we've got we've got this discrete signal here and are do apologize for this crappy data is really just grab and I apologize on but this is a discrete signal that I'm I'm trying to deal with it so the way that we deal with these is through a process called convolution and this is what what convolution is is taking 2 signals combining them into a 3rd signal and this is this is kind of what we're doing here I I apologize for the star that star there the star is actually the mathematical notation for convolution unfortunately it's also the thing we use for multiplication in computers so so convolution is taking these 2 signals in coming up with a 3rd signal from that the formal definition is like this but we're not going to I won't describing here will do in pictures of so we have 3 signals here that top 1 is our original signal the middle 1 is the signal that we want convolute with and the 3rd 1 is a resulting signal so the code for actually doing this is the this is the code for doing it in Ruby and I want you to notice that it's based on arrays but were using array indexes and there's an a indexes started 0 this is important so convoluted are convoluted signal length is actually the signal the length of the 2 signals minus 1 and the way the algorithm works is we have a single the top there that's origin signal the signal at the bottom is the 1 1 example we with and we take that those points on the bottom signal and multiply them times a points on the top signal and then some those to get that the point in the resulting the resulting signal so we actually moved along it starts at 0 like this and we move along like that keep calculating those not how we come up with the come up with a new signal so water a look at a few low-pass filters low-pass filter just these little chunks that we applied to are applied to the signal so this is an identity signal i is just the number 1 and if we take the original signal convoluted with the identity signal than we just end up with the same signal again so we can actually use this to define an amplifier so instead of multiplying by 2 1 we have a 2 so it looks the same but you can see that bottom signals actually twice as high we can use this to shift the signal 1 to the right so if we set point 1 to 1 so we've actually shifted our resulting signal to the right by 1 and we can take me is take these are little kernels and combined together to do interesting things the signal for example we can make an echo so we have a we have a amplifier plus a shifter which comes up with an echo we can even come up with an average so will will take these 2 signals and figure out the average of the signal and the reason I wanna do this is because taking the average of the signal will smooth out that smooth out that random data at the bottom but keep the keep those sharp edges which is what we're trying to detect we can actually use this for 8 hours as well so for example if we transmit a signal like the 1 on the left and we get a signal like the 1 on the right the contains random noise and that we can answer the question is 1 signal contain the other and we do that by taking the received signal and convoluting that with the transmitted signal and if that the receive signal contains the transmitted signal then you get a very high spike where so we can actually detect when detect when our signal is there another anything that you can do it and come up with the guys in distribution so if you take 1 signal and you convoluted with itself a few times you actually end up with a Gaussian distribution like this and I just think of that is need so again here's our here's our convolution code
and remember it's a it's based off 0 0 base indexes and I thought to myself you know i've gotta i've gotta do all this they do all these transformations and I want a graph then and I want to graph and all are but because doing in R is pretty you know pretty cool like makes you look smart and stuff even though the graphs agraphia everybody cycle graphs use or I have this so so I thought to myself OK well I'm gonna port there's an airport this Ruby could already in graph graph that data so I learned I learned about are the
hard way I took this I just ported the code straight over R and it turns out that in all are arrays are actually 1 based based on 1 now what's really extremely fun about this languages it is asking for the zeroth element it gives you the type that stored in an array so in this case numeric have a list of integers it was even more fun is that you can perform mathematical operations on that type it just works no error so I acquire these calculations so the on I I was very
frustrated so I thought to myself you know I I don't wanna figure out I don't wanna figure out how to port my Ruby code to use 1 based indexes I'm not that smart there must be an easier way I thought myself there must be an easier way alright so back to the data back
to the data I said that this data and I'm I'm sorry it is crap data where we're trying to prove it but it is it is crap us I don't wanna figure out how to deal with these 1 based indexes so my next my next thing that I want to do and I just don't have time to do it is
implementing cons car encoder in different languages but using only when and you may be asking yourself
why why would you do that to yourself and the reason is I like learning new languages but I don't have much time I don't have much time to learn a whole bunch of new languages so I thought to myself what is the bare minimum that I can learn in any particular language in order to get indoor went in and and I thought to myself well the 1 thing I can learn if I learn this and if I went lambdas in every single language then that should be enough to get me into any you know give me endorse someone so where is the thing I wanna learn any target language so what our cons car encoder the cons actually forms a cell the left and right a left and right things we just have 2 things here no other function car returns the left side of the cell so it'll give us back the left side of the function could will actually return the right side of the cell now what can we do this only using landers and the answer is yes we can i've written in 3 languages here for you this is all on node and Ruby and colored nodes don't know the difference between node in Java Script and I actually actually posted this function on the Twitter and I was like how why OF the type returned so much and I got all like Tom the responses that we will use the estates role and I like I don't I don't know what that is the so is that this kind of a mouthful and I need to move on but what it is is our commons is a function that returns a function and that function that returns takes a function and calls are functions I so a return the function right OK server you don't think about 2 hours with so car what it does it's a function that takes a function calls a function and passes a function and the function that it passes returns the left side and actually the easiest way to see this is using using arts defined Collins an are if we call constancy you'll see that actually returns to things of function so like I said a return the function returns environment and the environment is the thing that actually captures that captures those 2 values you'll see car is just a function I and I can pass that I can pass the return value of Collins to car and recover my original original value now here is a could implementation it actually returns right side it looks exactly the same as the as the cars were just returning right side left side so this we can actually form a tree is a tree of cells so we can say like OK we have a 1 a 2 hour we have a 1 on the left side and the right side points in another cell and then we can just keep doing this and end up with no on the very end and we can actually turn this into an array so if I implement a function called each we can indeed iterate over that over that list the I now here's an example usage this is this is in JavaScript we can see we can't together a bunch of stuff and we can actually loop over those and get get our values back so what's neat about this is a means well we don't have loops anymore I don't need to know how your language implements loops of I don't need to know how your language implements arrays I if I implement hashes hashing function I don't even know how your language implement hashes because I can just use a tree so what about numbers well we can actually eliminate that too I don't wanna know how numbers work new language there and we can do that using using a thing called Church numeral encoding and what that is is we define a function that calls something 0 times at 0 so we define a function that calls a function that you pass in once that's 1 and if we call a function twice that's 2 or 3 times at 3 and that's the way that we encode these and if you look at the very bottom there I can prove to you that 3 is equivalent to 3 by passing a function that just increment by 1 so you get 3 back from that now I'm lazy I don't want to find every single 1 of these so I can actually define a function that's called added since we know that we just need to call that function the number of times for the number that is so we can define other function 1 we define add and we can define 2 and 3 in etcetera etcetera etcetera so I have all the numbers and this is called Church encoding so I no longer need your numbers I know how to do and I can figure out how to do subtract multiply divide so don't need a mathematics I I can even circumvent logic as well so if I implement I can implement true and false in in land and I can implement conditionals of those and I can go into that because I do need to move along so we don't need Booleans so we don't need conditionals I don't really need any of your language I just me windows so back to my back to my graph data back to original problem I did wanna rewrite my algorithm using 1 based arrays right I want to rewrite that I want to write a using 0 for and now that I can implement an array in any target language and I want to I can make my or a zero-based so what I did in AZ-II implement Cons car could the labeling each the labeling each with index and now I have now I have an array and I implemented on array indexing so I say like that I want I wanna get a head element at a particular index and make that index 0 I I can actually take those vectors from vectors from R and turn them into cells and now I can actually port that convolution constraint over are using zero-based indexes yes alright ok you so I I'm library promise of a few some test data I got some test there plot so I can perform filters out I can do like in could define a filter plot the data the filter and then do convolution on the data and plot that as well so I can see this is on the the crabgrass and see how nobody's are so I'm pretty proud of myself at this point we yes nice looks good so I'm like OK let's take a real data in input and I take my real data that I'm trying to trying to analyze I input and Fortaleza
is error evaluation as the deeply infinite occurs and it turns out that are does not support tail call corecursion so this blows up the stack and I just think I hate are so the things I don't have time for figuring out
or he I back to the back to grab data so I'm a couple not think that that that that that that if I want I wanna share with you on a share with you something and I build actually acquires is there so I show you where I got this data from and what I'm trying to when actually trying to figure out what the status I wanna show you something to build on wanted bill was I have had this contraction right
here so what it's composed of a
bathroom scale sort of a bathroom scale I we have an amnesty for 30 is a microcontroller that is able to read off of the scale and give us the give us the way data over a serial connection and I have a rather a pipe was plus a motion sensor and Raspberry Pi will read that way data over the serial connection so I have it set up at home like this so at the top there is lot at the
top is where I have the Raspberry Pi mounted with the motion detector at the bottom there that warrants bar is the uh the scale now on top of the scale are actually have what is known as a litter box in yeah the cat goes in the litter box I can detect that in can we use and I know I know that the cat as last so that is where this graph comes
from I am at the head of the not that so so so on the left hand side is where the cat enters and on the right hand side that is where the cat leaves and if we calculate the difference between those 2 we can figure out approximately how much was left behind time calculated to be about 100 grams alright
so let's wrap this up where wrap this up with a little kernel of knowledge for you to take home so you don't feel like my entire talk was a waste of time of effect fact that the so what I really wanna like you know we should take conference conference there is that it's very hard to make should scale thank you very much higher and it was an honor to be here thank you have and uh the
th Farah WSD he was really
Subtraktion
Computerunterstützte Übersetzung
Bildschirmsymbol
Computeranimation
Widget
Computerunterstützte Übersetzung
Code
Computeranimation
Office-Paket
Bit
Facebook
Sprachsynthese
Computerunterstützte Übersetzung
Hacker
YouTube
Computeranimation
Open Source
Telekommunikation
Software
Web Site
Twitter <Softwareplattform>
Software
Open Source
Mereologie
Hacker
Computeranimation
Internetworking
Telekommunikation
Bit
Sichtenkonzept
Zentraleinheit
Zentraleinheit
Computeranimation
Soundverarbeitung
Programmiersprache
Formale Sprache
Zentraleinheit
Extrempunkt
Computeranimation
Generizität
Domain-Name
Formale Sprache
Datentyp
Generizität
Zentraleinheit
Schreib-Lese-Kopf
Soundverarbeitung
Stellenring
Subtraktion
Lesezeichen <Internet>
Fächer <Mathematik>
Selbstrepräsentation
Mereologie
Stellenring
Garbentheorie
Kombinatorische Gruppentheorie
Speicher <Informatik>
Hacker
Computeranimation
Bit
Befehl <Informatik>
Punkt
Framework <Informatik>
Formale Sprache
Garbentheorie
Computeranimation
Programm
Programmiergerät
Unterring
Prozess <Informatik>
Reelle Zahl
Programmiergerät
Vorlesung/Konferenz
Optimierung
Binder <Informatik>
Kombinatorische Gruppentheorie
Räumliche Anordnung
Computeranimation
Chipkarte
Web Site
Bit
Subtraktion
Klasse <Mathematik>
Zellularer Automat
Zahlenbereich
Computeranimation
Homepage
Benutzerbeteiligung
Datenmanagement
Radikal <Mathematik>
Kontrollstruktur
Vorlesung/Konferenz
Softwareentwickler
Optimierung
Soundverarbeitung
Softwaretest
Parametersystem
Softwareentwickler
Güte der Anpassung
Auflösbare Gruppe
Bitrate
Elektronische Publikation
Chipkarte
Rechenschieber
Energiedichte
Transaktionsverwaltung
Verknüpfungsglied
Last
Mereologie
Grundsätze ordnungsmäßiger Datenverarbeitung
Strategisches Spiel
Information
Zeichenkette
Netzwerktopologie
Subtraktion
Wald <Graphentheorie>
Rechter Winkel
Speicherabzug
Computeranimation
Wald <Graphentheorie>
Mereologie
Computeranimation
Druckverlauf
Selbst organisierendes System
Mereologie
Computeranimation
Resultante
Druckverlauf
Rechter Winkel
Gasdruck
Kombinatorische Gruppentheorie
Extreme programming
Computeranimation
Normalspannung
Proxy Server
Server
Punkt
Multiplexbetrieb
Browser
Atomarität <Informatik>
Mathematisierung
Versionsverwaltung
Zahlenbereich
Zellularer Automat
Kartesische Koordinaten
Kombinatorische Gruppentheorie
Binärcode
Computeranimation
Homepage
Benutzerbeteiligung
Client
Socket
Datentyp
Endogene Variable
Protokoll <Datenverarbeitungssystem>
Softwareentwickler
Bildgebendes Verfahren
Einfach zusammenhängender Raum
Binärcode
Protokoll <Datenverarbeitungssystem>
Multiplexbetrieb
Abfrage
Mailing-Liste
Elektronische Publikation
Datenfluss
Endogene Variable
Dienst <Informatik>
Automatische Indexierung
Client
Cookie <Internet>
Server
Bandmatrix
Web-Designer
Normalvektor
Computerunterstützte Übersetzung
Proxy Server
App <Programm>
Server
Datentyp
Content <Internet>
Kartesische Koordinaten
E-Mail
Dicke
Binder <Informatik>
Datenfluss
Computeranimation
Endogene Variable
Client
Benutzerbeteiligung
Verschlingung
Proxy Server
Endogene Variable
Server
Cookie <Internet>
Elektronischer Fingerabdruck
Speicher <Informatik>
Proxy Server
Hash-Algorithmus
Prozess <Physik>
Mathematisierung
Content <Internet>
Interaktives Fernsehen
Kartesische Koordinaten
E-Mail
Dicke
Kombinatorische Gruppentheorie
Code
Computeranimation
Homepage
Weg <Topologie>
Knotenmenge
Benutzerbeteiligung
Code
Notebook-Computer
Endogene Variable
E-Mail
Analysis
Objektverfolgung
Nichtlinearer Operator
Datentyp
Schlussregel
Binder <Informatik>
Systemaufruf
Endogene Variable
Patch <Software>
Digitalsignal
Verschlingung
Automatische Indexierung
Mereologie
Server
Projektive Ebene
Aggregatzustand
Folge <Mathematik>
Bit
Prozess <Physik>
Adressraum
Zahlenbereich
Gebäude <Mathematik>
Maschinensprache
Computerunterstütztes Verfahren
Code
Computeranimation
Virtuelle Maschine
Loop
Wechselsprung
Algorithmus
Prozess <Informatik>
Adressraum
Code
Maschinencode
Byte-Code
Optimierung
Hilfesystem
Bildgebendes Verfahren
Implementierung
Tabelle <Informatik>
Programm
Nichtlinearer Operator
Lineares Funktional
Befehl <Informatik>
Gerichtete Menge
Sichtenkonzept
Assembler
Rechenzeit
Gebäude <Mathematik>
Rechenzeit
Systemaufruf
Mailing-Liste
Quellcode
Keller <Informatik>
Generator <Informatik>
Digitalsignal
Funktion <Mathematik>
Loop
Ganze Zahl
Rechter Winkel
Eliminationsverfahren
Festspeicher
Wort <Informatik>
Ordnung <Mathematik>
Normalvektor
Tabelle <Informatik>
Software Radio
Software
Digitalsignal
Gruppe <Mathematik>
Computer
Broadcastingverfahren
Computeranimation
Bit
Prozess <Physik>
Punkt
Zahlenbereich
Computer
Computeranimation
Unendlichkeit
Digitalsignal
Digitalsignal
Gruppe <Mathematik>
Digitalisierer
Stichprobenumfang
Datentyp
Ordnung <Mathematik>
Speicher <Informatik>
Diskrete Untergruppe
Digitale Signalverarbeitung
Analytische Fortsetzung
Mittelwert
Distributionstheorie
Punkt
Prozess <Physik>
Wasserdampftafel
Zahlenbereich
Identitätsverwaltung
Ungerichteter Graph
Transformation <Mathematik>
Computerunterstütztes Verfahren
Code
Computeranimation
Kernel <Informatik>
Zahlensystem
Multiplikation
Algorithmus
Mittelwert
Code
Minimum
Nichtunterscheidbarkeit
Faltungsoperator
Figurierte Zahl
Array <Informatik>
Distributionstheorie
Dicke
Mathematik
Graph
Sender
Faltungscode
Mailing-Liste
Automatische Indexierung
Rechter Winkel
Dreiecksfreier Graph
Faltungsoperator
Gleitkommarechnung
Nichtlinearer Operator
Formale Sprache
Mailing-Liste
Element <Mathematik>
Rechnen
Code
Computeranimation
Array <Informatik>
Ganze Zahl
Automatische Indexierung
Datentyp
Figurierte Zahl
Fehlermeldung
Array <Informatik>
Punkt
Extrempunkt
Compiler
Formale Sprache
Applet
Element <Mathematik>
Kardinalzahl
Dicke
Extrempunkt
Computeranimation
Netzwerktopologie
Algorithmus
Bildschirmfenster
Skript <Programm>
Plot <Graphische Darstellung>
Addition
Array <Informatik>
Softwaretest
Automatische Indexierung
Lineares Funktional
Filter <Stochastik>
Systemaufruf
Plot <Graphische Darstellung>
Digitalfilter
Programmierumgebung
Ein-Ausgabe
Teilbarkeit
Arithmetisches Mittel
Funktion <Mathematik>
Twitter <Softwareplattform>
Automatische Indexierung
Rechter Winkel
Zahlenbereich
Zellularer Automat
Konditionszahl
Server
Decodierung
Ordnung <Mathematik>
Programmierumgebung
Lambda-Kalkül
Nebenbedingung
Subtraktion
Implementierung
Zellularer Automat
Zahlenbereich
Mathematische Logik
Loop
Knotenmenge
Reelle Zahl
Datentyp
Endogene Variable
Hash-Algorithmus
Faltungsoperator
Programmbibliothek
Schreib-Lese-Kopf
Graph
Mathematik
Multiplikationssatz
Mailing-Liste
Vektorraum
Hochdruck
Netzwerktopologie
Bildschirmmaske
Faltungsoperator
Mehrrechnersystem
Boolesche Algebra
Fehlermeldung
Gemeinsamer Speicher
Leistungsbewertung
Systemaufruf
Rekursivität
Computeranimation
Design by Contract
Rechter Winkel
Ein-Ausgabe
Plot <Graphische Darstellung>
Reelle Zahl
Steuerwerk
Fehlermeldung
Leistungsbewertung
Einfach zusammenhängender Raum
Zentrische Streckung
Graph
Quader
Minimum
Mikrocontroller
Computerunterstützte Übersetzung
Quick-Sort
Computeranimation
Soundverarbeitung
Subtraktion
Maßstab
Rechter Winkel
Endlicher Graph
Computerunterstützte Übersetzung
Computeranimation
Kernel <Informatik>
Schreib-Lese-Kopf

Metadaten

Formale Metadaten

Titel Closing Keynote by Patterson
Serientitel RailsConf 2017
Teil 19
Anzahl der Teile 86
Autor Patterson, Aaron
Lizenz CC-Namensnennung - Weitergabe unter gleichen Bedingungen 3.0 Unported:
Sie dürfen das Werk bzw. den Inhalt zu jedem legalen und nicht-kommerziellen Zweck nutzen, verändern und in unveränderter oder veränderter Form vervielfältigen, verbreiten und öffentlich zugänglich machen, sofern Sie den Namen des Autors/Rechteinhabers in der von ihm festgelegten Weise nennen und das Werk bzw. diesen Inhalt auch in veränderter Form nur unter den Bedingungen dieser Lizenz weitergeben.
DOI 10.5446/31236
Herausgeber Confreaks, LLC
Erscheinungsjahr 2017
Sprache Englisch

Inhaltliche Metadaten

Fachgebiet Informatik

Ähnliche Filme

Loading...