We visited Rails Girls Warsaw

I was invited to coach at last week’s Rails Girls Warsaw, and I’m very delighted with being given such an opportunity.

Three of Coins is by no means a RoR company – we write Chef cookbooks, Vagrantfiles run in our blood, and one of the best ways to increase our heart rate is to iterate through backup systems, looking for the Perfect One.

Having said that, I do believe engaging in initiatives that increase the diversity of our community is important enough to spend time learning new technologies. Even intermediate Rails knowledge is enough to help other people get started! In my case, not-so-distant memories of the issues I myself encountered at the beginning of my Rails path allowed me to better understand (and prepare for) questions and problems that might arise during the workshops.

Wonderful organizing team from Warsaw

Wonderful organizing team from Warsaw (Anksfoto)

To make sure that participants got the best out of the weekend, each coach was looking over a group of just three students. Although most attendees had no prior programming experience, one member of my team had learned C during computer science classes at her university – classes designed to actually introduce programming languages, classes that, suffice to say, did not encourage to study programming, nor did they shed light on what programming is about.

The group I was coaching. Yes, we had chocolate!

The group I was coaching. Yes, we had chocolate! (Anksfoto)

Of course, not everyone has to know how to program, and not every participant of the workshop wanted to pursue a programming career. Knowing how this stuff works is an advantage in many fields though, even if the position you hold in your company / non-governmental organization is not the most technical one. And seeing how my team’s enthusiasm rose as workshop time passed, how they stated they want to continue their programming education made me very happy. I had a chance to donate some of my time towards increasing the diversity in our, still homogeneous, programming community.

Rails Girls Warsaw participants

Rails Girls Warsaw participants (Anksfoto)

If you’re interested, check out Rails Girls Warsaw’s Facebook page. If you’re wondering about coaching, you’ll find a list of local Rails Girls workshops here – as you can see, there’s plenty of locations to choose from! And if you are (or you know) Polish, there’s a message board for Rails Girls Warsaw attendees, where participants can share their problems and accomplishments, supported by most of the coaches of previous editions. Give it some thought – educating other is always an invaluable learning experience.

This is what I found at FOSDEM


FOSDEM is considered the best European conference about open source. I knew that before I participated first time this year, but still was impressed. This year’s edition had an astonishing number of 22 tracks. Most of them (though not all) last for one day, and having a look at the schedule might give you a headache.

After a weekend spent on talks, discussions, and waiting in line to squeeze into the more popular devrooms, I prepared a digest of what I found interesting. (or where I managed to squeeze into) Fortunately (and impressively!) FOSDEM talks (a bit over 510) were recorded and should be available at http://video.fosdem.org/ soon.

Chef’s Sean O’Meara gave an overview of configuration management. It was a good refresher for those more advanced and a useful introduction for people with less experience. Sean talked about the difference between convergence and idempotence and stressed to use these two terms correctly, showed the importance of writing configuration in the correct order (to make sure the code is idempotent) and reminded to always pull, never push. Sean’s presentation and recording aren’t online yet, but you can check out code he wrote for FOSDEM to illustrate his points here.

You might enjoy the „The classification problem” talk by Marco Marongiu. Marco shared his experiences of the pitfalls of internal classification, how exceptions are the unavoidable norm and talked about CFEngine.

Michael Ducy from Chef talked about cross-distro automation. He showed how delivering everything together while abstracting away from the implementation is the way to go.

I did not manage to grab a seat at the „Metadata ocean in Puppet and Chef” talk, where Marc Cluet from Rackspace presented best practices of organizing metadata, so I’m looking forward to the video.

Peter Chanik’s lightning talk might interest you in syslog-ng, a tool that customizes log messages (but that’s putting it very simple, you should probably visit their website).

James Turnbull of Docker shared results of his observations of OSS communities during his „Software Archaeology for Beginners” keynote. Being a seasoned member of the OS community, you might not experience the problems he touched on as often as people new to OS, sometimes overwhelmed by existing trolling and not-always-transparent decision processes or poor documentation. He advised to get to know a community before submitting any changes, to ask contextual questions, to over-share (dumps and logs!) and keep comments as positive as possible, as this easily isolates trolls and bike-shedding. He also suggested that the biggest help might not always come from developing a new feature: fixing broken tests or updating outdated or scarce documentation might be even more welcome.

