 Ayla, like he mentioned, I just graduated from GA. So GA sort of gives a ton of courses. I was in their full-stack web development course, and we picked up a bit on Ruby and Rails from them. So my presentation is sort of more geared toward beginners like myself. People who have sort of picked up a bit on Ruby and Rails and are sort of guiding themselves through their own learning process. And just wondering, just show of hands, who would consider themselves a beginner at this point? Yeah? So not like you have low self-esteem, but really you've been coding 10 years, but like real beginner. Yeah, like a couple of weeks, a couple of months. So the one thing I've kind of realized is when I went back to the apps I developed like as a beginner-beginner, I sort of had to redefine my learning process of it just because I was used to sort of starting up with just getting something that works on the screen. If it works it's good, brush my hands off and fine. But when you go back you realize, okay the code's a bit shoddy, it doesn't make a lot of sense to other people that are looking at my app. And so I now have to start from a place where I wanna know where to put my code, how I would define it, how it would make sense to someone else, how I could scale it, and how I could build features on top of what I'm making and not be so afraid of breaking it or breaking the app, which was where I was before. One thing I might wanna show you is the kinds of apps that we've built. So basically how GA works is you usually start off learning something like for maybe a week or two of Rails, for example, a language or a framework, and then we're given a week to work on a project. So this is something that we came up with. This is like an individual project. So not completely, not overly complex, but it's meant to sort of test out different concepts that we learn. So this is meant to be sort of more of like a real time Pinterest kind of meets, I don't know, Eventbrite kind of thing. So if somebody is at an event and they wanna know what's going on right there and then they can kind of just say like hi and you see it come up. So this is sort of like action cable and use. So this is sort of an example of something that we could build. And this was an individual project. And I don't know if you wanna see more. I think I'll just stick to that for now. But yeah, so going even back to that app and trying to build on it, I did realize I do have to think a little bit more about the architecture and a little bit more about how I'm learning just because you do go into Rails, really learn Ruby first, and then we went to Rails. But as I was getting pretty in-depth in Rails, I kind of forgot a bit about Ruby because Rails is its own animal and it kind of pulls you in. It's really seductive, it starts to work and you're really okay with just leaving the code there but the truth is you should understand more about the architecture and about how you're going to create your app because eventually when you do want to add things, you might end up screwing around with your app and it might fail you. So what I'm probably gonna do is go through the mistakes that I've been making and hopefully some of you might be able to take away something from this. So my first mistake that I sort of came across was the idea that, I don't know, I'm guessing most of you have heard of skinny, controller, fat model, and I hadn't really thought about it that way to tell you the truth. I was putting a lot in my controller. It was like Rosie or Donald fat and models like Giselle skinny. It was really sparse and I never really thought of, I knew you can kind of sense even as a developer, even as a beginner you might build intuition by what would be dry code but would be clean code and I'd say definitely hone on that skill, that intuition of feeling like something, even if you don't know the actual concept behind it, there usually is something that you can find online that addresses what your concern is. So one of the things I felt was, okay it's kind of weird that my controller is really clumped up and it looks really messy and of course this can't be the right way to do this and lo and behold I find, yeah it's not, I was doing it completely wrong and this sort of stems back from the way I was thinking about how I was making my apps in the first place. You do like the idea of it just working and sometimes you do just leave the code alone but I think eventually I did have to end up thinking about what I should be putting in each of the slots of this framework. So the controller is meant for something. It's meant to be the middleman. It's meant to do specific things. Same way the model's meant to do specific things and spreading that responsibility out and putting too much in the controller or putting too much in the specific slot might end up complicating everything and whoever else reads your code might not be expecting to see what they see. So that was something that I realized that I was sort of making as a mistake. Second mistake, lack of developer discretion. So right, I relied quite a bit on gems just because I mean you get introduced to jQuery plugins and gems and you get super excited because they're free, you can use them and everything and I'm a girl that's like going window shopping but everything's free and it's really, really cool but eventually the gems I chose sometimes even broke on me and that was really my fault because I chose those gems and I never really did my due diligence on them so I had to sort of address that addiction in my own way and what I sort of do now is sort of walk through these different set of criteria. One of them would be pretty simple, like look at Ruby Toolbox or websites like that, make sure that it's been updated recently or that a lot of people are using it. I mean, if a lot of people depend on it it makes a lot more sense for you to go with it rather than you phishing out like a random gem and just because it looks good on their demonstration on the site doesn't mean it's gonna work for you and doesn't mean like it's always gonna work in all situations and I learned that the hard way, really embarrassing talk I used to give with my app and it would break and I'm like oh my gem sorry, so that can happen. In terms of how complex it is, sometimes I bring in gems to do things for me and I could really do them myself so I might use Devise for something but really I could build my own off system and I don't need Devise and I don't need all the other functionality that it adds so if you could build something on your own and if you don't really need that extended functionality I think probably better to just build it on your own or in the other sort of spectrum, other end of the spectrum if you feel like there are edge cases that you might not be able to catch so I'm not too experienced yet so I might wanna bring a gem in to help me catch edge cases so those are cases where you might wanna bring in a gem and lastly, look at the code so if you're looking at any kind of plugin or a kind of gem don't be afraid to just delve into the code and see if it smells bad, if there's something off with it if it doesn't look right to you or if you think you see loopholes or something wrong then you don't have to use it. Mistake three, thinking of model classes is a long title. I think the point I was getting to here was yeah, part of what I was talking about earlier at that point I was harking back to I started off with a bit of Ruby, went to Rails and a lot of the time I was caught up in this framework with Rails that kind of prevented me from realizing really it's built on Ruby and we should be able to use Ruby like in conjunction with Rails and not it shouldn't work against you so one thing that I sort of hadn't really thought of before and maybe other beginners may not have thought of before is use your models as classes you don't have to just think of it as direct relationships to your database you can have non-active record models and they could really help just help you extract what you need to extract from your current model and at least compartmentalize some of your logic if that makes sense and one of the other things someone had put up an article on when to use these and I've been learning them and I would get kind of confused this is the kind of where do you put it question and I get really confused about where to put it sometimes because I would develop a framework in my head, use it forget about it, go back and be like where did I put it and why did I put it there so I think developing a framework that you know like a new trust that you're gonna follow it when you end up building more and more apps you kind of know and understand why you're putting things where they are you know where to look for them and you're not gonna be like a crap why was I thinking this so even if you are a beginner and you don't know all of these different tools yet I realize sometimes coming in from learning about the architecture before you learn about the actual implementation of it might actually help because then you don't kind of run into the problem of practicing so much and then making a huge mess and not really knowing what you're getting out of the tools in the first place yeah and this sort of comes out it's like a same thread of thought so I really love this idea of being able to create like subfolders that address the actual controller or model in question if you're creating what we call a plain old Ruby object and you're kind of extracting that functionality you're putting it in something else this is sort of a really great way to like really know what your code is associated with so if you have like a dashboard in your app and you want your list of users to you know be able to be paginated or you could like filter them or sort them in some way you could easily make sure that it refers always refers to like the right thing and so this is a really good tip that I sort of got off from someone else it might help you and this is more okay mistake five learning process so when I was picking up even on Ruby and Rails I mean I love reading textbooks I feel like it's really efficient way of getting a lot of information in your head at once but I don't know if you guys ever experienced this you would read something or watch a tutorial on anything really and in the moment you think okay I've got this I'm gonna remember this forever and ever it's gonna be amazing and I'm never gonna forget it and it's gonna be etched in here because in the moment you think you're so sure and then two weeks later you're like I don't remember I have no idea and so I sort of realized probably a better way to go about it is to start with learning something and then asking you're gonna you're about to have questions about what you learn and your book or tutorial can't answer everything I've kind of realized if you were to like answer your questions right away they don't become these growing concerns in the back of your head that always pop up if you keep you know coding and building new apps so go to Stack Overflow go to documentation try to get them answered and then build something small to test it out and I mean something really bare bones that has to do with that specific concept so at GA the one thing that really helped me was any single time we had a concept and it had to do with you know maybe something small even with you know any kind of framework they were trying to demonstrate something they would just build something small and they would show it and basically it's a demonstration of how it works and I realized I kept going back to those same apps just to learn or get a refresher of those concepts because a lot of the time you think you have it all up here but really it's not and you don't want to go to like page 274 of that textbook that you highlighted just to like recap something you want something you can easily reference on your laptop and just go back too quickly so even if I was saying doing Rails for a while but I wanted to go back to Node.js and I want to know for example I don't know like how to make the Ajax calls with put or delete requests or something like that I know I have an app to go back to that exemplifies it really simply really easily and I don't have to you know look it up anywhere it's right in front of you you get to see it play out really easily so I realized having something like that to refer to would be a really good idea I could show you like a really simple example of that actually let's see so this would be the most simple example of something that really explains more of like a design concept than something I would really explicitly learn but it was a book I was reading I forget the name but he was basically trying to explain in a really simple way what it means to have single responsibility like one of the main things I learned from him was if you ever have a model and you want to find out whether or not you're putting too much in it just pose it a question and make sure if the like actual question makes sense then it would make sense to keep it in a model or a class it doesn't make sense it's better to sort of you know externalize it in another class so for here it might be hi gear would you be able to get me your wheel diameter so that sounds kind of iffy like that doesn't really make a lot of sense sure yeah sure yep is that good do you want to book the question no okay um yeah so this is sort of his way of explaining it if you're asking gear for a method that really has more to do with the wheels that wouldn't really make sense you could put all of these attributes all of these different methods in here you really could do that it'd be okay but eventually it might not make a lot of sense so this is a really small scale way of exemplifying that but I'm sure like as I build bigger apps it's a really easy thing to come back to to sort of refresh something as simple as single responsibility um going to road right so this is sort of like the other end of the spectrum so on the one hand I might end up reading too much and getting lost in those details on the other like on the other end I might end up building too much in the sense that rails really is the sort of magical thing I love that you can create something and get the results right away but what can sometimes catch me off guard is that it abstracts away too much from my learning process just because if you keep using certain things without really pining on the code and trying to find out you know what the real concepts behind what you're doing are um if something were to scale something were to break you're far more in the dark than you were before so I would say it's definitely more of a balance between being able to code and do something and actually exemplify it in code but also read up enough and like make sure you understand what you're doing and don't just get lost in the creation of it without with like you know skipping a few steps rails allows you to skip like way too many steps so I would definitely I mean a lot of rails developers at least at this point the ones I've talked to are saying just try to pick up more on Ruby sometimes you get lost in rails and you forget about Ruby and that's definitely at that's where I am so anyone who's kind of up this hill and is right about where I am I'd say pick up advanced Ruby and really try to that's what would let you get into the source code and really understand what you're doing more and I think it also gets you out of the the main MVC architecture that you sometimes get trapped in and you think that's the only way to do it because that's how I know to do it that's what rails taught me but if you know Ruby more you know that might not be best at all times there are ways and things you can build up upon that architecture that could really work for you so yeah that's my two cents and thank you for listening