Live data from Hacker News

Choosing Ruby on Rails for web development project in 2019

ideamotive.co

141–150 of 216 posts

Re: Choosing Ruby on Rails for web development project in 2019

#141

I stopped reading at "Python, the language used in Django, is a language very commonly used for academic purposes, whereas the Ruby community — thanks to Rails — is more business-oriented."...

It's okay to read articles that you don't completely agree with.

Re: Choosing Ruby on Rails for web development project in 2019

#142

Earlier quoted context omitted.

Just a disclaimer, I work with Rails every day, but I don't really like it all that much and I really don't like ActiveRecord. We have Rails legacy apps and I maintain one of them. I'd still use Rails for some things, but it I'm pretty picky about what I think it's good for. Having said that, it makes me a bit sad that there are quite a few developers who actively avoid SQL. Granted the syntax is absolutely awful, bu…

I agree! SQL-avoidant developers are something we actively try to screen out in our interviews. (Being too gung-ho about using raw SQL -- something I've been accused of --is bad too, but at least it's not a path of willful ignorance) Granted [SQL's] syntax is absolutely awful, but it is a very useful and powerful language. The concepts behind relational databases are embraced by SQL in ways that I can't imagine in an…

I probably shouldn't have said the syntax is awful because as you say, I've never seen anything better. But I just think that SQL is this nice composable structure but it seems needlessly awkward to write from my naive point of view. I keep thinking that something more lisp-like would be nicer, but perhaps it wouldn't work. Maybe it's something I can try as an experiment some day :-)

Re: Choosing Ruby on Rails for web development project in 2019

#143

Rails is ideal for the "Get Shit Done" approach to development. However, Ruby's type system does not provide many assurances, making mature codebases harder to maintain, refactor, and extend (as compared to codebases in, say, well-written Java). I am surprised this was not listed as one of the criticisms. Sorbet, a type checker for Ruby, stands to make this criticism less valid: https://sorbet.org/

I have to be honest, I don't understand why people care so much about typed languages. I almost never face type related issues, and when they occur they are the easiest to catch.

I have a talk where I turn "you called a function from the wrong thread" into something caught by the type checker in C. Getting an error message at compile time pointing out the specific line with an error, rather than segfaulting at a later point in roughly 2/3 of executions, is a big improvement in developer experience.

Slides here: https://github.com/dlthomas/using-c-types-talk/tree/master/s...

The example is a toy but the technique was developed for (and very successfully used in) a production setting.

Re: Choosing Ruby on Rails for web development project in 2019

#144

Earlier quoted context omitted.

Just a disclaimer, I work with Rails every day, but I don't really like it all that much and I really don't like ActiveRecord. We have Rails legacy apps and I maintain one of them. I'd still use Rails for some things, but it I'm pretty picky about what I think it's good for. Having said that, it makes me a bit sad that there are quite a few developers who actively avoid SQL. Granted the syntax is absolutely awful, bu…

As a counterpoint, I love ActiveRecord. It's a Swiss Army knife that's got pretty much everything you need, you just need to find the right tool and use it. What ActiveRecord isn't is discoverable . Which is to an extent understandable. Its domain is literally anything you could express in SQL. But you really can do anything you want with it, you just have to find the right abstraction. A tool I use a lot is to .to_s…

Hmm... I see your point. There is always the confusion between ActiveRecord the software and "Active Record" the pattern. It's really the latter that I dislike. I've used AR-the-software to build my own relational object mapping with scopes and enjoyed it quite a lot. But there was lots of SQL in that code :-)

Re: Choosing Ruby on Rails for web development project in 2019

#145
post #5

Ruby code is like poetry. Rails code is like a song. Working with RoR always made you feel being like an artist, instead of being only a software developer. RoR is always my inspiration on how to design a software from start to finish.

I have barely any experience with Ruby or Rails, but I'm interested in your similies.

Could you link a repo that you feel represents this kinda mentality?

Re: Choosing Ruby on Rails for web development project in 2019

