Hacky Friday Stuff #05.06.2020
Tags: ruby, rails, javascript, hackyfriday
Published: 2020-06-05 15:03:02

Photo by [Martin Shreder](https://unsplash.com/@martinshreder) on [Unsplash](https://unsplash.com/@martinshreder).

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

[The 2020 Developer Survey results](https://stackoverflow.blog/2020/05/27/2020-stack-overflow-developer-survey-results/)
65,000 developers shared their thoughts on the state of software today in the 10th annual developer survey conducted by Stack Overflow.

[GitHub Classroom](https://classroom.github.com/)
Managing and organizing your class is easy with GitHub Classroom. Track and manage assignments in your dashboard, grade work automatically, and help students when they get stuck— all while using GitHub, the industry-standard tool developers use.

[Marketing for Engineers](https://github.com/LisaDziuba/Marketing-for-Engineers)
A curated collection of marketing articles & tools to grow your product.

### Tutorials & articles

[List of top Open Source alternatives to popular products](https://dev.to/fayazara/top-open-source-alternatives-to-popular-products-stop-paying-16jn)
Great alternatives to some very popular products.

[Two Commonly Used Rails Upgrade Strategies](https://www.fastruby.io/blog/rails/upgrades/rails-upgrade-strategies.html)
Rails upgrades can be done in many different ways. Depending on the application that you want to upgrade, some ways make more sense than others. There are factors that determine which Rails upgrade strategy is the best for your case, like how big your application is, or how frequently changes are pushed to the master branch. This article will be covering two common Rails Upgrade strategies so you can decide which one is the best for your application.

[Writing better Stimulus controllers](https://boringrails.com/articles/better-stimulus-controllers/)
In early 2018, Basecamp released StimulusJS into the world. Stimulus closed the loop on the “Basecamp-style” of building Rails applications. This article is explicitly not an introduction to Stimulus. It explores common failure paths when people are getting started with Stimulus and how to fix that by writing better controllers.

[Rails 6.1 adds support for signed ids to Active Record](https://blog.saeloun.com/2020/05/20/rails-6-1-adds-support-for-signed-ids-to-active-record.html)
There are many ways of generating a signed link for implementing things like invitation email, unsubscribe link or password reset feature. You could add a token field on the model, use JWT tokens. But in the upcoming Rails versions, the functionality to generate tamper-proof and verifiable ids will be built into rails.

[Open source status update, May 2020](https://timriley.info/writing/2020/06/01/open-source-status-update-may-2020/)
May was a breakthrough month in terms of the integration of the standalone components into Hanami 2 for Tim Riley. Let’s dig right in.

### Tools & libraries

[Solid](https://github.com/ryansolid/solid)
Solid is a declarative Javascript library for creating user interfaces. It does not use a Virtual DOM. Instead it opts to compile its templates down to real DOM nodes and wrap updates in fine grained reactions. This way when your state updates only the code that depends on it runs. 

[htmx](https://htmx.org/)
htmx allows you to access AJAX, WebSockets and Server Sent Events directly in HTML, using attributes, so you can build modern user interfaces with the simplicity and power of hypertext.
htmx is small (~7k min.gz'd), dependency-free, extendable & IE11 compatible.

[BackstopJS](https://garris.github.io/BackstopJS/)
Visual regression testing for web apps.

[Geared Pagination](https://github.com/basecamp/geared_pagination)
Most pagination schemes use a fixed page size. Page 1 returns as many elements as page 2. But that's frequently not the most sensible way to page through a large recordset when you care about serving the initial request as quickly as possible. This is particularly the case when using the pagination scheme in combination with an infinite scrolling UI.
Geared Pagination allows you to define different ratios. By default, we will return 15 elements on page 1, 30 on page 2, 50 on page 3, and 100 from page 4 and forward. This has proven to be a very sensible set of ratios for much of the Basecamp UIs.

[triki](https://github.com/josacar/triki)
You want to develop against real production data, but you don't want to violate your users' privacy. Enter Triki: standalone Crystal code for the selective rewriting of SQL dumps in order to protect user privacy. It supports MySQL, Postgres, and SQL Server.

[pghero](https://github.com/ankane/pghero)
A performance dashboard for Postgres. [See it in action.](https://pghero.dokkuapp.com/)

[PgTyped](https://github.com/adelsz/pgtyped)
PgTyped makes it possible to use raw SQL in TypeScript with guaranteed type-safety.

### Videos

[Hanami :: API by Luca Guidi](https://www.youtube.com/watch?v=tbyT-zhYMd4&feature=youtu.be)
Hanami is a full-stack web framework for Ruby. With Luca we will learn what will be the major changes for 2.0 release.
Luca is the creator of Hanami and author of redis-store. Also a dry_rb core team member.

### Podcasts

[Remote Ruby | 80. RailsBytes.com, AppLocale and more with Andrew Fomera](https://remoteruby.transistor.fm/80)
Today, our special guest is Andrew Fomera, from Podia, co-worker of Jason, and friend of Jason, Chris, and Andrew Mason. He’s got a course on “Learn Rails by Building Instagram,” he’s launched AppLocale, and launched a tool called RailsBytes with Chris. Chris and Andrew Fomera talk about what RailsBytes is and how they got into building it. Also, Andrew Fomera tells us more about AppLocale, how he got started on it, what it does, and why it will change the world. What is “Thor” and why doesn’t Andrew like it? And why has Jason hit some major “Stonks” as a developer?