Florian Gilcher talked about unicorns: those mystical creatures that exist, just like good, article-style technical documentation. Florian asks interesting questions and goes through a few solutions.

What I found positively surprising was a whole track committed to building more energy-efficient software. Looking for ways to minimize the energy consumption of a device was always considered to be a domain of the „hardware people”. Jeremy Bennet from Embecosm and Kerstin Eder form the University of Bristol talked about initiatives aiming to raise awareness and conducting research to support innovation in energy-efficient software. The energy-efficient computing devroom hosted some noteworthy talks. You should check out MAGEEC and ENTRA.

The FOSDEM conference wouldn’t be possible without a hundred volunteers, a team of organizers and sponsors. Participating was a last-minute decision for me and I’d regret very much if I decided not to. It was impossible to see everything I found interesting (for example the legal-policy issues track), so video recordings are invaluable. Summing up: watch out for next year’s edition!

We released Chef Browser today

Even if you know your way around a set of tools and consider yourself an efficient user, some little helpers can still save you lots of time. Today, at Warsaw Ruby Users Group evening, we have officially released such a helper for Chef users. Chef Browser is an open source tool we created to support your daily work. As the name unsurprisingly suggests, Chef Browser lets you browse the data in your Chef server. If you use knife search and knife show a lot to find out detailed information, you might be pleased to know you don’t have to re-type the same commands over and over again to access certain data.

Getting started

You’ll need Ruby 1.9.3 or 2.0.0 (Rubinius and JRuby are also supported) with Rubygems and Bundler. Download the code from the GitHub repository. Run bundle install to install the needed gems. Create a settings.rb file, which will override default settings. To do that, follow the examples in the settings.rb.example file, providing details of your Chef server (url, client name, client key). When you’re ready, run puma -e production. If not specified otherwise, Chef Browser will be available at http://localhost:9292; for production deployment, tell your Apache or Nginx to proxy from that port.

Listing resources

The main page of Chef Browser lists all known nodes. You can navigate to other resources from there: roles, environments, data bags and data bag items. After clicking on any item on the list, you will be taken to a page showing this item’s details.

Chef Browser » Roles

Neat attributes

Let’s use nodes as an example: when viewing details of a node, the accessible data is close to what you’d get by typing knife raw /nodes/node_name . The difference lies in formatting: Chef Browser presents nested attributes with their JSONPath. This makes it easier not to get lost in (sometimes quite deeply) nested attributes, and to find the one you’re looking for without having to navigate down the hierarchy – especially handy if you’re not sure in which part of the attribute hierarchy your data lives. Since it won’t be uncommon for a table of JSON attributes to be over a thousand rows long, the table is supported by a jQuery live filter, narrowing the visible data to just what’s necessary.

Chef Browser » Nodes » batch

We aimed at linking data together where possible. For example, tags and the environment of a given node will link to other nodes sharing the same tag or environment.

Configurable saved searches

How often do you need to find some nodes across the servers by their content, and you have to use (and remember) queries like like knife search mysql_server_root_password:* -i? (Long) search queries that you run often can be saved and accessed from the search bar’s dropdown menu:

Chef Browser » Nodes

It’s enough to edit your settings.rb file, adding one line per saved search, like so: node_search['MySQL'] = 'mysql_server_root_password:*'

Under the hood

We decided to make Chef Browser as light-weight as possible. Since all data is acquired by queries to the Chef server, there’s no necessity to have a separate database. Hence, Sinatra became our web framework of choice. The app is based on Bootstrap 3, which is 100% responsive and looks well on tablets and mobiles – a small thing people on pager duty might appreciate. To talk with the Chef server, we use Ridley, a Chef API client gem made available by Riot Games


This is the first release. We’ve done our best to test Chef Browser, and we already use it everyday. We also plan to keep working on it: on the roadmap there’s at least cookbook browsing and access to encrypted data bags. We’re also very open to suggestions, bug reports as well as seeing new issues and pull requests on Github.

A brief look at Eurucamp 2013

Starting a day after jRuby conf and held by the lovely Müggelsee lake in South-East Berlin, this year’s Eurucamp was a well balanced mix of talk and play. Kudos to the lovely organizers team for an extended lunch break that made it possible to enjoy the (probably) last days of summer.

