5 ms·
> if you follow (the Rails Guides) start to finish, you'll have a Rails app in production. And it isn't just hello world. Your app will have authentication, cac
by nomilk 2y ago
> if you follow (the Rails Guides) start to finish, you'll have a Rails app in production. And it isn't just hello world. Your app will have authentication, caching, rich text, continuous integration, and a database. That's a real application.
These features are great for established apps like GitHub and Airbnb, but if you're making a tiny startup, and want to test ideas quickly, I wouldn't spend time on CI, caching, Rails's authentication (use extremely feature rich Devise gem), Rails's 'turbo' features, and writing tests. These are all good things for medium or larger apps, or well-funded apps with a long run way, but are usually cost-benefit negative for small apps.
Turbo saves a fraction of a second on many page loads, but can add days of development time for those not fluent in javascript when it causes some core functionality to not work (e.g. devise's Log out!). Testing is very important on large apps but for quickly flicking a few ideas together and getting it in front of users; unless you're a banking or healthcare app, they can probably be postponed until you have traction.
Be mindful of your size and timelines and don't succumb to 'default bias' where you use things simply because they were there out of the box. Feel confident to say 'no, we don't need that (for now)'.
- yakshaving_jgt 2y agoI don’t agree with your position on tests. I find that writing tests even for small applications saves me time. And that’s even in a language with a sophisticated type system. I’m also not sure how much time you imagine one spends on setting up CI. In my case it’s just one file with about 20 lines in it, and I usually just copy and paste it from previous projects.
- nomilk 2y ago> I’m also not sure how much time you imagine one spends on setting up CI. In my case it’s just one file with about 20 lines in it, and I usually just copy and paste it from previous projects. The problem is when it breaks due to some versioning issue or some other easy-in-hindsight problem that saps 3-6 hours of time that could otherwise have been spent talking to users and discovering/building real features. I start to question "did I really need CI in the first place", I think the answer for non-critical apps (e.g. with a small number of users; not healthcare/banking/similar) is usually a hard "no". Other than autonomously running tests what value does CI offer?.. to me, nothing that I can think of. Not saying everyone should denounce it, just that it's very okay to say 'nope, don't need it (yet)'.
- yakshaving_jgt 2y agoHmm… Interesting. I use Nix so I don’t have versioning issues. Maybe I would have if I didn’t.
- boredtofears 2y ago3-6 hours is nothing in terms of the money you will spend on development for even a modestly funded startup. You definitely don't need to be a healthcare or banking app to quickly reap the benefits of a robust dev/deploy cycle.
- gavmor 2y agoSome people use tests as a design tool, and as a way to repeatedly execute code in a known state while developing it. In that regard, it improves upon print statements and, frankly, step-through debuggers. That it leaves behind a harness for triangulating bugs in pull requests is, of course, an invaluable side-effect.
- yakshaving_jgt 2y agoThat’s exactly my approach. I learned it from watching the Destroy All Software screencast series a decade ago. While the screencast demonstrates this with Ruby and RoR, it’s still applicable to all my work in Haskell and Yesod, despite some ideologues arguing that there is some dichotomy between types and tests.
- gavmor 2y agoWhen do you switch from Flask/Express/Sinatra/Gradio/Hono to Rails?
- boredtofears 2y agoCI should speed your development up, not slow it down. It's definitely something you should add earlier to the project than later.
- deleted 2y ago[deleted]
- speleding 2y agoAs long as the test suite is small enough to quickly run on the devs laptops the gains from CI are fairly minimal. With old school Capistrano-rails you can deploy in 20 seconds and roll back in 5 seconds, IMHO you don't need to pay the price of multi-minute deploys until much later in a project's lifecycle. I appreciate that they wanted to keep Kamal simple, but rebuilding a Docker image each time you deploy a tiny change feels like a waste. Capistrano just does a 'git pull / bundle / server restart' which seems much more elegant. Of course, things like upgrading to a new ruby version become much harder with Capistrano's model, you need a separate process for a small release and a big release. But those things happen twice a year, on small projects you can do those manually until you have time to set up Kamal / Terraform / Ansible.
- aantix 2y agoIf you're looking to build a SaaS app, start with a professionally curated Rails template. It will save you months of development time. Payments/Auth/etc are built in and there are solid patterns in place to extend from. Jumpstart Pro is great. https://jumpstartrails.com/ https://jumpstartrails.com/ So is Bullet Train. https://bullettrain.co/ https://bullettrain.co/
- bleuchase 2y agoDo projects like Jumpstart Pro or Bullet Train exist for other languages? Like Go?
- aantix 2y agoNot sure about the Go ecosystem.
- anarwhal 2y agoThese are great recommendations, thank you! Gives me a reason to spin up a new project I've been musing about for a while in order to play with this