Week 5 – Semicolons. Semicolons, everywhere.

If in doubt. More semicolons. If still in doubt, maybe a couple of brackets and curly braces. This was the main theme of Week 5 ‘The Curious Tale of Mr Cript’.

So we’d started this thing with a girl called Ruby. It was great at first, everything was so new and exciting. Ruby was attractive, easy to get along with and very polite – the type of girl you’d be happy to take home to your parents. Things were going swimmingly. We learnt new things about each other, experienced new thrills together and hardly ever argued.

giphy (2).gif

That was until the effortlessly cool Mr J.S.Cript entered the scene.

Mr Cript was noisy, different and had bags of street cred – suddenly ‘nice and polite’ just didn’t cut it anymore. Poor, innocent Ruby was mercilessly cast aside as we started punctuating across town with Mr Cript.

Yes, this week was the week we welcomed JavaScript into our lives. Monday was exciting. Tuesday we were seriously regretting our life choices (Ruby, you were so kind and forgiving) but by Wednesday I was beginning to have some hope that Mr Cript and I would get along just fine.

By the end of the week we’d cut our teeth on a simple game of FizzBuzz, reproduced the Airplane Challenge and created a Thermostat web app linked up to the Wunderground weather API. We also created our own API to save the state of the Thermostat so that a user wouldn’t have to reconfigure every time they loaded the app.

That’s a whole lot of stuff for five days.

So that we could send and request data to and from our server, we first had to get our already-pretty-full-of-new-stuff-heads around AJAX. If you’ve never heard of AJAX, I can tell you that it stands for Asynchronous JavaScript and XML. I hope that clear things up for you…

If you need a little more explanation (seriously, keep up) AJAX basically allows you to update a webpage without reloading the page/changing paths. An example we’ll all have come across is Facebook – when you click on ‘photos’ or ‘about’ on a profile, the page stays exactly where it is. The URL doesen’t change, but the content does! Magic.

Overall, the week was a huge success. Even though we’d all grown awfully attached to Ruby (which for many of us was our first love programming language), the jump to JavaScript was much less painful than I’d imagined it would be. Finding new solutions to old challenges and katas in a second language proved to be a really effective way to learn, drawing out the similarities and differences without overcomplicating the requirements. I finished the week not pining for Ruby anymore (promise), but looking forward to taking my relationship with Mr Cript to The Next Level.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s