Category Archives: Ruby

[Video 410] David Greenberg: Dynamic vs Static — Having a Discussion without Sounding Like a Lunatic

Which is better, dynamic or static typing?  For many years, this question has divided programmers, often bitterly. What are the advantages (and disadvantages) of the different approaches of typing, and how can we advocate for an approach without being blind to the trade-offs associated with that approach? In this talk, David Greenberg surveys a number of languages, approaches, and trade-offs,  and how we can think about static vs. dynamic typing without getting into crazy arguments. Moreover, he describes how static typing can be seen as a benefit, rather than a straitjacket, as many dynamic-language aficionados might believe.

[Video 387] Tom Enebo, Charles Nutter: JRuby 9000 Is Out; Now What?

JRuby is one of the most interesting and famous implementations of Ruby, for several reasons: It runs on the JVM, it runs really quickly, it interacts with Java libraries and objects, it integrates with the entire Java ecosystem of tools, and it solves the concurrency problems that the standard (MRI) interpreter has.  Recently, the JRuby team released a version that is compatible with Ruby 2.2, which raises the question — what does the future hold for JRuby?  What are the plans on the Ruby front, and the JVM front?  In this talk, JRuby developers Charles Nutter and Tom Enebo describe the current state of affairs, and where we’re headed in the JRuby world.

[Video 385] Laura Frank: Developing Ruby Applications with Docker

Developing an application using Ruby on Rails is supposed to be really straightforward. But it turns out that getting all of the versions (e.g., Ruby and gems), as well as all of the dependencies (e.g., databases and HTTP servers) right can be time-consuming and frustrating, particularly for newcomers. And then you have to deal with this once again when you move your application to production, and then deployed to multiple servers. One solution to this problem is to use a virtual machine (VM), or perhaps even a container manager such as Docker. In this talk, Laura Frank describes containers and Docker, the parts of a container, and how containers can help to improve your environment for development and deployment alike. She also distinguishes between VMs and containers, helping us to understand the differences between these virtualization systems.

[Video 382] Mat Brown: Seven Habits of Highly Effective Gems

One of the reasons for Ruby‘s popularity as a programming language is Ruby gems, the collection of open-source libraries that can be downloaded and used by developers around the world. With tens of thousands of gems available, there’s no doubt that they make Ruby a more productive, interesting, and collaborative language. The fact that anyone can contribute a gem makes it even more appealing and democratic. But not all gems incorporate practices that encourage their widespread use, as well as contributions from other developers. In this talk, Mat Brown provides seven ground rules for gem designers that, when followed, will make your gem more appealing to developers — those who want to use your gem, and those who want to help make it even better.

[Video 380] Jay McGavren: The (Complete) Story of Method Lookup

When you send a message to an object in Ruby, which method is really invoked? This seemingly innocent and simple question lies at the heart of Ruby development; if you understand the difference between objects, classes, and singleton classes, then you’re doing quite well. However, understanding the relationships among these various objects can be difficult and/or challenging.  In this talk, Jay McGavren explains what happens when you invoke a method in Ruby — who receives it, what they do with it, and where that message might go. If you’re a Ruby developer but are struggling to understand the object model, including such things as “include” and “extend,” then this talk will help to bring some order to your mental model.

[Video 377] Sandi Metz: Nothing is Something

Programming languages include lots of abstractions — many ideas that sit on top of other ideas, allowing us to work at a high level. But there are many cases in it’s important to understand what our code is not doing, or where there are values that represent nothingness, or the absence of something. In this talk, Sandi Metz reminds us that even the things that “seem like nothing” our code are actually important, worth thinking about and understanding. While the talk uses Ruby, the ideas are easily transferred to other object-oriented languages, and are food for thought for any programmer using object-oriented techniques.

[Video 374] John Cinnamond: Softly, softly typing

Ruby is a dynamically typed language. This means, generally speaking, that objects have types, but variables don’t. While this makes for a very easy-to-use programming language, it also means that there isn’t any way for the language to know, or enforce, types when they are passed to operators or methods. It has been proposed that Ruby 3 will include a “soft typing” system, letting developers include optional typing on their variables. In this talk, John Cinnamond demonstrates the use, and implementation, of a soft-typing system in an extremely simple language. If you’re curious about the future of typing in Ruby, or of how type systems are implemented, you’ll enjoy this talk.

[Video 369] Aaron Patterson: Inside Ruby’s VM — The TMI Edition

How does Ruby work? That is, the Ruby virtual machine — often known as the MRI — is what runs the bytecodes into which our Ruby program is translated. But how does the Ruby VM actually do what it needs? And what does the Ruby VM do to improve the efficiency of our code?  In this talk, Aaron Patterson provides a gentle introduction to VMs in general, and the Ruby VM in particular. If you’re a Ruby developer, and have ever wondered how your code is executed, or why Ruby works the way it does, this talk will be of great interest.

[Video 368] Aja Hammerly: Stupid Ideas For Many Computers

What can you do with lots of computers? Cloud computing allows us to scale up (and down) very quickly, but how do we do that?  And what do we do with such scale when we can? Well, worry no longer, because Aja Hammerly has come up with many ideas for what you can do with large numbers of computers. Between playing games, solving problems, and building huge regular expressions, this talk is fun and interesting, and shows what you can do with some Ruby, lots of computers, and a playful imagination.

[Video 366] Jerry D’Antonio: Everything You Know About the GIL is Wrong

Many programmers, when they start to work in Ruby, are surprised to discover the GIL — the Global Interpreter Lock, which ensures that only one thread can run at a time. For people used to working with threads on other systems, it’s hard to come to grips with the GIL. Why does it exist, what can we do to get around it, and how to Ruby developers go about their work when it exists? In this talk, Jerry D’Antonio discusses the GIL, and why many of the things you thought were true about it probably aren’t.  He then points to other languages with high-quality concurrency tools, and discusses his efforts to bring these into the Ruby world.