Category Archives: Ruby

[Video 365] James Adam: Why is nobody using Refinements?

Several years ago, a new proposal made the rounds in the Ruby community. “Refinements” were proposed as a way to modify an existing class, but without the unfortunate (and potentially dangerous) side effects of monkey patching. The Ruby community discussed and debated refinements, and when they were finally included in Ruby … well, it seems that almost nothing happened, because no one really used them. In this talk, James Adam asks why no one is using them. He describes refinements, and then points to reasons why they might be interesting and/or useful, and then discusses why they aren’t in common use.

[Video 364] Louisa Barrett: Design Thinking for Rubyists

Developers often talk about the people using our code… but it’s not always in the most positive way. Successful teams think about their users, and the ways in which our users (and customers) will use the products we’re creating. . In this talk, Louisa Barrett talks about how we can and should think creatively, like a designer — not necessarily thinking as an artist, but as someone who wants to  help our customers to achieve their needs, and use our products in the most effective ways.

[Video 357] Christophe Philemotte: Prepare yourself against the Zombie epidemic

Let’s say that there’s a zombie epidemic, and you have to write a program to decide where people should go. What technique, or techniques, should you use? In this talk, Christophe Philemotte suggests that we use agent-based modeling, which allow us to model a large system based on simple rules that apply to a large number of independent actors, known as “agents.” The talk describes how you can create a simple ABM system using Ruby, modeling behaviors (such as walking, and deciding on your next action) using objects and methods. While the talk  might not actually help you to avoid zombies in the event of an invasion, it will help you to understand a technique that is increasingly popular in a number of disciplines.

[Video 340] John Cinnamond: Extreme Object-Oriented Ruby

Ruby is, of course, an object-oriented language.  But there are parts of its syntax that aren’t quite object-oriented, such as the “if” statement. In this talk, John Cinnamond tries to push Ruby to its limits, removing and re-implementing parts of the language that we often take for granted. Perhaps this isn’t a way in which we would want to program every day, but it is certainly thought provoking, and gives us greater insight into what it means to describe programming as object-oriented.

[Video 339] Piotr Solnica: Blending Functional and OO Programming in Ruby

Functional programming and object-oriented programming are two well-known and powerful techniques for organizing code and providing programmers with flexibility and power. Each has its own strengths and weaknesses, and each has supporters who feel that their technique is far superior than the other. But instead of seeing these two techniques as being opposites and incompatible, many programmers see them as complementary. In languages such as Ruby, you can work in both styles at the same time, enjoying the best of both worlds. In this talk, Piotr Solnica describes his experiences mixing these two techniques, and how doing so in Ruby helps him to be more effective and expressive in his programs.

[Video 337] Ian Whitney: Even Hemingway Wasn’t Hemingway

Do you feel like you’re a bad developer, because your code isn’t that good when you first write it?  Because it needs to go through a process of editing, testing, and refactoring before you can use it, and before you can share it with others?  Well, it’s normal to have to change things, and improve them.  Moreover, the best writers — whose prose we believe to be beautiful — have done this with their writing for years, with drafts and additional drafts and additional drafts, ad infinitum, to make things better.  In this talk, Ian Whitney describes how to think about drafts (early versions) of course code, and how we should work on our code so that it’ll need improve.

[Video 329] Tara Scherner De La Fuente: I Like My Params Like I Like My Coffee

Ruby on Rails makes it easy to take user-submitted parameters, and pass them along to the database via Active Record. That’s great, but raises questions about security. In this talk,  Tara Scherner De La Fuente teaches us about  “strong parameters,” the mechanism in Rails that ensures we only pass to our models those values that we really want and need to pass along. She gives us hints for using them, and for ensuring that our applications are as protected as they can and should be.

[Video 325] Corey Haines: Fun with Lambdas!

Many programming languages include a “lambda” keyword, allowing you to create an anonymous function. But how far can you go with lambda? In this talk, Corey Haines explores what’s possible with lambda — not as a practical exercise, but as a thought experiment turns into actual code. If you’ve wondered what lambda can do, or what the lambda calculus was trying to demonstrate, or just how far you can go with a very small language-creation toolkit, this talk will help you to understand all of these better.

[Video 322] Yehuda Katz: Rewriting a Ruby C Extension in Rust

Rust is a new language for systems programming, which aims to be friendly to developers. But typically, a language that is friendly to developers can be hard to optimize. In this talk, Yehuda Katz discusses the Rust language, starting by focusing on a compiled extension that was written in Rust, and which required surprisingly little optimization to outperform C. How can this be, and what does it say about Rust?  And how can it help us to understand the differences between dynamic and static languages?

[Video 321] Bradley Grzesiak: Simplify Challenging Software Problems with Rocket Science

We often think of “rocket science” as incredibly complex — certainly, far more complex than software. But it turns out that rocket science is possible because of techniques and tools that have been developed over the years, providing aerospace engineers with the ability to solve problems. In this talk, Bradley Grzesiak argues that the techniques used in aerospace engineering are not that different from those used by software engineers, and can help to inform how we work with software.  (As a bonus, he even shows how you can perform certain space-related calculations in Ruby.)