Hacker News new | ask | show | jobs
by echelon 2035 days ago
Ruby's flexibility makes it great for going fast and hacking things, but oh my god can it lead to monolithic spaghetti.

Magical eager backfills, mysterious action at a distance method_missing dispatch, crazy class hierarchies and transclusion, endpoints with reflective behavior, nonsensical tests with horrific abuse of rspec, ...

I've spent engineering years tearing down Ruby crud others have built, and it's led me to have a distaste for the language like no other.

5 comments

What’s crazy to me is that despite much of this and my general dislike of ruby, I still often reach for rails to get an idea up and out. For my uses I’d rather just test something out and either let it burn down quickly or pay the price eventually to fix it (an old colleague called this a “champagne problem”). I’ve only had to pay the price a few times, which probably made each sequential one easier to avoid some parts.

Rails is still a phenomenal framework to use, again something I somewhat begrudgingly admit.

with great power comes great responsibility.

ruby is amazing and once you get past your keanu stage and learn some of its most common pitfalls it's insanely good. it's one of the few programming languages that brings me joy when i use it.

also as a side note: if you believe rails==ruby you are limiting yourself. ruby is so much more than rails

It's interesting, there seem to be two primary camps when people talk about technologies that "bring them joy".

One camp feels this way about maximally-dynamic environments like Lisp and Ruby, which presumably provide "the highest bandwidth" when it comes to translating ideas into code.

Whereas for me and others, it's the exact opposite: these languages create nothing but anxiety. Joyful programming, for me, is programming where I can feel confident and peaceful knowing that every possible contingency of a given piece of code has been either accounted-for or prevented. Knowing that I'm not going to be blindsided by anything, being able to narrow my focus to the problem at hand instead of being overwhelmed with the infinite number of things that could go wrong.

I wonder what causes such a divergence in mindset

i think safety (perceived or real) is different from joy. I also think it’s really hard to enjoy something repetitive and super verbose.
Yes, some developers like to be needlessly clever and do in Ruby things that they would never do in PHP or Java. I also lost time deciphering some clever metaprogramming.

It is more about the developer than the language though. I go with simple solutions no matter which language I use. I worked on some old code of mine last week (it was Python) and I couldn't understand it immediately. I fixed a problem and I'll rewrite part of it this week to make it clear what it does. It will also lower the chances of bugs.

I love creating nearly everything with rails, however i agree picking and cleaning an foreign codebase has always been a pain when i didnt know the team/dev follows a very similar pattern
It is a lovely language to use but it provides a few footguns too many. The main problem is that the community suffers from bad taste.
The community is the reason Ruby is amazing. And Matz is one of the nicest guys you’ll ever meet. So genius, yet so humble.
The language and standard library are great. I mean that there's a tendency in the third-party libraries to abuse the features of the language for the sake of cute syntax and in the process create a difficult to understand beast where a more straightforward library would do.