Hacky Friday Stuff #22.05.2020
Tags: ruby, rails, javascript, hackyfriday
Published: 2020-05-22 13:11:43

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

[Rebuilding our tech stack for the new Facebook.com](https://engineering.fb.com/web/facebook-redesign/)
Facebook sharing the lessons they’ve learned while rearchitecting Facebook.com, using React (a declarative JavaScript library for building user interfaces), and Relay (a GraphQL client for React).

[Five common issues with services and dry-monads](https://www.davydovanton.com/2020/05/19/five-common-issues-with-services-and-dry-monads/)
Anton Davydov shares his opinion regarding the common mistakes people often making when using dry-monads. The article describes detailed refactoring of the code snippet found at GitHub.

[Deno vs. Node.js — Here are the most Important Differences](https://medium.com/javascript-in-plain-english/deno-vs-node-js-here-are-the-most-important-differences-62b547443be1)
s Deno the new Node.js? Or is it just a nice alternative? In this article we will go into some important differences and features — have fun!

### Atricles & Tutorials

[Five Steps to Reduce webpack 4 Bundle Size](https://medium.com/better-programming/five-steps-to-reduce-webpack-bundle-size-8aebcd8e1562)
The article covers the approach of the application's size optimization by applying bundle analysis, import transformation, reduction of the imported big libraries, and code splitting techniques.

[The State Reducer Pattern with React Hooks](https://kentcdodds.com/blog/the-state-reducer-pattern-with-react-hooks)
A pattern for you to use in custom hooks to enhance the power and flexibility of your hooks. It's used in [`downshift`](https://github.com/downshift-js/downshift) to enable an awesome API for people who wanted to make changes to how `downshift` updates state internally.

[Modern React Testing Series](https://blog.sapegin.me/all/react-testing-1-best-practices/)
This series of articles is an in-depth snapshot of the current state of testing React components and frontend in general, explaining many whys, not just hows. We’ll see why to write automated tests, what tests to write and how to write them. In practical articles we’ll learn how to use Jest, Enzyme and React Testing Library to test React components.

[How to Fix Slow Code in Ruby](https://engineering.shopify.com/blogs/engineering/how-fix-slow-code-ruby)
Shopify team shows how they effectively finding and solving performance issues in a big monolithic Rails application. They are talking about the approaches for finding slow code, fixing it, and proving that the new solution is faster showing some case studies that feature real-world examples of using profiling and benchmarking.

[How to Migrate from Capybara Webkit to Webdrivers](https://www.fastruby.io/blog/rails/upgrades/how-to-migrate-from-capybara-webkit-to-webdrivers.html)
The article covers the issues with Capybara Webkit, why it worth switching to the modern approach that uses the [`webdrivers`](https://github.com/titusfortner/webdrivers) gem and a headless browser, and how to make the transition step by step.

[Ensuring backward compatibility in distributed systems](https://stackoverflow.blog/2020/05/13/ensuring-backwards-compatibility-in-distributed-systems/)
The move towards distributed architectures brings lots of benefits: easier testing, smaller deployable units, looser decoupling, smaller failure surfaces, to name a few. But it also brings its own set of challenges. How can a set of services evolve together in a way that doesn’t break the system?

[PostgreSQL - transpose columns into rows](https://id-in-it.com/postgresql-transpose-columns-into-rows)
A very simple approach to transpose columns into rows using PostgreSQL.

### Gems & Libraries

[Fullstaq Ruby](https://fullstaqruby.org/)
Ruby, optimized for production. A new Ruby distribution, with the Ruby you know and love, but better.
* Less memory — save 30-50%
* Faster
* More secure
* Fully open-source, based on MRI

[Snowpack](https://www.snowpack.dev/)
The O(1) build tool for modern web apps. Snowpack is your near-instant web build tool. Snowpack replaces your dev bundler with a dev environment that only builds files as they are requested by the browser. That means instant dev startup times, less unnecessary work and faster updates on every save.

[SWC](https://swc-project.github.io/)
Superfast javascript/typescript compiler.

[Render Async](https://pragmaticpineapple.com/render-async-2-1-6-released/)
Speed up rendering Rails pages with this gem.
render_async renders partials to your views asynchronously. This is done through adding JavaScript code that does AJAX request to your controller which then renders your partial into a Rails view.

### Podcasts

[The Bike Shed | 243: I'm Not a Couch Worker](https://www.bikeshed.fm/243)
Chris shares his recent explorations of railway oriented programming (hint: not what you think!) while doing his best to avoid words like "monad" and "functor" (he does not succeed in this effort). Steph updates on her quest for the ultimate personal note-taking app and some misadventures in DNS and networking, and they touch on their shared search for ergonomics in the home office world we all live in these days.

[Ruby Rogues | RR 460: How to Brainstorm Introverts with DeeDee Lavinder](https://devchat.tv/ruby-rogues/rr-460-how-to-brainstorm-with-introverts-deedee-lavinder/)
Dee Dee Lavinder talks with the Rogues about how we can create space for introverts to participate in discussions, thereby getting their input in situations where we otherwise would not. She provides some tips for extroverts to invite the input, Luke brings his patented sarcasm to the table, we discuss some pitfalls and Dee really brings some fantastic advice to the table for those trying to moderate discussions as well as for those of us having small discussions with our colleagues.

[Outsourcing Oasis | OO 006: Building Long Term Relationships and Positive Experiences for Clients with Don Gregori](https://devchat.tv/outsourcing-oasis/oo-006-building-long-term-relationships-and-positive-experiences-for-clients-with-don-gregori/)
Don Gregori is the COO at First Factory. The main presence in First Factory is in Costa Rica, but Don is based in the USA. Don started as a client at First Factory at Kaplan Test Prep. He's not a technical guy, but he understands user experience. Don focuses on creating a great experience for his customers. Don and David dive into what makes a great experience for clients and how to make sure that you're not only meeting their needs but building great relationships that last for a long time.