Ryan Bates's Avatar

Ryan Bates

@rbates.dev

Producer of https://railscasts.com - Ruby on Rails Screencasts. Also https://rbates.dev

327
Followers
45
Following
22
Posts
17.11.2024
Joined
Posts Following

Latest posts by Ryan Bates @rbates.dev

Replicube — Walaber Entertainment

Replicube is an awesome little puzzle game. It’s like Picross 3D meets shader programming. The puzzles are a fun challenge and the interface is charming. Worth checking out! www.walaber.com/replicube

19.05.2025 14:38 👍 8 🔁 2 💬 0 📌 0

90% of the Ruby code I’ve written the past few years has been class methods without shared state. The code has clearer dependencies and is easier to read, test and maintain. OOP has its place, but I don’t think it fits the majority of web-app logic.

25.02.2025 21:17 👍 11 🔁 2 💬 5 📌 0

Whenever you’re tempted to reuse a method that *almost* does what you want: Stop, duplicate the method, make the modifications, and then refactor the actual duplication.

21.02.2025 22:17 👍 5 🔁 0 💬 0 📌 0
Post image

I Googled "capybara drag_to" and the results caught me by surprise.

20.02.2025 21:16 👍 8 🔁 1 💬 0 📌 0

It starts multi-select and selects the next occurrence of the current selection. Super handy for renaming variables or repeating keystrokes in multiple places. I've tried using Vim macros as a replacement but could never get the workflow as efficient.

03.02.2025 20:01 👍 1 🔁 0 💬 2 📌 0

I use Vim extension in VS Code and it is pushing me toward Neovim. The undo behavior in particular feels tacked-on. I just wish Neovim had command-D. Zed is promising but not quite there.

03.02.2025 18:18 👍 1 🔁 0 💬 1 📌 0

Anyone else find GitHub code diffs near impossible to use in Safari lately? Slows to a crawl and/or doesn’t render.

03.02.2025 18:12 👍 0 🔁 0 💬 2 📌 0

I do agree with this thought behind the post: external dependencies should be avoided when not absolutely necessary.

13.12.2024 06:17 👍 0 🔁 0 💬 0 📌 0

I personally would like to see the default Rails install slimmed down and more things moved into official gems that aren't included by default.

13.12.2024 06:15 👍 0 🔁 0 💬 0 📌 0

That said, this is coming from 37 Signals so it makes sense vanilla Rails is plenty for them. If it wasn’t then they would add it to Rails to fit their needs.

13.12.2024 06:15 👍 1 🔁 0 💬 0 📌 0
Preview
A vanilla Rails stack is plenty Minimal dependencies, maximum productivity. Staying vanilla pays long term dividends for your Rails apps.

We all have different apps with different requirements. If vanilla Rails is plenty then I think vanilla Rails does too much. dev.37signals.com/a-vanilla-ra...

13.12.2024 06:14 👍 2 🔁 0 💬 3 📌 0

What’s everyone using these days to cross-post between Bluesky/Mastodon/X?

13.12.2024 00:29 👍 3 🔁 0 💬 0 📌 0

Ruby’s metaprogramming is like a forbidden fruit. Always there tempting me, and I almost always regret using it.

12.12.2024 23:01 👍 2 🔁 0 💬 0 📌 0

In Ruby I always use keyword args if the method takes more than one arg. I find the code much easier to read than positional args. It's less necessary in functional land with a typed language, but it's still easier to read.

11.12.2024 01:25 👍 1 🔁 0 💬 1 📌 0

Gleam is close, but I find the double `name name: String` to be cumbersome. I understand the reason for it that you explained a while ago. I just run into it a lot in my code.

11.12.2024 01:19 👍 1 🔁 0 💬 1 📌 0

I like that they aren't just pattern matched records (JavaScript, Roc, Elixir). I imagine it has a performance impact and you need to make the record. Elixir also has keyword lists but I could never figure those out.

11.12.2024 01:17 👍 2 🔁 0 💬 1 📌 0

Honestly have no idea. Just a google image search. 😄

11.12.2024 01:08 👍 1 🔁 0 💬 1 📌 0

I feel like GitHub’s marketing is no longer interesting to me as a developer.

10.12.2024 20:24 👍 1 🔁 0 💬 0 📌 0

I love how Ruby handles keyword arguments. I miss them in just about every other language.

10.12.2024 18:49 👍 0 🔁 0 💬 1 📌 0

After working with Roc and Gleam for a while, full type inference is amazing. Now I want a procedural language with full type inference.

10.12.2024 18:35 👍 1 🔁 0 💬 0 📌 0

I wonder why more functional languages don't support local mutability within the scope of a function. It is convenient and still keeps the function pure.

10.12.2024 18:32 👍 0 🔁 0 💬 2 📌 0

Hello all! I'll try to post on here along with Twitter/X and ruby.social.

10.12.2024 17:49 👍 19 🔁 3 💬 1 📌 0