#146
post #5

Ruby code is like poetry. Rails code is like a song. Working with RoR always made you feel being like an artist, instead of being only a software developer. RoR is always my inspiration on how to design a software from start to finish.

Perhaps I am an odd duck (I come from heavy Java backend experience including Spring and struts and now Go) but Rails feels incredibly clunky. I am working on a mid-size Rails app and it's a total horror show. Setting up debugger alone was very difficult (had to locate just the right patch version of a ruby gem that would work with my app); I can't just follow the calls because things are wired together behind the sc…

Having spent a lot of time on legacy Rails codebases that need new features and fixes, existing ones coming in from clients, and so on, I'd consider it practically write-only as soon as eyeballs are off it for a couple months or a handoff happens. Heroic testing practices that I rarely see in the wild could save it from that fate, but little else. Ruby's got some great libraries available but there's too much magic and "wtf is this even?" going on in your average Rails codebase. Sinatra with Sequel over it any day if it's my choice and the product's intended to have any kind of lifespan, and we're using Ruby.

Re: Choosing Ruby on Rails for web development project in 2019

#147

Earlier quoted context omitted.

I've taken the approach of building the monolith first with an architecture that allows me to easily pull parts of it out into services when I hit constraints and need that scalability.

How?

Service Oriented Monolith. I.e. you can organise a monolith in pretty much the same way you would organise a micro service architecture.

Re: Choosing Ruby on Rails for web development project in 2019

#148

Earlier quoted context omitted.

Rails is slow. Ruby isn’t slow. Ruby has the same thing that every other language has, call outs to C code under the hood for most of the real work. What makes Rails slow is the process around so much object creation and destruction, but this is exclusive to Rails itself. You put a Sidekiq worker up against a Go worker for some background processing and the performance is comparable.

> Ruby has the same thing that every other language has, call outs to C code under the hood for most of the real work. Yes, this is exactly the problem. Ruby is so slow that you end up writing C extensions when you want to do any non-trivial computation. The documentation is bad, the tooling is bad, the build/CI complications are bad, and there's not much community info online about the process. And now your RoR deve…

Don’t get me wrong, there are faster languages out there.

The trade off that Ruby has always made was maximizing developer productivity. It’s never tried to be the fastest, but it’s plenty fast enough.

Re: Choosing Ruby on Rails for web development project in 2019

#149

Rails is ideal for the "Get Shit Done" approach to development. However, Ruby's type system does not provide many assurances, making mature codebases harder to maintain, refactor, and extend (as compared to codebases in, say, well-written Java). I am surprised this was not listed as one of the criticisms. Sorbet, a type checker for Ruby, stands to make this criticism less valid: https://sorbet.org/

I have to be honest, I don't understand why people care so much about typed languages. I almost never face type related issues, and when they occur they are the easiest to catch.

Static typing is not very important for new, small projects where the developer can keep the whole thing in their head. It can even be a drag during the design phase if the design is changing rapidly due to the added overhead of changing interfaces. Progress has been made reducing the overhead in recent years and proponents may disagree.

Fast forward to when the same project grows and matures. Now it is huge and no one knows every subsystem. The original developers skipped town years ago. There are -1x to 10x developers on the team, and contractors who must "hit the ground running." Static typing is now crucial to prevent the whole thing from collapsing like a house of cards.

I recommend the best of both worlds, such as prototyping in a productive language, then port when the design solidifies. Or, use a language that can be gradually typed later as your startup matures into an established company with customers that rely on it.

Re: Choosing Ruby on Rails for web development project in 2019

#150
post #135
post #107

Earlier quoted context omitted.

1. You can find a RoR developer.

Ha. It's so hard to find Ruby developers. But I will grant that when you do find one, they are usually pretty good developers.

Ok, this is true. But as a Ruby developer, I'm being approached to program in Elixir, because those are even more difficult to find.

You can find more experienced Ruby devs -- finding someone with multiple years of Elixir would be very difficult.

Post reply on HN