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
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
New article on our blog: You know Big-O is important - not only for acing your next job interview but for knowing how code works at scale. But have you ever taken the time to go beyond a superficial understanding of the subject? In this article, Julie Kent uses equal parts math and Ruby to reveal the beating heart of Big-O and show us how it ticks. https://www.honeybadger.io/blog/big-o-notation-ruby/
I’ve put together a new
News module that offers easy to (re)use “porcelain” helpers / methods that hide the “plumbing” of the pluto machinery for building your own newsreader or newsfeeds in minutes in two easy steps, that is,
News.update. Happy planet. Cheers. Prost.
Are you staring down the face of a Rails app with a multitude of failing specs? Here are some strategies to chip away at failing specs during an upgrade – and keep your sanity in the process. Read the post.
This week on the Maintainable podcast, Robby Russell speaks with Mike Perham, Founder and CEO at Contribsys and author of Sidekiq and Faktory. They discuss the pros and cons of using external dependencies, how Mike built a business off of his open source project, Sidekiq, and the dIfference in maintaining Ruby vs Go software projects. [more inside]
In this episode, we look at attaching emojis to our comments model, allowing them to fill in some emotional cues. https://www.driftingruby.com/episodes/emojis-from-scratch
The tty-exit is here to provide human friendly and standard way to use exit status codes in command-line applications. Instead of saying exit(64), you can say exit_with(:usage_error). It is so much nicer! Wouldn’t you agree? That’s why tty-exit gathers a list of all the most common exit codes as used by POSIX-compliant tools on different Unix systems for you to use. Enjoy!
I put together a handy guide comparing all the different ways you can set attributes on an Active Record object in Rails 6. At a glance the cheat sheet shows you which methods save to the database, run validations, run callbacks, update timestamps, etc.
At long last SimpleCov has received a major update with support for the branch coverage added to the Coverage standard library module introduced in Ruby 2.5