HNHacker News
TopNewBestAskShowJobs

midrus

1,678 karma · joined November 29, 2016

submissionscomments
midrus··on Django 4.0
I've used Django for a long, long time (since 0.96). Django is great for backend stuff, but nowadays for full stack applications (if you're not doing an SPA) I find Laravel and Rails a lot better. In particular Laravel's templates (blade) and asset handling is awesome.
midrus··on Why Ruby on Rails Is Still a Good Choice in 2022?
Full stack frameworks such as Rails, Laravel and to a lesser extent Django (because the frontend part of it is inexistent) are what we need for 90% of the cases. The other 10% being offline first apps, and extremely highly interactive apps such as Google Maps or Figma.

Nowadays we have *awesome* ways to do frontend in these full stack frameworks, such as Hotwire/Turbo, Livewire, HTMX, Unpoly, Alpine.js, etc.

The same JavaScript is not your grandpa's JavaScript anymore, traditional MVC apps is not your grandpa's MVC apps either.

And no, Next.js + Prisma, Remix, etc... ARE NOT full stack frameworks despite their claims. They're cobbled together third party libraries all around which just allow you to submit a form to a database. That's not full stack. You need a way to do authentication, authorization, sending emails, translations, command line tasks, background jobs, input validation, caching (and many, many more things).

Why do we do SPAs? Because we as developers want to have the only one "true way" of doing things, so given you can build almost anything with JavaScript, then we want to use JavaScript for everything even if it is not the best tool. It's like when Redux showed up: suddenly *everything* had to go into redux, because that's "the way".

I've been a professional developer for about 18 years, I worked a lot with python (django), java (dropwizard) and the last 8 years or so mostly focused on frontend with JavaScript, last few years doing a lot of React (Next.js) and Vue (Nuxt.js). Playing with Sveltekit.

I love JavaScript and it is what pays my bills nowadays, but we need to realize that the tools and ecosystem (frameworks, libraries, editors, etc) are WAY more important than a language itself.

