This week we were introduced to Ruby on Rails! The magical steam train! The web app framework that you can have up and running in no time! In my makers journey so far, it’s probably the closest to magic that I’ve seen. You wave your wand and hey presto! It’s done a bazillion things for you already. Dare I say that was exactly what I didn’t like about it to begin with. I felt like I didn’t have to do any thinking. I came to realise however that the advantage of Rails is not in finding satisfaction in difficult debugging and planning, but in being able to put together a project quickly and accomplish more in a shorter time frame as a result.
Before we could even get started on the app, we needed to work out how we were going test our code. TDD is one the pillars of the Makers education after all. Despite using a string of testing libraries over the last few weeks, RSpec, Capybara, Jasmine, Mocha, Chai, I’ve never actually taken the time to look at the code and figure out how it works. So this is my attempt at breaking down a very elementary testing framework.
Week 6 arrived at Makers and finally we started working in groups! I’ve enjoyed pairing, but now that we’ve learnt just enough to take on all aspects of web development, working in groups feels so much more efficient. I had a lot of fun this week and was fortunate to be grouped with great coders, who I knew I would enjoy working with.
We were set with the challenge to build ‘Makers BnB’, an Airbnb clone, and we were free to use whatever technology we wanted. We had two choices really – Rails or Node.js. Airbnb is actually built on Rails. It’s suited to it. So why did we end up choosing Node?
CRUD stands for Create, Read, Update and Delete and these four functions make up the basis of persistent storage in the land of computers. By storing a state as data, we can ensure that this state will remain even if the process that created it does not. For example, I developed a web app at the weekend where you could play rock, paper, scissors, and I used a singleton class to store my game. As soon as I stop running the app though, that data vanishes. I can’t recall the game history. It’s gone and that’s not ok. There’s an obvious need to store information. This is where CRUD comes in.
Dependency injection really isn’t as complicated as it sounds. Last week, a massive influx of new terminology and being introduced to new concepts, without having much time to digest them, sent my brain into panic mode. New concepts and phrases kept getting thrown around, ‘dependency injection’ being one of them, and somewhere along the way I got a bit lost in the crossfire. But that was last week, and now it’s time to explain what it is, why you do it and show you how it’s done.
My first week at Makers has surprised me in so many ways. We were introduced to pair programming and TDD in our final week of the precourse, but I’ve never been in a situation where I’ve had to work with a new person every day and our project has been a lot more complex and longer than anything we came across in the precourse. Every day we have a ‘stand up’ where as a group we think about the previous day and consider what went well, what we struggled with and what our focus is for the upcoming day. For me, there have been a few recurring themes which I’m going to highlight, in the hope that it will help me create targets for this week.
I think these last three days have been my most productive in a long while, and I think that’s largely down to pair programming. I can’t quite believe it’s only Wednesday, when I feel like I’ve managed to learn so much.
On Monday, we officially started our bootcamp and I finally met the rest of my cohort. We shared mixed emotions of excitement and apprehension as we had no idea what to expect from our first day. Day one actually ended up being pretty easy going. It was largely a day to get introduced to the cohort and staff, what to expect and how to get the most out of our time and then a teeny bit of coding at the end. Followed by pizza. Obviously.
1.. 2.. FIZZ!
Ring any bells? What if I continue? 4.. BUZZ! That innocent Fizzbuzz game teachers made you play in primary school to learn your times tables that you corrupted by turning into a drinking game at uni? Oh yeahhh… That. That was our task this week. Our aim was to create a FizzBuzz program, a pretty straightforward task by our standards now, except we were to use it as an opportunity to pair program and to start incorporating TDD into our coding habits.
Thankfully, the July cohort were right when they reassured us that Chris Pine week (aka PreCourse Week 2) would be the most difficult, and once over that hurdle, it would be an easier ride for the remainder.