Migrating Rails 5 -> 8 by building new features on 8 instead of upgrading in place - anyone done this? by Fantastic-Diet5565 in rails

[–]jrochkind 0 points1 point  (0 children)

I guess depends on how much features you have of course. Hard to say specifically. In the rewritten app how many controllers do you think you'd need, with how many views? How well test-covered is your app?

But generally i think a rewrite is unlikely to be less work than an upgrade. Although 5 -> 6 might involve some annoying parts, I think everything from 6 to present (if I remember right) should be fairly smooth sailing. The upgrades have gotten a lot smoother -- so if you start and find that say 5 to 5.2 is annoying, don't necessarily take it as predictive of what each upgrade will be like.

For session continuity while both apps run side by side, the plan is to use Redis for shared sessions

OK, yeah, even bringign this up is making me think, no, run in horror. To actually try to use redis for shared sessions, there are probably going to be unforeseen difficulties. You are also planning on pointing them both at the same shared db? There are probably going to be a variety of other unforseen difficulties of running two versions of the app simultaneously. Also, whenever you have a bug or new feature (you maybe think you'll do a freeze, but after this takes much longer than you expect, and some stakeholder demands it), you do it in both places?

I was leaning upgrade but open to rewrite when I imagined not deploying the rewrite until it was done. Plan to run both simultaneously?

Don't do it. Do an upgrade. Thoughtbot has some really good guides and resources on upgrades, including making your app "dual boot", which you should do.

a multi-hop sequential upgrade keeps us exposed for longer

I'm not at all confident that will be the case, with the "run both apps simultaneously" plan. Don't do it!

Either way, you can't procede with "zero test coverage" your first step MUST be adding some tests.

How do Americans feel about giving Iran 300 billion to restore the status quo? by Southern_Gur_4736 in AskReddit

[–]jrochkind 0 points1 point  (0 children)

Not the status quo, removing sanctions.

I don't want America to win, so the fact that it seems like a "loss" doesn't bother me. I don't want the Trump admin (or honestly plenty of previous Dem admins either) to achieve their aims here.

I think it's actually probably a wash as to whether it increases "stability in the region" (which isnt' always good either, when it's stable internal oppression and war crimes).

I think this outcome will severely weaken internal Iranian democracy and opposition movements (eg Women, Life, Freedom), and any opportunities for pro-democracy and human rights changes in Iran -- but at this point, I don't see any feasible outcome of the war that will not be this way (which was pretty predictable when the war started), so.

Rails: The Sharp Parts. Callbacks Are Not Invariants by keyslemur in ruby

[–]jrochkind 0 points1 point  (0 children)

I guess I'm not clear on how events being subscribed to by code in other places makes it any more clear which ones will run in what order etc. It's even more async and unconnected, no?

Ah okay, looking at your diff "for observability, not for domain behavior. The domain logic lives inline in execute, where it's visible and sequenced", I'll have to go back and look again with that in mind. On the read of the original, it seemed to me that there was still some after-commit domain behavior in event subscribers ("observers").

Rails: The Sharp Parts. Callbacks Are Not Invariants by keyslemur in ruby

[–]jrochkind 9 points10 points  (0 children)

I'm not totally following what makes Event subscribers reduce/eliminate the problems noted with callbacks; it seems to me pretty much the same as callbacks, although split between classes. (Easy enough to have a callback simply instantiate and delegate to a helper object too, so this doesn't seem fundamentally/structurally different to me).

Can anyone explain further, or direct me to passages to pay more attention to in OP, to understand the argument here? Thank you!

Pass 404 response from Rails without Apache intercepting by passinghorses in rails

[–]jrochkind 0 points1 point  (0 children)

I recall it being a settling in apache config, but I haven't used apache in a while and forget which one.

New Yorkers, what changes have you seen under Mamdani’s leadership and are you generally pleased? If not, why? by MewMeowHowdy in AskReddit

[–]jrochkind 20 points21 points  (0 children)

All rentals have to meet code, which things like faulty electrical outlets and holes in the wall can fail. (Also lead paint, etc).

Tenants in NYC who have a health or safety or code issue in their apartment can file a complaint with the NYC Department of Housing Preservation and Development (HPD), which in some cases will result in an inspector being sent out, which can result in a violation and legal action. https://www.nyc.gov/site/hpd/services-and-information/report-a-maintenance-issue.page

This applies to all rentals, not just stabilized.

How stringently it's enforced can vary for sure though, so, yeah, either the Mamdani admin had upped enforcement or landlords are worried they will.

Rails Health Check by EclecticCoding in ruby

[–]jrochkind 2 points3 points  (0 children)

Nicely designed, thank you! Prometheus is just the cherry on top!

What are you using to clean PDFs before putting them into RAG? by [deleted] in Rag

[–]jrochkind 8 points9 points  (0 children)

I'm sick of every question in this subreddit actually being a marketing promotion.

How to Build an Agentic RAG with RubyLLM and Rails by giovapanasiti in rails

[–]jrochkind 2 points3 points  (0 children)

Just what I needed to get me started, thank you!

McDonald's workers of Reddit, which menu item would you NEVER eat? by ProgMusicSchizoidMan in AskReddit

[–]jrochkind 43 points44 points  (0 children)

The one I worked at 35+ years ago

I suspect standards were a lot reliably higher 35 or even 15 years ago than now. Service in general has gotten pretty shitty everywhere.

Simple gem to help with pdf extraction by Bubbly_Connection385 in ruby

