15 ms·
The productivity of Rails for B2B 'CRUD' software is unmatched. Surprised to not see more newer startups make use of it!
by ukprogrammer 1y ago
The productivity of Rails for B2B 'CRUD' software is unmatched. Surprised to not see more newer startups make use of it!
- nurettin 1y agoThe entire 2012 scene used Rails. Then they realized it was hard to scale and rewrote everything in Go.
- rco8786 1y ago> Then they realized it was hard to scale A rumor perpetuated by exactly one company - Twitter. I know because I was there when it happened and helped dismantle the original monolith. Rails scales just fine for 99%+ of business cases. If you're doing a sustained 5k writes per second with bursts up to 100k...sure maybe you need something more specialized.
- jerf 1y agoRails has been around for time to change the calculus on it too. It came out in 2004. The smallest instances you can get today on AWS would have counted as fairly powerful servers back then (with insanely fast CPUs), and by the second or third smallest you're beyond anything available at the time, and there's still room to run after that. Even the slowest web frameworks running on modern hardware take some quite substantial load before they're a problem. It's good when choosing a framework to consider if you're doing stuff where that might be a problem, but it's also good not to overestimate the performance needs for your site.
- vidarh 1y agoTwitter also would've scaled a lot further on Rails just by dismantling the monolith. I don'tike Rails (though I love Ruby), but the way Rails was scapegoated for an original architecture that was not suited for scale irrespective of framework or language was annoying.
- rco8786 1y agoYep totally agree. And also realistically once we hit that kind of scale it was perfectly reasonably to start looking at other options as well. It's been a while but I think we were at like 250mm MAUs when we finally decided to break up the rails monolith (and I think it was still on Rails 3 at the time, but don't quote me on that). The number of companies that ever hit that kind of scale approaches zero, and even less in the B2B space.
- kloop 1y agoThat makes perfect sense for people that need to scale. But doesn't explain why newer start ups aren't using it. Doing things that don't scale is a proven strategy at the beginning, pg even has a post about it https://www.paulgraham.com/ds.html https://www.paulgraham.com/ds.html
- dismalaf 1y ago> But doesn't explain why newer start ups aren't using it. Plenty of newer startups use Rails. At least several pretty much every YC batch. You just need to pay attention.
- wiseowise 1y agoNo static typing would be a good dealbreaker for us.
- vinceguidry 1y agoRuby has static type system built into the language. https://github.com/ruby/rbs https://github.com/ruby/rbs There are others you can use if you like.
- wiseowise 1y agoUnusable mess. Ruby should take lessons from Python and TS on how to make proper gradual typing.
- Lio 1y agoI think a much better way forward is proposed by Jake Zimmerman[1] of the Sorbet team. That is to allow the runtime to parse RBS inline format comments. That retains Sorbet’s fast static checker and its runtime checks which Typescript compiled to JS lacks. 1. https://blog.jez.io/history-of-sorbet-syntax/ https://blog.jez.io/history-of-sorbet-syntax/
- frou_dh 1y agoIt should stay true to itself and not do it at all. Sigh - all languages needn't converge into Grey Goo.
- byroot 1y agoNah. If anything it's NodeJS that ate Rails' lunch. Around 2013/2014 it took over as the defacto default stack for startup.
- aqme28 1y agoIt scales just fine. AirBnB, Github, and Shopify use it.
- nopcode 1y agoIt does now, but it took a few years for rails to do what nodejs did when it came out (the live chat demo app).
- mrinterweb 1y agoThe rails doesn't scale trope is pretty old at this point and has largely been discredited. Don't believe me, take a look at Shopify or Github.
- kybishop 1y agoAfter programming with elixir and phoenix for a few years (with many prior years of rails experience) I have a hard time seeing why one would choose rails. Elixir is more performant, has compiler safety guarantees that are only getting better as types are introduced, is actually designed from the ground up for web dev (being based on the Erlang VM), and... it's just way more fun (subjective I know). Elixir is what I always wished Ruby was, and I couldn't be more excited about the coming type inference. Programming with Elixir makes me feel like Ruby is a previous generation language, much like Ruby made me feel that way about Cobol or Fortran, it really is that stark.
- Shank 1y ago> I have a hard time seeing why one would choose rails I like Ruby, and I feel it has significantly prettier syntax, to me, than Elixir. So that’s a big reason why I also like rails.
- throwawaymaths 1y agoIt's a matter of taste, but i found Ruby syntax to be annoyingly inconsistent, and do |..| ... end being something that isn't quite a lambda a huge source of confusion. also activerecord doing "trust me bro" things behind the scenes (like pluralization) drove me up the wall. to be fair ecto does a small bit of this too, but at least it doesn't change spellings (so you can global search an identifier).
- sanswork 1y agoI switched fully to elixir close to a decade ago now and library availability is still lagging. For pretty much any company I can be pretty sure there will be JS/Ruby/Python/C#/Java integrations/libraries and occasionally you'll find one for elixir maintained by someone that stopped responding to github issues 3 years ago. It's definitely better but I can definitely see why you'd still choose rails these days.
- kybishop 1y agoI agree with this sentiment, though in practice it doesn't seem to be much of an issue the vast majority of the time. Sometimes you do need that niche library though, and end up forking and updating for your needs. Given how rarely this comes up it feels like a tolerable problem that will only diminish as Elixir adoption continues to increase; I am aware of many rail shops that are slowly and quietly switching everything to Elixir, and it feels like that snowball continues to pick up pace as Elixir improves and those libraries are created.
- neya 1y agoI was a Rails consultant for about 7 years. Then, I switched to Phoenix - really out of just curiosity. Since then, I've never looked back. If you never believed in "Simple is better" philosophy, you will after using Phoenix. The development time is shorter, the bugs are far less since you catch them at compile time and the development experience is unmatched. Oh, and did I mention performance? You can get insane performance just out of the box.
- nopcode 1y agoI keep reading about a shortage of phoenix jobs. Any advice?
- monooso 1y agoI wouldn't describe LiveView as simple, necessarily. It makes for a great demo, but in my experience it complicates simple things in lots of subtle—and occasionally pernicious—ways. Whilst you can use Phoenix without LiveView, this is becoming increasingly difficult as the Phoenix developers have clearly decided that LiveView is The Way.
- maqnius 1y ago+1 from me. I already spend more time learning phoenix in my free time than I'd like to admit and I'm stil waiting for the moment it makes 'click'. It's just so hard sometimes to wrap your head around the abstractions, even though they are shallow + things are changing fast. I feel like my django-ish mental modal of web applications is also getting in the way a lot. It would probably help, if I could spend more time with less interruptions on it. But I have to say that I expected to get into it a lot quicker since it's praised so much for it's dev experience.
- arrowsmith 1y agoShameless self-plug: if you’re struggling to learn Phoenix maybe I can help? https://learnphoenixliveview.com https://learnphoenixliveview.com
- 1y ago
- camcil 1y agoWhat caused the drop in popularity in RoR? It seemed like ~10-12 years ago RoR was the de-facto startup standard. On any given day there were multiple items on the HN front page having something to do with RoR.
- deleted 1y ago[deleted]
- AstroBen 1y agothe allure of the new and shiny
- vinceguidry 1y agoNodeJS and the siren's song of using the same language on the server as the client. Despite the popularity, node never caught up with rails in terms of features and productivity. I was part of a replatforming from rails to node some 10 years ago. So many things we had to just rewrite because there was no option at the time in node. The team lead that made the decision left half-way through the project. Second worst thing to happen to me in my career, after covid of course.
- Spivak 1y agoWell and that JS is really fast thanks to V8 and TS has leapfrogged Ruby in terms of developer tooling. Personally I think Ruby is a nicer language and JS has a lot of odd quirks but it became Java. A good natural choice that can be used for any project.
- vinceguidry 1y ago> leapfrogged Ruby in terms of developer tooling The only thing I would ever want from js is destructuring assignment. There's rightward assignment in ruby now but it's pretty clunky. > became Java Best laugh I've had all week.
- const_cast 1y agoJava is both significantly faster than JS and significantly less buggy/footgunny. JS is pretty much just a bad language in my mind. It seems specifically designed to create as many bugs as humanly possible. It's a lot like C++ in that way, but at least C++ is actually performant.
- mattbrewsbytes 1y agoWith so many generative AI tools out there, picking more obscure or niche languages is a detractor because the AI models won't have as much depth of training to pull from when you ask it to do things. Also, technology choices for B2B web apps is rarely going to be a sole factor in determining success or failure of any business. As much as this community likes to compare performance metrics, benchmarks, frameworks and everyone has personal tastes on what is "good", all of those discussions are mostly irrelevant. Picking something the team is comfortable with and has depth of knowledge in is a good practice. So just pick Rails and move on with solving business problems :)
- runjake 1y agoI do some Rails work and I’ve found that Ruby and Rails are one of generative AIs weaker languages. I usually get pretty shoddy output[1]. I generally don’t use AI during Rails stuff, other than as a hint for a Google search or a docs lookup. Are you having a different experience? 1. Shoddy output with Ruby and Rails knowledge. In general, I would consider myself pretty advanced with “prompt engineering”.
- mattbrewsbytes 1y agoI'm not expecting perfect output, if there is such a thing. I'm expecting output equivalent to a junior engineer or intern at this point in time. I can tell an agent in the editor I want it to add a many to many join relationship and a multi select field to a form and it does it pretty decently. In some ways this is more automating the tedious tasks which is really what AI's strong suit is right now, in my opinion. Sure I could go move a method around, refactor the 5 classes that call it, etc. but I can delegate that task and its done in a few seconds while I think about the next thing I want to do. I find if you get too lengthy with tasks or too advanced AI goes off the rails so to speak, sorry for the pun.
- azuanrb 1y agoSimilar experience. Although, recently just tried Claude Code and it seems to be a pretty good upgrade (both Sonnet and Opus). I'd suggest you to give it a try if you haven't. For UI, Playwright MCP helps a lot. And since it can run rspec too, it can get faster feedback. To me it is better now, but not as good as certain languages. Since that I'm using Go as well, I do notice Claude Code perform better with Go.
- Hnus 1y agoSerious question: do people actually enjoy writing Ruby? I feel I’m writing in something like Bash. I never felt this way until I picked up other languages like Rust, Zig, C#, and learned a tiny bit of programming language theory. After that, the loose and squishy feel of Ruby really started to bug me. Also, it seems like every Ruby programmer I know only ever uses other dynamic languages like Python. It’s never like they’re experts in C++ or something and then decided to start programming in Ruby.
- hotpocket777 1y ago> Also, it seems like every Ruby programmer I know only ever uses other dynamic languages like Python. It’s never like they’re experts in C++ or something and then decided to start programming in Ruby. Can you expand on what you’re saying here or why you’re raising this is as an issue with ruby the language or rails the library?
- Hnus 1y agoJust a personal observation that made my communication with ruby developers hard as I cannot use concepts from strongly typed languages because they live in a word without them, but I guess it's more issue with me than them.
- monooso 1y agoThere are several people earlier in this very thread who moved from C++ to Ruby.
- PapaPalpatine 1y agoWhat an odd question lol. Yes, people like writing in Ruby. I’m one of the. Switched from C# in 2016.
- Hnus 1y agoYou don't miss things like enums, exhaustive switch or any other basic language features? How about `method_missing` its such a crazy idea to me that something like this exists, I know why it exists but I am like why, why such bloat and complexity.
- IshKebab 1y agoCan you tell me why exactly? I've never used Rails but I have tried to understand and modify Gitlab's Ruby code and honestly it was a completely incomprehensible mess. I'm no stranger to large codebases but Gitlab is almost impossible to follow and it seems to be entirely because they use Ruby. I mean if you look at one file the code seems fairly clean and well written, but if you try and figure out e.g. where a function is called from... well good fucking luck! There's no static typing to help you, and even worse it seems like almost everything is "magically" connected. Like you'll have a function called `foo_bar()` and if you grep for that you get zero results. In the end you'll find that in the `Foo` class there's a list of strings including `BAR` and it constructs the identifier from those. Absolute nightmare. But people do seem to love Rails... so why?
- vidarh 1y agoLearn to use a remote debugger, and how to show the method source location. This may sound snarky, but it's a good faith suggestion. Ruby has all of the tools to make debugging easy, but they're different than what you will expect if you come expecting things to work like in the static typing world. But as much as I love Ruby, I do agree that Rails has too much unnecessary "magic". Much of which more modern Ruby is a reaction to. Personally I avoid Rails for my Ruby web projects.
- IshKebab 1y agoI mean... that sounds like a pretty horrible dev experience. Every time I want to understand a piece of code I have to actually run it? Insane. For example I'm trying to understand Gitlab's merge train behaviour. Do I have to set up an entire Gitlab instance from source, then create a project, set up CI, run a merge train, all while running Gitlab in a debugger and then set a breakpoint and then finally I can see where the code is called from? I've also done a lot of work on VSCode which is similarly large but mercifully written in Typescript. For that I just right-click->find all references. It takes 3 seconds.
- vidarh 1y agoIn practice it is not. And no, you don't have to run it, but it makes things a lot easier to do so. And no, you don't need to do what you suggest, you just need to load all the code into a running Ruby REPL. It is one consequence of Ruby being as dynamic as it is, but another is that the codebases tends to be far smaller. Anywhere from half to 1/10th of the size of codebases in statically typed languages is my experience, including with direct translations.
- mvdtnz 1y agoThe idea that Rails productivity is "unmatched" is such a holdover from 13 years ago. You can like Rails all you want but it is very much matched by several quality frameworks today. Many of which don't suffer from Rails' very real downsides.
- RangerScience 1y ago> several quality frameworks Gonna name names? :)