News for hackers. Stuff that matters.
Re:Stories – Medium clone built with Rails by erokar on Saturday September 15, 2018 @04:50PM (#17995981)
I've just revisited Rails after being away for 4-5 years, mostly doing frontend development. First impressions are it's extremly productive. With Turbolinks and Webpacker you can get a very near SPA responsiveness just using traditioional server side rendering and sprinkels of JS. Most of it comes out of the box, while the setup for a similar approach in e.g. Django would require a lot of time spent on setting up things, researching best practices, etc.

Did a simple test to evaluate: Make a simple note taking app with user auth and sprinkle in a React component. Took me half an hour to have the basic functionality in place. So far I haven't seen any framework with Rail's level of productivity.

Re:Stories – Medium clone built with Rails by _hardwaregeek on Saturday September 15, 2018 @05:18PM (#17996081)
It's actually very annoying. I want Node or Go or Kotlin or something to eat Rails' lunch. It's good to have competition. But nobody has come close to the developer ergonomics and the sheer development speed of Rails.
Re:Stories – Medium clone built with Rails by save_ferris on Saturday September 15, 2018 @07:03PM (#17996448)
Elixir and Phoenix are getting there from a developer ergonomics perspective, with massive gains in performance over Rails. Phoenix is much younger, obviously, but many rubyists are taking notice.
Re:Stories – Medium clone built with Rails by pankajdoharey on Sunday September 16, 2018 @02:09AM (#17997547)
Elixir is great but it will have roughly have the same mind space as Ocaml, Haskell or other ML languages. It is very impractical to hire people for elixir, i can teach people lisp in a day if they know javascript or ruby because lisp supports imperative style aswell. Purely Functional approaches has its demerits most importantly the learning curve and unlearning from the OO and Imperative world. I feel gradual adaptation to functional approach like in lisp languages is better. Most modern lisp/schemes like Clojure/Racket are easier to teach and become productive in than Elixir. Elixir requires serious effort, i had put one month of serious effort to learn Elixir, meanwhile i learnt clojure basics in few hours.
Re:Stories – Medium clone built with Rails by _hardwaregeek on Saturday September 15, 2018 @08:08PM (#17996681)
Definitely. Been meaning to learn Elixir. How's the GraphQL support? Part of the reason I'm still on Rails is the nice integration between GraphQL and ActiveRecord.
Re:Stories – Medium clone built with Rails by lobo_tuerto on Saturday September 15, 2018 @08:48PM (#17996790)
GraphQL support is pretty good. Check out Absinthe.

If you like learning from book, I can recommend this one: https://pragprog.com/book/wwgraphql/craft-graphql-apis-in-el...

Re:Stories – Medium clone built with Rails by Secretmapper on Saturday September 15, 2018 @08:37PM (#17996767)
There's an excellent package named Absinthe. It's pretty great, though I can't compare it to Rails' since I haven't used it.
Re:Stories – Medium clone built with Rails by dcwca on Saturday September 15, 2018 @05:56PM (#17996218)
Counterpoint: Rails is not efficient for new developers who need to get up to speed on it. Other tools are more straightforward to onboard devs; just follow the API docs and read the code. With Rails you need Rails experts.
Re:Stories – Medium clone built with Rails by burlesona on Saturday September 15, 2018 @06:24PM (#17996314)
As someone who trains devs on rails I find that’s not true.

In my experience if you have a developer of any experience level go through the full Rails tutorial they come out on the other side highly productive. I usually have people on my team do this on their own time and they usually finish within the first two weeks of work.

What I will say is that the implicit, convention over configuration approach of rails means you really do have to RTFM. I find that the more experienced a developer is the more resistant they tend to be to this. But in general they all get over it after they read the manual.

Re:Stories – Medium clone built with Rails by pandler on Saturday September 15, 2018 @09:59PM (#17996959)
> What I will say is that the implicit, convention over configuration approach of rails means you really do have to RTFM.

And there you have it. Most devs I have ever worked with hardly read docs beyond as reference material.

To be fair, effective documentation (beyond just api reference) is hard and time consuming. I have a lot of respect for the projects that have documentation _worth_ reading.

Re:Stories – Medium clone built with Rails by _hardwaregeek on Saturday September 15, 2018 @06:26PM (#17996321)
I disagree. I learned it as a pretty inexperienced developer. You just need to know Ruby and how a web application works. Sure, that rules out most bootcamp students, but honestly bootcamp grads shouldn't be writing production code.
Re:Stories – Medium clone built with Rails by erokar on Saturday September 15, 2018 @06:20PM (#17996294)
What are the other more straightforward tools?
Re:Stories – Medium clone built with Rails by ben_jones on Saturday September 15, 2018 @06:23PM (#17996313)
I will hazard a guess that expressJS in the Node ecosystem, and Flask in the python ecosystem, would be two tools the OP would agree are significantly more straightforward (at least for initial application development) then rails.
Re:Stories – Medium clone built with Rails by dcwca on Saturday September 15, 2018 @06:45PM (#17996384)
Yeah, those are good examples, along with Java or .Net or even PHP. There’s an understanding that a developer can open a file from the source code tree, look at which includes are in scope, which methods are being used, and follow the API docs on those in order to track down what’s happening. This works almost everywhere but Rails. With Rails you need to have a basic comfort with the entire ecosystem and which behaviours are globally applied, often you can’t follw the source code to know, even if you go into the Rails source, where many methods are dynamically generated.

Other responders on this thread think I’m saying Rails isn’t productive or easy to learn, I’m not. I’m saying there is a higher bar for the minimum amount of knowledge you need to comprehend the flow of control in a Rails app.

Re:Stories – Medium clone built with Rails by erokar on Saturday September 15, 2018 @06:55PM (#17996416)
Fair point, I agree that a lot is implicit in Rails. It might feel intuitive and easy, but at the same time be hard to track or explain.
Re:Stories – Medium clone built with Rails by jpittis on Saturday September 15, 2018 @11:54PM (#17997235)
I feel like this is a problem rooted in Ruby’s mettaprogramming system. Class state (new methods, changed methods, inheritance hierarchies, etc.) and unexpected control flow materialize out of seemingly nowhere at runtime because you happened to load some library. There’s lots of power here but it would be incredibly dishonest to call it simple. (As you say, hard to track and explain.)
Re:Stories – Medium clone built with Rails by erokar on Saturday September 15, 2018 @06:49PM (#17996399)
I agree those libraries are more straightforward in the sense that it's easier to track what's happening, but I feel that's only true for rather basic apps. Having done my share of Express developmnet, I know that once you need user auth, a database connection etc. you are curating your own selection of libraries, inventing your own folder structure and so on and so on.

And if you are so unlucky as to inherit such a project it is anything but straightforward. It's like trying to deschiffer the mind of some alien creature, i.e. former developer.