Category Archives: Ruby

My notes from Rails Camp #17

The 17th Rails Camp was held last weekend at the Hawkesbury north of Sydney. It was 3 nights of coding, drinking and socialising…without any phone or internet reception.

Reminders for myself for next Rails Camp with no internet or mobile phone reception

  • Get all the Dash documentation you can
  • Actually START your project before you go, so that you KNOW you have everything you will need there
  • Make a goal for what you want achieved by the end of the weekend, otherwise, the time flies, you get distracted and nothing gets achieved
  • Don’t tell your husband you will text him when you get there…

What did I actually get achieved at Rails Camp this time?

Continue reading

Leave a reply

Ruby Conf AU 2015

rubyconf 2015

As part of Rails Girls Summer of Code, I was given a free conference ticket to Ruby Conf 2015. I spent some of last week there, and it was hands down the best conference I have been to (on any topic).

It had something to do with the amazing venue (Federation Square, Deakin Edge theatre), the great after-hours social events (parties, roof top cinema) and also that a lot of my friends attended, making it so much fun.

But, on the serious side of things, there were also fantastic talks. They were pitched at all different levels, so that there were things for everyone, and they were also on a broad range of topics; technical, career, soft skills and inspirational ‘look what I made’ talks. There seemed to be a particular focus, by a number of speakers, on Service Oriented Architecture.

Below is an outline of some of the talks (using my own categorisation).

Continue reading

Leave a reply

Ruby Array to Hash Using each_with_object

At work I need to do things with arrays and hashes all the time. Something I’ve needed to do a lot of lately is change an array into a hash.

I always forget the most elegant way to do it, I usually end up having at least 3 lines.

Line 1: create a hash, even if only empty

Line 2: loop through the array and adjust the hash

Line 3: return the hash.

Too many lines! So here I am noting the quicker way of doing it so I never forget again!


your_array.each_with_object({}) { |array_item, hash| hash[array_item] = whatever_you_like }

And here is a bit more information about each_with_object.

1 Reply