The Pieces Are Coming Together
Feeling great about today. The things that a struggled with the most I ended up cementing (it’s not dry yet) into my brain. The Learn community is awesome I must say. After 2 hours with a Learn Expert (basically a TA) we were both sufficiently stumped. I dropped a note into the students Slack channel and <20 minutes it was figured out by the group. So you’re probably wondering what it was…
Yeah, it’s in that code… can you find it??? Well I wrote it and I couldn’t find it so if you can’t all good. If you’re still trying don’t scroll down lol. Here’s the fix with just the line of code that had the error:
Yeah, I was missing the
fields_for which makes a BIG difference. I can confidently say that I’ll most likely never make that mistake again. I also started taking screen shots during lecture videos of things I wanted to remember and write down. Figured this would be more effective than writing down the time in the video things happen. Although, I did write down a couple larger concepts if I ever need to go back and look.
Something I was struggling with early was
collection_select(:post, :author_id, Author.all, :id, :name_with_initial, prompt: true) and reading the APIdock didn’t help. To the Slack channel for people doing Rails I went. Got some solid info. Then later in a lecture video Avi goes through an almost identical line of code and what it means. Here’s what I got (saved as a screen shot that I’ll write out by hand in my notebook later):
For context higher up in the code:
<%= form_for @post do |f| %>
<%= f.collection_check_boxes(:category_ids, Category.all, :id, :name) %>
Will generate a checkbox named post[category_ids] for each category in Category and it will use the :id as the value for the checkbox and it will ust the :name method as the label for the checkbox.
Exactly what I was looking for was right around the corner when I finished the lab. This isn’t the first time I’ve experienced this. There have been many a lecture where after I struggled through something it all became clearer. Specific topics that I had questions about were explained in a way that answered my questions.
Side note, I’ve realized I need something to rest my wrists on. Especially my right hand that uses the mouse. This Microsoft Natural Kayboard has a nice soft wrist rest. However, these 10 hour coding days + this time writing the blog takes a toll.
It’s time for my Sunday night look into where I’m at. I’m 53% done with Rails according to my dashboard and 50 lessons from my Rails projects. I’m still on pace to start my projects on May 10th at a 5 lesson/lab/lecture per day pace. Mon, Thurs & Fri of this past week I spent <1:30 working so if I can get that back up over 2 on weekdays (closer to 3 ideally) and keep this solid 10 on the weekends I’ll be happy.
Time spent today: 10:11
Time spent total: 242:14
Lessons completed today: 9
Lessons completed total: 466
If you know someone that is thinking about doing an online coding bootcamp, please share this article on Facebook and Twitter.
And please click the 💚 below so that other people will see this here on Medium. Thank you for reading.
Originally published at itzsaga.github.io on May 1, 2017.