Hacker News new | comments | show | ask | jobs | submit login
Stories – Medium clone built with Rails (github.com)
80 points by miguelmichelson 3 months ago | hide | past | web | favorite | 46 comments



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.


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.


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.


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.


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.


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...


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.


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.


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.


> 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.


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.


What are the other more straightforward tools?


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.


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.


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.


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.)


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.


If you’re looking for a self-hosted blog that looks like medium I can also recommend Ghost: https://ghost.org

Pretty easy to set up, quite simple and open source.


Or just use a static site generator like Jekyll (https://jekyllrb.com/)


Ghost 2.0 basically has an exact clone of the Medium editor which is important to some people. But of course it depends on how you prefer to write.


Or use a static site generator that has a gui. https://getpublii.com


And if you want to move over your existing medium content to Ghost -https://github.com/ageitgey/medium_to_ghost


Do you know what the best recipe hosting sites are? I'd like to host some recipes for myself as I test different cooking methods and have poked around but figured someone here would know something good.


You can use Wordpress and install a recipe theme to add recipes.


Is there any reason why devs choose elasticsearch to implement basic site search functionality when Postgres full text search functionality would be sufficient?

Real question, because introducing another dependency like elastic over postgresql seems overkill.


I implemented full text search in Rails with a PostgreSQL the other day and it was very straightforward. I used the pg_search gem but rolling my own query wouldn't have been too difficult. The best part is I can simply merge my search scope into the usual record-displaying eager loading Rails code and everything just works.


Elastic Search is many times better than Postgre in search, especially with unicode character or CJK index. Integration is easy, and it is battle tested, I would actually think not using Elastic would be the wrong approach.

Something even better would be using Vesper, the search engine from Yahoo, that would definitely be overkill.


It's because the application developer isn't expecting, or is naive to the difficulty, of maintaining complex infrastructure for an extended period of time.


It was definately the done thing for a while. Might just be muscle memory.


OP! Nice of you to ship this. We need more of editors and self publishing platforms. I tried creating an editor a few years ago at my last job [1]. It is really hard to get all things correct when implementing your editor, with all quirks that contendeditable has.

[1](http://hindi.yourstory.com/editor)


Rails isnt very intriguing in 2018, atleast for the minds that seek novelty. A Blog Engine in Rails in 2018 is like, A Website written in Java in 1999. If you are someone who is re-visiting Rails after a few yrs, you realise they haven't learnt anything, they are still creating breaking changes entire API rewrites, new methods that do the same stuff that old ones did, but atleast makes it sound new. Mostly vanity changes.


There have been some improvements like adding instant messaging and webpack. Here's the end of DHHs 2018 keynote:

>Let's continue to compress the concepts that are worth keeping, reject the ones that aren't, broaden the base of people who can actually have a chance to write this software that's eating the world, such that the software that we end up with is software the benefits the world.

I think that's what's interesting - reducing the technical complexity to allow more focus on building things that are interesting in the real world.


What is the modern, best practice for * quickly * integrating rails with python based ML like scikit learn or keras for an mvp?



Ctrl + f “flask” no results - what gives


Looks to just be an implemented instance of Stories. Github is here:

https://github.com/hibiken/stories

Project appears stale, unless someone else has picked up the development.


Thanks. Since the submission seems to be intended to be about the platform itself, we've updated the link from https://dante-stories.herokuapp.com/.


Dante Stories appears to be a maintained fork of Stories.

https://github.com/michelson/dante-stories


Ok, we've changed to that from https://github.com/hibiken/stories.


The web site linked has very few details.

Whenever I read "Ruby on Rails", I can't help but think back to when it was the latest fad and everyone was playing with it, but then every single project would break whenever any of the 82 dependencies needed to be updated due to security issues.

Since this site has no details, I've lost interest since I have no intention of revisiting that shitshow without someone telling me it's somehow different, that the dependency nightmare is now fixed. Pretty or not, projects which require significant energy to just keep up with security updates aren't worth it.


Aren't you describing a situation that persists with virtually every framework that relies upon external libraries and manages dependencies?


What would be an example of a language/framework for web development that avoids the dependency shitshow you describe?


Not OP, but it's completely possible to build a complete webapp with just two dependencies: Python/Django and a database adaptor for PostgreSQL/MySQL.


Of course. The same is true for Rails. Realistically though, wouldn't a Django developer -- like say a Rails developer, a C# developer or a JS developer -- usually add some convenient packages?


Yeah, people have moved onto another dependency shitshow with modern JavaScript.


They have not moved on, rails has matured and now requires less public debate.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: