Tutorials

Evented Rails: Decoupling complex domains in Rails with Domain Events
In our last Domain-Driven Design discussion, we learned how to group similar business components into application Bounded Contexts, which were separated folders in our Rails apps. This segregated cohesive groups of application code into separate f...






![Implementing inheritance with params: CreateProducts < ActiveRecord::Migration[5.0] - Ruby Blog](/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MTE2MDEsInB1ciI6ImJsb2JfaWQifX0=--04a98234b597c6649c0b98ef78a1563aec6a8a6e/data.avif)
Implementing inheritance with params: CreateProducts < ActiveRecord::Migration[5.0] - Ruby Blog
In Rails 5 each migration class is inherited from `ActiveRecord::Migration[5.0]`. It looks quite unusual to see that `[5.0]` part at the end of the parent class. In this article I'll describe why we might need it and how it works.

Ruby concurrency: in praise of condition variables · vaneyckt.io
In a previous post, we talked about the benefits conferred by Ruby mutexes. While a programmer’s familiarity with mutexes is likely to depend on what kind of programs she usually writes, most developers tend to be at least somewhat familiar with t...

Implementing classification using a SVM in Ruby - Practical Artificial Intelligence
In this blog post I will show how to implement a support vector machine (SVM) in Ruby, and how to use it to solve a simple classification problem. We will be using the RubyGem rb-libsvm to help us setup a SVM, train it and make predictions in a mi...