Live data from Hacker News

Ruby on Rails Audit Complete

ostif.org

101–110 of 171 posts

Re: Ruby on Rails Audit Complete

#101

The productivity of Rails for B2B 'CRUD' software is unmatched. Surprised to not see more newer startups make use of it!

After 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…

Where is the 15 min make a simple blog with minimal code video for Elixir?

Re: Ruby on Rails Audit Complete

#102

Earlier quoted context omitted.

And if you need that kind of persistent immediately reactive connection and are willing to pay the price, go for it! If that's truly a requirement for you then you're in the subset of web that overlaps substantially with telecoms. I'm not cautioning against making the calculated decision that realtime is a core requirement and choosing the BEAM accordingly. I'm cautioning against positioning the BEAM as being designe…

"willing to pay the price" what price? learning a new language that is designed to be learned from the one you already know with fewer footguns? ok fine. but you make it seem like going to elixir is some kind of heavy lift or requires a devops team or something. the lift is low: for example i run a bespoke elixir app in my home on my local network for co2 monitoring. and for that purpose (maybe 300 lines of code? yes…

To name just a few costs that aren't worth it for many businesses:

* A much smaller ecosystem of libraries to draw from.

* Much weaker editor tooling than with more established languages.

* An entirely different paradigm for deployments, monitoring, and everything else that falls under "operations" that may be incompatible with the existing infrastructure in the organization.

* When something does go wrong, using a weird stack means you have less institutional knowledge to lean on and fewer resources from people who've been doing the same thing as you.

* A whole new set of foot guns to dodge and UX problems to solve related to what happens when someone's connection is poor. This has come up repeatedly in discussions of Phoenix LiveView—what you get in reactivity comes at the expense of having to work harder to engineer for spotty connections than you would with a request/response model.

* More difficulty hiring people, and an increased tendency when hiring for selecting people who are really just obsessed with a particular tool and unwilling to see when the situation calls for something else.

There are many more, these are just the ones I can think of without having a concrete application with concrete requirements to analyze. In the end for most apps reactivity is so much a "nice to have" that it's hardly worth sacrificing the stability and predictability of the established option for moderately better support for that one aspect of UX, especially given that you can always add reactivity later if you need to at a slightly higher cost than it would have come at with Erlang.

If reactivity is a core requirement, that's a different story. If it's polish, don't choose your architecture around it.

Re: Ruby on Rails Audit Complete

#103
post #64
post #42

Earlier quoted context omitted.

I 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.

+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…

Shameless self-plug: if you’re struggling to learn Phoenix maybe I can help?

https://learnphoenixliveview.com

Re: Ruby on Rails Audit Complete

#104

The productivity of Rails for B2B 'CRUD' software is unmatched. Surprised to not see more newer startups make use of it!

After 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…

As someone who has used elixir for startups and loves it, the benefit of Rails for a startup is that it's easier to pick up. html/live projects can create more confusing layouts, which can make it harder to learn if you're trying to get something running. Rails is a great framework to use if you're primary product is not a website, but you need a website.

Re: Ruby on Rails Audit Complete

#105

Earlier quoted context omitted.

Ruby has static type system built into the language. https://github.com/ruby/rbs There are others you can use if you like.

steep and rbs don't work so well and are the wrong approach. sorbet is also the wrong approach but it works better. The Python 2 -> 3 way would've been a better way to do it but Matz chose an unwise way (separate files) that doomed it combined with a failure to type all the things and make it work. Oh, and very few Ruby gems are cryptographically signed and so most code is mostly untrustworthy. Making important thing…

All of these problems are worse in javascript.

> a failure to type all the things and make it work

Everything is typed in Ruby.

Re: Ruby on Rails Audit Complete

#106

The productivity of Rails for B2B 'CRUD' software is unmatched. Surprised to not see more newer startups make use of it!

Can 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?

Re: Ruby on Rails Audit Complete

#107
post #71

Earlier quoted context omitted.

NodeJS 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 t…

Well 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.

> 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.

Re: Ruby on Rails Audit Complete

#108

Earlier quoted context omitted.

Ruby has static type system built into the language. https://github.com/ruby/rbs There are others you can use if you like.

Unusable mess. Ruby should take lessons from Python and TS on how to make proper gradual typing.

I 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/

Re: Ruby on Rails Audit Complete

#109
post #55

The productivity of Rails for B2B 'CRUD' software is unmatched. Surprised to not see more newer startups make use of it!

Serious 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…

Yes, love it. Rewritten large parts of my stack in it (editor, shell, font renderer, terminal, window manager, file manager)

I started from a background of heavy C++ use, including a lot of template metaprogramming. Convincing me to even give Ruby a chance took a lot, but once I'd tried it I abandoned C++ pretty much immediately, and don't miss it.

Re: Ruby on Rails Audit Complete

#110
post #77

Earlier quoted context omitted.

I love Rails, its been my to-go framework for reference. But I could never get as confortable with Ruby as writing JS or PHP. I do not know the reason.

I agree. I think..there's too much freedom. Too many ways to do things, and debugging is hard with monkey patching.

If debugging is hard to you in Ruby because of monkey patching, it's an issue of not knowing the debugging tools. Attach pry or Ruby debug, and show the source location of a method, or log them. This isn't surprising - debugging Ruby is different to debugging most static languages, and more tutorials on how to do this well would be nice...

Also the use of monkey patching in Ruby peaked something like a decade and half ago. Outside of Rails, it's generally frowned on and introducing new methods is usually addressed by opting in by including modules these days.

Post reply on HN