It’s been a tough week. Work’s been manic and extra-curriculars over the week have meant I’ve not been able to code as much as I’d have liked to. However it’s always been in the back of my mind and with a few hours spare I was able to finish off the codeacademy.com Ruby on Rails course.
I’m glad I did it, and generally I understood most of the concepts that were going on. After a few iterations I was happy generating controllers/models and could carry out some basic instructions. However I found this quite difficult at times. I’m taking solace in that a lot of others had similar issues to me and this was evident in the forums. Often it was just a simple syntax error and I do feel that after some more practice of similar methods I’ll be far more comfortable and wouldn’t have the same issues. But at times his wasn’t pretty (hence DeAndre face).
We started off with the image above. It helped me understand how a website renders information, with a user requesting information from a web page which gets passed to a controller, then that information is relayed back from the model to the controller which interacts with the view to render the information into human-readable format….I’ve probably completely butchered that explanation and I’m sure after gaining some experience in the future I’ll look back at this and cringe, but this is where I’m at!
I’m glad I did the Ruby course first as it helped with the iteration code that you’re required to do in the later modules. Rails, to me, is a very good framework. Generating controllers, installing bundles, everything gets saved for you in particular directories and it’s really easy to navigate around. Once you’ve had a few goes at it then you know exactly where everything lives and it’s a really quick process to go through the necessary steps. I’m just hoping more experience will make the whole process easier for me to go through.
Other than getting used to the Rails framework, one of the best bits of knowledge I gained from this was the belongs_to and has_many functions. These are used to describe how entries in a database relate to each other, for instance:
- A team has_many players; but
- a player belongs_to only one team (ignoring internationals – stop being pedantic!)
- The Clippers has_many players
- DeAndre Jordan belongs_to the Clippers
- Chris Paul belongs_to the Clippers
It’s a really easy concept but it’s good for me to see how we tell a database about this relationship.
This week I’ve found myself youtubing random programming channels and reading a lot of articles through twitter. However I feel like I’m falling into the trap of reading a lot of stuff without any direction on what I’m reading. This doesn’t feel very productive to me and the lack of focus makes me feel like I’m in a dreamland. I need to sort a curriculum out and stick to it, either picking a course and then only doing those lessons, or reading articles only about those topics. I don’t know…I just feel I’m drowning in a sea of information without using the lifeboat at the minute. Still, I’m sure I’ll get there!