The Ruby and Rails community linklog
Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!
Submit a post
Post Preview
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
Active Admin Tips and Performance Optimizations for Rails Apps
Active Admin gem is a popular tool for building admin interfaces in Ruby on Rails apps. In this blog post, I will describe a couple of less obvious tips and performance optimization techniques. [more inside]
Build Your Own (Offline) CryptoKitties Breeding (Offspring) Calculator
Hello, I’ve added a new chapter to the (free online) book “Programming Crypto Collectibles with Ruby” titled “Build Your Own CryptoKitties Breeding (Offspring) Calculator - Odds & Probabilities”. Happy data wrangling and genome genetics bits & bytes slicing with ruby. Cheers. Prost.
The Complete Guide to Create a Copy of an Object in Ruby: Part I
In this article we’re going to explore the following topics:
AWS Lambda Serverless Ruby Cron Jobs Tutorial
A great use case for AWS Lambda is running Cron Jobs. Instead of setting up a special one-off Cron server to run a simple task, we can just run the task on serverless nowadays. In this blog post Serverless Ruby Cron Jobs Tutorial: Route53 Backup we’ll go over how to build a simple Cron Job with Jets, the Ruby Serverless Framework. As a useful practical example, we’ll create a job that backs up route53 records. This is quite handy when if you ever need it!
How we interview developers
Hi all! If you’re running an agency or you need to recruit developers for your project, you need to have a process in place. At MarsBased we’ve been hiring Ruby developers for five years now, and this is how we do it: [more inside]
Ruby Quiz - Challenge #10 - Breed Kitties - Mix Genes Using the Sooper-Sekret Formula
It’s Friday. Ruby Quiz time! Join us. Let’s keep going with a new Ruby Quiz every fortnight. Ruby Quiz - Challenge #10 - Breeding Kitties - Mix Genes Using the Sooper-Sekret Formula in the GeneSciene CryptoKitties Blockchain Contract Send your code snippets to ruby-talk. Happy data wrangling and genome genetics bits & bytes slicing with ruby.
Comprehensive Ruby 2.6 changelog
The Changelog of new language and standard library features that tries to be full, comprehensive and well-structured, complete with examples of usage, reasons behind changes, and links to discussions.
Handling enums in PG array columns
Little extension similar to Rails enum, but for arrays
https://freeletics.engineering/2019/01/03/array-enum-gem-for-pg-arrays.html
Updated base32-alphabets library - Encode / decode numbers in 5-bit groups (2^5=32)
Hello, I’ve updated the base32-alphabets library that lets you encode / decode numbers in 5-bit groups (2^5=32) with Kai, Crockford or Electrologica notation / alphabet (e.g. break down the 240-bit CryptoKitties genome into 12 groups of 4 (x 5-bit) genes, for example). What’s news in 1.1? You can use byte arrays for encode / decode too or use Base32.bytes to get all 5-bit chunks as an (integer) byte array. Happy unique bits & bytes slicing off the (block)chain with ruby.
Gem for grouping multiple DB operations under same transaction like Ecto
Ector::Multi makes it possible to pack operations that should be performed in a single database transaction and gives a way to introspect the queued operations without actually performing them. Each operation is given a name that is unique and will identify its result in case of success or failure. [more inside]
Using Ruby in 2019
I spent some time putting together my thoughts and reasons for using continuing to use Ruby in 2019. I’d love to hear your reasons, too! Using Ruby in 2019
Notes from The Complete Guide to Rails Performance's Workshop
Here are some notes from my experience participating in Nate Berkopec’s workshop. I mention some of the tools and libraries that we used throughout the workshop and how you could use them to do performance optimization: https://www.ombulabs.com/blog/rails/performance/notes-from-the-complete-guide-to-rails-performance-workshop.html
Serverless Rails on AWS Lambda in 5 Minutes
Post covers how to deploy a Rails application to AWS Lambda Serverless in a few minutes. With Jets Afterburner, you don’t have to make any changes to your Rails application to get it on AWS Lambda. 🎉 https://blog.boltops.com/2018/12/21/jets-afterburner-serverless-rails-on-aws-lambda-in-5-minutes
4 interesting examples using operator precedence in Ruby
In this article, we’re going to explore the following topics:
Gem for eliminating Ruby initializers boilerplate code, and providing unified service
Smart Init offers a unified API for stateless service objects, accepting values in initializer and exposing one public class method call which instantiates new objects and accepts arguments passed to initializer. [more inside]
Git Cop 3.0.0
A new version of the Git Cop has been released with enhanced support for XDG environment variables. This is most notable when adding a .config/git-cop/configuration.yml to your projects with custom settings. There is no longer a need to use tools like dotenv to set $XDG_CONFIG_HOME or $XDG_CONFIG_DIRS individually as Git Cop will detect the changes automatically. Enjoy!
Runcom 4.0.0.
The Runcom gem has been updated to 4.0.0 which includes Ruby 2.6.0 and improved XDG environment support. This is a boon for anyone needing XDG support for cache, config, and data environment variables (especially CLI programs). See project README for further details.
MixGenes - Inside Breeding - Matron + Sire = New (Offspring) Kitty
Hello, I’ve added a new chapter to the (free online) book “Programming Crypto Collectibles with Ruby” titled “Inside Breeding - Matron + Sire = New (Offspring) Kitty - All About Gene Swapping, Inheritance & Mewtations (incl. mixgenes Formula and Odds & Probabilities)”. Happy data wrangling and genome genetics bits & bytes slicing with ruby. Cheers. Prost.
HexaPDF 0.9.0 with document layout support released
The latest version of HexaPDF supports document layout which makes the creation of PDF files much easier. For details see the release announcement. [more inside]
101: Actual refactoring - real life story
This blog note is next in our cycle aimed at less-experienced developers. This time we will start with real-life code, that I’ve found in one of our projects. Through a series of steps, we will refactor it to excellent object structure, separated from other parts of the application. Read more…
Statistics - Build Yourself An Up-to-Date Cattributes Rarity & Popularity Cheatsheet
Hello, I’ve added a new chapter to the (free online) book “Programming Crypto Collectibles with Ruby” titled “Statistics, Statistics, Statistics - Build Yourself An Up-to-Date Cattributes Rarity & Popularity Cheatsheet from the (Unofficial) CryptoKitties Web Service @ api.cryptokitties.co/cattributes”. Happy data wrangling with ruby. Cheers. Prost.
How to use the Ruby 2.6 JIT
Ruby 2.6 was just released and includes a new experimental just-in-time (JIT) compiler. Here’s a quick screencast to learn How to use the Ruby 2.6 JIT.