 Okay everybody shut up. So, empathy. Honestly I just wanted to start the presentation in an awkward manner and it seems we're off to a great start. So you're in the track section called how we develop organic groups eight after two years with Elm and if you just you know stick your head for a few seconds and you know you're not gonna stay so the very the short the quick answer is we are developing it very very slowly. Any questions? No thank you for coming. Bye bye. However if you want to stay here for the next hour there's obviously a longer version but for that longer version you'll have to sit down lay back and I will have to take a few steps back and in fact quite a few steps to the side and tell you about the path that I've been taking in the past two years and as a consequence Gizra as well. So my name is Amitai Burstin, Amitai Burstin is the nickname I'm the CTO and co-owner of Gizra. We have a few fancy clients name-drop name-drop name-drop and like my real sales pitch that looks somewhat like that about 60 seconds after I present ourself and we establish the fact that we are awesome developers we're saying that most of the IT projects around the globe are failing and when I'm saying failing it means that they are unable to meet at least one of the three items the definition of success on time on budget or customer is happy or what we call the unholy Trinity all of them and when I'm saying that a project will fail I don't mean that it will not be published there is a good chance that the audience here and the audience at home knows what the failing project is it means that it's not published on time or the budget is exceeded or there's a lot of frustration and the customer is not happy and you are not happy and so on and so forth and for many years I had this slide of how to solve it and I was thinking that the answer is communication and sacking expectations but honestly as time has passed I kind of realized that that's that's the technique that's the mechanic that I have actually a different answer for that how to solve it since 2017 and it's find and develop only the essence and time box the efforts so find and develop only the essence basically it means don't listen to your clients and I'll give you an example of how I make dinner to my kids and if you have kids at home you might relate to this story and maybe I will see a few nods in the audience so at a certain point of time when I'm offering them dinner I know that they can handle only fruits so I offer them fruits but they insist also on sandwich and pizza and pasta and salad and cake and milkshake and potato chip and also the slimy sugary thing that I need to clean after them later on and tortilla and biscuits and salmon oh boy they are so into salmon they are saying and vanilla cake and some chocolate cake to balance it and yogurt because why not and they really insist and I know it's going to end to end really bad but I try to be a good dad but those small manipulative bastards and honestly that point of time I think they're not mine it's obvious the gate to kick out of it and it's clear that they're not going to eat any of it and then my wife joins and she starts with all her accusations and she goes all crazy and then I start with the accusation and then I go crazy and then I start screaming at my wife you are your mother are going to take me down to my grave I actually wrote down chill out man my notes so that's how projects are run so so we need to serve our clients only fruits that is we need to serve them we need to develop for them what they really need not necessarily what they're asking for and what they can afford and it's easier said than done because if I would tell you when you come with your awesome startup PID and I will tell you no I will not develop that just tell me what is exactly what is the essence of what you need to do oftentimes you're too emotionally connected to what you're doing and say no I need everything all the features and I don't think it's the case and it's our job or at least my job in in in Gizra to convince the clients that it's best for them to indeed remove I don't know 90% or 80% of what they want and develop only the essence the second thing is about time boxing the efforts so so a project is basically the sum of all its tasks right so I don't need to reach I don't know six months down the line nine six months down the line or nine months down the line to the end of the project just to realize oh my god I'm not gonna I'm not gonna reach the deadline I can actually do it almost in real time per issue so the way we are doing the time boxing is we are saying we have a certain issue a certain feature we try to time boxing to time box it it's not going to be 40 hours or 100 hours it's gonna be 2 hours 4 hours 6 hours more than that it's like it's better to to divide it into smaller into smaller issues and what is the what is so important about time boxing it's not necessarily just for the developers but this is about setting the expectation this is the way we're setting the expectation to the client because if I'm setting if I'm setting the time box it's not going to be I'm setting the time box for a certain feature for four hours they're gonna get the feature in a fourth four hour development they are not gonna get it in 40 hours and I'm saying that because developers for example if you let them you know develop the menu on the nav bar they can do it in four hours and they can do it in 40 hours really and then it makes it it makes them happy to do it in 40 hours but nobody is paying for those 40 hours and setting the expectation is so important so for clients often time you know they don't really know what four hours get them and we all know that the answer is hardly anything because it's just four hours but in the end those four hours has have also a monetary value so you can communicate it and you can communicate it with everybody so I can tell the client listen it's gonna cost you one thousand dollar to do a certain feature and they understand what the one thousand dollar means and I can communicate that to the account manager and to the developer and they can understand it so those hours in a way it's also kind of a self-fulfilling prophecy right if it's if we're saying that it's four hours then it's gonna be four hours and the thing with time boxing you really need to commit for to that like for many for many years we had the idea of time boxing in Gizra but we weren't really committing to that right now we've reached the point that when somebody is approaching me with a problem in their issue my first question is how are we on the time box like I care more about the time than I care about the task being completed obviously I care about this has been completed but it's just about priorities and ever since doing that we are seeing a really a major shift in in this cycle in this communication in the setting expectation between everybody the client the account manager and the developer in a way everything that I'm saying here applies also I think in a way to Drupal or contribution as a whole I mean the essence you know finding the essence this is something we're talking about in Drupal and other places what do we really want to do but also kind of time boxing is there meaning if I'm a contributor I don't expect anybody like Dries going in the issue queue and writing okay you should do it in 12 hours that's not how contribution is done but there is a thing that we are actually paying we're not paying with money but there is a thing that if you exceed the time that you are expecting some somebody to write a feature or something like that you get people who burn out or people who just drop out of things so it's super important also I think in contribution in you know putting a border of what we want to be developed how long it should be developed and this is also setting the expectation to the developers in the contribution do we want a crazy feature that is thinking about all the edge cases the answer is no or do we want something that is more sensible so we have all this planning it and you know we've done the time boxing and the estimation and and that's awesome but bugs are there to you know to ruin our good plans bugs right for the crowd at home that doesn't see me I'm shaking my hand I'm still doing that all right I've stopped so bugs are really costly they're probably even more costly than they might appear because first obviously you need to fix it so it costs you the money right I'm talking now about projects not contribution it costs you the money to fix that but on the same time it takes it takes your time like if we have a deadline that same developer who should have written something for a feature is actually wasting their time on on fixing the bugs client is disappointed and this is where I always give the mechanic example because I've seen it so many times so if I have problem with my car brakes and I go to a mechanic and I ask him to fix it and then he tells me you know I fixed it and I go out of the garage and the brakes are not working again this is not cool I will most probably not no not go back to that mechanic but as developers or as you know as website builders when we how do you say fuck up without it sounding obscene we kind of expect the client to be cool with that and like oh yeah it's bugs so yeah having bugs that's fine having the same bug twice it's it should be embarrassing for everybody and last but not least is the developers and the account manager I call project manager account manager for me is the same it's the morale like you're kind of losing face losing face when you go to the account manager and you say yeah I have yet another bug and this is something that troubled me those bugs until I came across two years ago when I've started dealing with Elm and don't worry we're getting close to the code stuff is that word that I was missing and that I've learned thanks to Elm is the idea of correctness so I want to share with you a bit of a my expectations from computers how they can assist me in making sure that I do not have those bugs the cost of double clicking on something let's hope that's a little better okay I'm gonna show you real quickly web application we developed it's headless Drupal with a front in Elm this is basically for teachers that they are able to create lessons and broadcast it to students well what you're seeing here is what we call a board template that is a teacher is able to go in drag and drop images add different text add free hand and lines change the order of the slides add a quiz with different questions and set different answers for those and then when they're done they can launch what we call a live session so a student can go in enter four digits pin code and then be redirected to that live session where the teacher can change everything and in real time we can see it reflected a student can write their own text and then the teacher can drill down add some feedback take control over the student even and you know add their own lines or text and and whatnot they can go back they can set they can start a quiz so a student can answer it and the teacher will see in real time the the answers well so one of the reasons I'm super excited about that application the same excitement I see on your faces is that none of it existed five and a half months ago that's that's completely that's completely new I don't think anything like if I would use another JavaScript framework I would never I would never reach that and another thing that I really like is the back end is the same Drupal that you and I love to love and love to hate we are using had this Drupal Drupal 7 sorry and what you can see is that it's a node right if I wrote some text it's I can see the text and I can see I can see the different attributes so that application this is probably the biggest application that we've written in the Elm as you can see it's very feature-rich and I've never felt more confident about a web application as I feel with that specific application so I gave you the teaser of what Elm is but I haven't gone deep and we are going to go a little deeper right now so I've been using we've been using Angular 1 for many years more years that that I'd like to remember and I was quite frustrated with Angular 1 for all the right reasons and then I started poking around with React and Angular 2 and whatnot but soon enough I found myself with Elm so what is Elm? Elm is a functional programming it's it's you write it at the Elm language and then it's compiled to JavaScript but it's not TypeScript in the sense that it doesn't try to fix JavaScript it rather says JavaScript is a wonderful language but we as humans do not need to interact directly with it it's statically typed it has an amazing compiler that really assists you building your application you don't have to fight with it and it has zero runtime exceptions and that that's a pretty powerful that's a powerful guarantee and after all those years with Angular 1 transitioning into Elm suddenly it's for us we've transitioned from really hating or me personally really hating writing front-end code because after two weeks you get a spaghetti you don't control into something that I really really enjoy and in fact after diving into Elm and diving into this whole functional programming world I've started noticing the different flaws that I saw in Drupal like we were we were seeing we were using techniques or we were seeing the computers the computer assisting is assisting us in writing the application in a manner that kind of made us envy Elm and wanting to have the benefits of Elm in Drupal itself so the mandatory sorry the mandatory counter example I will go over it quite quickly and then we'll saw a bit more elaborated Elm code and we'll go over it together so you can understand how to think Elm so a counter example if you can guess what the application is doing you will win a counter example application and you click on the plus it's being incremented when you click on the minus it's being decremented can you see there if you can see good for you if you cannot see I'm so sorry about that so I will not go over every single line of code and you don't need to understand every single line of code but you need to understand the concept and if you're not a developer and you're sitting in the room don't shut down immediately because it's not very very complicated it's logical I find it's way more logical than just JavaScript and everything so just listen to the different concepts different concepts that we have here so along with Elm we have a thing called the Elm architecture which is kind of how to structure your web applications so as we know there is an MVC in Elm it's called a model update view so how is it done so first of all I have my model the model would be an integer since it's a compiled language it means that if I will try to pass to the model something wrong like a character string it will not let me compile it so I'm just saying the model can be just an integer and it's gonna start with the number zero then the next thing that we have over here is a new type which is basically what are the possible actions that I can do on my model and this is pretty awesome again if you developing with Angular 1 or we react without Redux then that that's probably very appealing to you because it's in two lines I can know exactly what kind of changes I'm going to have and this is decrement and increment these are the only actions that I can have on my model and then in my update function I can see that if it's decremented then I'm gonna decrement the model if it's incremented I'm gonna increment the model and this is immutable more model meaning I'm not returning the same model I'm not returning the same object I'm just returning something a different object and then I have the view function which kind of resembles HTML it's not exactly HTML it's compiled which means that you cannot have a typo in the name of the button or the divot or what not and then I can see that over here I have on click decrement it means that when you're interacting with the HTML the actual incremented incrementing or decrementing does not happen in the HTML itself the only thing it's doing it is calling the update function here on top it is gonna pass it the action increment or increment along with the model and it's gonna get all the all the business logic is gonna happen in the option update function itself so with it with the Elm we have this idea of compile error versus runtime mistakes and I'm not writing runtime exceptions because there are no runtime exception in Elm so the idea is that we try to shift as much of possible in our logic into something that's the compiler can recognize and stop us from doing from doing mistakes so let's do a types 101 really really quickly so we can dive into a slightly more complicated example so here's type Boolean the way it is defined in Elm core itself it is either a false or a true that's it here is another definition that I've written completely arbitrary type so first of all I have type alias name x will strings it means from now on Elm will treat the word name as if it was just a string so I'm able to define I have a user type over here it can either be anonymous it can either be authenticated which is basically wrapping a name that is wrapping a string so along with knowing that the current user is authenticated as part of this type I'm gonna hold I'm gonna wrap the value which is gonna be the name of the user and let's say I have a premium user type then that will wrap the name and let's say the expiration date of that user so let's see a cart example up until now if you've been in other presentation that have given given this is the amount of code that I've shown but I have one hour to fill they were very clear in the email that I need to fill one hour so I'm gonna dive a little bit more it's not gonna be live code but I'm gonna live code not really impressive yes the comments guys want a guy you want to buy it it's gonna cost you 50 and the currency is not defined all right so we have a cart example there's absolutely no interaction going with that cart I have a card content that is holding one shirt and two pants and the total is 50 this is the that's the essence of our application it's not very very fancy but what I want to do is actually show you how we're starting to think elm and how elm helps us shape a solution for that and the way we're doing it is we're starting by modeling the problem and in a way when we're doing it in Drupal we are doing it the same thing I think you're probably similar to me in the sense that when you're hearing about the feature then you don't really think immediately oh I'm gonna do it with with views or sit will plug in that's like kind of a side effect of what you have you probably thinking first what are the different content types what is the entity what are the references between them you build your data structure the same thing with elm I'm starting with the types once undefined them correctly then everything kind of you know advances naturally so I could start first with saying I have a type alias which is an item which is basically just saying I have a record that that could be the name is string amount will be integer and some arbitrary ID that is gonna be integer and then I can define a shirt like you can see every function is always returning a value I don't need to write return and I'm saying shirts this is the type is gonna return an item I don't really have to put it elm can live with that it's an inferred type in fact it will also tell me it will give me a hint and we say it we cannot say it here it will give me a hint to what I could write as the type signature so I would sorry in the shirt I define the record this is shirt this is the amount this is the ID and obviously like we said this is a compiled language this is statically type language if instead of an integer I'm gonna write a string then immediately the system is telling me hey you have a problem with with the amount field so you know what to change so I have my shirt and I have my pants that's it I've defined an item next thing that I'm gonna have is a type alias of added item which is a record that is gonna hold the item itself along with the quantity that it's gonna be an integer so added shirts for example would be I'm showing you two different syntaxes syntax that it's actually the same thing I can either write it as a record or I can use the type itself directly and then do it by the order and then finally I have the type alias cart and I can have a list of added items so an empty cart would look something like that and the cart items would be a list along with the added shirt and the added pants that's it like once I got it right then writing the application as well I could have bugs obviously but I got my data structure correctly and then everything goes out naturally from here so let's see how it evolves so let's look for example at getting the total of the cart how do we do it and right now what I'm gonna explain is exactly the same explanation two years ago Amitai would have loved to get from somebody in a presentation because when I saw this list for the L this is one of the steps I think that really stops people from looking into Elm more seriously they go into the Elm they see new syntax it looks a little daunting it's not really clear what for the L is and they stop it happened to me and this is a courtesy of me trying trying to prevent that from happening to you so cart added items is a list so I want to actually iterate over that list and start accumulated what is the total so the way I'm doing it I'm fold the L like fold from the left right I think it's you call it reduce in in JavaScript talk I'm passing the added items list along with a zero what is the zero over here this is my accumulator I start with zero dollars and I start accumulating the information over here so list fold L and then I have this anonymous function which is basically getting one by one the different added items and the accumulated total so I can do a get amount which is quite silly function that we'll talk about soon that is getting an item and it's returning me an integer how how much this item costs and it just returns the item amount remember that part do you remember it good so get the amount and I'm multiplying by the quantity and I append it to the accumulator so in the end I will get the 50 the same 50 we saw here how would look how would look how would the card contents look I'll have a view card function it will get a cart it will return some HTML and this time I want to iterate over my list of added items and just I don't want to reduce it I want for every item to have an ally in the HTML so I just list map it over here and then again I'm getting the added item in the function and I can build my HTML which is basically adding an ally I tag along with the different information over here right this is what we are seeing over here all is fine as beautiful maybe you're slightly excited but in the end you know JavaScript you could you could do it with JavaScript but what happens when I'm a little tired and in the get amount instead of returning item amount I return item ID remember how it looks our item is an is an amount of type int and the ID of type int the compiler is not barking at me because everything is fine right I'm returning an integer and now when I'm refreshing it the total is five and I just lost my job because I've sold a bunch of $50 worth stuff in five and this is where elm really shines because I'm able to start adding type safety to the things and I'm able to say you know this thing of amount it's a pretty serious thing I want to be sure that I'm not passing into different functions that are able to accept or return an integer I just want to have my own type and for that I can jump to another file that I've created at home where I'm doing exactly that I will define a new amount a new type called amount which is actually amount which is wrapping an integer like the user type right we had authenticated wrapping the name same thing over here and then here on my on my item on my item record the amount is now not of type integer but rather on type amount so when I define a shirt I define amount then if I'll try to say an integer I will get an error from the compiler having that I know I'm now required to do some more work in order to extract what the actual amount value how many dollars is that because I'm constantly going to get it wrapped with the type so it's going to look something like that let's look at the get total cart again I'm list folding over the added items but this time the initial value is not zero it is amount zero and this time I might get amount function looks something like that sorry it is passing the amount my get amount function is I'm just piping it it's like some fancy elm stuff I got I got my value and I can pass it on into multiple amount which is a function that I've wrote here which I'm saying you will get the integer this is by the quantity how much you want to multiply this with along with the type called amount and over here what I'm doing I'm actually extracting the amount out of the amount type you see how I abuse the word amount it's the same way we abuse the word content in Drupal amount is wrapping an amount so I'm able to extract it I'm able to multiply it by the amount and then later on I'm able to wrap it again I'll take that information and then I'll pipe it again into a new function called append amount which would look something like that it will get two amounts it will unwrap it it will append them and then it will wrap it around wrap it with amount again and then we indeed get here added the dollar we get the same web application it's performing the same way but I have better confidence in the type of application and I know I help my I help the compiler in helping me in structuring a better application let's do it in the end all right let's do it now we had a pressing question about the amount the int amount amount is that the two values that come in the value that comes out yeah the type signature you mean yeah yes the exactly oh my god you've been paying attention all right maybe values this is again when I saw it I was looking and I have two screens it's not a real story I don't have two screens I don't want to lie to you but imagine I have two screens on one I have elm and I have this idea of maybe values and then I shift my hand into PHP and I have a bunch of not empty sets scattered around and then I'm looking at maybe values again and I'm starting to envy it and what is a maybe value so let's imagine an application that I have a user in that application so I define the type Alice user it's gonna have an avatar URL and a name and I'm gonna say I have this thing of an empty user meaning I've just initialized my application I don't have the user yet I didn't get it from the server so I don't know what to fill in so I'm saying it's an empty user that you don't have real you don't really have a name and you don't really have a URL and this is completely an utterly wrong right because there is no such thing as an empty user the user was just not fetched yet this is what I'm trying to describe and the maybe value is basically saying maybe you have a value meaning I could actually structuring differently and say that user is a maybe user so when empty user would actually be nothing I still don't have it or if I would have something then it will be wrapped with just justice like the quitter the opposite of a nothing so now if I'll have like a function of view user that will get this maybe user I can do what we call pattern matching saying case the the maybe that maybe user is if it's nothing then write text loading and if it's the user then just user then you can print the username and having this maybe values and again you always need to remember there is a compiler there once I'm saying it's a maybe value I need to always make sure that I cannot suddenly forget to write not empty as we all do in our PHP code the compiler will not allow us but even here we have better patterns and better way of structuring our application because what happens if I did call and try to fetch my user from the server but you know the the HTTP request did not work so if you're doing it in Angular or React and you're like me then you're probably telling yourself what can possibly go wrong right why should why shouldn't the server answer like it's I cannot foresee any situation that me as a developer need to take care of it of actually dealing with a server error right some some relate to it more than others so we have this pattern that we call remote data or web data which we're basically saying fetching remote information is actually four steps or four different options one the first one is not asked I did I I'm just initializing by application I did not ask it yet or I didn't click the button yet the second is loading I'm currently in flight I'm currently requesting for that thing and then I have this failure along with the actual error wrapping the error or the success with the actual value that that I that I got so in this case I would model the user as web data user an empty model would be not asked a debug user would be success wrapping the user and then my view user would look up a little differently where I'm saying if it's a success print the username if it's a failure print something went wrong and over here this underscore that I'm using as basically saying okay if it's not success or it's not failure that is if it's not asked or loading let's say just show a spinner something like that like I don't have really to write every single item I could have this underscore a trick I love it completely changed the way I'm looking at development and as a result I was looking at what can we have on the server side that would give me the same effect so I was started I was looking at Haskell which is like the father and mother of all those functional programming languages a can I assure you it has a huge learning curve I know that some people are saying like the it doesn't have it does it's really hard to it's it's really harder than learning PHP for example but again it's it's pretty amazing in terms of how it helps you shift the way you are thinking about development so where am I so we're not currently running in Israel anything made in Haskell in production but I let's say that I'm actively working on that and I'm specifically working with a framework called yes so so I want to show you really quickly much quicker than before different example of how I approach it so if you know restful for example in Drupal 7 this API slash login token where I say where I send the basic authentication with why username and password in the authorization header I want to get my login token back this is kind of the JSON that I want to have so how would I do it with yes so there's a bunch of magic key stuff that's going in that that goes but I just want to show you the essence so I will define I will first define my different models again I'm structuring I'm modeling my problem so over here I can see I have a user and even the password for example if the password is optional I can say that that it's going to be of type text but it's a maybe right and I'm going to have my access token and the created is actually of a date type and the user ID is of type user ID which is basically taking the user itself and adding the ID and that's super important that user ID because it's unlike you know PHP or something that you would say okay this is an integer this is not an integer this is a user ID this is the key of an entity of type user I would not be able to suddenly place in the in the access token instead of a user ID an article ID this is the type safety that I'm getting on the model on the model level and you saw it will parse this models file and will actually create the database for me according to the information that I have here so configuring the routes I'm saying API login token and it's matched to a certain handler called login token RR for handler and the allowed method is going to be get and this is how my handler is going to look so I have this get login token because this is the get method and over here I'm saying okay give me the UID which is the current user it's a require user ID and then in order to get the access token I want to validate that I indeed have this I have this access token I'm running a DB query which I'm asking select first bring the first access token user ID which is which equals a UID but it's not an equal between two integers this is an equal between two user ID keys meaning that thing you see here this access token user ID this is thanks to the fact that I have the word access token over here and user ID meaning this is type or in other words I'm unable to write an SQL query that is not valid I'm unable to call a column that does not exist not that it ever happened to any of us in production and since I'm running it on the database then you saw it knows that I'm not guaranteed to always get that information I'm not definitely getting an access token I'm actually calling getting a maybe access token right so everything is sitting inside those type safety and the compiler is always there to make sure maybe a little annoying right that I cannot deploy everything that I want but it's stopping me from having those arrows and if I have this tiny user profile that I can see my access token and regenerate one and have a login token link just to show you how the template is structured obviously with the type safety manner that is if we look on the div over here the adref is not I do not write API login token but rather I'm saying it's redirected to login token are meaning that if I'll go to the config routes and change it and recompile my application it will automatically make sure that all my all my URLs are correct and type safe and the last one and this is this is an example that I want because once you get the taste of type safety I think you kind of it's hard for you to stop like looking for when can I where can I add more type safety so Drupal is definitely taking the what can go wrong approach with Drupal at CSS right Drupal at CSS I want to add the static CSS bootstrap CSS and how do you know if it's working or not you're hitting f5 either you see your CSS state in action or you do not see that right but in your thought I can or in your thought or in a type safe a statically type language I'm adding this style sheet with CSS underscore bootstrap underscore CSS this is actually the type safe identifier of that file meaning when I compile my application then on compile time it's actually going to check if that file is there and if it's not there then it will not allow me to compile it finally Drupal 8 and I'm actually going to talk about organic groups just a little so I've apologized about organic groups 1.x many times this is not one of those cases this is just a retrospective of what we had so in organic groups 1.x the way the way I've created the entities that you have to remember field API was born fields are everywhere and entity API model was a new was the new kid on the block and what we've done is we had this idea of a group content and node or any entity but I'll call it no just for simplicity could have been a group content meaning a content that belongs to a group that is contained inside a group we had a group entity right and we had the membership the og membership entity which is kind of what is holding the information about a certain member along with different metadata what is active or is the user active or pending when did they join the membership and so on and so forth and in 1.x we actually had like we had the group entity which was pointing to the group node now I've actually deliberately did not add the words entity and node over here just because I wanted it to be for you as confusing as it was for us back then so for that reason in 2.x we've decided to stop abusing the entity API system in a way and remove that group entity and just the membership would reference the 2 nodes and instead I've decided to slightly abuse the field API so the problem there was that I kind of decided that you would be able to work both with the entity with the entity API or with the field API and create those membership now I know I don't know if I don't know if for that idea I will one day be punished or that the punishment itself was was trying to code that and in og8 right now we've we're doing something which at least at this point of time seems much more sensible and it is saying a user is not a node right make sense now oh my god what I think why didn't you stop emotion you knew it all along right you knew the answer so a membership like it doesn't really make sense of having a membership that it's related to a node it just makes sense when you relate it to a user so we've changed it that the membership is now referencing a user for sure and the group and the group content is related to to a group via entity via entity reference itself and if you have an edge case that you are using the you're abusing the og membership I can tell you I no longer care about edge cases that's I mean there are other ways of doing that but now the mindset of trying to write this og8 if you remember what we talked about 45 minutes ago sticking to the essence state sticking to the important to the important stuff so the same way I've praised the same way I've talked about the costs of bug of bugs and the unknown costs in a way I could praise the benefits of removing code or not writing code at all so if you have a code that was never written it does not have bugs it doesn't take time to write it and maintenance is super easy so that's kind of exactly the mindset is you know it's adding features and not reducing not necessarily like reducing from previous version right Drupal 9 if you're here in the audience let me repeat that it's adding new features not really necessarily reducing from the previous one right so we talked about types and I don't have that in PHP the best that I can do are the safeguards and this is you can see it all over Drupal 8 itself is making sure that if you didn't pass something right into the API function then at least in terms of data integrity we're gonna throw an exception and make it very very clear and not have some small notices or errors that are silently being being eaten so I'm not super excited about Drupal 8 I don't know if you heard it in my tone when I was speaking with you outside or not or from the fact that I've told you that I'm not super excited about Drupal 8 in the end I'm always like I'm judging it from a business point of view that personally for me for Grisra Drupal 8 isn't a significant significantly different from Drupal 7 it is different but if I'm comparing for the different from Drupal 6 to Drupal 7 I don't see that value right so that's why I gave this tiny background just to say that I think that in that sense of testing Drupal 8 is doing something really really right and that's the fact that I have three different levels of testing that I can do the functional testing the kernel testing and the unit testing so really quickly the functional testing is this is really banging your head in the wall because it takes for so long but whenever we're dealing with access or stuff like that that we want to be absolutely sure that it's working we are working in the functional we are writing the functional test the kernel test is kind of the go-to testing that we're doing because it's basically installing Drupal much quicker because we're telling it which models exactly to enable and which tables to install and unit testing is a beautiful fantasy story in the format of PHP PHP lines that we have it because sometimes you don't have anything else I've said my piece about the testing so what is wrong with Drupal how much time do we have I'm kidding but I give an example specifically from from og8 but it applies also to og7 so let's have this scenario in og so you have an article this is a group content you don't have the user does not have a site-wide permission to create an article but you have an og permission to create an article and you have your group audience field set up but it is not required right so we have a problem I I cannot allow you I shall not allow you to create an article without a group associated with that otherwise I get those annoying security issue emails that I don't want to solve I mean I don't want to reach that point of having the security issue so how should I treat it I should probably smart enough and make the widget required in in that situation and then I need to remember that you can actually have multiple group audiences so I cannot make it required but I still have to listen to the form state and make sure that at least we have one one group I cannot force you on each on each field because you're not required to have two groups and this is the problem that I'm seeing in Drupal I mean there are other problems maybe but this is the problem for me that when I'm looking and I there are a lot of parts that I Drupal that I really love and a lot of parts in Drupal that I really hate it's not necessarily about the code itself it's about looking at different things that are not Drupal and then looking into Drupal and saying I have this problem and as a maintainer when I'm writing this generic solution that needs to fit into this big generic thing I need to take care of all those security issues and edge cases and every time you will use OG or to that matter any other model I'm just bashing my own model over here every time any of your end users gonna hit f5 it's gonna run through that complexity it's gonna run through that lines of code that are treating something that you actually don't need and I'm seeing it a lot of I'm hearing it many times that when we have discussion like with developers about the project and we're asking how should we do it and somebody suggest a model and then he says yeah we can yeah I don't know get views filters and we're getting it for free and that for free is completely false because you are paying a certain price either on complexity or either on you know you're relying on something that you don't really need you remember that actually my third slide was talking about what is the essence the for free is often not the essence no the essence of your project is not having this page with all those select filters with Ajax as if all of us have with the views with the views with the views filter and in fact I wrote an OG functionality a group functionality in your sword in five different files instead of 150 different files and I got it working perfectly it obviously did not cover I don't know time did not cover as much as OG does but I didn't need all of OG I didn't need all of Drupal I just needed my thing so I've actually changed it like if you maybe you've seen that slide in one of presentation it said poor Drupal to Haskell and it was no exclamation mark and yesterday I've changed it to probably no like I'm right and obviously no it's not gonna change I mean Drupal has a lot of a lot of value it's approachable right I've started as a non-developer I wouldn't be able to start with Haskell I'm starting with PHP it was easier it has huge community it has a big ecosystem with Pantheon and platform a sage and amazing I hope amazing I own it has monthly releases and security releases we have Drupal con Drupal association Drupal drama Drupal console drush tons of code we didn't write and 50 years of experience and that's actually the most important part for me and now the my hour long session is coming to to looking at that at what is what is Drupal and I remember that Dris back in Drupal con Copenhagen was was answering a question about our relation with PHP and he was saying well Drupal we are tied how did you say it we are tied in the hip to the PHP community it made a lot of sense but nowadays when I'm looking at things and I'm looking at things a little differently I'm asking myself are we really are we really attached to PHP because we are choosing every day that's this is what we want or are we afraid of saying oh my god maybe decisions that we've taken some time ago were wrong and I'm not advocating to let go of PHP but what I'm actually advocating is to letting go of our fears in a way I feel that Drupal is in its safe zone right and the safe zone is the coding part like we're constantly writing code as if it will write a lot of code one day will get it right one day everything would be everything would be perfect right and I'll tell you what I tell often my clients our problem is not code when I tell my clients I tell them listen your problem is not code like everybody your problem is marketing and sales and let's say you have a perfect system let's say we have a perfect I don't know what some AI machine that we would tell it to do everything that we want so the first question would be what do we want right but that's not even the important question the important question is let's say we have that perfect system now what what are we doing with it in a way I feel that Drupal is kind of a solution looking for a problem and I think we need to sit and think about what do we want to do and that sitting is not necessarily something that need to take years it can be in a similar way to how we do coding it's can be a very iterative and a fast pace way of a way of doing that and this another thing that I tell my clients and I'm pretty harsh with the client because sometimes we actually doing that is tell them you know your problem is not code and to show you that we're stopping to develop we're taking a break it's gonna be a two weeks break or it's gonna be a one month break and suddenly this is about moving from the comfort zone you have to deal with the real things instead of going back and coding and even though it's quite radical and I don't believe it's gonna necessarily gonna happen a real suggestion is let's look at Drupal and decide that we're not coding Drupal for two weeks no one is working on core for two weeks is that really crazy I don't know like when the end of the world with Rick will reach or 10 years from now when Drupal will completely die it will actually happen right if we didn't we didn't decide to do it but now we can decide and why would we do it because if we're stopping then suddenly it releases us from our fears in a way and it gives us time to reflect to deal with other stuff and by getting out of the comfort zone and I can assure you I'm trying to get myself out of the comfort zone you've seen it on the first slide and I'm doing that myself it has a lot of value because you're starting to question the things that you're doing in a very honest way and dealing with those fears I think in a way that you select to do it could really benefit us so in order not to finish just with this reflective and theory stuff I'd like you to encourage the people who got at least slightly excited about how does Drupal and Elm we have this Gizra Drupal M starter which basically gives you a Drupal 7 with RESTful and migrate and different best practices and the Elm functionality and crazy Travis integration that knows how to run your simple test and be help test and web driver IO test and Aaron Novak one of Gizra's developers has just added a nifty functionality that if your web driver IO test is failing on Travis it's actually capturing a video of that it uploads it to Google Drive and then submits and a comment in the in the GitHub issue so you can know why it's failing so two last things one is the evaluation that I encourage you to write the evaluation but I encourage you more to come and actually take advantage of the fact that we are here I love hearing how awesome my presentations are I really do I slightly less enjoy hearing how they were not good but it's actually what's more interesting for me to hear those things just so I can improve it for the next time so this is definitely personally about me and if you got excited about it and it made sense and you happen to be an amazing developer and you happen to be looking for a job then in Gizra we are hiring and thank you very much exactly one hour exactly if somebody in the Drupal Association is asking it was exactly one hour