Hacky Friday Stuff #7.02.2020
Tags: ruby, rails, fullstack, fridaystuff
Published: 2020-02-07 16:54:33

*Links about web development, product engineering, tools and services from all over the internet.*

[Rails 6.1 adds support for multiple storage services to Active Storage](https://blog.saeloun.com/2020/02/03/rails-allows-configure-service-for-attachments-to-activestorage.html)
Before Rails 6.1, only one cloud storage service (Amazon S3, Google cloud storage, Microsoft Azure storage) could be used for the overall application.
But, there could be cases where our application might require to upload images to different storage services.

[Error handling with Monads in Ruby](http://nywkap.com/programming/either-monads-ruby.html)
Many modern languages, including Ruby, use Exceptions as the primary method of error handling. In this blog post, you will walk through the history of error handling.
Popular options will be briefly described but will mostly focus on the pros and cons of Exceptions before demonstrating how monads might provide a better approach in some applications.

[Wrangling slow reports, large file exports, and long-running tasks in Rails with ActiveJob](https://boringrails.com/articles/large-exports-and-slow-reports-with-activejob/)
In every non-trivial application you’ll have to do something that is just slow. You need to export a large data set to a CSV file. An analyst needs a complicated Excel report. Or maybe you have to connect to an external API and process a whole bunch of data.
So how do you know when it’s time to use background jobs?

[Page Objects that Suck Less – Tips for writing more maintainable Page Objects](https://johnfergusonsmart.com/page-objects-that-suck-less-tips-for-writing-more-maintainable-page-objects/)
Page Objects are one of the most widely used test automation design patterns around. Most QA engineers have used a variation of Page Objects at some point. However, it is often misunderstood and used poorly, which can result in test automation code that is fragile and hard to maintain.
In this article, we will look at some of the limits and pitfalls of the Page Objects pattern, as well as some approaches that can help you ensure that your Page Objects don't lead you to a maintenance nightmare.

[Why and how to choose reference user stories](https://bytes.babbel.com/en/articles/2018-09-12-reference-user-stories.html)
For many agile software engineering teams, it is common practice to estimate the complexity of the user stories that they will be working on. Estimation is not an exact science and so they choose t-shirt sizes, story points, or other non-time based scales to account for the uncertainty that is inherent to software development. Over time, a team of individual software developers gradually comes to an implicitly shared understanding of what degree of complexity each value on their chosen scale represents.
This implicitly shared understanding can easily be challenged, though, when a new joiner to the engineering team or colleagues from different disciplines (e.g. product management, product design, …) pose the supposedly simple question: “What do 5 story points mean in your team?”

[Unlearning toxic behaviors in a code review culture](https://medium.com/@sandya.sankarram/unlearning-toxic-behaviors-in-a-code-review-culture-b7c295452a3c)
> I’ve listed below some common unhelpful behaviors people display during code reviews, and some recommendations on how software teams can make their teams more supportive by refusing to normalize toxicity. All of the behaviors I describe were either witnessed by me or happened to an industry contact of mine. I’ve been guilty of several of these behaviors in the past, too.

### Tools and libraries

[Typesense](https://typesense.org/)
Typesense is an open source, typo tolerant search engine that delivers fast and relevant results out-of-the-box.

[Maizzle](https://maizzle.com/)
Maizzle is an email framework that helps you quickly build emails with utility-first CSS and advanced, email-specific post-processing.

[Break](https://github.com/gsamokovarov/break)
Break is lightweight debugger for Ruby. It's written in plain Ruby and doesn't have its own frontend. Once you require "break", it integrates seamlessly with IRB or Pry and you have commands like next straight in your REPL session. You don't need to remember to start your debugger or change your development flow. Break embraces your flow, instead of forcing you to abide to a yet another tool.

[CypressOnRails](https://github.com/shakacode/cypress-on-rails)
Gem for using [cypress.io](https://cypress.io) in Rails and ruby rack applications with the goal of controlling State as mentioned in [Cypress Best Practices](https://docs.cypress.io/guides/references/best-practices.html#Organizing-Tests-Logging-In-Controlling-State).

[binarysearch.io](https://binarysearch.io/)
Master algorithms together. Create a room, invite your friends, and race to finish the problems.

### Podcasts

[Rails with Jason Podcast | 028 - Sandi Metz, Author of POODR (with Special Guest TJ Stankus)](https://www.codewithjason.com/sandi-metz-author-poodr-special-guest-tj-stankus-rails-jason-podcast/)
Sandi, TJ and I talk about OOP in Rails; Java and COBOL; service objects and Interactors; getting bitten by snapping turtles; and Sandi's 11 bicycles.

[Ruby Rogues | RR 448: How To Avoid Catastrophes with Jon Druse](https://devchat.tv/ruby-rogues/rr-448-how-to-avoid-catastrophes-with-jon-druse/)
Jon Druse is a developer from Tennessee and has been using Rails for 15 years. He starts the show by sharing some of the background behind his RailsConf talk “How To Lose 50 Million Records in 5 Minutes” and the various mistakes that were made that lead to such a dramatic loss.