Hacker News new | ask | show | jobs
by koffiezet 2094 days ago
I only ever tried out a rails tutorial once, and coming from a C/C++ background, but having used with many languages, too many things felt like magic back then, but no further experience with the language itself, so can’t really judge it.

However, now I’m on the operational side of things, and there are 2 types of applications I avoid to deploy/maintain, mainly because of their runtime: Java and Ruby apps. It’s very likely the Ruby runtime has improved, but we actually set up a haproxy with multiple instances of the same ruby app, which we just restarted every 2 hours, just to keep it running properly. Upgrading ruby back-then was a mess, and could break a lot of things. I can’t comment on the language itself, but the runtime left a very bad impression. I since then (4/5 years ago or so) have successfully avoided ruby, so it’s possible things have improved, but first impressions last...

4 comments

I wouldn't call Ruby a high performance language, but your experience seems weird. Even four or five years ago I would consider Ruby one of the most painless languages for dealing with upgrades and new versions of things: install ruby with a version management tool, install your app from gemfile, run your tests, good to go. I regard it at one of the first languages to have effective tools for dealing with versioning and upgrades. I still find it easier to deal with than Python by a solid amount.
I hate deploying Ruby and Python because all the system packages they tend to use. Getting something working typically involves a bunch of crash/install cycles and some manual compilation and package downgrading.

Go is easiest if we're talking about pre compiled binaries. If you include builds, dependency hell is real.

C#, JS, and Java have been easy for me. Install JVM/CLR/Node and run one command. Old school Java with EE servers and Tomcat and such was a nightmare but everything I've done recently is self hosting

the magic in rails is not really magic once you get used to the fact that all those magic incantations are just method calls inside the class. every class in ruby is just a series of method calls. you can write a class that, when it's read from the file and interpreted will just print something...

class Foo

  puts "bar"
end

will just print `bar` when it's parsed.

so something like has_many :baz are just the method call `has_many(:baz)` defined by active record. that creates a few functions using meta-programming. the other thing that ruby uses a lot of are blocks which are just anonymous functions. `do |a,b,c| puts a; end` just a function passed to the method that can be invoked by the function. I think those things are the ones that trip people up the most with when learning.

Reminds me of http://harmful.cat-v.org/software/ruby/rails/is-a-ghetto . "The main Rails application that DHH created required restarting ~400 times/day. That’s a production application that can’t stay up for more than 4 minutes on average."

Not that Ruby = rails

And yet, Basecamp is a successful company. So that tell us that crashing 400 times a day is not a problem in itself.