Project Jitters
If you know me you know my nervous levels never even begin. If you don’t know me, know that I freak out very easily.

This may sound a bit weird, but I think this point illustrates variable assignment. In programming things can look the same, have the same name, but them being the same thing is a possibility and not a certainty.
That’s cool but what does it have to do with projects? I mean obviously we are past the variable assignment phase if we are working on projects, that just makes sense. But if I’ve learned anything from coding, it is that the hard problems are; the easy problems we think we won’t have anymore, and things we haven’t considered.
Naturally when I set out to start my first project I was feeling a lot of emotions.
How could I not be all over the place? I can say I’m excited but that could mean scared, happy, angry. All it really tells you is that I wasn’t my usual self. It is also a word that described me correctly throughout the project. At the beginning of my project I was excited.

I knew I had the tools to do the job. There was no reason for me to be worried. Bugs? I’ve seen thousands of them. One even landed on my eye once, that is when I learned to not panic about them. Panicking there would have made an unnecessary mess. So whatever bug that was coming my way I was ready for it.

Going into my project I was thinking I’m going to do more than just make a CLI app! I’m going to make a game, there’s going to be so much color, 5k graphics, it will do your taxes, and walk your dog. I feel like I could have been a little more ambitious but deadlines are real things. Figured this was plenty to work on.
Oh how right I was. I barely had a functioning project before the deadline. The first problem I came into was cloning the wrong github repo. I figured they looked the same, surely they will allow me to do the same things.

But that wasn’t a coding issue per se and was easily solved, but I wasn’t able to identify that was the problem quickly. The real problems came when I allowed myself to believe I knew what I was doing. One instance I remember clearly was when I seeded my data.
20.times {Review.create(user_id: rand(User.count), movie_id: rand(Movie.count), rating: rand(10))}
My understanding of what my method was doing was solid. I didn’t understand how ActiveRecord worked, in conjunction with this method. Specifically how the destroy all method would change what my values would be.

It was a bit hard to test when the user[id] wasn’t based on the user count. But it also made me think of how I can handle the changing ids, with every database wipe. Which in the long run will surely be something I use later on. The answer to my problem was seeming a little tricky. I was excited in the worst possible way. I was angry at myself, I knew I was overlooking something simple.
After research and phoning a friend I figured out what I was doing wrong. There are probably many ways to fix this problem, but I happened upon sample.
20.times {Review.create(user_id: User.all.sample.id, movie_id: Movie.all.sample.id, rating: rand(10))}
The use of sample made it so the review would have a user from the database and a movie from the database. Now this was stressful but a learning experience. I think I’ll try to use sample anywhere I can from now on. Doing this project made me doubt if coding was for me. But finishing the project was so satisfying, made me think about the next project. Wondering what that will be like(Don’t have stockholm stop asking). So
