Scottish Ruby Conference 2012

Tales from the road, waaaaay back

Sean Handley
9 min readNov 18, 2020

This is a re-publish of an ancient blog post I made in 2012. I’ve put it here for posterity in case it ever disappears from the original server at the company I no longer work for. Enjoy!

7 July 2012 | by Sean Handley

So that about wraps up Scot Ruby for another year. And what a conference it was. This post sums up my Tales From The Road, notes from the talks, impressions of Edinburgh, and lessons learnt. The story begins last Thursday in the rainy city of Manchester…

It begins…

“Landslip on the line at Oxenholme. All trains to Scotland cancelled. Rail replacement buses scheduled.” Not the best words to read at the start of a journey… At Preston the train terminated prematurely and the passengers were all herded out into the car park to await the promised buses.

Two hours and 500 impatient passengers later, there was still no sign of a bus. Kyle, Matt, Chuck and myself entertained ourselves in the queue in the traditional manner (complaining about the state of British public transport) until the solution became clear: join up with our fellow queuepeople and take a 7-seater taxi 90 miles north to Carlisle to meet our connecting train.

Crammed in the back like livestock, we deftly kept DVT at bay until we rolled up to Carlisle. Some wandering and Google Maps checking later and we were back in business aboard the Edinburgh train.

Edinburgh

Edinburgh is incredible. A properly gothic, medieval, moody, spectacular city that feels like it’s been carved out of the rock it’s built on. I managed to get utterly lost in the old town because the city is apparently built on two tiers, each connected by narrow passageways, which turn into dark tunnels of unknown horror at night.

I wandered about the streets a while trying to get my bearings and noted with some amazement that all the kebab shops sold vodka and cigarettes. Some even had a broad wine selection! It seems the Scottish liver’s reputation is well deserved.

At 3am, safely tucked up in my hostel bed, a troupe of revellers outside my window sang a passionate rendition of Total Eclipse of the Heart. Kind of them.

Friday

Bleary-eyed and caffeine-starved, I stumbled up to the registration desk, collected my name badge and took a seat in the cafe. Nursing a brew, I watched my fellow conference delegates percolate through the door.

The Royal College of Physicians is truly impressive. Crafted plaster ceilings, marble pillars, statues, busts, portraits of renowned doctors, ancient libraries with wooden panelling and mildy terrifying medical tomes with titles like “A Study of Bowel Diseases of the Tropics”. In our tech sponsored T shirts, trainers and backpacks, we must’ve seemed the least likely and most uncouth inhabitants of such an illustrious and historic setting. Oh well — we’d have to do.

We filtered into the main conference hall and Mike “World’s toughest programmer” Lee greeted us on the podium with the opening keynote presentation.

This guy was impressive — a Hawaiian who started his career “lifting things” at the airport before going on to teach himself coding and writing a DBMS in XSLT (yes, you read that right o_O) which went on to form the basis of the reservation system used by the whole airline.

He admits that writing a DBMS in XSLT was a “dumb as shit” thing to do. Still — impressive. We learnt more on Mike’s attitude and philosophy to life, coding, women in IT and what it means to craft software.

Points noteworthy: when speaking to women at conferences, ask yourself “The thing I’m about to say? If she were a man, would I still say it?” and the direct, matter-of-fact observation “Forget flirting. No woman goes to a tech conference to get laid.” which was received with a roar of laughter. Looking across the audience I’d say 10% were female faces — could be higher but I’ve seen a lower percentage than that elsewhere. The keynote concluded with a resonating round of applause and the stage was well and truly set for the rest of the conference.

I went on to watch Jim Weirrich talk about using Rake to automate dependency-based tasks surrounding files. I’d never really considered this aspect of Rake, but then it is the Ruby “make” tool, so it makes complete sense. Jim’s a great speaker and charmingly down to earth for such a legendary community figure.

Up next, Wesley Beary talked us through his experiences with the open source community as the maintainer of the popular fog gem. The transition from “fixer of bugs” to “mentor” and “giver of advice” was well observed and rings true with anecdotal evidence I’ve heard elsewhere.

The next talk was a cracker: Hexagonal Rails. Matt Wynne (author of the Cucumber book), Steve Tooke and Kevin Rutherford (author of Refactoring in Ruby). Kevin opened with the idea of metaphors and how our language is so steeped in them we barely notice. The underpinning metaphor for a Rails app is this idea of stack — a presentation layer sits atop the logic layer, which sits atop the persistence layer etc. The problem with this analogy is coupling — whatever sits at the bottom will affect every layer above it if it changes.

They went on to propose the idea of a table top where the business logic is written on a set of cards. Each cards is an entity within the logic. Chairs can be pulled up to the table and the chairs can be any design. The chairs represent a persistence object, a template object or anything that wants to interact with the business logic. This is the adapter pattern and keeps the core logic isolated and testable with external entities being “plugged in” as needed.

Steve R Baker had a cool observation in his Maintainable Rails talk. A house can cost $150,000 to build and you wouldn’t tear it down after 2 years so you could fit a new bathroom. The same concept applies to software, only the ongoing cost of software is much higher on average. It’s better to be able to maintain and update what you have in the long run.

The day was wrapped up fantastically by Ben Orenstein who showed up for a 45 minute talk with absolutely NO SLIDES. At the end of the day, this was exactly the kind of waking up we all needed.

Ben launched into a fast paced live coding session in vim where he refactored pre-written code using TDD and the entire audience as his pair programmer. It worked phenomenally well with people shouting out and getting involved.

