Engineer's Notebook #021 Rails engines share the host app's cache store by default. Always namespace your cache keys to prevent nasty cross-engine data collisions.
Engineer's Notebook #019 Slow Rails boot? bin/rails db:schema:cache:dump in CI, commit the file. Seconds off every cold start in production. Almost zero downside.
Engineer's Notebook #018 queue_as :billing in your engine, per-queue worker config in queue.yml. Scale engines independently with Solid Queue. No Redis needed.
Engineer's Notebook #017 Engine seeds live in db/seeds.rb inside the engine. Load them with Billing::Engine.load_seed. db:seed in the host won't touch them.
Engineer's Notebook #016 Engine views are overridable. Drop app/views/billing/invoices/_summary.html.erb in the host app and Rails picks yours over the engine's.
Engineer's Notebook #015 Adding app/services or app/queries to your engine? Zeitwerk picks it up automatically. Don't add it to autoload_paths by hand. The conventions do the work.
Engineer's Notebook #014 Write a RuboCop cop that flags Notifications:: inside the Billing engine. Or use Packwerk. Automate the boundary check, don't trust human eyes.
Engineer's Notebook #013 Don't inherit your engine controllers from ::ApplicationController. Define Billing::ApplicationController and let the host's parent be configurable.
Engineer's Notebook #012 Engine migrations share the host's schema_migrations table. Never run a blind db:rollback; always use targeted db:migrate:down VERSION=x.
Engineer's Notebook #011 rename_table takes an ACCESS EXCLUSIVE lock in Postgres. On large Ruby on Rails tables, that means downtime; create, backfill, and swap instead.
Engineer's Notebook #010 Having trouble extracting a service? Try "Tactical Forking". Clone the entire monolith and just delete the code you don't need!
Engineer's Notebook #009 Avoid "Big Bang" migrations. Use the Strangler Fig pattern to extract features incrementally into engines over multiple small PRs..
Engineer's Notebook #008 Boy Scout rule: leave code cleaner than you found it. Per PR, not per quarter. One renamed variable, one extracted method. Compound interest on quality.
@TheSinaesthetic@unclebobmartin Are the estimates on AI agent or on the human? They are two different things - I wouldn’t use the same metrics or the same time frames, what would take months for teams to do now can take weeks if not days.
@cleitonpqz@unclebobmartin It may not be a concern for either of you, but muscle memory is a thing, what is your view on the job interviews that require (and probably will continue for a long while) the candidates to strictly not use AI to do the coding exercises at interview stage, even when they use AI?
Engineer's Notebook #007 Adding engineers to a late engine extraction makes it later (Brooks, 1975). Onboarding cost is real. Finish the extraction with the team you have.
Engineer's Notebook #006 Knuth's premature optimisation quote ends "in 97% of cases". The other 3% is your hot path. Profile first, optimise second, refactor third.
Engineer's Notebook #005 That weird method nobody understands? Chesterton's Fence. Don't remove it until you know why it was added. Run git blame before git rm.
@HowToAI_ I have got to that point where it couldn’t continue doing the work - the work was to engineer a custom operating system for the iPod Classic writing in Zig. It gave up and started going around in loops. Although I do have to say it did try its best to reverse engineer.