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.
Solving the FizzBuzz test without a single If statement
Ruby hashes are awesome! Here’s how to do FizzBuzz without a single If statement. Declarative style programming saves of the day :)
Eigindir
One more virtus-inspired library with minimal API for PORO attributes’ definition and coersion. https://github.com/nepalez/eigindir
Creating custom Minitest reporters
In this article I show you how to extend Minitest’s CLI and how to create custom reporters, with two practical examples. Bonus: Ever wanted a really useful reporter for Minitest, pretty much like RSpec’s? Here it is!.
Performance comparison between Digital Ocean and Shelly Cloud
A few weeks ago, I published the post, a comparison of two platforms – Heroku and Shelly Cloud. Today I would like to share my results of a similar test: Digital Ocean against Shelly Cloud. [more inside]
Have problems testing methods that query ActiveRecord?
When the method is supposed to change a record but your test doesn’t show it. http://6ftdan.com/allyourdev/2015/04/30/have-problems-testing-methods-that-query-activerecord/
Ensuring your data is unique in Rails
Here’s how to ensure your data is unique in Rails. Only relying on Rails validation isn’t enough!
On my radar: RethinkDB + React.js + Rails
RethinkDB is the open-source database for the realtime web and it can push JSON to your app in realtime. I checked if I could get it to work with React.JS ans ActionController::Live to get real time updates of a webpage. You can read about it in On my radar: RethinkDB + React.js + Rails blogpost and watch 20s demo . Enjoy!
Loosely Coupled Push Updates
I think push updates are a great way to improve web applications. But Action Cable should be not as tightly integrated into Ruby on Rails 5 as it currently seems. It should provide an interface like Active Job and Action Mailer already do.
Postgres' JSON Column with Rails 4
I wrote a quick article about using the JSON column type instead of the hstore extension with Postgres in Rails 4. It is perfect to use for things like user settings or storing arbitrary data associated with a record. Read the article at http://blog.chadwilken.com/json-with-postgres-in-rails/
SETTING UP AN HTTP PROXY WITH RUBY
I just released an article about setting up an HTTP proxy with ruby. [more inside]
3 quick gem tricks
I recently updated Ruby and upgraded a few projects. And while I did, I found some pretty cool RubyGems features that I didn’t know about before.
Top 7 Ruby on Rails Podcasts
Hey folks, I’m bringing you the list of 7 RoR podcasts for all levels of experience and knowledge. If you don’t have time for text resources, you can listen to these e.g. while commuting to work :) https://netguru.co/blog/top-7-ruby-on-rails-podcasts
Mutation testing in a Ruby gem
Mutation testing is still a relatively unknown technique in the Ruby community. [more inside]
Minitest::Benchmark: An Introduction
I’ve been taking a little time to explore Minitest::Benchmarks on my own and trying to put them into context with the other testing tools I use. Over the next few weeks, I’ll be writing about my findings and publishing them for you and the rest of the community to read as I go. This week I’m starting with a high-level overview to help you (and me) understand what happens in a Benchmark - what and how it tests, and what the various assertions are actually demonstrating.
The Ruby and Javascript Scene in Barcelona
Barcelona is a great city right now for Ruby and Javascript developers, with tons of job opportunities, a vibrant startup scene, and the same weather and Mediterranean lifestyle that brings millions every year. I’m thinking on starting a monthly job offers writeup, would you be interested?
Thinking SQL, writing in Ruby on Rails
Thinking SQL, writing in Ruby on Rails? This may sound awkward, but one of our devs explains how he manages to do that - with great results: Why I Went Back to Thinking SQL
Denoising Autoencoders
In this tutorial, you will learn how to train and visualize a denoising autoencoder in Ruby.
Using UUID with PostgreSQL and ActiveRecord
In this article I demonstrate how you can integrate uuidv4 as primary/foreign keys, and learn about the drawbacks of following this approach.
Launching RubyThursday
What’s RubyThursday? It’s a free weekly (on Thursdays, get it? :) online show that gives you bite sized tutorials, tips and tricks and reviews for the latest tools, gems and sites to help you grow as a Rails developer. Hosted by a professional comedic actress turned hacker. Yep, you read that right!
Simple translator for RoR locale YML files
Locales translator with machine-translation ability (free Yandex.Translate API). It is here
Ruby Network Programming
Join me on this tour of ruby network programming to learn the basics, and start talking to other servers and clients using Ruby! Share it with your friends if you like it :) Blog post: http://www.blackbytes.info/2015/04/ruby-network-programming/
Tackling Those Tests, Part 3: Testing Made Easy With Gems
Testing can be really hard. But you can make it easier on yourself by using the right gems! This blog post explains how to implement the shoulda-matchers and database_cleaner gems, which will help keep your tests DRY and your databases clean.
What Overcommit can do for you?
A brief explanation on how to use the gem Overcommit and how it will help you in your everyday development methods. Check it out here.
Customize RSpec’s output for fun and profit
Ever wondered how you can customize RSpec’s output? I wrote a blog post explaining the details of RSpec formatters, how to write a custom formatter and integrating it in a Rails application. You can check it out here.