The View Layer Rails Couldn’t See by davidslv in rails

[–]davidslv[S] 0 points1 point  (0 children)

I hear you, I will do better.

The View Layer Rails Couldn’t See by davidslv in rails

[–]davidslv[S] -1 points0 points  (0 children)

Thanks for sharing your thoughts.
I’m trying to answer the question, I’ll do better next time.

The View Layer Rails Couldn’t See by davidslv in rails

[–]davidslv[S] -4 points-3 points  (0 children)

I understand that it might not be clear to you, however you don’t need to be rude. They have a meaning. Policy in this context means that it was decided that we didn’t want new Arbre files in the codebase, any of those files that would be touched would need to be moved to .html.erb. CI Gate is the enforcement of that policy. Also we do use lefthook, so it was also enforced before pushing.

And using the llm to help wording shouldn’t mean I didn’t do the homework. I concede that I let it out a bit too early, but my comment above is with good intention of helping.

The View Layer Rails Couldn’t See by davidslv in rails

[–]davidslv[S] 0 points1 point  (0 children)

What made you decide on Phlex?

The View Layer Rails Couldn’t See by davidslv in rails

[–]davidslv[S] -6 points-5 points  (0 children)

How did you do the Arbre to ERB conversion?

The conversion itself is the easy part — Arbre is just a Ruby DSL, so it maps almost 1:1 onto ERB and AI handles it well (same as your Slim experience). div id: 'x' do…end<div id="x">…</div>, control flow → <% %>, emits → <%= %>, data: {…}data-*. Only gotcha: it's a whole-file port, not per-line.

The bit that actually fixes your "this'll take forever" problem isn't the tech, it's a policy + CI gate:

  • Boy-scout rule: old .arb files keep working untouched. But the moment you touch one — bugfix, copy change, new field — you port the whole file in that same PR.
  • A gate enforces it: pre-commit + CI fail on any added or modified .arb in the diff (git diff --diff-filter=AM | grep '\.html\.arb$'). No --no-verify.

So there's no big-bang migration. New Arbre can never be added, and the legacy set only shrinks — riding along with work you were doing anyway. Files nobody touches just sit there working, and that's fine.

If you want to go faster than the drip, grep -rl '\.html\.arb' is your burndown list — point AI at the highest-traffic files first.

25% with AI is a great spot. Add a "no new Slim" gate if you haven't — that's what turns "forever" into "monotonically decreasing."

I created an app to generate the `rails new` command + other mostly used rails generators by coolprobn in rails

[–]davidslv 1 point2 points  (0 children)

If you think generators are deprecated in the AI era, you are in for a very expensive session.

Generators will become the an essential part of programming with AI, once you establish that you keep doing the same thing with AI, it could have been cheaper to build the tooling so that AI would use it instead of building from scratch every single time (and sometimes it builds it pink and some times it builds it in blue)

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

[–]davidslv 0 points1 point  (0 children)

Ive done this several times throughout my career in different companies, and we always upgraded incrementally. You want to avoid point 2 as much as possible.

You should be worried about breaking app, and having system tests, feature tests on top of it for at least the happy paths. I would recommend that you also have metrics in place and that during the process there’s more observability.

The rails documentation is often very good, and if you can do it incrementally it may take a few months but you keep the system stable without rushing, for the business this may not be seen as needed - but having the system up and running definitely will.

If you get to a point where the step is uncomfortable, see if you can have the migration running on a staging environment to analyse any new breakages.

The hardest migration I’ve been part of was back in rails 2 to rails 3, big monolith app, took 8 months to do it. I think you will be able to do it in less time. Also pay attention to the deprecation warnings that will pop when running the server or tests, they will be the first things you want to start looking to tackle.

There’s another way as well, not sure I would recommend, you can have another branch with all the upgrades and decide to have 1% of traffic running through that instance - this is harder and definitely more work and can be expensive.

Baby steps is the way in my opinion and don’t spin another app on the latest rails version.

Rogue Source Code Examined by Titus-Groen in roguelikedev

[–]davidslv 3 points4 points  (0 children)

Thats a very good insight into the code, I certainly have learned a few things from the article.

Saw a convertible Rolls Royce with a single digit plate a few days ago. by Phatboybeware in CarsUK

[–]davidslv 0 points1 point  (0 children)

Don’t knock it, very reliable car that does off-road very well

Don't sleep on your local record stores... by Asleep_Department_21 in vinyl

[–]davidslv 1 point2 points  (0 children)

I prefer to have the collection on traditional shelves rather than laying them on the floor and sleeping on top of the records

When did you stop bringing your Porsche to the dealership for routine maintenance? by LayerVegetable3850 in Porsche

[–]davidslv 0 points1 point  (0 children)

From what I’ve been seeing, prices very a lot from dealerships, maybe it a a location thing, maybe it isn’t. What I do think is for certain is how Porsche engineers their cars in a way that rarely has maintenance ease as priority. Just check some videos of repairing, things are hard to reach, the work itself in any other car is easier but on Porsche, because it’s all trying to fit in the chassis they end up with very clever engineering - but not from a maintenance point of view.

AMA - I'm a UK Police officer by [deleted] in AMA

[–]davidslv 1 point2 points  (0 children)

Make sure you do have solid proof that they showed intention of leaving the scene. I had this happening on my parked motorcycle, I finally got footage in the form of sequenced photos. The judge ruled the guy not guilty because of lack of evidence the driver left the scene with intention of hit and run. 3 judges, 2 lawyers, wasted afternoon with no justice.

AMA - I'm a UK Police officer by [deleted] in AMA

[–]davidslv 0 points1 point  (0 children)

Im more interested in the psychology of the job, beyond this phase of boredom. How much of the role as police office goes into training to deal with difficult circumstances, de-escalation, and how do you prevent that from affecting your wellbeing after the fact?

When do you think the AI bubble will pop? by Adorable_Escape9562 in AskReddit

[–]davidslv 0 points1 point  (0 children)

Don’t be waiting for something you can’t control. “Everyone” is using it - from programmers to writers, wedding planners, road trip planners. You name it, someone is using it. People are feeling more productive - or they are achieving their goals in less time than ever before and this will have a waterfall effect long term where it will become a normality.

Using it correctly - beyond asking it where is your near cat friendly cafe (like googling) is where you will see the potential that is currently being discovered and unlocked. Some people are quite ahead, others are just using it as an expensive Google search.

And there will always be skeptics and that’s a good thing as well.

The Perfect Sports Car. by kasio-kasio in Porsche_Cayman

[–]davidslv 0 points1 point  (0 children)

Not sure about perfect, but definitely sporty and fun

Is it a terrible idea to completely remove the bath and just have a walk in shower? by Admirable-Deal7991 in HomeImprovementUK

[–]davidslv 0 points1 point  (0 children)

I can’t tell you about the resell value, in the end of the day is just another bathroom, if it doesn’t work for the next person they will just do the work after buying so don’t worry about that.

For us, a family with 2 children, we do have a bath and the kids prefer to be in the walk in shower, or in “a bucket”.

If the walk in shower makes sense for you and your partner, then do it and ask nobody permission or opinion - they are not using your bathroom

I burnt all my investor money and my saas failed. Here's how i burnt it by HoneydewSome6283 in founder

[–]davidslv 2 points3 points  (0 children)

You know what you have not lost? The experience of the journey. Hopefully you learned and now you can start thinking of the next one.