The conference was opened with an inspiring keynote by Joseph Wilk. You can see the slides to “Can Machines Be Creative” here. Wilk showed numerous examples of teaching computers to do things humans would consider creative if they were done by other humans, raising important questions about the role of technology in art, and beyond. Other conference talks quite evenly touched on technical, abstract and community issues. Here’s what I picked:

Michael Grosser encouraged using the airbrake_tools and air_man libraries to debug more effectively. Both of them log, prioritize and trace exceptions. Additionally, air_man allows to run airbrake_tools constantly, sends emails about exceptions and assigns people to them, so nothing gets lost and not taken care of. Michael also showcased his library request_recorder for effective and friendly logging. Request_recorder sits in your application’s stack and stores the full log; it also comes with a Chrome extension. You can see the whole presentation here.

As far as logging is concerned, Matthias Viehweger shared some useful tips. Most important message: never raise your log level globally — you’ll start treating everything as noise faster than you know it.

Arne Brasseur talked about web linguistics and why we should stop using strings to handle structured data. You should check out the slides for valuable insights into web security (and refreshing graphic representations).

If you’re striving to be a better programmer, Eurucamp gave you the opportunity to listen to three inspiring talks. Joanne Cheng, who’s a developer working at Thoughtbot, talked about how Ruby Processing helped her become a better programmer. Her talk is not online yet, but if you’re a beginning or intermediate programmer, always wanted to be an artist, or you just like seeing the effects of your work straight away, you ought to learn about Ruby Processing and go make some art. You should also visit the Processing website.

Ellen König presented most effective learning techniques. We all know that learning is important and that all of us should develop our skills constantly, but picking the right thing we’d like to get better at, setting goals and getting there may not be as easy as we think. Fortunately, Ellen got that covered. Watching Floor Drees‘ talk “What I learned learning Rails” is a good wrap up. You can watch the slides and/or read her talk.

Also worth checking out: Drew Neil‘s “Modelling state machines with Ragel”.

I’d like to finish with linking to a great Eurucamp talk made by Ashe Dryden. Ashe spoke about diversity in our programming community and quoted some powerful statistics. In her talk she goes through some important concepts that we should keep in mind. Did you know that women make up for only 3% of OSS contributors, but at the same time they’re 73% of Bulgaria’s computer science students? Read Ashe’s slides to learn more and find ideas to make your community more diverse.

Bundler and rvm: remember about login shell

Bundler and the newest rvm (1.23.1) might give you a bit of a hard time, especially if you’re a less experienced Linux user. You install bundler by running gem install bundler in your GNOME Terminal and it’s a success, but when you want to actually run bundle  in your git repository folder, you might get a message like this:

/home/marta/.rvm/bin/bundle: line 32: gem: command not found

ERROR: Gem bundler is not installed, run gem install bundler first.

No matter how many times you run gem install bundler, nothing changes. You’ll receive a similar message if you run bundler in your Rails app folder:

ERROR: Gem bundler is not installed, run gem install bundler first.

Running gem list in the terminal will show you have bundler installed, and which bundle will return the path to the gem… but bundle -v will return the above mentioned error. So what’s going on?

Before you start digging in the ~/.rvm/bin/bundle source code and wonder what’s wrong with paths (it might seem as if there’s a problem with interpreting the proper path to the bundler gem), be sure to check if you have your Run command as login shell option ticked in your terminal’s preferences (in GNOME Terminal: Edit -> Profile Preferences -> Title and Command). When this option is left unchecked, Terminal won’t be able to find bundler when it’s being asked to execute it. That’s why you see bundler on the gem list, but it won’t be found when you call it.

Rvm might give you a hint on that login shell option, but unfortunately in completely different circumstances. If this option is left unchecked and for some reason you want to switch to an older version of Ruby, typing rvm use 1.8.7 will return:

RVM is not a function, selecting rubies with 'rvm use ...' will not work.

You need to change your terminal emulator preferences to allow login shell.
Sometimes it is required to use /bin/bash --login as the command.
Please visit https://rvm.io/integration/gnome-terminal/ for a example.

If all you want is to use the most recent version of Ruby, it might take some time before you actually run this command and thus stumble over that information. Whether you’re a less experienced Linux user or a regular that reinstalled her system recently, remembering about login shell might save you loads of time.