Nowadays I'm doing a side-project with Laravel, and learning PHP (as a consequence of wanting to use Laravel) and I'm finding it incredible powerful and productive. I like it a lot more than Rails, and certainly much, much more than Django. I can do html components in the server, I can add behavior with Alpine, if it is a complex one with LiveWire, and if I want to do SPA like page transitions across pages I can use Unpoly. And I can trust the next person picking up the project will have a decent documentation (Laravel's official docs) which is something you don't have when you cobble together your own library salad.

midrus··on Twitter’s heads of engineering and design will leave in a company shake-up
I've definitely seen this happening more than once, so to me this is a thing for real. The people you you'd want to stay leave, and the people you'd want to leave stick forever.
midrus··on Django, HTMX and Alpine.js: Modern websites, JavaScript optional
From my point of view, Unpoly is just more "full stack" than the others. You have the functionality of several of the others in one single package, plus awesome things such as automatic loading indicator (turbolinks style), very good error handling, modals, layers, popups, sidebars, slow network detection, caching, eventbus, server provided instructions via custom http headers, polling, keeping elements across page transitions, compilers (kind of "stimulus" for creating custom behavior based on html attributes), etc. And all of it in an awesome and very clear API: It's all custom and data attributes on standard elements.

HTMX, in my opinion, has a smaller scope. Of course you can do everything, but you'll have to do more yourself.

Alpine seems to be even more low level, kind of a lightweight Vue. I don't like it, it really turns me off adding code in html attributes.

midrus··on Ask HN: Simplest stack to build web apps in 2021?
If we're talking about inspiration, then maybe it goes the opposite way? Given Turbolinks existed many years before even elixir or phoenix existed. In fact the creator of elixir was a very prominent rails dev.

But I insist, they have almost nothing in common other than maybe the end user result. The approaches they take are architecturally very different and with very different trade offs.

midrus··on Ask HN: Simplest stack to build web apps in 2021?
I do!

Backend:

  - Huey for background jobs
  - Whitenoise for statics handling
  - Gunicorn for running the application
  - Honcho for process management (also for development, for spawning js and css bundling)
  - Slippers for django template components
  - django-all-auth for signup/password recovery/etc.
  - django-rest-framework if you need an API
Frontend:

  - Unpoly for ajaxy SPAish feel (just the good parts of that feeling)
  - Tailwind for styling
  - esbuild (CLI) for bundling js
  - npm for frontend dependencies
  - postcss (CLI) for building/packaging css
Deployment/infrastructure:

  - Dokku for hobbie or side projects
  - Heroku for getting started with production apps, AppEngine if shit gets real.
  - No need for Websockets, polling is good enough most of the time.
  - Sqlite for side projects
  - PostgresQL for serios stuff
  - Maybe redis
midrus··on Ask HN: Simplest stack to build web apps in 2021?
I'm a big fan of Unpoly. Pretty similar to Htmx. Unpoly just fits my brain better.

https://unpoly.com/

midrus··on Ask HN: Simplest stack to build web apps in 2021?
> With Golang, you actually don't need a mega framework to get started

You just need to build it from scratch, document it and ensure it is well tried and tested.

"mega frameworks" are there for a reason. Rails, Django, Laravel, etc have everything they have because almost any web application you build (except if it is just a minimalist micro-service) will need routing, authentication, i18n, ORM or similar, migrations, caching, e2e testing, validation, background job processing (the one that works after a deploy or restart), and a thousand more other things.

Of course you don't need it to "get started", but 1 week after getting started you'll find yourself rebuilding the wheel yourself or tying together 10k dependencies (something doable if you have enough experience and know what to pick and what to not pick, but risky).

> And it's not uncommon in Go codebases to repeat yourself.

The fact that it is not uncommon doesn't make it any better. Rewriting the universe from scratch in every single project is the worst idea ever.

I don't think that because we like a programming language which happens to have no popular web framework we need to negate all the problems of not having one, or say it is in benefit of simplicity. It is not.

I'm very sorry for my rant, but I've already faced too many disasters in work environment were people thought that "just flask" would be enough, and years later we're still fighting the fire and trying to understand why this custom ORM validation integration doesn't work.

midrus··on Ask HN: Simplest stack to build web apps in 2021?
> It’s what rails copied for the Hotwire stuff

It is not. From the outside the end result for the user might be similar, but that's where the similarities end. Elixir's LiveView what I assume you're talking about keeps state on the server, in memory, and sychronizes changes back to the client over a websocket. Hotwire is "stateless" in the sense that no end user state is kept in memory on the server across requests. You can also use most of Hotwire without websockets.

My previous company was using Elixir, and they moved away from it because everything took longer to develop, the ecosystem of libraries was very lacking, the tooling (such as editor support) was terrible, and it was very difficult to hire experienced developers.

Performance wise, I agree, it is faster and you will use less servers. A nice problem to have to be honest.

midrus··on Remix – A framework focused on web fundamentals and modern UX
Yes, but just because marketing.
midrus··on Remix – A framework focused on web fundamentals and modern UX
You can consider yourself a recovered person then.
midrus··on Remix – A framework focused on web fundamentals and modern UX
Not full circle...this is more like an 8 shaped thing, and with this we're right at the wrong extreme right now in my opinion.
midrus··on Remix – A framework focused on web fundamentals and modern UX
I think in an SPA, traditional form posts and server redirects are a terrible idea.

This might work for q blog post example, but imagine doing a full reload just because you liked a post or a comment.

midrus··on Remix Goes Open Source
Wow! They reinvented form POSTs and server redirects!!!111

You've got to be kidding me.

midrus··on NPM – "is-even", 160k weekly downloads
Well... if the actual Open Source work you do is in your day job except that instead of committing to the internal codebase you commit in your own packages all day and then update the dependency in the project, I don't think you need to be 10x.
midrus··on NPM – "is-even", 160k weekly downloads
> I wonder how many jobs they’ve applied to while bragging about their millions of monthly NPM downloads.

I used to work for a company where it was ok (managers won't say anything, even if explicitly pointed at the situation) to remove company company code, create your own NPM package (on your own private NPM account) and add it as a dependency of the company codebase(s).

This and some other similar behaviours were the reason I left that company. But I'm the loser of the story here, as those guys are now working for even bigger companies with bigger salaries than me.

midrus··on Rich Harris joins Vercel to work on Svelte full time
Yeah, now add state management, event handling, side effects and performance optimizations and come back with your example. You're just comparing syntax. This is very naive.
midrus··on Rich Harris joins Vercel to work on Svelte full time
I just don't get people complaining of trivial or superficial stuff such as how to do ifs, loops or binding handlers. When the most important part of these tools are the architecture, the trade offs, the state managements, the tools, the libraries and the ecosystem.

Complaining just because of the syntax is just trying to convince yourself you don't like it.

It's like when people just discard tailwind because they don't like how ugly many classes together look on the html, ignoring everything behind it which is what really matters (and that you can still like or dislike).

midrus··on Rich Harris joins Vercel to work on Svelte full time
Yeah, I really like the middle ground approach, but having tried almost everything in the category, my favourite by a long margin is Unpoly.
midrus··on Rich Harris joins Vercel to work on Svelte full time
I've used React extensively, and now I'm about into 1 year of Vue 2 with Nuxt after having switched jobs.

My gripes with Vue are:

- Despite they say it is not a "Python 2 to 3 like" situation, it is. Every library you find specifies if it is for Vue 2 or 3, some have versions for both, some are only for 2 and will never be upgraded to 3, others are just for 3.

- Vue doesn't have any spirit or ideas of its own. It just copies over every feature from every framework trying to be all to everyone, which leads to too many different ways of doing the same thing.

- There is a horrible culture of auto importing things (components, functions, ref sugar, etc) . This breaks tooling and editors, then they patch those to auto detect these tricks, then introduce a new one and everything breaks, then again..

- Many, many times I was trying to investigate a problem and you end up in a Github Issue which has part of the discussion in Chinese. Doesn't happen as much in official repos, but it happens in many of the third party libraries you end up needing anyway. Some libraries don't even have a readme in English.

- In the part of Europe I'm in, nobody wants to use Vue, so it is difficult to hire.

- Nuxt.js is terrible compared to Next.js. They're also in this "2 to 3" rewrite, and have been terrible at communicating. Probably our project at work will never move to Vue 3 and/or Nuxt.

- Community feels an order of magnitude smaller than react.

On the good site:

- It has a far, far, far better reactivity system than React. No need to manually track dependencies, memoize callbacks and components, etc.

- It is a lot more easy and intuitive, a lot less foot guns.

- It is a real framework, as you have an official router, state management solution, styling approach, etc. I love this.

midrus··on Show HN: I made a form builder that saves data in Google Sheets
It looks great, and very professional. I'm impressed.

Did you build it yourself? Because it honestly looks like a full blown company had built it by how good it looks from the outside. If so, you're a f**g machine!! Congrats.

midrus··on Rich Harris joins Vercel to work on Svelte full time
We seem to agree. I'm not saying React's approach isn't justifiable. It is what it is for reasons.

I just don't agree all that complexity is worth when you need to ship things fast with a decent robustness and performance. Specially when you don't have 100s of devs in the project.

I'm just saying that given React vs Rails, for 80% of projects I'd pick Rails+hotwire+etc... But given Svelte vs Rails, I'm more inclined to pick Svelte now, because it is not so complex, for now at least.

midrus··on Rich Harris joins Vercel to work on Svelte full time
Yes, clearly it is not for purists.
midrus··on Rich Harris joins Vercel to work on Svelte full time
The complexity and the over engineering going on, mostly.

Things such as redux, rxjs, observables, thunks, etc really put me off when you compare that to just MVC with Rails for example, plus most applications I worked with React were just forms anyway, with some fancy controls/widgets on top.

Not having a clear way, even today with Next, to load data (client side, without doing SSR) before a route transition happens (which leads to spinners everywhere), and now the solution seems to be all the server components, concurrent mode, suspense, etc, etc which to me is just mind blowing how complex things became.

Also hooks which conceptually they make a lot of sense and I like them, but then you have to do all the dependencies tracking manually, they have a lot of gotchas (async in useEffect, ordering, etc).

The "rerendering of everything" and the need for manual memo, useMemo, useCallback, etc and the whole "don't optimize it until you need it" (guess what, a my company as in many others it never was a product priority to make it fast).

Now, take the good parts of the approach, remove all these complications, and you have a very nice and clean approach to do web apps. To me that is what Svelte brings back.

midrus··on Rich Harris joins Vercel to work on Svelte full time
It is really worth it. Svelte is sooooo much better than React. Believe me, I was one of the skepticals about the entire SPA thing but after trying Svelte I think my problem was with React, not with the concept per se.
midrus··on Gmail’s fake loading indicator (2020)
New insult for PMs: You're worse than NPM's progress bar!!
midrus··on Rich Harris joins Vercel to work on Svelte full time
I've been pretty skeptical about SPAs but having tried out Svelte for a few side projects, I have to admin I was probably directing my skepticism to the wrong thing, probably React was the cause of my dislike for SPAs. Svelte looks really awesome and the simplicity it brings back is invaluable. I really wish it takes off, for real. Looks very promising.
midrus··on Gmail’s fake loading indicator (2020)
Except they also add tons of overhead which also makes everything go slower, including that meeting to discuss why we go so slow.
midrus··on Will the climate crisis force America to reconsider nuclear power?
What other feasible/realistic cleaner alternatives do you propose?
midrus··on Will the climate crisis force America to reconsider nuclear power?
Problem is that the alternatives, even done right, are worse.
← PreviousPage 7 of 20Next →