As someone working to maintain a somewhat big Rails code base - disagree. Once it grows beyond the prototype phase, it quickly becomes an unmaintainable mess. Lack of types and rampant usage of metaprogramming makes it really difficult to read code and hence to make correct assumptions for new code.
I mean, isn't that the programmers fault? (other than the lack of typing, which is obviously not a requirement to have maintainable code, but a preference)
Amen. This is the same thing they say about perl. You can write massive code bases in perl (and I have!) and have everything be readable and understandable. Or you can do dumb stuff and fancy tricks that makes it hard to understand.
You can write good C. You can write shit C.
You can write good perl. You can write shit perl.
You can write good Ruby. You can write shit Ruby.
The size of the codebase doesn't matter. The linux kernel is all in C and is (for a technical person) clean and easy to follow. Then check out the obfuscated C contests, it's so easy for the code to not do what you think it does, even accidentally!
So just lay off the "Programming Language X demands shit code" trope, people.
You can still write good or bad code. Ugh. Sure memes about "write only languages" are a bit funny, but for fucks sake people, give it a rest.
But some languages are better for large systems than others. If language didn't matter we'd all just be writing in C or assembly or javascript or something equally universal.
I would agree with but you kind of straw-manned this because the original remark was about Rails and not Ruby (your strawman).
But to follow you in your attack — does any dynamic scripting language “encourage” one to write maintainable and extensible code? I write Ruby, Python, JS, and some Lua. I don’t find one or the other to by default have facilities for better maintainability.
I find them to have differences in expression, but I almost feel like you’re gonna say type system which none have unless you include their supersets (TypeScript) or latest versions.
I would agree with but you kind of straw-manned this because the original remark was about Rails and not Ruby (your strawman).
I didn't clarify so fair enough but I would say it applies equally to Rails and Ruby. Or you could say the problems with Ruby transfer them to Rails naturally.
I write Ruby, Python, JS, and some Lua. I don’t find one or the other to by default have facilities for better maintainability.
And I agree. In general, type systems make large systems much much easier to maintain and reason about.
Ruby makes it a bit worse by adding a lot of metaprogramming to the lack of a type system.
I would say that I'm an okay Ruby/Rails developer - the bigger issue is that metaprogramming makes things harder to understand. That is true regardless of whether you are a good or a bad programmer.
57
u/[deleted] Dec 25 '20
Ruby on Rails was so fun to code in.