Hacky Friday Stuff #26.06.2020
Tags: ruby, rails, javascript, hackyfriday
Published: 2020-06-26 10:33:17

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

[Ruby 2.7 adds Enumerable#filter_map](https://blog.bigbinary.com/2020/05/08/ruby-2-7-adds-enumerable-filter-map.html)
Ruby 2.7 adds Enumerable#filter_map which is a combination of filter + map as the name indicates. The ‘filter_map’ method filters and map the enumerable elements within a single iteration.

[Using Webpack Module Federation to Create an App Shell](https://medium.com/expedia-group-tech/using-webpack-module-federation-to-share-an-app-shell-7d23633510e)
Webpack 5.0 will ship a powerful new feature for javascript application architecture: module federation (committed in v5.0.0-beta.16). This article explores the implementation of a federated app shell micro front-end (MFE) working with an example travel shopping experience.

### Articles and tutorials

[Postgres Indexes for ActiveRecord Join Tables in Rails Apps](https://pawelurbanek.com/rails-postgres-join-indexes)
Join tables are a common citizen in Ruby on Rails apps. Their use case is to provide many to many relation between database models. Adding correct Postgres indexes on join tables is not obvious. In this tutorial, we’ll look into how compound PostgreSQL indexes work and how to correctly use them with join tables.

[Serving ActiveStorage uploads through a CDN with Rails direct routes](https://lipanski.com/posts/activestorage-cdn-rails-direct-route)
ActiveStorage makes it really easy to upload files from Rails to an S3 bucket or an S3-compatible service, like DigitalOcean Spaces. If your uploads are meant to be public and you were thinking of serving them directly through the CDN sitting in front of your S3 bucket, you’ll soon notice a problem: ActiveStorage URLs are built to always go through your Rails app, mainly through `ActiveStorage::BlobsController`. In this article, you'll get to know an easy way to go around this problem.

[Webpack and yarn magic against duplicates in bundles](https://medium.com/@adevnadia/webpack-and-yarn-magic-against-duplicates-in-bundles-52b5e1a5e2e2)
This page describes the theory and some technical details behind the [webpack-deduplication-plugin](https://github.com/atlassian-labs/webpack-deduplication-plugin) plugin, which helped to reduce javascript size in Jira by ~10%.

[React Hook Form VS Formik](https://blog.bitsrc.io/react-hook-form-vs-formik-form-builder-library-for-react-23ed559fdae)
Through this article, you’ll learn about the pain of building forms with React and how form-building libraries like Formik and React Hook Form can help you to have fewer tears.

### Gems, libraries, services

[GitHub::DS](https://github.com/github/github-ds)
GitHub::DS is a collection of Ruby libraries for working with SQL on top of ActiveRecord's connection.

[Webpack Deduplication Plugin](https://github.com/atlassian-labs/webpack-deduplication-plugin)
Plugin for webpack that de-duplicates transitive dependencies in yarn and webpack-based projects.

### Podcasts

[Code[**ish**] | 73. The Blockchain, Beyond Cryptocurrency](https://www.heroku.com/podcasts/codeish/73-the-blockchain-beyond-cryptocurrency)
Cryptocurrencies like Bitcoin have gained popularity as people seek to reclaim more privacy in their online activities. But the underlying concept is built on a technology called blockchain, and while it's often associated with cryptocurrencies, its potential can be applied in many more places. Host Owen Ou interviews Adam Hanna and Melanie Plaza at AE Studio to talk about what the blockchain is (and isn't), building on top of blockchain platforms like Ethereum, and the future implications for blockchain networks.

[DevDiscuss | S1:E6 - Little-Known Productivity Tools; Big Productivity Gains](https://dev.to/devdiscuss/s1-e6-little-known-productivity-tools-big-productivity-gains)
In this episode, we go through our favorite hardware and software that allows us to be the best developers and designers we can be. We invite DEV Principal Software Engineer, Josh Puetz, and DEV Lead Product Designer, Lisa Sy, to talk about their favorite desk setup, organizational, and efficiency tools.

### Videos

[Hanami 2.0 application template - pt. 1](https://www.youtube.com/watch?v=FH_EIlN89cQ&feature=youtu.be)
Piotr Solnica explores Tim's Hanami 2.0 application template - part 1, settings and rom-rb.
The template on GitHub: https://github.com/timriley/hanami-2-application-template


Photo by [Alexander Sinn](https://unsplash.com/@swimstaralex) on [Unsplash](https://unsplash.co).