Day 52/53 — Route this and future post
One of the most common errors I seem to make are in regards to routes. Something just doesn’t hit the right route. One that I’ve seen a few times is loading up the new page for whatever app and it hits the show method. Which basically means I screwed up and had show before new. Whatever. Lesson learned about that adventure.
The number of times I actually generated each route and then something bad happens and I switch to using resources, far too often. Far, far, far too often.
So at the moment I’m staring at my Mock StackOverflow project and one of the last items I need to do is allow a user to delete their answer. Should be simple right? Should be the same as deleting a question right? Well it’s actually not. I actually need to hit the answer id in order to delete that particular answer. What I actually did was allow the user to delete the question from within the question while thinking they were deleting all the answers.
I deleted a lot of questions this way without knowing it.
Eventually I got there once I figured out realized my if statements were woefully wrong.
As for everything else…I’m slowly getting caught up on certain things and trying to hit some of the harder items. For instance I added in voting for my Mock StackOverflow, put in some design elements, and even messed around with fake advertisements that I quickly regretted.
All in all a solid week of production thus far.
So yesterday morning I got the opportunity to sit down with someone that has a lot of respect within The Iron Yard and is apparently well known in the tech community. He gave me great insight and was just honestly a great guy. I really enjoyed talking to him and things felt natural. So much so that I thought it would be a boon to actually work alongside him. Then I decided to ask him something that I’ve been hearing a lot about from interviews, job searches, etc.
Companies want more senior developers, not juniors. So my question I asked was simply: where did the senior developers go?
It’s an interesting topic that I’ll hopefully write a full on blog post after talking to some other people in the tech community. More on that at another time.
Struggles: Spent way too much time on something very simple. I was trying to not allow different users from marking something as correct. I knew it was a simple if statement. I knew I couldn’t use current_user as duh, not what I want. I was typing in the controller for things that made no sense. Terrible.
Then an instructor went “how do you find the owner of the question?” Easy enough “it’s @question.user”. They responded with “okay then how do you dictate if they are the one looking at it right then?” Umm sure “I just use current_user?” …
Understood: I was able to reproduce voting from Reddit into StackOverflow in less than 10 minutes. Once I actually understood what I was doing was amazing.
Looking forward to: Cleaning up my projects and putting them in the portfolio. It will be nice to have those up to date.