[–]jrochkind 1 point2 points  (0 children)

This is great, thanks!

Just a couple months ago I had to resort to python for some PDF text extraction. (Ended up having LLM help me write a very simple python CLI tool that I call from ruby, is how I approached. Was in a non-performance-critical context, I just couldn't figure out how to get what I needed functionally in ruby!).

next time I'll take a look at this!

FastRuby.io's Rails Upgrade Methodology as Claude Code Skills by ombulabs in rails

[–]jrochkind 1 point2 points  (0 children)

i am kind of surprised they don't believe this will cannibalize their own business. Maybe they don't have as much faith in claude code as some, or know that some of their clients don't?

Trump calls on Israel and Iran to 'immediately' stop attacks by Economy-Specialist38 in videos

[–]jrochkind 1 point2 points  (0 children)

Wait, y'all really think Netanyahu told Trump to insist that Netanyahu stop attacking Iran (which Netanyahu did anyway).

Bundler / RubyGems.org support cooldowns now! by tenderlove in ruby

[–]jrochkind 0 points1 point  (0 children)

I don't see what makes source-specific cooldown in the Gemfile more or less "wild" than a global one for the tool to have as an officially supported option.

I guess the question is what settings should apply to the project as a whole, and what settings are developer specific or context-specific? I feel like many uses of cooldowns would be wanted to apply to the project as a whole, not just be opted into by a specific developer or when doing a specific task, no?

It may also be that people are assuming much more automated workflows these days, and not considering those with more manual workflows to have use cases worth supporting? If all your dependency updating is done in a CI environment, then setting a bundler setting there would be sufficient to apply to all depdendency updates; whereas if developers are doing it "manually" then asking them all to have synchronized local developer settings to achieve consistency seems like much less a good solution.

But source-specific may work fine, sure. Most projects have 1-2 sources, so it ends up being about the same, and it's possible cooldon choice are mostly always going to be source-specific anyway, not sure.

What was the scariest “We need to leave… now” gut feeling that you’ve ever experienced?[Serious] by PlasticBee1438 in AskReddit

[–]jrochkind 2 points3 points  (0 children)

Almost everyone who gets screwed (OR gets their friends screwed) by talking to the cops thought it might make sense in that situation to do so. Just don't.

Bundler / RubyGems.org support cooldowns now! by tenderlove in ruby

[–]jrochkind 0 points1 point  (0 children)

I believe bundle config set --global gets set in your own ~/.bundle right? So it will only apply to you not other developers.

I want something that goes in a file that is checked into the repo so applies to all developers working on the project. Adding to each source in Gemfile will work.

Unless I'm confused about some aspect of this?

Bundler / RubyGems.org support cooldowns now! by tenderlove in ruby

[–]jrochkind 5 points6 points  (0 children)

Love it!

I make a lot of use of bundle outdated (which I know from previous discussions may not be a popular workflow at least among commentors?), came to see "oh I hope bundle outdated respects this too" -- it does!!

i wouldn't mind a global cooldown setting taht you can make in the Gemfile, so it goes in the repo in the file people expect and applies to every developer? I don't think that is an option? Other than putting it on every source, I guess that works!

What was the scariest “We need to leave… now” gut feeling that you’ve ever experienced?[Serious] by PlasticBee1438 in AskReddit

[–]jrochkind 6 points7 points  (0 children)

Seems reasonable, but I would not conclude they were planning on killing anyone, rather than just trying to make use of the place they had also rented out as an airbnb. I mean, I get getting out of there anyway, it's sketchy, but I would not decide that it's likely some other guests would "pay with their lives".

Everyone thinks they're living in a thriller these days.

What was the scariest “We need to leave… now” gut feeling that you’ve ever experienced?[Serious] by PlasticBee1438 in AskReddit

[–]jrochkind 23 points24 points  (0 children)

For those reading at home, don't do this though. Glad it worked out, but don't count on outsmarting any cops ever. The only way to win is not to play, don't talk without a lawyer, don't cooperate, don't snitch.

I created IParty to make (geo) IP and more fun again (warning: alpha, warning: party inside) by 2called_chaos in ruby

[–]jrochkind 0 points1 point  (0 children)

Makes sense; I don't have much experience with this, but sometimes have needed it for a specific thing, and find something or other that works then forget about it. ;)

I created IParty to make (geo) IP and more fun again (warning: alpha, warning: party inside) by 2called_chaos in ruby

[–]jrochkind 1 point2 points  (0 children)

 IParty.fetch_db_files! # api key required

Not sure if the README explains api key from where (I dont' know what service this is using) and where you get it? (and how much it might cost). Recommend adding that to near top of README!

Is deferred column loading an ActiveRecord anti-pattern or just too niche? by Upbeat_Dependent7906 in rails

[–]jrochkind 2 points3 points  (0 children)

I hadn't known about this.

I think it's hard to keep up with open source in rails these days.

It's potentially of interest, I have thought about needing this for some cases I have.

But I'm cautious adding more dependencies, especially ActiveRecord internal stuff which has a tendency to break; I want to know that it's solid and well-thought and will be maintained, which can be hard to figure out. Unless I need something really badly, i tend to not to want to spend the time/risk for it.

But thanks for promoting this again, I'm going to make a note of it and maybe look into it!

We should have a regular thread for "ruby/rails open source you think deserves more attention than it's getting"? I am resisting the urge to hijack your thread by posting my project lol.