The abiding principle that stuck from our refactorings was Tell, Don’t Ask. Anywhere in Ruby you see a method in another class being called and the result of that being stored in a temp variable is a prime candidate for a refactor because what you’re reading is procedural code.

Ruby is great for procedural scripting but if we’re striving for good OO design it’s better to move the responsibility into the method you’re calling and only ever returning ‘self’ from public methods. This way you’re not asking questions all over and spreading responsibility for one operation across multiple objects. ‘Do one thing well’ is the abiding Unix principle and it applies the same when writing code!

Whisky!

Following Ben’s session, we went out to meet the Bruichladdich representative Craig for a tasting. Presented with 3 whiskies, we learnt techniques for tasting, smelling and analysing whisky (including, bizarrely, rubbing it on your hands!). Craig had some cracking stories about the distillery — particularly about how a CIA satellite spotted them unloading distillery equipment from boats and promptly turned up to assess whether they were producing weapons of mass destruction!

Saturday

I woke up at 6am after a heroic night of drinking whisky. To quote Withnail, I felt “like a pig shat in my head”. In spite of this unfortunate affliction, I threw on my running gear and headed down to Arthur’s Seat for the conference’s 5k running event.

It was an uncharacteristically beautiful morning in Edinburgh when we set off on the circular route around the hill. A feeling came to me rather swiftly as we took in the view of Edinburgh — overwhelming regret. My systems complaining wildly, I powered through the last kilometre over the finish line where I was immediately and spectacularly ill. I fell to my knees and an evening of merriment ejected itself promptly through my alimentary canal. But I finished third, so it was totally worth it.

Aaron Patterson kicked off the second day’s proceedings in his involved, hilarious style: “Thank God I’m at a podium for this — nobody can see I’m not wearing any pants.”

He went on to discuss in some detail the limitations of MRI Ruby regarding concurrency, specifically why the global VM lock prevents Ruby code executing in a manner that properly takes of advantage of systems with multiple CPU cores. Following this, he discussed what he would like to see in Rails 4:

  • Fat client support via a rails.js file, specifying client side functions.
  • Streaming response support.
  • Queue support for interchangeable background jobs into which other systems can be plugged (Redis, Delayed Job, etc)

We were also treated to a fantastic “bonus round” where Aaron outlined how he makes his own Salami. Apparently it needs the right humidity, temp, pH and wind speed (!). He set up his own wine cooler as a curing box into which he plugged sensors, a fan and a dehumidifier then wrote his own control software. Points for most scientific sausage ever!

Up next I was treated to a great talk by Jen Myers tackling the myth that devs can’t design. Conclusions drawn were that devs and designers don’t communicate closely enough, devs should learn some design theory, designers should learn a little coding (at least HTML) and that devs and designers ought to pair together in the same way devs would pair up — we’re all creating the same product so it makes sense to get involved together.

Other highlights were Brightbox’s John Leech discussing how their gem was designed to be beautiful on the command line. It’s important that your Ruby app figures out whether it’s talking to the user via the shell or to another app via a pipe — you can use the .isatty method to test for this.

This allows you to prettify output for when a user is receiving the output and to use raw data for when the output is being piped to another app.

The illustrious Pragmatic Dave Thomas delivered the closing keynote of the conference (and my was it fantastic!). Lessons learnt are as follows:

  • Context is everything. OO is not always appropriate, neither is procedural, functional, agile, TDD, anything — make your design decisions on the merits of the context in which you find yourself, rather than some notion of “best practices”.
  • Do katas regularly to keep your grip on concepts. The more you understand them, the better you can apply them to situations.
  • Good code is easily changed. That’s the only metric worth measuring code by.
  • You can’t be ‘agile’ by simply doing as you’re told.
  • Agility is about reacting quickly to change (self righting robot used as an example). The robot’s programming assesses these three things: Where am I now? Where do I want to be? How do I get there?
  • Labels are dangerous. You’re not “a ruby programmer”, you “solve other people’s problems with Ruby”.
  • Be a verb, not a noun. Do, don’t be.

Following this, we wrapped up and headed out for food before returning for the closing party. Alan Francis, warm host and organiser, was kilted up in his finest tartan and we all gathered cross-legged on the floor of the great hall to witness the joy that is Zoe Keating playing layered cello. The music was fantastically immersive. Many closed their eyes and let their minds wander wherever the sounds took them — it was sublime and a fitting end to a great conference.

And finally

Since it was multi track, I missed a lot of sessions. The ones I’ll be keeping my eyes peeled for when the videos are online are:

  • Joe Wright’s “Continuous Delivery”
  • Justine Arreche’s “I am Designer and So Can You”
  • Ben Bleything’s “Roll your own Realtime Visualisations”
  • Renée De Voursney’s “Fill your Bookshelves”
  • Katrina Owen’s “Therapeutic Refactoring”

My goals following the conference are:

  • Learn Vim. Learn it well. Use it every day. (Thanks to Ben Orenstein for the inspiration on this one!)
  • Use Tell Don’t Ask principles in code more often.
  • Be sure to refactor responsibilities into separate objects.
  • MOAR KATAS.

So absolutely loved Edinburgh and the conference — first visit to the city and first Ruby conference I’ve been to as a delegate rather than an organiser. Met some great people, learnt a lot of cool stuff, drank delicious whisky.

Well done, SRC 2012 team, you gave us a weekend to remember!

SRC have raised a ton of money for their chosen charity, Children’s Hospice Association, Scotland. Do drop them a little if you can :-)

--

--