Devreal

SF Scala: Bill Venners Interview

SF Scala: Bill Venners Interview

Recording: SF Scala: Bill Venners Interview

hello everybody I'm Alexa krav the founder and organizer of SF scala and this is our last made up of 2016 where Clara witches are a new member so we're kind of moving up and up and I think it's a very good way to close out the year with Bill donors one of the i would say fathers of Scotland locally and internationally with the author of the famous scholar book which will use and so I think we kind of celebrate many things by celebrating the third edition which came out this year we've seen a huge intake and the impact of skull of this year and the episode where a new company using scholar so I think this is all good reasons for us a shuttle bill so all right I will it's greater to you know have you back with us so third edition we didn't really have kind of a formal a book party and we'll use this as an opportunity kind of to see what's new in Scala right so the book is noticeably bigger I have it in my backpack oh I hope you can sign it ah and I learned a lot from that book right from the first edition yeah and then I had the second edition and I have this pti August all students so they don't if you remember we gave me a nice discount program at a good student it was true but you didn't verify anything and right on the PDF is super awesomely crafted all right that's not just any IDF and I think it's probably one of the reasons in my mind that Scala is actually adopted as much because it's actually just a perfect book on programming right it's not just a broken skull it actually reads very nicely right and and so I just wonder you know if you can tell us what's new third edition you know again how did you manage to to catch up with all this you know is it harder or easier every time when the fourth editions be coming out do you know it already so tell us you know kind of everything about third edition okay sure well first thanks for saying all those nice things and it's nice to hear that because we worked really hard on on making it accessible and making it a great piece of writing and the reason it was hard to do the 3rd edition is because scala actually did get adopted to some enough of an extent that everybody was really busy so what we we actually I just had a conversation with Martin it skull exchange last week that I we were talking about maybe we should just do one every release like just instead of like when it's sealed feels like the right time to do it just go ahead and do one every year and a half because scholar releases come out one and a half years and it might be easier to do the update but since ours had gotten pretty stale it was five years since there'd been a new edition yes just because we couldn't keep up we actually over shots Collins and covered to 12 in the book before 212 was released as a risky because what if she fell changed right they might have changed what if meant between the time we you know we'd have to but they didn't it it actually is still accurate to 212 and now it's it's the most up-to-date book and I just I think you know because it is kind of a resource for everybody would be good if we could try to do that and then it would be a smaller step each time so hopefully we can achieve that but but yeah I was for me I mean just personally was so hard of how many years I've been wanting to get it out and it couldn't just couldn't quite get it all finished so it was a really nice too so finally get it out the door so a writer all right has the different techniques yeah I like so there is this program in empirical writers almanac right garrison keillor yeah does it every morning right that 9am like it's a fun job so and so the birthday so different writers and usually sometimes you measure the techniques even writers two different techniques yeah some of them kind of start with the last sentence and go backwards some of the way I can kind of so like is there anything in your technique how did you know obviously you you know your speaker right you can solve you have all the things wrong still you manage to find the time to write in update this big book like is there any special tricks and just put in for me was just find any time to put no work but I'm not that I don't think I'm really good at writing like just writing something once i have to write it badly and then rewrite it a bunch of times and really do that a lot for me other people you know it just comes out pretty nice you know earlier on but the other thing that I learned from brew cycle he's a wrote a lot of books that were pretty popular on C++ yes thinking the job the second thing is he was using Java she was too big books right he wrote a tummy spell that's right this he said read it out loud to yourself and if it sounds funny saying it out loud then maybe it's not conversational if I mean the kind of it spends on what you're trying to achieve because what I wanted to achieve was just conversational friendly tone mm-hmm so that's like what I would tell you about whatever it is I'm trying to explain in person that's how I wanted to code I mean the text come out I mean the yeah the reading field feeling to come out so that's one thing i would do sometimes is read it out loud it's myself to say if that sounds more natural you see ya but on my dad from bruce he gave me that tip you know i mean i know that you saw you little training i see and interact one-on-one yeah with people and you know I I can tell right like you know we have many many talks at the conference a madhab sell your talks are one of the best delivered right and kind of the clearest right so so I look at trying to see a very effective in person so I kind of traveling and you're speaking this allowed to try the kind of translate that into into book form what works in kind of interpersonal communication he it just wanted to be not confusing I think I mean interpret I mean the public speaking was I was not natural or at least when I was a kid I was very shy so it wasn't I was terrified of that but somehow I got or it didn't matter i don't know how that happened exactly where that happened but but yeah i think in the book i was thinking about you know his first book our team had ever published so i got books on typesetting and I wouldn't I wanted to make the typesetting beautiful if I could and kind of artsy I mean as best you can do with lautech yeah which lot of tech is really beautiful a two types it technical material you can really make it nice so but anyway um yeah I I think it was more really trying to squeeze out anything that could be confusing to people like especially things that sound alike like partial functions and partially applied functions they aren't this is they're completely different things but they sound very similar and that's confusing to users right but that's and we couldn't change I asked Martin if there's another name for that but he said you know they're really traditional in the academic literature so we should probably call them that so we did yes right on there were other things we changed names we adjusted to like not calling val value and VAR variable mm-hmm we didn't do that because val really is a variable also like f of x equals x plus 1 X doesn't change but it's a variable mm-hmm so things like that we were very very very painfully particular about to just try to not avoid when you're reading along you get mixed up you know i think what were they wouldn't you know what I mean so that's what in the writing as we try to do so what are the new measurer additions to the third edition well futures which was kind of funny because we wrote about the future of the future uh-huh which you could might want to well like you were we haven't come out yet but they added a bunch of stuff to future well first of all but in the old edition in the second edition we had a chapter on actors mm-hmm it was scala actors get that has since been deprecated and replaced by acaba dhaka is really like not scala it's a you know a thing on top of scala yep and Joba so it didn't really make sense to put it in the book but features had been taken from the Aqua project and brought into scala since then and so and they're just great right so I like them a lot so we want to put a chapter we replace the actors chapter with the future chapter but in 212 they added a bunch of nice methods to future which hadn't come out yet but we documented those as well so there was like the future of the future the future the past and just updated with everything got rid of the you know that the procedure syntax a bunch of little things just so it's up to date and like we didn't show view bounds anymore which is I don't think is officially deprecated but it's kind of not deep discouraged and we started we talked about context bounds which and type classes mm-hmm more which because they had the instance come into favor as the more preferred way to do that kind of thing so I have some examples it's just basically brought it up to date with what's in the language and what's accepted is more best practice let's say interesting so obviously you know skull is used for many different contexts and I think until a few years ago it was mostly used for things like plate but now we see a lot of add optional spark so whatever it is that influenced eating anyway it's influencing Scarlett and in this edition didn't really come into play there I don't think but like at least Martin is talked about some of the methods that they added in spark in like in the data structure to distributed collection mm-hmm are kind of nice i thought maybe we should put those in scala collections but they haven't yet so after this radical view of spark essentially that's I think the spark is basically justice turbulence column mmm so I think this partnership very very well yeah the note mortises they are basically your various color prompt and B instead of there's a single machine there is a giant cluster yeah but if sport doesn't jump really really well future disappear right and so I think if the initial success of spark was based on a scholar collections API reservation just took Scala collected be literally you know mail them you know the distributed collection behave in the same way right so so I think you know it's kind of you know the book that's a really good joke enough explaining the collections yeah right and i think in kind of the the long-term you know if people know them like is your supply right but but there is this whole rise of data and kind of essentially sequel like methods and data frames rather than Boris all this data science things so I wonder do have any inclination to kind of see how scholars used in this country so yeah I mean confusion the one thing that I felt was that the old way imperative way of dealing with collections of things like that you have a raise you'd use a while loop and go through them yes they kind of all have to be there or as the functional way was to get rid of there's like it's error prone to write a loop and index and all that so you move that into a method higher-order function like find and then you just pass in the bit that was different every time you wrote one of those loops which in the case of find is what you're looking for like a little predicate yeah and then that's a little bit of behavior so if you mm it's done that was then that way to make it less error-prone you know you're not writing a bunch of loops that you might make a mistake each time you have that all inside these higher-order functions you just pass in a little bit of behave it was different each time but because you're doing that then what then you don't have to have the whole collection there anymore right if it's distributed across five other day bm's you could give me can you can serialize it a little bit of behavior you can send it and have one piece do part of it and another piece do part of another piece department so I thought it was kind of like it fell out of because it was the functional style where you were functions were first class objects you could pass him around pass them as parameters that also happened maybe by Just well I don't know I mean I didn't sort of foresee that but it also meant that it could be this serializing sent and chopped up into pieces and if you look at parallel collections the same kind of thing even though it's on one JVM you chop it up in pieces and it will easier with you can send this behavior not get serializing it now but you know you can have parts of it done here parts we've done here and then you reassemble it mm-hmm that was the only kind of thought I had was that it it was the functional approach that enabled that mm-hmm which is big right yeah i think you know kind of to me Scarlett vesicles never use among students in the small right part is kind of memory some large right and skull is kind of it teaches you to deal that you know what the data set as a whole yeah I so you don't have this you know I we should get through it so you know which is you still you are using in Python right like it's not still natural to you want us you have to use them it can use a little spark right there but but I think it's kind of yeah so I wonder about the this other thing I think you know your book is actually kind of a first book for many people for scholar right and maybe the first book partial programming all right because of scholars special nature right so so I just wonder like if you know over the course of years like what are kind of observations you know like there are new people coming in to postpone remain right when they use your book so so do you see this is going easier is kind of functional mega mainstream or is it still a lot of dirty people kind of still of strongly with with this um new world well what came to my mind when you asked that question was that in we wrote it in two thousand if I get this right seven and eight and there was nobody using Scala really I mean it was his teeny tiny little potential future language that people might use yes and so the target market was Java people because they were feeling some pain of verbosity and a bit a bit of I had been a while since much it happened in Java land yes so we really did targeted it imperative Java but you're familiar with Java and that way of doing things and we would compare to Java a lot and I think what difference these days is that a lot of people are coming from Java now people coming from data science aren't mm-hmm so the you know comparison this is like Java that's like Java all through the book and footnotes mm-hmm like it makes sense for java people but it may not make so much sense for everybody right that's how it's different and they are I think I still think functional is most people don't have a lot of background and add a lot of practice with it most people i mean there's always definitely people came from high school mm-hmm because this was on the JVM but despite you hear from them i think most people aren't don't have a functional background still today but it's just they also don't have a job in essence background yes certainly that's different in Ruby you know somebody told me that Ruby developers make better scholar programmers untrained charitable it could be because they share the same interest in beauty and concise that's interesting right and look at this little close yours yep there's a kind of have a little verbal the parson to them yeah right so so they have no already have a lot of the ground yeah right and so a lot of them go to closure but I think scholars shares all the values right so so I think yeah I think like it is in this kind of modern world right maybe they're not into functional programming directly but they're kind of conditions right I got a little yes I can pick up yeah that's interesting because when way back when the in like prior to a me discovering scholar I was kind of feeling the tug of wanting a new language after Java that was more concise but I didn't want to give up static typing and I didn't buy the dynamic typing as the future Mont you know sort of marketing pitch of these consultants who wanted to hit sort of stake their their business on that yes and what I had observed is that what people like about Python what people liked it but Ruby we're actually functional things like blocks and Ruby mmm-hmmm or you know in small talk at the same thing yep list comprehensions in Python I was like well yeah but that's actually the functional thing and so that's that's was like oh that's interesting and then the other thing that I felt about Ruby's I really did like their taste you know they had really nice taste on code and beautiful code and I tried to I really tried to emulate or honor our spec when I design some things in Scala test because I just thought they did it right really nicely there and cucumber also like that's also from the Ruby community and just always very clean you know the code that's like English but yes right so that that actually did influence Scala test at least the Ruby aesthetic I think yes because I thought it was I also agreed with what you just said it they have a nice well I just think they have nice taste the other day Z I was fortunate to meet moths and all the other yeah he gave a talk recently at the the Microsoft reactor and interesting that D like you still focuses on basically yeah on style and making people happy no yeah he didn't care about how fast it goes unless that makes you unhappy I suppose but yeah I met him too I interviewed him years ago and he is this that was the most humble nicest guy yes yeah so so this is interesting so it's obviously can I think it's nice kind of transition into skeleton so I'm so going to talk about the essence yeah of testing yeah thanks for coming in this rainy day this is the essence right like that never tested us and I think the strongest people will well come yeah I know so so I know in the think it's you know kind of an allocation i would ask about the skeletons collective rights oh hello you you keep developing skeleton source collected it's kind of a separable library right right which you can use outside of testing and it reflects your own learning of you know a lot of different things on so i'm going to curious about your take on right so we see a lot of really full function programming yeah presented scholar by the playwright so every year new things are becoming mainstream so feminine was last year and of new things this year so it's come every year we introduced we up the level of complexity right and and so and they're gonna spread through the kind of most advanced tribe of scholar people right right and so I want and kind of inland scholastic I think you really do a good job of kind of taking what what kind of works for you right and make it available and when you look at it it's really clear and this has excellent skull doc in examples and now the link is kind of a lorry so I'm almost waiting for you to learn all this thing yeah that's funny okay learning little kind of threshold right yeah you know hurdle you know get into scholastic then we'll look at you so so so I just wonder like what do you think about this interesting progression that skull is kind of a testing ground for all this new 50 concepts and they're kind of some of the spread in the mainstream some of them are not right like then you decide to put them in scholastic so kind of tell me like how do you decide what to learn how does it make its way into scholar to Aston into the sky right well i don't know i think it's somewhat intuition and just like it is it over time I learned and then they relate so actually this way better but then I have to I deprecated that I mean I think one of the reasons people use Skeltah says it's also very stable mm-hmm I do make changes but I do them slowly and you know I if I actually need to realize I screwed up or not screwed up but i need to i want to change what something means I deprecated that it still works for a year or two yeah and then you know there's a warning and you switch to a different name and then I changed it after that right yes so but yes Galactic was just there are certain things people asked me for that made sense to put into test in the test framework that they also wanted in their production code so i said okay i'll i'll have this one that's tied together and it has grown over time and it is a lot it is like functional object divided programming it was kind of a little bit like cats or scholarly but is it like some of the things they do like a type-safe equality or validation or there's something in there called any valves which i'm going to show tonight which there's something in type level called refined which it's done mines in this collective basil more object-oriented and the refined way is a little more hastily it comes from high school it's like the type level but they there's it they it's like address some of the same use cases i would say but i think you know what's kind of I what you described there is true of Scala still and I remember years ago people I heard someone say about Scala that it's still small enough that it has interesting conferences uh-huh it's a lot bigger now but it still has really fascinating conferences because everybody's doing so many interesting things yes all different kinds of experiments so some of them you know won't end up being the way we end up mm-hmm but I think that's just what's really exciting about it is just people are all trying different things and so what I I'm kind of going the functional object-oriented way where I say well it's not hack it's not Haskell on the JVM and it's not java without semicolons it's this middle thing this new thing yeah and how do you really combine these two I mean yeah that's what I'm trying to find I think what's galactic and I think cats and it's more people really love category theory in math and they want that to be at the center whereas I think most people most mainstream folks can benefit from that some of that stuff but they don't really want that at the center they want something more domain-specific then won't stop it works and bosses the tests yeah and it's more domain-specific it actually reads like and so that's one thing is Ruby folks did because they don't have any types they sort of had to make the code read like what it means you know what you meant mm-hmm and I think even though with the types you can still have like nice types that even have mathematical contracts yeah laws and that sort of thing but they still actually read like text and it sort of says okay I kind of get what's going on that's what I think was missing from the scholars II approach it was just way too mathy as far as the resulting code people would look at and they see all these squiggles they have no idea they just really can feel lost you know like most people so that's why I'm trying to like find a way to actually get the benefits of it but actually but still the code is accessible to everybody yes yes so let's go out like the test to read as a spec rather than am sure what they do and I think you know your shooters go right on your card and doing this and i think it's it's it's there so oh probably you know i can ask you anything else so it'll probably you know like a whole bunch of asian of dance could make my next stop but you all do ask you two questions so terrible so one is i remember a part of skeletons update was this major effort to do scholars yes right so you know looking back a few months then from what should do you think it's justified do you think scale jess will be adopted and and this effort people put into compatibility is it is it worth it uh I don't know I wondered a half way through if it was worth it and I don't know how big skull j s will be but the effort they did two things one is it it postponed a lot of things that I wanted to do so that that was not bad yes but the good thing is is actually help me understand what the test framework really was because the JavaScript was so different than the JVM and we had to do so much disentangling from the JVM then then we sort of learned there were some things were forced upon us that actually the whole thing better even on the JVM so I think it was worth it to do it for that purpose but and now we're just having a lot of fun doing started to catch up on those things I'm going to show tonight that were sort of sitting on the shelf for a year and a half yes trying to get JavaScript to work yes so yeah but ever think of at least you know because you know as a book a programmer wants to go into front end I think it's a secret option and I think you know the fact that a lot of people made this effort to me to be compatible mm-hmm at least use it a big chance right kind of pushes for it and so okay so the kind of wrap up question I would ask you is you go to all this conferences you you know what all the people doing right there just you know Scott lets users basically all kind of you know Scott tribes so what are your kind of learning plans what do you want to kind of learn next year and not necessarily like bring it in this contest but what are your interests in with skull is going right like what do you want to catch up on and maybe you some of this is called s maybe not but like but what's interesting too i'm a year behind i want to learn about free monads alright so let's much I mean I I I think that it's I just I find it hard to understand their code oh hell yeah but it's actually if you can avoid mocking it's actually about testing right it's a way to do something that you can you describe what the side effects are going to be the end you end up with data structure with with a for expression it's kind of natural Force Col I think and you can just test it look make sure it looks like it's supposed to interpret it but it's all the other part about it is it's slow in case is it too slow right so that's I'm just kind of curious about that and because it's kind of related to testing in that way but I just just take a step back like last week I had so many fascinating conversations with people and I learned a lot so I'm and they were mostly the cats folks yeah because i'm not i'm not from that world and so I have a lot to learn there still so that's that might be a little bit that's good at that local or so studio caloric Ian chant they promised you know to give moto so maybe you know we can both come as commercial pressures all right all right so let's make it a plan okay okay thanks Bill so I looking forward to my token thanks again for coming thanks