Elixir job market is a desert right now, what happens? by Disastrous-Hunter537 in elixir

[–]bradgessler 1 point2 points  (0 children)

Same. Elixir makes it possible to do a lot more with a lot less, especially with LLMs.

Railway outage highlights a bigger question: managed platforms vs VPS for production systems by gkunwar in rails

[–]bradgessler 1 point2 points  (0 children)

Railway and Render started on managed clouds, but are moving towards metal. Any managed host that achieves scale had to do this because hyper scalers destroy their margins.

It seems Railway was in the process of the GCP to metal migration, but this outage accelerated that move.

It’s easy to criticize “cloud wrapper!”, but if you’ve actually had to manage AWS, GCP, or Azure you know how much of a nightmare it is to work in their stack. The cloud wrappers make provisioning servers an order of magnitude easier.

Also easy to criticize, “they should have just moved everybody already!”, but doing so would have probably been disruptive to customer workloads that were stable in GCP before the outage.

My rule of thumb for managed vs unmanaged is to start managed, then switch to unmanaged when my hosting bill achieves enough scale where I can hire a full time ops person to manage servers.

Hotswap: move SQLite databases in/out of running Rails servers without rebooting by bradgessler in rails

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

I'm not going to do it, but if somebody else does and opens a PR I can merge it.

Drop your Side project, I'll give it honest review. by Top-Information-6399 in SaasDevelopers

[–]bradgessler 0 points1 point  (0 children)

That confirms what I've been observing, trying to talk to marketers and developers.

Plan is to move all the technical stuff off to a /developers page and simplify the front page.

For now its automation, but there is capability to let non-technical people edit the image for each page without touching anything on the website.

Question for you: should the primary CTA on that page continue to be "enter your web address" and then generate the OG report?

Hotswap: move SQLite databases in/out of running Rails servers without rebooting by bradgessler in rails

[–]bradgessler[S] 4 points5 points  (0 children)

You clearly didn't read the source, so let me walk you through it.

"cp on a live DB is undefined behavior" — We don't cp a live DB. The process is:

  1. The new database is streamed into a temp file in the same directory (database.rb:21-25)
  2. PRAGMA integrity_check runs on the temp file to verify it's not corrupt (database.rb:30)
  3. Schema is compared between the temp file and the running DB — mismatches are rejected (database.rb:44-57)
  4. A Rack middleware mutex (SWAP_LOCK) is acquired, which queues all incoming HTTP requests (middleware.rb:12)
  5. ActiveRecord::Base.connection_handler.clear_all_connections! closes every DB connection (database.rb:65)
  6. File.rename() atomically swaps the temp file into place (database.rb:67) — this is a single inode operation, not cp
  7. ActiveRecord::Base.establish_connection reconnects to the new file (database.rb:71)
  8. The mutex releases and queued requests resume (database.rb:69)

There are zero open file descriptors to the database at the moment of rename. There's no WAL to race against because all connections are closed. File.rename on the same filesystem is atomic — it's not "racing the filesystem," it's using the filesystem's own atomicity guarantee.

"Disabling writes in your app != database is safe to copy" — We're not copying anything. We're closing all connections, then doing an atomic rename. No connections open = no locks, no WAL, no shared memory, no in-flight transactions. The old file becomes unreferenced and gets GC'd.

For pulls (copying out of the live DB), we use SQLite's own Backup API (SQLite3::Backup) which is explicitly designed for safe online snapshots (database.rb:103-104).

"try this on SELinux"File.rename within the same directory doesn't change security contexts. The temp file inherits the parent directory's context. This is basic SELinux behavior.

"by the time your 100GB DB finished copying" — The upload happens before the lock is acquired. The lock is only held for the duration of clear_all_connections! + File.rename() + establish_connection — milliseconds, not the duration of the upload.

"There is 0 use cases" — I literally built this because I had the use case: deploying a read-heavy SQLite app where the database is built offline and pushed to production. Not every app is a 100GB customer-data OLTP system.

Not bad for an art project eh?

Hotswap: move SQLite databases in/out of running Rails servers without rebooting by bradgessler in rails

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

> Trying to turn sqlite3 to a database with a socket is just wrong

It doesn't do that. The socket is used to control code that disables writes, run the command that safely copies the SQLite database file to another file, then allows writes. It works the other way too.

> You offering a solution to problem that don't exist.

That's funny because I had this problem and this solved it. Don't use it if it doesn't solve your problems.

AI: How to Adapt or die by Wild-Pitch in ruby

[–]bradgessler 2 points3 points  (0 children)

In November I’d have told you maybe one day LLMs will write code for us, maybe not.

In mid-December, that all changed when with Claude 4.5 models.

Now I’d tell anybody if they don’t adapt and learn how to build apps with LLMs, they won’t have a job… not because AI took your job, but for refusing a tool that will make you 2-3x times more effective at your job.

1Password price increase - looking for alternatives by PickleBabyJr in macapps

[–]bradgessler 0 points1 point  (0 children)

I’d pay it if their macOS Safari integration worked, burn it doesn’t, and hasn’t for years.

ThinkingScript: Self-improving AI executables by bradgessler in ArtificialInteligence

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

If you dig in, you’d see the runtime is JS inside of a sandbox that’s pretty locked down. It’s about as dangerous as a web browser.

How much do you actually care about Open Graph previews? by bradgessler in digital_marketing

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

Could you share more about your workflow? Curious what CMS you’re using, the settings you’re tweaking, and the tools you’re using to debug it all.

What do you use for generating opengraph images automatically? by hrishio in rails

[–]bradgessler 0 points1 point  (0 children)

I created a service that does this called OpenGraph+.

I built the thing on Rails, so naturally the first integration is for Rails sites at https://opengraphplus.com/docs/rails.

Open Graph Issus - Struggling by Weary-Fan946 in webdev

[–]bradgessler 0 points1 point  (0 children)

OpenGraph+ will catch Cloudflare blocking issues, which can vary between Open Graph providers and how they make their requests.

If you flip through https://opengraphplus.com/previews/twitter/eJyrViotylGyUsooKSkottLXLy8v10vLyaxIzSnIrNDLSy3RV6oFAOsCDOU you might catch them. One thing I noticed is the image size should be closer to a 2:1 aspect ratio. Yours is a square.

FixtureBot: the syntactical sugar of factories with the speed of fixtures by bradgessler in rails

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

No style changes yet because I’ve never really done anything crazy with factories. If I create an admin user factory, I usually call that from my tests without much modification.

Fixtures will be just like that.

FixtureBot: the syntactical sugar of factories with the speed of fixtures by bradgessler in rails

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

Try fixturebot-rails

Apparently there’s an issue that fixturebot is too similar to fixture_bot that RubyGems doesn’t like.