News for hackers. Stuff that matters.
Re:DHH answers: What makes Rails a framework worth learning ... by newsat13 on Tuesday January 24, 2017 @04:33PM (#13475743)
So, I have seen rails code and I did not fall in love with the code. Instead what I saw just black magic and all sorts of conventions. Reminded me of perl. You have to invest a lot of time knowing all the magic stuff.
Re:DHH answers: What makes Rails a framework worth learning ... by pmontra on Tuesday January 24, 2017 @04:52PM (#13475954)
There isn't much black magic. Most of it is pretty sane naming conventions which could be OK in any sw project, plus database schema autodiscovery. The bonus is increased maintainability.
Re:DHH answers: What makes Rails a framework worth learning ... by cies on Tuesday January 24, 2017 @06:06PM (#13476643)
> The bonus is increased maintainability.

It will never have strong-typed discipline though... (sad)

Re:DHH answers: What makes Rails a framework worth learning ... by pmontra on Wednesday January 25, 2017 @02:44AM (#13479538)
They are talking about adding some optional type inference in Ruby 3.0. See the rejection comments of https://bugs.ruby-lang.org/issues/9999 This is the most stong typing I'll accept for Ruby. There are plenty of other languages if strong typing is important for a project. They usually look bad (not because of strong typing) but if one really needs them...
Re:DHH answers: What makes Rails a framework worth learning ... by jen729w on Tuesday January 24, 2017 @07:00PM (#13477051)
As someone who is just learning Rails [1], I can definitely empathise with the "black magic" comment.

Some of the stuff it does is pretty much voodoo to me at this point. But - it's voodoo that makes me think - even say out loud to myself, sometimes - "wow". I can see how it's amazing that it does what it does with so little code. I can see how this is an enormous benefit to getting a project up and running. I can see how it'll potentially save me hours and hours of configuration.

That's a great benefit, but it comes at the cost of understanding. What exactly is that line of voodoo doing? I dunno. How do I troubleshoot it if it doesn't work? I dunno. Like, I have no idea.

[1]: As the first real "language" I'm trying to actually properly learn, so take my comments in that context. I am not already an experienced coder. I want to be able to knock up little projects, proofs of concept, in a reasonable amount of time. Rails, to me, seems like the framework that will allow me to do that. We'll see.

Re:DHH answers: What makes Rails a framework worth learning ... by hekker on Tuesday January 24, 2017 @04:42PM (#13475845)
What's wrong with conventions? It seems to me that code conventions would make code more maintainable.
Re:DHH answers: What makes Rails a framework worth learning ... by bobbytherobot on Tuesday January 24, 2017 @05:48PM (#13476506)
newsat13 wasn't complaining about using conventions. newsat13 was complaining about how Rails uses black magic with conventions.

I can't speak to Rails, but I've worked in other codebases that used reflection to dynamically attach different pieces of code together. It was hard to trace code because I couldn't do a search for the value being generated nor could I use the static analysis to find the value. I had to manually trace through the whole stack to find the bit of reflection that was generating a value.

Re:DHH answers: What makes Rails a framework worth learning ... by rhizome on Wednesday January 25, 2017 @08:22PM (#13487941)
I've never worked in a codebase like that, but in all my years of helping people with Ruby and Rails I've concluded that reflection is a code smell. It's one of those things that is taught in CS and winds up appearing where conventions might not have been immediately apparent, a fallback to training.
Re:DHH answers: What makes Rails a framework worth learning ... by trustfundbaby on Tuesday January 24, 2017 @05:41PM (#13476457)
> So, I have seen rails code and I did not fall in love with the code. Instead what I saw just black magic and all sorts of conventions.

Right, so clearly Rails is not for you. No harm no foul.

This is essentially the point of rails, that I as an engineer don't care enough about those details, because I need to get something working quickly. if it gets to a point where it matters (because it actually does, say, when you're trying to scale) you can invest the time to learn how it all works and either improve it or say ... "you know what, I think we should ditch this entire thing"

Simple.