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.

Understanding Selection Sort with Ruby

If I asked you to sit down right now and sort a list of numbers, there’s a good chance that you’d intuitively rediscover the selection sort algorithm. It’s a simple approach that can have significant performance implications. That’s why it shows up so frequently in technical interviews - even though most developers never implement sorting from scratch. In this article, Julie Kent walks us through the selection sort algorithm, builds a working implementation in Ruby, and discusses its performance characteristics.

sports gem - sport data structures for matches, leagues, seasons, rounds & more

Hello, I’ve extracted another little gem called sports that lets you use “plain old ruby” sport data structures for matches, scores, leagues, seasons, rounds, groups, teams, clubs and more. The readme sample shows how to build the standings table for the English Premier League (EPL) for the 2019/20 season from all matches in the comma-separated values (.csv) format. Enjoy the beautiful game (or other sports) with ruby. Cheers. Prost.

How To Write a Glimmer Timer Desktop App in One Hour

I needed a simple Timer desktop app on my Mac today, so I wrote one in Glimmer (Ruby Desktop Development GUI Library). The initial working prototype took me about one hour, mostly spending my time outside of Glimmer, figuring out how to leverage the Java Sound libraries (since Glimmer works through JRuby). Otherwise, I spent 2-3 hours afterwards on fit and finish (e.g. logo and fonts) and testing/packaging for the Mac and Windows.

How many Heroku dynos do you need, and which size—An opinionated guide

This guide is everything you need to know about Heroku dynos when running a Rails app. It goes deep into the two questions everyone asks: “Which dyno is right for my app?” and “How many dynos do I need?”. It covers how to get the most value from Heroku, how to avoid app slowdowns, and provides clear guidance on the best way to run your Rails app.

score-formats gem - read / parse and print sports match scores eg 8-4 (4-2)

Hello, I’ve extracted a little stand-alone (no-dependencies) gem called score-formats that lets you read / parse and print sports match scores (incl. half time, full time, extra time, penalties and more) e.g. 6-5 pen. 2-2 a.e.t. 1-1 (1-0) or 8-4 (4-2) or even in German style e.g. i.E. 6:5, n.V. 2:2 (1:1, 1:0). Enjoy the beautiful game (or other sports) with ruby. Cheers. Prost.

Rodauth: A Refreshing Authentication Solution for Ruby

The Rails ecosystem has several popular authentication frameworks (Devise, Sorcery, Clearance, Authlogic), but over time these libraries have accumulated a lot of internal complexity, inconsistencies in design, and haven’t managed to standardize some important functionality (JWT, MFA). Rodauth is a fresh take on authentication in Ruby, built on Roda & Sequel. It has all the essential authentication functionality, additional enterprise-level security features, multifactor authentication (TOTP, SMS codes, recovery codes, WebAuthn), JSON API support, passwordless authentication and more. https://janko.io/rodauth-a-refreshing-authentication-solution-for-ruby/

Understanding Database Transactions in Rails

Few things are scarier than a database slowly losing integrity over weeks or years. For a while, nobody notices anything. Then users start reporting bugs, yet you can’t find any code that’s broken. By the time you realize the problem, it may be happening for so long that your backups are unusable. We can avoid problems like these with skillful use of transactions. In this article, Kingsley Silas introduces us to transactions at the database level, discusses when they should be considered, and shows us how to use them in Rails.

Loading older posts