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.
Speaking on Ruby and Chronic Pain Management in Sheffield
I was recently invited to Sheffield Ruby User Group to share the story of MaraBot, a very personal project to help use machine learning and weather shifts to regain control over managing chronic pain:
Distributed cron for Rails apps with Sidekiq Scheduler
In some of our Ruby on Rails applications, we have migrated from using OS based cron to distributed cron using Sidekiq Scheduler. We will discuss the motivation for this change and the benefits from it.
Spotting unsafe concurrent Ruby patterns - talk recording
Writing Ruby code that uses threads is a great way to get better performance and improve your app’s user experience. It can also be quite daunting due to the often-feared “concurrency bugs”. In this talk, recorded at the Fullstack LX Ruby meetup, I introduce a number of pitfalls to watch out for, presenting correct (and fast!) alternatives for each. [more inside]
csvjson library / gem v1.0 - read tabular data in the CSV ♥ JSON format
Hello, I’ve published a new library / gem, that is, csvjson that lets you read tabular data in the (new) CSV <3 JSON format, that is, comma-separated values CSV (line-by-line) records with javascript object notation (JSON) encoding rules. Happy data wrangling with ruby (and csv and json). Cheers. Prost.
How we halved our memory consumption in Rails with jemalloc
I recently wrote a blog post on how we halved our memory consumption, and drastically increased speed, in our Ruby on Rails app just by switching to jemalloc: If anyone has any thoughts, or other tips for performance optimisation, please do leave a comment!
Working with Thread in Ruby
Little article about Thread in Ruby and how you can use it for I/O operations: Medium post
Serverless Platform for Ruby - FaaStRuby 0.2.0 Released!
Hey there, FaaStRuby 0.2.0 is out! This version comes with lots of improvements. Top 2 highlights: Functions are packaged, deployed and managed individually (no more pulling from git repository) | TESTS! Functions can have tests and they can be configured to run before each deploy, aborting if it fails. Feedback is greatly appreciated!
Why the standard CSV library author deserves our hugs and thank yous
Hello, I’ve written a new episode in the why the csv standard library is broken, broken, broken (and how to fix it). It’s a new introduction to the series titled “I apologize - Sorry, Sorry, Sorry.” to clarify that I am in no way blaming the author (really I’m blaming YOU :-), that is, all the free-loaders waiting for a miracle. The author or the authors of the standard CSV library deserve our hugs and thank yous for the great work and many hours (for sure many unpaid and volunteered) put into the CSV library. We are all standing on the shoulders of giants. Thank you. Thank you. Thank you. Cheers. Prost.
Invisible Captcha, a honeypot protection gem for Rails, new release!
Hello 👋 I just released a new version of Invisible Captcha (v0.11.0), a gem to protect your forms/actions from spam bots. [more inside]
macOS Mojave: Ruby and Rails
Setting up Ruby / Rails can be quite a challenge, in this episode we’ll walk you through the process so you can get up and running with ruby and rails as fast as possible. [more inside]
Rails 5: Matching Asset URLs in Feature Specs
A brief post showing how to match fingerprinted asset URLs in your specs with Rails 5. https://www.chrisblunt.com/rails-5-matching-asset-urls-in-feature-specs/
Why the CSV standard library is broken (Part IV) - Numerics aka Magic Type Inference
Hello, I’ve written a new (and fourth) episode on why the CSV standard library is broken, broken, broken (and how to fix it). Let’s have a look at numerics a.k.a. auto-magic type inference for strings and numbers. Questions and comments welcome. Cheers. Prost. PS: If you want to see other (more) CSV formats / dialects pre-configured and supported “out-of-the-box” in the new csv reader, please tell.
Evolution of Ruby String - from 1.8 to 2.5
In Ruby, a string is represented as an instance of the String class. This class has highly evolved between Ruby 1.8 and Ruby 2.5.. SEE MORE
How to log HTTParty requests using built-in loggers
Did you know that HTTParty gem provides built-in support for logging requests details?
Detecting hate speech and derogatory language
I just published a gem that connects to our hate speech detection API. We use it to analyze websites our clients link to, to ensure they don’t accidentally link to hate speech sites etc and ruin their reputation. You send text in and it sends the polarity back: 1 = hateful, 0 = nothing detected Super useful to protect schools, business websites etc. Hatefreeweb on Rubygems
csvreader v1.0 - read comma-separated values (csv) the right way (incl. hash, ...)
Hello, I’ve uploaded version 1.0 of the new comma-separated values csvreader library / gem that lets you read tabular data in the comma-separated values (csv) format the right way :-), that is, the basic methods such as Csv.read or CsvHash.read use best practices out-of-the-box with zero-configuration. Under the hood the new library includes purpose-built “backend” parsers (e.g. ParserStd, ParserStrict, ParserTab, etc.) so you can handle
all the popular comma-separated values (csv) formats / dialects such as MySQL (use Csv.mysql.read) or PostgreSQL (use Csv.postgres.read) exports and more using unix-style escapes and \N or unquoted empty values for null/nil and so on. Data is the new gold :-) Happy data / gold mining with the new csvreader library / gem (in ruby). Cheers. Prost. PS: What’s wrong (broken) in the standard csv library? See the let’s count the ways article series.
I am writing an introductory book to Rails application deployment
VPS for Makers is a book on basic web application deployment with a concrete full Ruby on Rails & PostgreSQL example. Here is the announcement. Would be happy to receive any feedback!
To Microservice or Monolith, that is the question...
The constant series of questions asked about if so and so or such and such should be better architected as microservices, or built with multiple layers of front end components hitting backend dohickies hosted within multiple layers of auto-magic hosting “silos” of data and services, shows that truly, there is way too much confusion out there on what constitutes a “good” software development approach. [more inside]
tty-box with connected borders
Latest release of tty-box adds new parameters for modifying border corners. What this means is that you can create complex layouts of seamlessly connected boxes. Enjoy!
Understanding Method Visibility In Ruby
What does public, private & protected mean in Ruby? These 3 methods control the public interface of your class. Why would you want to do that? Find out in this NEW Ruby article!
render_async 2.0.0 Brings Error Handling and Loses jQuery as its Default Option
render_async 2.0.0 has just been released! [more inside]
[Tutorial] Building Live Chat Between Users in a Rails application using Planga
Planga is a new web-service that is currently in open Beta, that allows you to seamlessly integrate live chat functionality in your existing web-app. [more inside]
[Screencast] Service Objects for API Interactions with Twilio
In this episode, learn how to extract the interactions with an external API into a service object so that code is isolated and interchangeable. https://www.driftingruby.com/episodes/service-objects-for-api-interactions-with-twilio
Podcast - Generate a (static) podcast website from a folder of MP3s w/ jekyll
Hello, Pat Hawks hacked together at yesterday’ HackUIowa a new tool (in ruby). Let’s welcome - podcast - that lets you generate a (static) podcast website from a folder of MP3 files with jekyll and friends. See Herky Hack for a first sample (live) podcast. Happy publishing your radio talk shows with jekyll and friends. Cheers. Prost.#jekyllrb #podcast #mp3 #audio #id3 PS: Did you know? Octopod is another (free, open source) extension for publishing podcast episodes with jekyll.