Hacker News new | ask | show | jobs
by nanna 1659 days ago
I must learn Django, it's got everything I'll ever need. No, Rails will make me happy and it's better for lonely devs like me. No I must learn a Modern Web Framework (TM) to prove I'm not stuck in the past. No way, I'm not a fashionista. Have you seen that Phoenix demo where the guy builds Twitter in like 4 minutes? That's the future. Hold on a minute, enough of this magic. I need to learn to build everything in Common Lisp and own my code 100%! Wait I don't actually have the time for that. Django is the way, it's so solid, just that it won't bring me joy....
8 comments

There are just so many makes and models of automobile and people get by. I remain so confused why choice paralysis is a thing in software.

Maybe the libraries need to cost 30,000$ ;-)

That would for sure push our community to better describe the runtime of the different solutions. We talked only about syntax, features, semantic but very little about the runtime characteristics of the different platforms (Java, .Net, BEAM, different Common Lisps implementation etc). Maybe it's a sign of abundance and that most of these solutions are ok in most of the cases.
Different cars are much more obviously different than different web frameworks. When car shopping, you know whether you're looking for a RAM3500, an Odyssey, or a Mustang. Sure, the F-150 may win out in the end, but the Caravan and Charger were never contenders when looking for a truck.

Choosing between software (especially bikeshedding between languages that both place priority on being pleasant to write) is often like comparing a Tacoma to a Tesla on the quality of seat heaters, upgrade price for the sunroof, and selection of factory paint options. Worse, you can't often have a clear understanding of the difference without investing the time to gain direct experience with each option. Otherwise, you're relying on community reputation and hoping it's both accurate and not horribly out of date.

Sometimes they cost you much more, if you chose the wrong one
Imagine each car model having different controls, different engine and components placement, some coming with rectangular wheels. That image is closer to SW frameworks.
That's me. Once a year I get burned out from all the new languages and frameworks and decide to learn Common Lisp again for the 10the time.
Hahahaha you've just described my life too
Same here :/
It's actually a bit worse (or better) depending on how you see it. You get to invest (time, energy) in what will land you a job. 99% it's not what you want/like and not what is technically best. IT's just what came to dominate your job market.

At least if you're in a EU backwater country or in EU public sector-related projects. (Which usually means java/c# and to a much lesser extend a python tech stack).

PS: Loved the rant but you forgot to mention Golang :). "You're doing web backend and not using Go?!!"

This really depends whether you see IT as a job or as a tool to achieve your own projects. If the latter, then you don't particularly care how "hype" your tech stack is as long as it successfully solves your own problems.
There's also the part where you dig around to see what people use and recommand, and most of the answers are "use what you already know", which doesn't help when you don't know anything in detail. I feel like at this point the best strategy would be to list all the viables alternatives, pick one, and forbid yourself from using anything else for the next X months, but when thinking about that I have a huge fear of missing out.
You can experience all of this while staying in a single language ecosystem. Just recently, I had to build something in Javascript and got to know Express is no longer recommended. Fastify, Remix are the latest hotness. :)
I genuienly have not heard about either one of the three. I guess I remain stuck in PHP, Phalcon Framework, Symfony and Django / Flask.
I was checking out Express...how do I get user logins, oh just npm in 50 other projects, adding 50000 dependencies. Back to Django then!
The difference between Django and Express.js is that one is a fully-fledged web application framework, while the other is a micro framework that just gives you a simple request -> response abstraction over `http.createServer`.

I find Flask is more comparable to Express.js in that regard. Need auth? You need to:

1. Install a lib for persistence

2. Set up cookie sessions, or install another lib for JWT

3. Set up auth middleware

4. Prepare login/register/forgot pass views and flows

which are almost the same steps you need to take in Express.js.

I guess my surprise came from asking around about what framework to use and being told it was Express. I guess it might be 'Sails', but it's been a week or two so that is probably obsolete now.
Haha, that's exactly what I'm dealing with right now on the project I'm working. Add on top of that Firebase Cloud Functions. I really miss Rails.
Nah, Django makes you sad: async support is not full, migrations engine is pretty poor, not all database features are present, any kind of typing is hacky, very slow and so on
> migrations engine is pretty poor

I find this to be an odd take. The Django migrations engine is probably its strongest feature.

Any change you make has to be atomic, or it is unable to detect the change, and you have to rely on manual migrations.
What do you mean by this? Auto migrations detect changes in your models. I'm not sure what atomic means in this context.
Let's say you change some attribute and the name of a model, Django simply does not recognize it, nuking the whole attribute
There is at least one way that migrating a + b is different than migrate a + migrate b, in ways that you can then only incrementally migrate your project rather than building from scratch.

It’s mainly in post migrate actions, and specifically for me adding a group for permissions.

If you write manual migrations, then it's often worth it to write the reverse function (in your case, deleting that group) so that you avoid this situation.
It’s not the back and forth, it’s that a migration in b that requires the post migrate step from a will fail if both migrations are run in one shot, (say, because you’re bootstrapping a new dev or test db) but it will work when done incrementally (such as during development or deployment).
What other migration engine have you used that's better? Anything non-django I've used makes me wish I was using Django
"alembic" is better by leaps and bounds. it is used within a SQLAlchemy system, which is also a superior ORM than Django's.
question of taste...
Less taste and more that data mapper ORMs are better (although harder to make) than active record ones, except for very small datasets/simple queries.
"Better" for whom? It was a long time ago that I surveyed the ORM landscape but I remember thinking at the time I was much happier using an active record style ORM.

I guess I'm saying I'm always suspicious when I see "better" with no qualification. Everything has tradeoffs.

Yep, web solutions change too fast, with lots of legacy, and every solution is a compromise.
paradogm of choice