Fast Feedback Using Ruby

From interactive code experiments to automatically running code

The workshop shows how to automatically run code when files are saved. In other words: How to get feedback about code real quick

# Abstract Do you spend too much time manually performing tasks like running automated tests and reformatting files? Would you like to know a way to make these tasks happen, every time you save a file to disk? In this workshop, you’ll learn ways to get the fastest possible feedback on changes you make in your project. This workshop shows you how to resolve these pain points using the simple example of reformatting a text file. The same technique can be used to achieve much more complex tasks! We take the following steps in the workshop: First of all, we explore how to express a simple task in Ruby by using an interactive Ruby shell. We are running Ruby code on the command line and immediately see the result of your code. Second of all, we'll write a Ruby script that we can can call from the command line. This allows us to run the same task with various input files. In step three we'll set up a tool to watch our files for changes and run the Ruby script whenever the file is changed, i.e. when we save it to disk. The workshop assumes some programming knowledge: if you can program in a language like Python, Java, or JavaScript you will be able to play along. If you already know Ruby a little bit, you're fine. Here are some examples to illustrate how I am using this kind of automation: In one project, I run all unit tests whenever production or test code changes. In this case a system notification displays the test result. In my e-book projects, I automated checking cross links in the book, i.e. references to chapter titles defined elsewhere in the book. A third project used text based tables to express workflows. The tables are transformed into a kind of flow diagram. This visual representation was helpful in finding test scenarios I needed to cover. The workshop is packed with exercises and attendees will get an e-book covering everything from the session and help you setting things up after the workshop.

Related Sessions

  • Tutorial
  • Keynote
  • Talk
  • Workshop
  • Combo
  • Bonus
  • Active
  • Social

45-minute Keynote

13:30-14:30 Room F1+F2+F3 - Plenary

Creating a Culture of Learning

45-minute Keynote

17:45-18:45 Room F1+F2+F3 - Plenary

Happiness is Quality

45-minute Keynote

9:15-10:15 Room F1+F2+F3 - Plenary

How to Build a Quality Culture

25-minute Talk

11:45-12:30 Room F3 - Track 3: Talks

Dear Diary: How Energy-Expensive is a Bug?

If you like the Agile Testing Days Conference you might also like: