re: Why do people like Ruby? VIEW POST


I came from Java and C/C++. I've been using Ruby on Rails for a while now and just have not learned to love it. In fact, I've been trying to weed it out of my projects with few exceptions.

Without getting into the weeds (I want to keep this short), my least favorite thing in the Rails world is ActiveRecord (and AR migrations). It's mostly the same reasons I never liked Hibernate in the Java world and fell back onto MyBatis (and Flyway). Complex queries in ActiveRecord (and Hibernate) are an absolutely nightmare, but trivial and much more common queries are fast and easy.

When it comes to basic, web-facing entry points for an application I can still see it used. When it comes to microservices and wanting performance in systems it just can't beat other languages. For large data transformations and hefty calculations I've had more luck using languages focused on those things as their speciality.

That being said, I think we live in a world now where using a single language to accomplish everything in your system is ludicrous. The days of "we are an XYZ shop" are almost over. A good cloud architecture uses whatever is best for the task at hand. For a website or a prototype? PHP and Ruby on Rails are perfect. Any engineer worth their salt, though, knows AT LEAST 3 languages inside and out.

In a lot of systems I've worked on lately I've seen a mix of Java, Go, Python and even some C# in some places. For people doing nifty things with Nginx I've seen some neat C, too. Ruby comes in mostly when I see people using Chef, Terraform, etc. where I think it is a great fit.

Monolithic systems are on the out and microservices are on the in. RoR/Passenger, RoR/Unicorn and things like Java/JBoss, Java/WebLogic, etc. are LESS necessary in many enterprise apps now. They absolutely have their place, but things like Kubernetes help alleviate some of the headaches they caused as well.

There's some other things that bug me about Ruby "stuff I see frequently": not being strict type safe (I dislike dynamic typing pretty strongly), overuse of hashes instead of classes (except in the case of things like parsing JSON where it is great), lack of distinction between arrays, lists, sets, vectors, etc., using AR all over the code instead of having shared DAO services, using AR migrations instead of direct SQL (heck, we have Docker now so you don't need to test on SQLite and deploy on MySQL) and some other stuff.

Again, I see it's place, but I just don't love it. I can see its use for scripting, but I prefer Bash for that and fall onto Python when Bash doesn't cut it.

I dunno. Just my opinion.

code of conduct - report abuse