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.
Interactive diagramming application for Rails
Hello, I created an open source project that helps people familiarize themselves with a new Rails database. I provided the link to the Github page below for anyone interested in reading more about the project or for anyone looking to contribute. Thanks! [more inside]
Microservices for Startups: An Interview with Christian Beegden and Stefan Zier of Su
Sumo Logic’s CTO and Chief Architect discuss their microservices driven approach to building one of the most powerful machine data analytics services in the world.
Inside @CryptoKitties geneScience.mixGenes - Sooper-Sekret Gene Mixing Formula
Hello, I converted the pseudo-code published by Sean Soria in
“CryptoKitties mixGenes Function” into a running (working) ruby script, that is, mixGenes.rb. Try: $ ruby ./mixGenes.rb to breed new kitties (with matron and sire) and mix the 256-bit (with 48 genes in 12 trait groups) genome. Happy CryptoKitties gene mixing in ruby. Cheers.
2 Quick Tips for IRB
IRB is a pretty handy tool to quickly manipulate code gist. But sometimes, it becomes a bit complicated to use. [more inside]
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.
Toy Robot Simulator - A Ruby Gem Implementation for Learning Purposes
A few weeks ago, I created a basic Ruby gem implementation of the Toy Robot Simulator problem for learning purposes. It is a simulation of a “robot” moving on a square table of certain dimensions. The robot is free to roam around the surface of the table controlled by a limited set of commands but must not fall.
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?
Convert an ActiveRecord object into the fixture
Small but useful blog post on how to convert an ActiveRecord object into the fixture
How I've Built a Profitable Slack Bot as a Side Project in Rails
I’ve built a Slack bot in Ruby on Rails and it is profitable. In this blog post I will describe what I did and tools I used to create, promote and monetize a simple SAAS product. [more inside]
Ruby-Devscoop: issue #4
Avoid Short-Circuit Evaluation During OR/AND Expression.. see more
Differences Between Procs and Lambdas
lambdas are strict on argument number. If the call doesn’t respect the exact number of argument then an ArgumentError is raised.. see more
Installing Ruby and Rails on Windows (For RailsGirls)
Small guide on how to install ruby and rails for RailsGirls in 2018 Here
SOLID Principles #2 - Open/Closed Principle
Five-part series of blog posts about SOLID Principles. This one is about the second of them - Open/Closed Principle: [more inside]
SOLID Principles #1 - Single Responsibility Principle
Five-part series of blog posts about SOLID Principles. This one is about the first of them - Single Responsibility Principle: [more inside]
A PR has been submitted
http://pauloancheta.com/ruby/clean-code/2017/06/16/ruby-pr/ Kudos to you, person who contributed to a Ruby repository. I am actually thankful that you did not just create an issue but you actually tried to solve the problem by creating a Pull Request. Now my job, is 10x easier since I don’t have to stop the other things that I am trying to do. [more inside]
Programming Blockchains Step-by-Step Guide in Ruby. Let's Start w/ (Crypto) Hashes...
Hello, I’ve started a new (free, open source ) guide titled “Programming Blockchains Step-by-Step”. Let’s build blockchains from scratch (zero) step by step in ruby and. Let’s start with crypto hashes (Digest::SHA256.hexdigest)… Happy blockchaining. Cheers. Prost..
How to parse command line options with Ruby Slop
Learn how to parse command line options in your Ruby scripts with the slop gem: https://readysteadycode.com/howto-parse-command-line-options-with-ruby-slop
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.
Speed up and improve your RSpec tests in 4 simple steps
Use shared examples, custom matchers, Rails transactional tests feature and lightweight factories to speed up your RSpec tests READ MORE
The correct emails configuration in Rails
I wrote an article with the best practices in configuring your emails in Rails. This small article contains some quick hints and suggestions on how to configure the different environments and to properly test emails [more inside]
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.
SearchFlip - Chainable ElasticSearch Queries
I’d like to introduce the SearchFlip gem. Create dead-simple index classes that correspond to ElasticSearch indices and use its elegantly chainable DSL to manipulate, query and aggregate them. While being version 1.0.0 it’s used in production for years already. Great docs included. https://github.com/mrkamel/search_flip