RubyFlow The Ruby and Rails community linklog

×

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

You can use basic HTML markup (e.g. <a>) or Markdown.
Note that your post may be edited to suit the format of the site.

As you are not logged in, you will be
directed via GitHub to signup or sign in

Post Preview

Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.

JSONify your Ruby Translations

PostgreSQL offers native column types for efficiently storing and retrieving JSON-formatted data. Although these types are a natural fit for model translations, most applications use separate tables for storing such data. In this post, I describe a new translation strategy for storing model translations on a single database column, implemented in the latest version of Mobility, a pluggable Ruby translation framework.

What's Your Hash Rate? Find out your Mining Speed w/ compute_hash_with_proof_of_work

Hello, I’ve added a couple of new chapters to the “Programming Blockchains Step-by-Step from Scratch (Zero)” and starting with (crypto) hashes… What’s News? Mining, mining, mining! What’s your hash rate? Let’s find out and use the “stand-alone” version of the by now “classic” compute_hash_with_proof_of_work function. Let’s try (run) benchmarks for the difficulty from 0 (4 bits) to 0000000 (28 bits)… On my “low-end” home computer the hash rate per second is… about 100 000. What’s yours?

Memoizing in Ruby

This has been written about before, and will no doubt be written about again. Memoizing in Ruby addresses the oft-seen footgun of memoizing falsy values. Spoiler alert: you don’t need a gem, you just need some basic Ruby knowledge.

FasterPath v0.3.9 released!

Did you know the Rails web page load time spends about two thirds of its time handling your assets file paths? Would you like to improve your sites performance by over 50%? FasterPath may just help you do that. FasterPath rewrites file path handling methods from Ruby and C in to Rust for better performance. FasterPath includes binary releases so you won’t need to compile it on your server to use, provided you’re using a Ruby version we’ve pre-compiled for. Now including faster than C code for File.basename, File.extname, and File.dirname.

Are you tired of flaky automated browser tests?

A key problem with browser tests are that changes to HTML style and structure cause unintended test failures and contribute to flaky tests. The UI Interactors gem makes it simple to write automated browser tests using selenium-webdriver - tests which are resilient to HTML structure and style changes. Use the gem with your favorite testing framework. The gem’s readme is comprehensive. It’s still early days, but if you have suffered from the problem, I think you will find the gem useful.

Loading older posts