Project 1 – Tic Tac Toe!

We’ll be doing three projects in total over the course of the twelve weeks and this weekend marks the start of our first project week.

We were given the choice of three projects:

  1. an app that helps scheduling resources, e.g. room bookings
  2. an app for DJs to promote and upload songs with a user commenting functionality (hello Myspace!)
  3. an app where users can log in and play Tic Tac Toe (i.e. noughts and crosses) against the computer or against each other.

I found it really hard to decide on a project and nearly went for the Myspace type one as it seemed most fun. But then I thought that I’d probably learn more if I chose a project that I can’t really imagine how to do at the moment and that is creating a Tic Tac Toe game.

I spent some time today creating wireframes for my website and a diagram to map the objects and their relationships.

We are supposed to use the project management app Trello, so I started creating a Trello board with all my to dos for the project, ordered by ‘must have’, ‘should have’ and ‘could have’. I feel like I am probably missing a lot of to dos that will only come up along the way but then I’ll just add them to the Trello board as and when I think of them.

So, no coding today! I am still a bit hungover from the previous WDI cohort’s graduation party last night, so will leave the heavy brain work for tomorrow.

Before starting our project prep on Friday afternoon, we had a lesson on pagination in the morning. Pagination is used for example when displaying search results. Usually websites don’t display all of the results on one page but maybe 10 or 20 per page. And guess what: there is a Ruby Gem for it!

On Fridays we usually have some time where we can ask to repeat certain things that we did during the week. This Friday we asked to have the has_many :through relationship explained again. You know the one that scared me on Tuesday. It turns out, if you actually implement this relationship in your app from the beginning, it’s perfectly fine! This time it seemed really easy to understand. Phew!

Anyway, I’m looking forward to next week: we’ll have lessons in the mornings and will be free in the afternoons and evenings to work on our projects. Presentations are on Friday and then we’re breaking up for Christmas.

One more week to go until I fly to Germany to drink lots of Glühwein and eat lots of Lebkuchen!

Advertisements

A sense of accomplishment…

…is what I’m feeling on this fine Wednesday night while I’m sitting on my sofa with a glass of wine. I just created a Rails app in four hours. It’s connected to a SQLite3 database, has two different associated objects with the corresponding CRUD actions, a user login feature, different permissions for admins and users, input validation, my first attempt at using Bootstrap and then my own CSS after I didn’t have the patience for Bootstrap.

Wow! Who would have thought at the beginning of last week when we were introduced to Rails that today I would be able to create something like this all by myself? And who would have thought last weekend when I was faffing around with a select box of associated ingredients for five hours that I could create something like this app in less time? Pretty cool.

We learnt a few new features this week for Rails including user authentication and authorisation, search function and image upload for users. It always followed the same process: the instructors showed us how to create the particular feature using Ruby and database queries. We all go “oohh… this looks difficult/confusing/time intensive”. The instructors say: “Hahaaa! But there’s a gem for this!” and then show us how to use the gem instead. We then implement that functionality in our recipes app from the weekend.

So, not too bad this week so far.

Except…

has

many

through

My god. The Monday night homework task was to turn the has_and_belongs_to_many association between our ingredients and recipes into a has_many :through association to include quantities of ingredients. Not fun. I wasn’t feeling too great either as I had caught the WDI cold (yeah, yeah, excuses…), so I was struggling on several levels.

Michael did tell us that he only expected about 10% of us to figure it out (turns out it was actually less than that) but still, even when he explained it the next day, there were blank faces all around. My face must have been so blank, that Tony (who is featured in Good Things magazine this week!!) sent me this wonderful image on HipChat.

has-many-through

Oh yes, it did. Thanks, Tony.

PS: Just before I published this post, I added a new WordPress category “Week 4”. When I saved the category, it suddenly duplicated the existing categories. The same bug I had in my recipes app!!! Amazing.