 Hi, everyone. I'm Chuxin. I was here for the first session. Now I'm here for the sort of last session Okay, so I've heard everyone should reach this page already. So you should have a login page And after logging in, let me check Okay, if you are not at this page Yes, you can do the copy at the pace. So I Assume everyone have access to this Google Drive So, okay. So what happens here is Oh my no stop This guy shouldn't be there Okay, so I assume everyone Okay, let's Go to this guy My Okay, I will Google Drive folder Here if you don't have the code the latest code you can follow the instructions I Don't want to do this Actually, I have the exact copy You're not the real me Anyway If you go open that file you will have a link So it's linked to the github. I set up for this session what happens here is if you go to the Tag 0.0.1. It should cover up All the previous sessions there and if you are not very familiar with gith you actually can do is I You actually can create a new workspace Open Anyway, if you open the the remit file you can create a new workspace with a link point to my github That way you will set for today. So you don't need to worry about What's there for? Yeah, so here so you can just copy over the link Here and after doing that You need switch to the correct tag Tap so the command is git check out tabs slash the type name Okay Just make sure everyone have this page of the login page here Let me drag it It's in the go to the Google shareholder it should it should be including in this file You probably need to download it. Actually it's a text file. I don't know why Yeah Let me see. I should have a local copy somewhere If you're not sure you can follow the instruction here. Actually it's similar So once you clone the whole thing you do a git check out text slash Okay, then after that because it's new project you need make sure your database is properly set up So this is a easy way. Just do a rack DB reset I think you should be familiar with rack DB migrate Right, so anyone can tell me what does the rack DB migrate does. They'll key in that comment Anyone So Okay, so what happens is when you're doing the migrate If you go to your project file, you will see this the migrate folder It will go through this file one by one based on the ID in front of it And it will set up your database But what we have here is a bit different from DB migrate it's called DB reset So it assume you already have a database setup, but it does it well Do a drop and set up So drop means you're going to be all the database you have in the other table you have in the database Then during the setup actually will do a load and a seed load means it will set up all the schema or the migration stuff you do and the seed and You should have this file too Which is a seed file it will prepare your database to a Initial state with some data you can test with so after that After that actually you should do a real server in self-seed This is something I want to show you today Has other tutor show you what's the real console Okay, so you know what he does, right? and the rack rocks command so Everyone should have whether you run the running command on On call now you should run with the port number and Where is it? Okay, here is my command. So I do a get check out the text and then I Didn't do the Database migration because I know my database is set up to date Then I do a real speech support number and IP address Here we go. We have Okay, so what you need to do is just create a new Yes, and provide the link I have in the documents the link actually should be let me see Uh Just one Yeah Let me try to download that fall So this is a step for the initial setup I'll set if you have the player running just try to sign in with Some data. I think I'm going to use this one Apple gmail.com Let me get back to you The command is This is a comment the command is a rack Okay, I can Can you see this one? Yeah, you can just type it into the So once you get the workspace it will show something like You will have something like this Then you just key in the comment over there. Oh, we can help with you later. Let's continue. So just Make sure everyone can log in and that you can see this page and If you clone it You probably will see Amber's name here because I actually copy from her. So if you want to change that If you are using your insistence project should be okay Then you need to do that It's okay, we just get started You need to bundle your stuff for us Yeah, I forgot so it says Actually to do BB Reset it will say some behind us is busy. It's because we didn't do bundle you stop Let's continue And so let's go to the events Arash is seeing this And if you just Click on the show events, it should be something similar to this one Any of you play with this page Try something like Click on this one and Do update and attendance it works, right? But anyone try this Everyday at the bug in the code in the code base So today we're going to fix this bug first Error guys is error or it just me got this error. Let's wait for those people still doing with the bundle People add the second row. Can you guys see this error? What? Oh, you guys Everyone's waiting for the body One question Well, you guys are busy with the setup question How do you guys answer? Yes so In terms of programming and the rails What we'll do other than Google and Before actually before you Google, what do you know? What's the right? Question you're asking in Google message That's a good start Yes You can try this. Yes, that's that's that's good. Okay, so one thing is What's showing here the error message you are showing? I mean real estate showing another thing is you can look at is In the log So it it gave a lot of information, but the point is Some points in life you need to know how to Interpret and understand what's in the log and We will come back to this a lot of more later today and for now we can actually just focus on our error message here and Another thing about Google is You need to know what you are asking So other than the error message here certain Knowledge Tell me the knowledge that you need to pick up during the process For example All the comment we are doing here today Actually, it's if you go to go back to this guy The the cloud IDE Some part there it will tell you it's a wubuntu console here Some part in this in this guy, it will tell you it's a wubuntu and the terminal we are using Here actually it's a bash Anyone knows what's a shell other than the Okay, so It's it's just if you use Windows then you probably have this CMD thing And if you're using a Mac then you have this terminal and the shell is the interface the command line interface between a human and as a computer and For shell there is a lot of version and the batch is one of it and In batch shell Here is your entry point if you're interested you can just Google batch shell and they will have a lot of tutorials a lot of information on it and most of the Most of the time actually even I don't care about that Only care about something like what does this particular command do? For example, let me think For example, just now someone Most of you did it check out right so you're probably wondering what else does this comment can do? so one thing you can do is Go to Google and Just search Give man page So man page is the term we search commands information in Linux Actually, you can do a man get into in the terminal itself. Let me show you my So it's loading Okay done and let's do Man get so this is a manual page for good command. So during the development of Rails you probably see a lot of different commands. So this is one thing you can do in the terminal you can even do it in the Cloud 9 the terminal there, but I just show it in my computer and if This this thing is not really user friendly You need know some command for them. I want such tag Yeah, you need no certain command because it's not a graphic user interface. So what we can do it It just search it in Google and we'll it will point you to a web page and it's easier to look through Okay, so Just in case Something happened you are not sure and some comment is very if you go to tutorials in Like there's a website called real school. I think and there is a real cast that wonderful source But they don't really explain every single comment. So if you are not sure what this command do look or search and Know what you are searching for Okay, so everyone gets the error page yet the error You are seeing just now actually it's a corner case It won't happen to like all the time. You need to have a specific condition to let it happen I went through the code you guys wrote so far and That is something we call happy pass We do it that way will seem nothing will win wrong in the code but that is a Thing we are really happens in in real life So now this is your first error first bug in the application. So I want Everyone try to reproduce the error and share with me Why this error happened and why it's only happened in that case Okay So people got the errors Look at the events is under the events real events under your update the attendance is there Oh See some action Try something I said try something just don't look at that what you are looking at is the happy pass We are trying to create the unhappy one Okay, the point of this exercise is You need know your program and you need to try to understand how the user will use your program and Then you can prevent him bad things from happening, right? software company If five years ago there actually the dedicated role called QA engineer Quality assurance engineer what they do is you give them a piece of code. They will just try to break it but now With a gel if you heard of that so basically it's a new practice in the engineering field the developer himself is responsible to cover all the cases and try to make Program sort of perfect. So this is a very important skill The discover the corner case and try to handle the current case For those already get the error maybe can try to figure out just try to Think of a reason why I think the reason we've seen this is Some study on this You might okay, so You can try to create a new space coming what we have and You know, it's a charity. Okay. I got it. Yes. This is just the one I was trying to create or edit Oh I didn't look through that yet. So let's go back to the best folks on that So you see in this current project, we have a lot of clothes, right? Today we don't know folks Okay If you guys know this specific That's why I'm calling you quantities, right? At least not a chronic Yeah, so you probably miss one of the Oh So what why is not working in this case where you anyone can just summarize what I Mean actually is when this area will happen Yes so This is something we call Yeah, so basically what happens here is The back end is a swimming you always have something but the right is You can't tell the whole thing, but this is a part of that. Okay, so let's let's get fix it Question is anyone does know what this means? Think think it's like English. What does this work meaning? Uh, partially right This guy is a class so in Ruby everything is an object and if it's a object it come from class and This new is your object and This new class is the cut it from and This is a special Value in Ruby this indicates just like you need there's nothing behind So anyone take a guess what does this mean this sentence me so you know, sir method is What Take a guess Under the method Control Close close That's all I read from there. Yes. Yes. So what's the keyword? The keyword actually is under Actually the whole sensitive keyword And just the same as you probably if you search it you probably won't find anything Is it because this method? So here is just undefined Undefined method. This is an error. So type of error and this method actually is something you are using so it's very specific to your application and This guy is standard. So Actually, you can have undefined method something else for this class Next step is the key This is a highlight right line. It's indicate where this error come from so anyone tell me What does this line do? I hope The tutor in the last class Okay, so That's the first error may appear is hash key You shouldn't read that way so If you do a Google hash key, you're probably going to have a lot of our quest. I mean Stuff actually is a very specific Computer science term But it has nothing to do here So question actually to here You see the dot here Actually is indicate this key is a from the guy in front of it So this is what we call OOP object object oriented programming. So your object actually is in front of it So can you try to read this again I Don't understand that's part I Just focus on the Tendent hash the key question mark there How do you interpret it is this this this sentence here Doing too much of the interpretation Tendent hash itself is object and go back to the master. It says this key is a method It's not fun and actually the method name is key question mark So key and key question mark are two different things here. So here actually is this is the object and You are trying to get this method in this object and You'll pass some parameters into here. So let's see about this one first. Actually, it's not important in this case so what happens here is and undefined Defined a method key question mark for this class and what happens here is this guy is a It's a what? Yes Yes, so you actually find the root cause here Yeah Okay, so you probably probably going to see this error a lot some method not defined for this new class new object and from this class and So first you need to identify the method here. It's here. You are using this one and which means Basically what you are doing here in this case You are doing Let me see attendant attendant hash equals to now and then you do a attendant key question mark and some parameters so you are actually doing this and Then again, which means you are Eventually it's doing is just do this. Now you understand what's going on behind the same, right? No, that's the point. That's the error here. It shouldn't be this guy Because you are trying to do something with this guy. So basically it means I'm trying to say it should be objects with the value you want You should organize You should organize the Ruby cost. Yeah, so if you Anyone finish the book I send in the first class The introduction to Ruby program something like Learning programming actually So there's a whole chapter on this I Not linking back to what is the point that you raised up this error Mm-hmm, and how do you derive at that same thing? This is the part that you're wrong Mm-hmm. I understand this part I know you don't understand why you create that You want to create it back? I was the point of actually reading that title that I was trying to figure out where we're wrong That's that's the point. I've got gets in the way. I'm confused. Oh What's sorry, okay? I mean, it's not the language part the language logic That's not making sense to me right now It's more that where's the error coming from and how do you complain that oh this is where you have to look for? I thought that's the whole point of the body. Yes. Yes. Yes. Yes. What's wrong with it, right? Yes So, yes, I'm going to gather. Oh, okay. So basically you find out is This guy, right? I write here I'm just like confused because it's not very clearly defined to me that where you're trying to get The point of this we we so basically we need make sure when this function is called This guy it shouldn't be a new right? That's the point So that's why I'm explaining why is this error is calm? Why is this error come? Why does yeah, this error happened and the And how to prevent that from happening in the future and in that way so basically from here and If you're doing a lot of programming you will see this guy. Oh Something is missing. It shouldn't be new and then you need to identify who is new. So then here it is Then we need to make sure it's not Okay, it's just that you you went around to another side trying to explain the language Yeah Okay, sorry Okay, so after this Let's before fix it Just take a guess why it's happening. So now I'm telling you this guy shouldn't be new and Now it is and why is that case? correct, correct So if you want to go deeper there, you need to check the logic in the summit attendance and Something like that and how this work all together and you need to identify where this Oh This object is initialized to that value, but I'm not going to do that. It will go into very deep So I'm just gonna do a quick fix on this issue here Okay, another thing. So anyone tell me where where this fall is. I want to see this error, right? You should see the fall. Where's the fall? I need to change the fall, right? Okay, so that's correct, let's go to there Events control So Okay, nevermind From the arrow page and we found the line of code that is highlighted Red so what should be first step that you should do to check what's wrong Because like to I guess to me personally, I don't know what like, okay fine I know the class is wrong. So we'll be the first time to check I mean we check this one or a right. So we found the root cause the root cause is This guy it shouldn't be now, but it's now and it's calling this one So what we need to do is we just make sure when it call this guy It's not enough. It actually is new Now it's another language So if someone going to do Java in the future you will see this guy Then there is an error of the non-pointer Something like a non-pointer error. It's similar to this guy so It's It's just a quick fix. It doesn't guarantee The whole thing is 100% accurate But I just want to show you it's a common practice before you're trying to do this thing and you can't be sure it has a value so you do if Attendant hash so well here is You are safe safeguard so this statement and we're going to put this statement in between so here You are Safeguard this statement. So basically If this means If it's not now It's well do this so if object is a now If you put it in inside the if statement is well considered as a false and if it's not now There is a true Okay, that's why I'm okay, right Yes, yes, and I Assumed here I assume this value will take a true or false How do I get this? I didn't read the quote at all. I just see this folder. I just think it might take a Boolean time. It's a true value or false value. Why come to this conclusion? so at least here It have this consistency, so I just assume hello Are you here the Ruby on wheels? But let's meet you Okay, so because I don't want to introduce any side effect. So what happens is If you have a I don't find variable EL code It might create chaos Somewhere so people don't know what's the actual value it is and in some parts It might introduce a bug because this a variable can be real center another value and people assume it's a different value So in that case, I will do a else the health EL else I will send for false the reason being is Get back to the UI We know when it's not a check it will have this issue so Which means this has a tent should be a false That's another reason when you do programming The variable name is really important So for example if the previous developer Just change the heather tendon to ABCD. I have no idea what's going on Then I need to go back to the code and reach for every single piece code there and to try to understand What this ABCD is? but in this case we can just Assume it will do what it's supposed to do so So in that case we can give this guy a try Let's hope it works. Ah it works so this is a part of the debug techniques and Now you also know why you need a very meaningful Barrel name because you probably didn't work with other people and then you won't make sure everyone understands what's good This party take a lot longer than Okay, so Everyone get this part working Now we fix this bug. Let's continue with the next thing so if you In this page you can see there is a admin session and there is the attendance session right and if you go to the Model class where's our model if you go to our model class you can see It actually has another session called coach. It's never show in the UI That is not all if you click on edit no attendance no stuff right so What we are going to do is we're going to add those stuff there. Okay, I try to know what's next Let me take a look at them. I cheat sheet Okay, let's leave there Cheat sheet X Okay, if you have download the Google dots open this guy We will I will try to explain this guy It's CS underscore zero zero one So it's a Ruby file and this is a follow location. We're going to modify and I'm going to explain what's going on here if we take a look at our model class you can see the attendance actually is a I will say it's a many to many relationship So why is the many to many relationship from the code? I'm not asking you the logical behind that Just from the code how I can tell it's a many to many relationship Then it can be a one-to-many relationship No, I mean so has many means each events has many attendance right and Many to many means Many events can have Many So how can I tell it's a many to many relationship? It's not a one to many relationship Yes, that's the key part This is how you identify a many to many relationship. Okay, let's make the whole thing very tricky it's Okay The way I'm going to show you it's not normally I will do they call it like more pure or Ruby on Rails way and Normally for for a vapor drive like this first Here the wheel I won't have all this stuff ERB false You understand how this ERB false works, right? when you create a Request to the server the server will interpret your request and render the UI based on the ERB false and Try to put everything into the layout Okay Normally I Won't do that. So read me it first Now it's like almost every single website. There is a app version in my first Session I share with like web application and the application the British relationship between this and This guy is rendering a HTML on the For the request for the client How do you do that with a app? I mean you can open it with your browser in your phone, but people Want to have a right and what app will provide more performance better performance So in this case Normally notice the back end. I won't have the EDR so my solar won't render the HTML instead it will do Something For device to consume instead of a browser So normally it's you probably heard of a full API recipe I and there are other stuff like There is some standard we can use to do that the way we do that is instead of a render HTML file we render something like a XML file Something like this on fire if you are not sure what the disonfa looks like So it's it's definitely something not a human can read but it's something a device a computer program can easily consume so This is what I normally to do with my back-end server and But people still want to use it to show a browser, right? How do I do that? I? will make you some framework To consume that So that's why I say the stuff I'm sure is not normally I do things like this and the reason is trickier is One thing people is expecting is For example, you want to add a pendant you can't just open a Page or form for every single people you want to add right Normally people will do is you have a button there you click on it it show up a new form in the same page Then you fill up and if you want more people to use it then click on it again right, this is something people will expect and It's very hard to achieve purely with static HTML and the job without our experience to sell So that's why I said maintenance me is very tricky. So that's why every Next part we will Assume we will fix number of coach and fix number of attendees. We are not trying to add Any number we want so we will use a fixed number Before that Let's let's go to this guy So the next step is we need add this one to our events model What you can do is If you enjoy typing you can type it if not, you can just copy over to this guy Anywhere I mean as a lot is not in the DF the defined the defined method class I mean if the block is okay, you can put it here. You can place anywhere So in my case, I love my association to be together. So I play here because This is for your attendance. So I just play here Now I'm going to explain to you what's going on here So basically what that way does here is it will let Reels know This form is not just for the events. It will also take additional attributes for the attendance So if you go back to the UI page we have for Create events now. You will see it only have the fields for events the reason being is Reels assume you just want to do that and for Reels to take additional attributes, you need to provide this one. So you can see it's called nested attributes for for this guy Then I will talk about this part later So I understand the first part Okay, the second part If you see this one That's the language part Okay This is what we call hash It's basically it's a key value pair. I mean not really that's actually it's not a pair You can have as many as you want in it and this two are the same So if you have a equal error Or you have something like this, it's the same. It's just a two different way to write it so and You probably seeing something Like this a lot in the code for now you should be put on here You are pointing this value to here and here again, right? It's a key value and this one is a string and this one with a Come up behind or come on in front. It's something we call label. It doesn't matter. It's a similar thing and Here what happens is In Ruby actually it's not real. I'm not sure. Okay. Anyway You give a parameter and the last parameter. It can be a hash when it's a hash You don't need to give us a bracket here actually is equivalent to Dammit So One thing you might see is you're going to see a lot of Function costs and at the end of it you have a lot of this this error thing or This thing this hash thing so the last attribute for a function call it can be a hash and And in that case you don't need to provide us a clear correct bracket And what happens here is When we submit Click the form and we submit the attributes It's possible you submit an empty form and It's perfectly fine because in our case is we actually want to create as an event so we allow the sub attributes that the necessary the attributes are empty in that case We can reject if it's empty otherwise if you go to our A set attendance model you will see other validations and it will give you an error and It won't be removed because it's the whole thing hard code for now. So We do this a reject and this reject if it will take a Function actually and then we call this one is called an anonymous function. It's a lambda statement which Pussy you guys idea. So what happens here is? Will some is a value it will pass the value into this lambda statement and it will evaluate this guy and So basically we are check whether the user ID is it's black. It's empty. It's an empty street So in that case if it's empty street, then we just It's not this particular value a anyone it's not lost Actually, you can leave just leave the this reject if if you want then we will go to the happy pass So the most important part is the first part So now if you do a refresh on let's try to create a new one new No errors, but still we don't have the attributes Anyone tell me why why we don't have the attributes in the form. We already told the model We want the attribute for this subclass Okay, so which one which file is that? As a file view is the folder, right? Which file you want me to add it. It's still a folder, right? Which file I wanted to find it new HTML good gas good gas No, I was looking at it new, right? So let's see what's going on here What's this? It's pretty empty Why is empty? Every every is a good one. You said it's a new right because we are doing a new your new Object for this form. So you can see here. It's calling another function render. So it's render a partial here. So Which file is this partial? Yes, so in Rails if you have a real star with underscore then we call it partial Because it's partial for it's not a complete file. So we need to modify this guy. We now we can take a look at Come on Actually, I have everything type out already This is if you open your says zero zero two then we can say we need to modify this file And this is the part we want to add so you can copy paste to it or You can tap it off Anyone here is familiar with HTML. So everyone else doesn't know What's the HTML at all a little okay so but basically HTML in In my browser it's just contribute to the UI to the structure and Logical wise it's not that important and I just like it's been a bit the div is We'll create a block Invisible block in the in the UI and Each tree entries at the header Then each one is the biggest then you have each two smaller than each tree is even smaller What Probably not I mean people normally just stay with each tree I think we'll go to H4 as well be similar with the normal size Yes, it's a convention, but size it is not the story Let's go through this code first, then you will see this percentage sign equal. What's this? What does this mean you also see this I'm just helping to recap what you learn already Yes. Yes, correct. So after this is a Ruby command and we call it I'm better than Ruby so it's so it's quite hard here and Then again, I'm not sure you need copy this one to this fall so Where does that come from? I'm very curious. Anyone can tell me where this F come from No, no, I mean Has everyone copied this one to this far already? So where where should guys put give me the line number where you're going to put the whole thing here Where you can't put the whole thing here and where you can Is there some place I can't put it? Okay, this I letter F here This F actually to come from here So actually the y'all was I think it's called form-builder helper class So you will do after label after text field and After dates select a select, right? So this this was a F class Obliac come from so here we continue use that This one I think is a new one for you. It's a fields for and this one need to be linked back to our Assets let's hit attribute for So this guy will create the attribute for your association Yeah, okay here is attendance and if you notice it will take another from builder and the hour case here I Change it because I don't want to create confusion and I probably won't work if I don't change it So now I call it a F stand for attendance from builder So inside here this part until this end actually Is what you're going to see for the form for your attendance And then let's just go through it one by one First select type in our case we only Take two values. I mean a student, right? so If the select it will give you a job box and The user type it's the attribute you try to create a phone for and this is a value potential value you're going to provide and Next one has a tent I create a hidden file there. I just assume when you create a the form Right there is not a tent across the end So that's why I create a hidden file and I set a default value false So when it's submitted it will create as a false value You can try without this this line and When you try to create the right you're probably going to see an error because if I remember correct be in the validation for that value for for Attendant value. We only take true or false. It doesn't take a empty Value, so that's why I have to at first. I didn't have this one and they give me I was so that's why I did it here And the next part is your actual field for the attendee's so the first one is the Name I say name number. It doesn't matter Okay, this this part is more important Because we actually get the attendees from the database from the user if we will check our Model class you will see the attendees actually Referring to the user class So that's why here I Actually get the value from from the thing from that So it will user all the collect and this part Again, if it is your lambda expression So what happens here is it will return this array to this function and here is this part the This screen A dot name plus a dot email so you will have an email space or name space email there It will show in to the user as the drop-down text here and this a dot ID Pay attention to the to come up here. So actually it's an additional attribute It's a it's an array. It's a array or a real string so this guy Will be your actual Value submitted to the server You will see in a moment how this be done, but for now you just Assume it will work. Yeah, okay, and The last part the last part actually has nothing we do with Creator new attendees, but actually it has more to do with your updates your events So if you go to your edit Yeah before you will see it's actually render the form to the partial form let me See it's rendered this form to So in case we want to remove someone to from the attendance list we will need that But so I just put it It should it should be okay. I mean it shouldn't create the issue if you remove it for now, but just have it Okay, so everyone and send us questions Anything I'm clear. I will just do a cover base So this is my form. I will put it after my date and before the summit, right? Create it now give a refresh Who is so not showing this weird Let's save it. Ah Yeah, why is this you're not showing I have the view why it's not Ever try if you show it. Let me know I shouldn't show Why the view is rendering from the form right if you go to your code The new new new new new new wheel, right? Where's the new guy? Yeah, here, right? It's rendered from why it's not showing guess everyone have no idea So let's go to our Controller, let's take a look why the event is showing but not this guy Oh controller where's my Which function should I look at it's the new Wait, this is the past the past is events slash new so Which function shall look at in the controller? Do you remember how the pass is generated? How does it work with the? Lots so basically normally for every Resource the past should be a part of the function name So it's new so we look at the new function, right? Then there's a new function. Where's the new function here? Ah, it's here Look at this guy What do you see? One thing I can try is Let's let's command this guy out and Refresh this again, I think this Give whatever Why why it's doing that why this guy is so important and this will also answer the question why we can't see the the the form we just Copied over Okay, so here is what happens. We will create a new form first thing you need to have a empty object and then Your form builder can be some of them to help that to create those fields for you And in our case here, we only have the event the empty object for the events so which means We actually don't have the empty object for our attendees So here is the tricky part That's why from now we only can make a fixed number of attendees there because we need to create the empty object for Them so it can be rendered the property on the UI part Okay, so let's create this empty object Actually This is a tree here if you just go down there for the first you know what I'm going to do next So this this code Which far through goes Take a look and guess what does it do or they seem to does. Okay. So basically this Model the association build function way does is We know what events right it's the empty object over there and you do The model the association the build it will create a new empty object for this association and Insert it to the social array without saving So basically it's creating a new empty Object for attendees So later you are going to see For for coach For the empty coach of right. What does this guy will be look like? so it will be events event the coaches, which is the association the build Okay, so this is an important function and Three times basically it will do the stuff in it three times Let's call it this guy over So where should I put it? My question is can I put it here? Don't mind the format can't play here Do you remember the error we guess? in the first if you put it here you will get a similar error there because your events is not initialized yet and this function will help you to Initialize this object. That's why you come to it there. It should be after it So remember in real if you want your form to be generated properly You need have a empty object in your new function. Otherwise your form will not work and My question is do we need that for the added part? Think about that We'll come back later Actually, maybe not So now let's let's do a refresh in the phone. Okay Come on. Ah, see Because we said we want three Attentives so they will be true attendees Everyone got this page She said guess how long taking me to figure out the stuff. I'm gonna show you today Not really not really So I'm a tommy. I need to do this Friday and I pretty much didn't sleep that much during the weekend because preparing this one First is not the normal thing I do for backhand. So I also need to learn a lot stuff and Second one is there's a as I said, they're much trickier than what you did before So it took me probably about 10 hours Yes, I won't I won't reform from this backhand already Let's do that after this cost actually in my github I provide these Stuff you probably want to pick up if you won't become more serious about programming Yeah, and so This is not what I do normally, but the tricky part is Someone might see some syntax error It's probably I'm talking about I hear so It's big probably because you miss some thing will copy the call especially the little things Here the the end the statement for your I'm better Ruby So the reason you might miss it is because this This line is also a part of the end of line in the original form. You probably just overwrite it So if you have a syntax error, just add it back So everyone can see this one Which is very Okay, you first first, okay, let's No, I just explained that but you just need to copy over Okay, so here is the commentary here as the comments here is the fall you need to edit Yes, so but It shouldn't be overwrite you need to add this one into the form and that is part of where you need to think Where is the part of the form you won't add and that's why I explain to you where this F come from It's not bad. This this form builder come from I Probably just show you the file I have it's gonna be either with my phone So This one is everyone should see this one, right? This one from your previous project the the daytime select so it's the draw box for daytime and What you need to do is add this this new form stuff under it Oh, but wait, it doesn't really matters, but you need pay attention to the structure of this guy So you just copy the code I have and then into here It should work. Let me see Yeah, and in between this guy and the the summit so you should have a After feels for until this end If You didn't see something is actually I know this is one if you have this error and then I So I'm Define method a plus sign for the new. Yeah, if you get that error, just reset a little bit Yeah, the the reading is actually I noticed in your previous session Where guys do the device? The prior for logging in you actually do the something you shouldn't you drop the user database And then you didn't introduce the name column back into the database So the reason being is working will suit work last time it's because During the migration, it won't actually trying to Really drop anything it will just try to really that you know smart way if you beat and sometimes you left something shouldn't be there, so We're doing program with database Try not to drop the table if you do drop make sure you add back all your All your column there as long as you're using it So I think for people it's starting with a new project. You should be fine and People who actually Use For people didn't check out my phone you need another migration The reason is Go to github if you have us just there's my github, okay You guys know how to do migration, right? For those can get an error with the name stuff the user name Create a migration So the migration recall something like add name to user And then you should use your add column function to add Then do a DB migrate But it won't see the data so you probably want to do a DB reset We'll create a migration. Don't just copy my code And And Yeah, it's using something called convention over configuration so Basically it means the phone name in the function name cost name Everything it needs to be consistent. They need to be a match. Otherwise, there will be some issues there Yeah so I Hope everyone is in that page already so for those people already have the Pick up you can try to fill out the page and click submit and see what's going on They know it's not working You need to do some body backwards The reason I'm showing you all this bug here is it's a common thing. It's even very experienced Programmer might have seen that You may just forget about that during the development so let's try and Try to look at the log and tell me what's going on. Why is not working If you reset a man actually the combination of four different comments, so if you see an error and it's not working You need to try to break it up and those combined Combined to comment one by one and the way around comments. Make sure go back to chat a lot. There's no errors Who haven't got this page yet Who else haven't got a page yet? I missed a form bar And after that, I missed a three part So I'm like lost with some of the segments Come back later. Yeah So I Want to have more class I think it's tricky Who haven't got it? I don't know I think there's some some people who don't know I think this is you know this is this is this is this is this is this is this is this is you are amazing So this is the place where this is This is So, don't you think this I don't know I'm quite scared to be in Brazil. Who are you? Well, you got a little chicken for me. I don't know how much I want to eat, but everyone's... Faucique. Cintec. Error. You- You're just saying it's correct, so I'm... Yeah. I'm- I'm very, very excited. I just don't want to say it. That's it? You have to know. Why should I tell you all of this? You have to... Oh, it's... I haven't heard from you. I'm just asking you guys to come here. We want to be in a venue here. But you guys are not allowed to show. It's very important. But you don't have to worry about it. We just want to be on the go. We're going to play the game. I have no idea why my Colin was not there. I don't know, I'm just out. I'm just waiting. It's not that I don't want to see Colin had the. It was hard to get an English version. Why do you have to have an English version? Cause there is this. And you're saying that you're already– Nervous. And you're also from this area, right? Oh, An AM! I mean the South Asian region, I think. The South Asian area? Yeah, I think it's in this area. Cause you can get something to ease it. So everyone try to submit the page and tell me what's wrong with it. Yes, you don't see an error but something is wrong. So basically you can't actually add the attendees there, right? So the next step is going to your log. Yeah, where's the log? Come on, the console log is here. This is your log. Okay, so this is the page, right? If you fill it up and try to create a student and create events and you will see the attendees are empty. Yes, so no. Yeah, so we need to figure out what's going on. Okay. So again, go back to the log. Basically, we will click on the create. It's doing a post, HTTP post to the server. I heard you guys learned about that last time. Okay. So do you know what's an HTTP post? Okay. Basically, let me, any link you link, actual link, we will click on it. Actually it's doing an HTTP get. Oh, that one. Yeah, so when you click on the create, actually it's not a link. It's a function, it's a semi function called by the jQuery actually. So it's doing an HTTP post. So that's your hint. So that's why you need to know what's going on. And then you're just looking for the HTTP HTTP post. Yeah, here. So actually this is your HTTP post before the get. So what happens is you post the data to this URL and here is the data you post. And you take a closer look. You can see the SQL statement there. There is a user, we got the user. So I assume this part actually is, that part is your device is verify your identity. I'm not sure I'm just guessing, but it's not important because it's a select. It's not creating anything. Here at this point, I'm more interested in the insert. So basically what you are seeing is the events is created in the insert into the database, but we don't have the attendance there, which means something went wrong here. As you can see, we only have insert into events, but we don't have an insert into the attendance. So, and here is something you should pay attention to. It said I'm permitted parameters. Basically means it's not allowed. So something, some data may have tried to post what's lost in the process. And that something is your attendance attribute. And if you go back a bit, see the log here, this is your parameters list. Is this the first time you've seen this? Okay, I saw the issue. Okay, so basically what happens here is, let me do the same. This is the form. Let's go to the form again. This is a new form, right? And if you inspect the form, you will see. I hope I was one using Chrome or Firefox. No one using Internet Explorer, right? Why are you despising it? No, it's just harder for the developer to work with. So if you open that, you will see this name and the ID stuff like that. So the name actually, that's come to HTTP request. When you do a post, actually you collect all the form information and post it into the server. And you can see this, events or attendance attributes. So this is the parameter that actually is not allowed in our server. So now you know where it's come from, right? So take a look at this. Remember this name. And go back to our server log. In this part, you will see there are the events. And then you have equal error sign, which is your hash. Or additional error, whatever. A metro earlier is pointing to another object, actual hash. And with the eight, there is a tendency attribute. And in that, it's the data you actually submit for this particular form. So try to map this information to the actual form here. So for example, the attendees, what does it look like? The user type. It will be events, attendance attribute. Zero means the first form. And the attribute is the user type. And this information will be linked back to your part. Parameters list consumed by the server. I see people lost. Yeah. So you need to understand this, then you'll know why actually the error is happening is because this Rails is using a white list. So any attribute come from the browser to the server. If the attribute is not a white list, it won't be server into the database. That's why you'll get this thing. So all we need to do is just add this attribute to the list. And do you guys know where it is? You should know. I saw a code. You have plenty of that. Controller, where's my controller? It's always in the controller. As a bottom, you have this guy right. What is this function called? So you just need to add the attribute list to here. And the reason I'm showing this one, you actually not just need to add a single this attribute. You actually also need to add the sub attribute within this attribute, which means you need to add the user type has attended and user ID and destroy. So how do we do that? You actually can go to not this guy. Yeah. So, you know, yeah, actually I want to show you. You didn't actually create the thing and go to that. So yeah, here is it. Here is it. It's the premier list for your attributes. So you just copy the whole thing, overwrite whatever is there. And you can see I'm not just adding this attendance attribute. I'm also adding all the attributes in the attendance, which include ID here. Not my ID here. More importantly, you need user type destroy and has a user ID. User ID. Yeah, user ID. Let's just copy the whole thing. So it should be something like this. You might wondering why the attendance is not created, but it's not an error. Actually, it's a molecular security feature. So it shouldn't read an error there. It's because I actually can modify the form and submit something the user shouldn't do. For example, the user type, if you notice it's a value, it's a sign. Okay, that's enough. In our case, it's not a valid case. For example, if you are students, you don't have the ID me right. And your user type is student. But I know this API exists and this API is not protected by any assess control. The way I can do it, I can actually modify my own type and submit to the API. And then I will become admin. And so this is just an extra security feature there to prevent unwanted data going to the database. So if you've done this one, then you can just create the thing that you will What do I call it? You will just have this in work. Let me just actually need refresh this because just give a refresh and call it a test tool and just create something. Apple and discover will be a student. Hope it works. That's it. Now you see it's working. So everyone back in this part. I'm going to hit if she wants to run the server. Oh, let me check. Where's this guy? I'll just comment. No, something went wrong. I don't know. The Cloud9 is acting weird today. Yes, yes. Okay. Anyone knows what that dog sounds like? It's a environmental variable in Linux. So I can do this. I just use my own. I can do one equals to eight and so on. And I call $98. Yeah, very well. So it's the variable name. In bash. You can not do that. I got it. This one actually is for the bar. So it's like a bar. So it's pretty easy. How is it easy right now? This is everyone. Okay. All you have to do. Next step, we can move to the coaches. So now you have a tenant, a tenant's right. So you have Admin and a student, right? So how about that? So do you have to add them? The first thing I'm going to change is the show. Because we currently don't have a way to check. But there is a contract. So I'm going to do this. I'm going to turn. I'm going to turn. Let's do it. I pray another one. They shouldn't do this yet. See? I think we're going to do it here in 12 months. And this one. It is showing 100 more right now. Maybe it's just the one. But it's not an help trick. In this stage. So in this stage, I'm going to put the size on. But I don't see any help tricking. So we need this part correct. But it's still actually open inside. This also is a trick. The first side I'm going to do is this one. The 7th last scene actually. How many do I have left? I think it's supposed to run it or what? No, we need to add it. Add it and go. Yeah, we need to add it. So I don't get it? Yes, so I don't have to find that. Except this little thing? Yeah. So the more important is you need to know how to identify the error. So you see just now how to set my ID. So first, the only reason is to only render one of that. I know it's probably the three times minority. But it should work. So I double check the three times it's working. Then it's going to the form. I'm thinking maybe something lost in the form. So that's why I print in the form with the count of the number. It's also a tree. And then it must be something else. Then the last so you try the wheel, you try the controller. So always you need to try this model. So let's go back to the model. So that's how it works. Oh, okay. So I just copy that. It's actually set in a set of trees. Or it's like set in a layer. Yes. So that's why it's important to understand the whole flow. If something will run over the track. So basically that's your team's opinion or true parts? Anyone here has no PHP. So yeah, so basically if you do PHP like long time ago, like maybe 10 years ago, it must be easier. You don't need to modify multiple fonts just to get one page out. But the reason we do that this way now is a better practice. So if something were wrong, I can't, if it's a very good wrong. And if I want to write automated tests, I can just write some tests against that particular portion of the code. So let's get back to our whole. So the code, first you need to update your, everything is rejected. Okay, for the code part, first you need to add as a coach, the particular coach part to the wheel page of show.htm.erl. Everyone, not like that. It should be very similar to your attendance. So you can just copy the code in your attendance and modify that. But you need to be careful about the attributes because the attributes at least are different. I think yours is okay. I think you modify that. Oh, you don't need. Oh, this part. Yeah, that part is okay. So just save it now. Yeah, save it. Now I'm going to re-presentate. Oh, wait, wait, wait, wait. Reject C for rejected. Reject. Reject C. Yeah. Yeah. Okay, try S. No S. No S. Some error is just due to your typo. So just be patient and don't do it. My first language was C plus plus. And at that time, we needed to use semicolon to separate the lines. And the semicolon is something we really need to easily use. It's my first month of programming. What's the first month of code? The logic is fine, but it just needs a small semicolon. So now we don't need a semicolon anymore. You already need a much better. It's strange. Okay, so everyone, guys, is a little hard. So if you don't want to write it, you can copy my note. For Windows user, don't use notepad. No, don't use notepad. Notepad is fine. So let me do okay. I do it okay. Don't use the semicolon with those. The correct one won't work. So then it's ERBW. This is SS007. Yeah, so into the show HTML.ERB. There's a church. Oh, that close. Yeah, so then you can just refresh your show page. Actually, just now I put it in attendance as I stack between some tables. So I have to change this space again. What am I going to do? What's planning for today? As of the end of the day, you should have this one. So you can add as many as coaches or attendees you want. Yeah, so this was my plan, but I don't think we have time to cover that. So for now, you just can try to... First, you need to show the coach in the show page. And second, remember what we did to the attendance and do the same for the coaches. And this will be your homework. And I hope next class someone can come this far. They're going to have... And if you're curious, you can just go to the GitHub page. This code, if you go to the master branch, it will have the latest one. If you check out, it will be exactly the same. You can see what I did there. And if you want to see, actually for each step I made, the changes I made, I do a comment. Where you can see the difference, each step what I did. So for example, the last one is... Actually I had to create different branches. So if we go to this one, so allow at any number of attendees in UI. So if you go click on this... Come on, come on, look, you can see the difference between the files. Let me do this one. So the entire part is an add, which means I added a new line there. And there is a minus, which means I removed this one there. And actually, I thought of wrote some script for today. So I think I'm going to share with you an actual upload. If you're interested, you can take a look. So here is this one that you can see. It's pretty much step by step. So now let's focus on the courses and we have half hour. Is there any step you are not clear about how to do that? So after show.html.grb, where you should modify the events model, which you need to add a set nested attribute for some association. So after that, you need to modify your controller. So what do we have to do with the controller? Yeah, so first is to create this empty object. And then it's your parameter wild list. So that's what we need to do for the controller. And after that, it's a form, the actual form. Then you need to modify the form. Don't look at it. I'm not creating anything right now. So let me see what I have here. Okay, so here is one. See this one? Ah, I think I will just upload the whole thing now. Okay, so it's in the app. So if you go to the Google Drive and under the notes folder, you will see this notes 002 and just open it. Just follow the step here. You should be able to add your coach. You need to look up, go to the Google Drive. I put the whole thing into Google Drive. The code. Yeah, the code, the instruction, the entire thing. So what happens here is just repeat, I guess what's said. First I mentioned something is missing. So this part I'm referring to the show coach. And the next part is that you need to modify the events heartbeat with this value. Something extra. A lot destroyed. I have a lot destroyed here, which means we'll do the click remove. It will actually destroy the app right in the database. The reason being is it's not a link to anywhere. This culture is only linked to this guy. So it doesn't matter. So the question here is for in your control. But in the model, in the last model, you have two functions. One is admin, and the other one is students. I don't get the modern name for that. Admin user and student user. Student attendance. The reason being is most of this data is coming from user. And they just, I think it's the last tutor. You just want to have a cleaner code in the UI. So you can do for admin user, something like that. So that's why they create that. But for coach, there's no such category one. So you can just, what you can do is just, if you go to the, where that. I don't have a code. I remove it. Do I remove it? Yeah. So here is the function you have, right? The events.admin user. And for coaches, actually you can just do events.coaches. Because we don't need to differentiate that. The reason they have this one, because for attendance, actually the admin and the students are the same association. They're in the same association. So if you read the code for admin user, you will see they have a search criteria on the user type. But I'm not saying the same. Oh, yeah. The reason I didn't say it before, let's go. So if you see the coach here, it will be events.coaches. It means when you submit the form, it will, it will ask. So actually to do, do you remember the log I showed you? It's the manager thing. I'm thinking of a way to, let me, another thing is you can, something you don't know, just search it. Then you have the official documents. But trust me, I mean, let me see if I can reface this. Yeah. So basically it means Nestle attribute allows you to save attributes on the associated record through the parent. So in our cases, you have events.coaches or attendance, right? The attendance is the association. Event actually is our parent, which means when we do events.save, it will allow you also save the attendance through the whole thing. Yeah, so that's why we have that. Otherwise, when you click save, it won't save. But actually it does something more than just this, I think. Yeah, I'll just stick it on there. It's too long. I want you to read it. So everybody should finish this part already, right? Then the next one is you can choose either your, I did your form or I did your controller. It doesn't matter. For starters, one thing you can do is every time you edit a file, especially controller and model, if you modify this file and the real file, you actually don't need to restart the server. So when I just start programming, one thing I want to do is when I make some changes in your file, I'll just refresh it. So just make sure the thing I change is not broken or it's not going to break anything. So you can also do that. Otherwise, if you just modify all the tree files, then refresh something field, it will be very hard to identify where we're on. It's in the world where I'm just going to sit. I don't know. Why could I find an individual? Go to the share with me something. Yes, zero zero six. No zero zero two and the notes. If you can't find the instruction file, it's go to session seven and the notes folder. There is a notes zero zero two. So that's the approach. Yeah, if it came out the error there, it's just supposed to be there. Yeah, I didn't actually decide if that is to. Maybe I need a step. So I'm trying to see, like, I'm not going to purchase. Really? Oh, where did you add the most? I'm trying to see if I'm right. Oh, I'm not even out of here. You can see that I'm down here. So that's the choice. Yeah, that's the choice. Yes. Oh. What is that? I don't know. I think we have one coach in the community. I don't know if it's, you know, or I need to do the other stuff. So I don't know if it's working. Is that a sequence of the notes? I think the instruction I learned there should be easy to follow. So it's homework. So the homework, you can finish up to have the coach in the wheel and you can add coaches with two instance. And I hope they will have time for the last part. And just show you guys what I normally do for the backhand server. This is a private repo I need with my friend last time. And you can see here there is a lot of, like, posts and get requests. This is actually our backhand server API. That's why I mentioned what I said. The way we are doing stuff today is normally not what I do. So this is what I do. So it's defined on a long list of API, which allows communication between devices. So speak of which to be a programmer. Actually there's a bunch of stuff. It's not like you need to learn, but it's just, it's good you have experience with. So in the GitHub, if you go to the doc for the, there is documents called what to learn. And so for starters, actually, one thing is very important. You need to understand what's going on with your computer. And some weird error will happen. And if you don't understand the basics of the computer, it might not possible to debug at all. And they come to the bottom part, algorithm data structure. This will help you with the problem solving skill. And the rest is just some advanced topic. In the future, you may want to pick up. And I think for us, you're probably more interested on the web stuff. So where is the first style you have to learn HTML, CSS, JavaScript? It's a basic, it's a building block of web technology. So that's it. And after that, it's something good to know, but you're probably going to use it someday. It's some alternatives for CSS. So I think you guys already see your SCSS somewhere in the code. So if you go to your, what's that for the application for the, then there is resource. I can't remember the, let me, let me try get it. So go to your app, then go to our assets. Then you have this style sheet. Then you have this SCSS. So that's really the pipeline. It will compose the SCSS into a CSS. That's why you might want to learn that. And another choice is the LESS. So it's up to you which one you want to pick up. And then it's the JavaScript alternatives. So you have a ES6. I mentioned it in the first class. So then you have TypeScript, which is a superset of ES6. Then you also have CoffeeScript. So all this will compile your code into JavaScript. So this is some extended reading. And the step two is you probably want to learn full MVC framework for the front end. So what we did with our application now, we actually don't utilize any front end framework. We just rely on Ruby on Rails to render the stuff for us. But in a real application, normally, normally nowadays, there are some components you need to use this. For example, in the form, in the case, you probably need to implement the form with, for example, AngularJS and AngularJS are responsible to communicate with your server and to create the actual object in the database. And in that way, you actually can reuse your server for other devices like desktop applications, like mobile applications. So this is something you might want to pick up. And then, I think just pretty much all for the front end. I missed one thing. You probably also need to learn a UI framework with how to beautify the stuff. So there's two choices. I think one is bootstrap. Another is why I think, why it's from, I think it's from Yahoo. And bootstrap is from Twitter. So there's something there. And if you are like a professional in graphic design, then you probably want to come up with your own stuff. Then is the back end. There is a lot of theory going with the back end. So you need to understand the request response pattern. So basically it's your server, the htv-post, htv-guest, post, htv-post, htv-guest. This is a typical request response pattern. Then you also might want to understand what's a publish, publish subscriber pattern. So it's more like a whole other thing called push notification. It's a typical public start pattern. And then you need to understand the network protocols. So of course, more important is the last three parts. Cybersecurity, system design, and APL design. Yeah, so there's a lot. So this concept is just a starting point. There is, if you are serious about programming, it's a long way to go. But it's not impossible, actually. I know, I have a friend. He was from, he is a college job on. So he studied college one year. Then he dropped out of college and he joined company. And within five years, he is an architect. He is one of the largest companies in the world. So it's not impossible. Okay, I think that's it for today. Another thing I forgot to mention, probably need to learn how to read code. Learn read code. Read, yeah, like a storybook. Yeah, so you don't need to know the language. You have to read the code, right? I mean, maybe it's okay because it's going to launch in days, maybe it's not. So once you start the language, then the next step, I normally recommend people to do is to pick up another language. Then you can see the common element. And then we'll pick up the third language. You'll know what's the question you're going to ask. So what would be a good language that you recognize? After Ruby. Yeah, after any words or personal favorites? My personal favorites. C sharp. Anyone heard about C sharp? Anything. It's a general. It's very similar to C and Java. So it's a macro source version of Java. Like I was asking my A and I was seeing a script and I was like, should I write it to start off? Because my A is actually the edge of it. And then I was like, I don't know what I see and what I'm thinking about. Yeah, definitely not a C. There's not a lot of C to do that. No, definitely not a C. No, you're going to die. I'm like, it's okay, fine. No. There's nothing like I'll get out of here. I don't care if it's those words. Still, you may think of Python. Python is a weird language, so. Why? Because Ruby is good. I mean, so in Python, how do you create an instance of a prep? I don't know. You probably don't know. So the thing is, for starters, I really want people to know is you should try to learn a language which you can copy, paste, so code directly from a website and write. In that way, every can have something working and then you can begin the confidence. Python is not something you really can just copy, paste to work because indentation, it matters. So, for example, even though, let me show you something. Okay, if I do something, for example, like ABC and I do ABC and I do, okay. I do this one, ABC. Oh, you probably won't say it. So if you, someone pay attention to my typing, the first ABC, the indentation in front is actually the type and the second one actually the space. And visually it is the same. But if you didn't choose the right editor, then it won't convert this to automatically for you. Then to Python, it's different. It will create an error. Yeah, so that's why Python is, I don't know why so many people are starting with Python, but it's not a language I would recommend. So what would be the language that you would recommend? How Ruby? Yes. But what's the usage type of usage? Ruby on real, actually Ruby is a general web application. And someone choose Python, it already says they want to do data science stuff. And then you have something like that. But actually, you can find a counterparty in the Ruby too. It's not necessary to do the stuff with Python itself. So what if I pair up with Python? What? I pair up any user. Yeah, you can do that. The students are very similar. Yes. Especially the arguments and things. Not really. Why? I think the way they argue things is... It's similar language. So the thing about language is... So the reason I said you can start with one language and learn the basics then start a second one. Then you know what's the common question you're going to ask for a particular language? For example, I was starting with Google Go. So the first thing I will ask that, how do I declare a variable? How do I declare a method? How do I declare object? Things like that. Then it's also seems like that they have pointer. So for starters, if this language says it has pointer, run away from it. Yeah, pointers. It's a C thing. So basically you shouldn't start with your programming with C, C++, Objective C, or Swift. Swift also has pointer. And Swift syntax is really weird. Yeah. So the point is for programming, start with something easier. Then you can gain the confidence. Then pick a second sort of easier language. Then you can compare these two. Then you know for new language, what you should be looking for. So I started with C. So when I pick a new language, the first question I normally ask, what's the entry point? What's the mean function? So in Java, in C++, there's a mean function there. But then Ruby and the Python come along, no more mean functions. That's something I need to cooperate. Yeah, so MAI. Oh. Yeah. So that's for C sharp and the, I mean for the older language, there's the entry point for that thing. Even with Google Go, they come back to me. So for starters, any language with pointers run away. And there is something called type of language. So like C++, we'll use a variable you need to declare is a int, so stand for integer. So you can't run away from that. That variable only can be used to save an integer. If you try to assign a string to it, something weird will happen. So in that case, so you try Swift. Is Swift is a type of language or not? Technically it's not. It's. No, so for example, if I remember correctly, if you start a thing with a particular type, you can't use that variable for another different type. I can't remember the detail. And the goal is that way. So, but some languages have this VRR. So like C sharp and the goal for variable declaration. It's, well, it can infer the data type from your data input, but it doesn't make it dynamic. Type in language. So Ruby, just stay with Ruby. So for Ruby, you can do this. You can have a a equals to one, then you can just change a equals to some string. It won't complain. And you can even do this with something else. But if you do this one in C++. Start somewhere. Yeah, start somewhere. Ruby is a good one. And ask those guys to organize the proper Ruby cost. One more thing. Do you have a test website? Well, people don't know HTML since it says address code. You can go to just that place here. Really entry level and I really need to follow this part. And for Rails, you can just go to this one. Railsgirls.com. Just Google Railsgirls. Railsgirls. And so it has some, I don't know, actually half of my stuff I learned from here. And another half is from this one. The Railscast. But this one, some of the code is outdated. You, some of this is based on trip or something. So normally now it's Rails4. And I think Rails5 is coming out soon, if haven't. Yeah, so the syntax and the functions and the modules are a bit different. So this is the first start. You can also put a tutorial in the notes of today's improvement. So you can check on the authors for the beginners to learn the program graphs. Well, questions. If you have questions, just drop an email to that lady or another two ladies. They will figure out the answers for you. Okay. So thanks everyone for coming. This is supposed to be our last lesson, but we, we decide to get one more because we think we need to wrap up everything. And because we'd like this course, we cannot talk to this thing. We cannot just learn Ruby on Rails without knowing Ruby's. So because we don't have the function there, so I can see a lot of you get confused in class. So in, we will have another class in 12, 12 of the, on 12 students. And we will wrap up everything and we have a very simple app. And then from the beginning and then we'll teach you how to publish. So the herald books. So we will help everyone. We're coming and Amber will send you the details. So if you have any questions, can just email to us. Our coach sent us two cards here, so we just put them. Just one more thing. Oh, it's not in here. So as she mentioned, so basically this one is a very good tutorial. Yes, I just put this in the notes. You don't need to actually buy it, they have a free version. Where is the damn free version? Yeah, free, free. No, it's not free. I can't find the link. They should have a link right now. Just Google around. Where is it? Oh yeah, here. So just, this is a very good tutorial. It covers from front to the end until department, everything. So if you can finish this one, about 70% start this call. So I think our final area is the most important is that when you turn on Ruby, so you get lost, you cannot wear the coat, so you just call behind the page without knowing why. So we hope that everyone will come in for the last lessons and we'll grab that seriously. And we'll go some small gifts from our coach. Damn tutors, please. Oh, thank you. Can I put it in my office?