News for hackers. Stuff that matters.
Re:How to Fix Slow Code in Ruby by imhoguy on Thursday May 14, 2020 @05:05PM (#23185435)
When my small SaaS customer calls and asks for an extra extension at current hard times, then all I need is to open up Rails production console (pry) and live type in an ad-hoc code with auto-completion aid:

    $ rails c
    Loading production environment (Rails 5.2.0)
    [1] pry(main)> s = Subscriber.find_by_email('[email protected]')
    => #<Subscriber:0x000055dbb64c3bb8
     id: 12913,
     email: "[email protected]",
     state: "active",
     expires_on: Fri, 15 May 2020 14:10:19 UTC +00:00,
     ...
    [2] pry(main)> s.expires_on += 2.months
    => Wed, 15 Jul 2020 14:10:19 UTC +00:00
    [3] pry(main)> s.save!
    => true
It is done now! Good luck! Bye! - end of call.

Cargo culting? From whom? I don't give a sh*.

Re:How to Fix Slow Code in Ruby by pdimitar on Thursday May 14, 2020 @05:08PM (#23185472)
I can do the same with Elixir's Phoenix, with exactly 3 lines in a production console like in your example.

What you describe is not exclusive to Rails.

Re:How to Fix Slow Code in Ruby by imhoguy on Thursday May 14, 2020 @05:20PM (#23185634)
Yeah, maybe I should rewrite one day, but customers wouldn't care much and I am content wit Ruby.
Re:How to Fix Slow Code in Ruby by pdimitar on Thursday May 14, 2020 @05:28PM (#23185748)
That's fair. Nobody is making you do it. Use what feels right to you.

I simply felt compelled to point out that Rails is not at all as unique as many of its long-time users believe.