News for hackers. Stuff that matters.
Re:Ask HN: Looking back, what have you wasted lots of time on? by mwizzle on Friday August 30, 2019 @04:00PM (#20842087)
Why do you regret Django/Python and wish you started with Rails?
Re:Ask HN: Looking back, what have you wasted lots of time on? by sellingwebsite on Friday August 30, 2019 @04:17PM (#20842239)
I don't want to start a flame war here, but I think Rails (and gem ecosystem in general) is a better choice than Django, at least for SaaS apps.

These are all my personal opinions, take it with a grain of salt. Having said that, here we go:

* Authentication - it is a pain if you'd like to deviate from the standard Django User model (using username to login instead of an email). I don't like Devise either.

* Asset pipeline, even though it is not updated anymore (sprockets) and partially replaced by webpacker is still better in Rails

* Configuration in multiple files, by environment, instead of a single config.py file

* Sidekiq has a better API compared to Celery. Also, Celery's default broker is RabbitMQ, not Redis. It is really hard to find managed RabbitMQ hosting, for Redis there are plenty

* Mailer previews, small but quite useful utility

* Testing - Minitest and Capybara is just a joy to work with

* I prefer ActiveRecord over Django ORM

I could go on and on, but I remember struggling a lot with Django/Celery when building a SaaS app. I decided to switch to Rails and haven't looked back (Rails has its warts as well). YMMV

Re:Ask HN: Looking back, what have you wasted lots of time on? by meowface on Friday August 30, 2019 @05:00PM (#20842674)
I'm a Python sycophant, but I totally agree. Rails does the Rails idea a lot better than Django does. However, for everything else, I prefer Python's libraries and ecosystem. (Flask over Sinatra, for example, even though Sinatra does "feel elegant" to use.)
Re:Ask HN: Looking back, what have you wasted lots of time on? by whycombagator on Friday August 30, 2019 @04:37PM (#20842459)
> I don't like Devise either.

What don't you like about it?

Re:Ask HN: Looking back, what have you wasted lots of time on? by sellingwebsite on Friday August 30, 2019 @04:47PM (#20842556)
It works great if you won't deviate from the common use case. Otherwise, you have to do all sorts of crazy monkey patching. On top of that, it is a relatively old project that has to keep legacy code for backwards compatibility.

I decided to roll my own auth, but was very cognizant about the risks of going down this route. I used primitives provided by Rails (has_secure_password, has_secure_token) and made sure that my implementation is not susceptible to known exploits, such as session fixation attack: https://guides.rubyonrails.org/security.html#session-fixatio...

Re:Ask HN: Looking back, what have you wasted lots of time on? by whycombagator on Saturday August 31, 2019 @10:07AM (#20846339)
> It works great if you won't deviate from the common use case

What have you needed to do that isn’t well supported by devise?