
Producer of RailsCasts - Ruby on Rails Screencasts
Southern Oregon
Joined March 2008
- Tweets14.3K
- Following478
- Followers38K
- Likes1.8K
Pinned Tweet
I finally set up a Bluesky account. You can find me at bsky.app/profile/rbates.dev
I'll continue to post on Twitter/X as well.
3
11
3,576
What an awesome little game Replicube is. It’s like Picross 3D meets shader programming. The puzzles are a fun challenge and the interface is charming. Thanks @walaber! walaber.com/replicube
1
9
3,085
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.
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.
Anyone else find GitHub code diffs near impossible to use in Safari lately? Slows to a crawl and/or doesn’t render.
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-…
Ruby’s metaprogramming is like a forbidden fruit. Always there tempting me, and I almost always regret using it.
After working with Roc and Gleam for a while, full type inference is amazing. Now I want a procedural language with full type inference.
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.
1
8
1,783
Anyone participating in Advent of Code this year? I’m doing it in Gleam: github.com/ryanb/advent-2024…
Git tip: What if you want to amend an earlier commit? I have this function in my dotfiles.
gfix() {
git commit --fixup $1 && git rebase -i --autosquash $1^
}
Stage changes and run `gfix <commit-sha>`. This will open interactive rebase in your editor so you can review.
Git tip: I like to keep a clean git history on my local branch. I often run `gcn!` to amend the staged changes to the previous commit. This is an alias I stole from oh-my-zsh.
alias gcn!='git commit --verbose --no-edit --amend'
24
2,459
Tip for mac users: Make a shell script of `defaults write` commands to set up macOS the way you like it. Then just run the script when setting up a new system. (see macos-defaults.com/ for possible commands)
TIL about macos-defaults.com/, a collection of commands to configure macOS through the command line.
Git tip: Enable 3-way diffs for merge conflicts. It shows the original content between the two changes so you have a better understanding of what has changed: git config --global merge.conflictstyle diff3
One benefit of giving each major feature its own namespace is you can easily run tests for that feature.
$ rspec spec/**/some_feature
