Friday, January 20, 2017

CODECLAN WEEK 15 - THIS BABY CORNERS LIKE IT'S ON RAILS

So it's week 15 and the penultimate week at CodeClan.

The mood at standup has changed as cohorts are stressing about applying for jobs and the realization that soon it will all be over and we will be cast back into the real world outside cosy CodeClan.

Exciting times ahead but we still have work to do.

This week we are learning about Ruby on Rails, and using it as a back-end framework for our web apps to serve up API data.

Monday 9:00 standup and the talk was about the homework and about how much or little people managed to do over the weekend. It was hard. The task was to create a Guess Who Game app with Javascript React.

I completed some of it but did not get a fully working game. I'd like to say the main reason is I ran out of time which is partly true, but I did get stuck with a bug in serving up my API data (Rails where are you?). Thank goodness for one on one instructor homework reviews!

Lessons start with an introduction to Rails, and in a 2-minute whirlwind of commands, we had a fully functioning website, although just flat HTML it was a website. What was generated in a few commands that had previously taken us days to code from scratch? I can see the power of Rails and instantly like it. Coding is fun but if something like Rails can do the boring bones for you quickly I'm ok with that.

Hidden in the back of Rails are some great database tools and the plan this week is to use Rails as a server for API data. Gone are the SQL queries, and replaced by some simple Rails commands that seem to know what you are thinking before you do.

The afternoon lab was a pair programming exercise to set up an API server of our choice using rails and view data in the browser. Pizzas and toppings were served up as JSON data. Homework was in a similar vein and we had to create another Rails app that could serve up TV show data as JSON data.

Tuesday expanded on the SQL databases by adding multiple tables and creating one-to-many and many-to-many relationships and serving them to an API server. Something that was hard a few weeks ago in raw SQL became much more intuitive in Rails.

In the afternoon lab, we were let loose on our own to create an App of our choice with one-to-many and many-to-many relationships. I chose Formula One which had Drivers who belonged to Teams, that competed in Races at Race Tracks and had Sponsors and Sponsorships.

Wednesday's lesson was an introduction to Authentication on websites. A bit of theory and some practical code along. We added login signup and sign-in with password protection to our API data. If you're not logged in you can't access the data and the server bounces you out. Again Rails with an added Ruby Gem makes the whole setup fairly painless.

Thursday is a big day as it's the last day of lessons. No more code along, no more following the whiteboard, no more looking at what's on the projector, and no more class banter… One thing I have to say is that the lessons have been brilliant and very well executed. In my past life during long classroom training sessions I would have found myself nodding off (usually after lunch in a warm classroom) But I can say hand on heart having attended daily lessons for 15 weeks surprisingly this has not happened, not once.

So Thursday we marry Rails API server with SQL data to a React Javascript front end and have a full-stack app running with security. This is what we have been building up to over the last 15 weeks. I really should emphasize this more as it's a big thing.

So we have a FULL STACK APPLICATION running with ‘RUBY ON RAILS’ Serving API data as JSON to a REACT framework JavaScript front-end website that has security Authentication!!!

Brilliant and I know it might now mean much to some folk but to me Its awesome.

Thursday afternoon we were given a brief for next week's project. This is the final project and we need to present it on the following Thursday.

The brief is brief, to say the least. We can basically do what we want and use what we want from what we have learned. We can expand on what we have learned, build something, or just practice. We need to show evidence of architectural design and planning.

So that was week 15. Another great week, and a few more tools in my toolbox.

You might wonder (I did) why we did not just start with Rails from the beginning and have it do a lot of the coding for us.

But it was about the journey and the learning, I can see what is going on behind the scenes and if pushed could code it all from scratch (I have evidence on my Git hub to prove it --> Link)

Thanks again to CodeClan and their brilliant instructors. And to my fellow Cohort's top marks, you are the best!

<- And thanks to the unknown artist/s that did the pictures above, I snapped them in a shop window in Stirling and forgot to take note of who painted them, I like the style and colours ->