HNHacker News
TopNewBestAskShowJobs

ervine

311 karma · joined February 18, 2019

submissionscomments
ervine··on Don't use booleans (2019)
Well done.
ervine··on Don't use booleans (2019)
Lemme be an absolute pedant and say that's destructuring, not spreading.

And correct me if I'm wrong, nothing worse than an incorrect pedant.

ervine··on Don't use booleans (2019)
Yes, 100%. Although you end up with some super gnarly types sometimes, so much better than marking a bunch of properties as optional but not handling certain combinations of them being passed in correctly.

Lord knows I still do that most of the time though...

ervine··on Don't use booleans (2019)
Big time.
ervine··on Old dogs, new CSS tricks
Old paradigm (media queries): You make layout changes based on the width / height of the viewport (browser).

New paradigm (container queries): You make layout changes based on the width / height of the containing element.

This lets you layout a component so that it looks good in any sized container. Picture a component that might be in the main section or in the sidebar - you can now just style directly based on width of the container instead of having to know the total width of sidebar + main section and do the calculation using viewport width.

ervine··on Simplicity is an advantage but sadly complexity sells better (2022)
Yep - seems clients have a knack for asking for the most complicated way of doing things.

Frustrating as a developer that is already slammed, but good for the business overall. But how many times have we all built extremely complex features that never ever get used.

ervine··on Gems of Tailwind CSS
Ideally design would be using a design system - you can alter all the spacing utilities in Tailwind to match the design spacing if they don't go by the multiples of 4 that Tailwind does.

If you're getting Figmas with inconsistent padding / margins everywhere, no CSS framework is going to save you.

ervine··on Gems of Tailwind CSS
Yep but Tailwind is not about replacing native CSS.
ervine··on Gems of Tailwind CSS
We do exactly that. And if you're not thinking semantically with Tailwind, you probably aren't thinking semantically with css / sass variables anyway, as it's the exact same thing.
ervine··on Gems of Tailwind CSS
Sample size of 1 here.

I lived through every CSS fad for writing "maintainable" css, and have settled on Tailwind. It doesn't limit you, you can always add normal old css files to your project if you need / want to.

But what it means is I don't end up with a `utilities.scss` of `.flex` `.block` etc etc etc, which you always do on any project. I get a full catalogue of utility classes that only get included in the generated css if I use them in my project, I don't have to think about class names, and I don't have to open a separate css file.

The only con is sometimes an absolutely ridiculous amount of utility classes on an element, but frankly scarlet...

ervine··on Gems of Tailwind CSS
Not at all, Tailwind lets you define your own classes - so you can have text-primary text-secondary, just like you would with sass or css variables (in fact you can use css variables to generate your tailwind classes).
ervine··on Garbage collection for systems programmers (2023)
Sprayed spot remover on my dog. Next day he was gone.
ervine··on Remix Vite Is Now Stable
Yep and it split the ecosystem / documentation / dev efforts / codebase.

Should've been a different product.

ervine··on Remix Vite Is Now Stable
https://github.com/vercel/next.js/discussions/46722

If only this had been brought to their attention recently with a bunch of good-faith discussion.

ervine··on Remix Vite Is Now Stable
What limitations? You mean like not being able to use the full node API in your middleware that's being run by the node server that you control in your own infrastructure?

And how about that dev rel... no response since August of last year.

https://github.com/vercel/next.js/discussions/46722

ervine··on Kind of annoyed at React
Man I agree with all your comments so far. You get it!
ervine··on Kind of annoyed at React
Yeah that's a great point. Nothing makes me start really looking closely at a merge request than when a useEffect shows up.
ervine··on Kind of annoyed at React
You're right, but I haven't touched a React project in ages that wasn't using a fetch library of some kind that give you hooks.

Cause you're inevitably gonna want to track loading state, error state, refetch on error, revalidate etc etc.

swr or tanstack-query are great and remove the need for useEffects for API requests. For sure they come with their own overhead, but there isn't getting away from the complexity of handling API requests and all the possible paths that can happen.

ervine··on Kind of annoyed at React
But all the lifecycle methods were magic that needed to be understood... hooks just let you co-locate related logic in one place instead of scattered across 3 or 4 lifecycle methods.
ervine··on Kind of annoyed at React
I'll never understand the "hooks are bad" people. I don't find useEffect confusing, creating custom hooks is a breeze, life is so much better than old class components.

When I read complaints about hooks I'm either missing something fundamental about why they're bad, or the people complaining are missing it.

ervine··on Why I'm using Next.js
Yep absolutely, I agree and understand how much we're getting for free.

On the other hand, their marketing and hype machine has gotten the industry at large to buy into their product. So when you promise enough to get companies to move to your (free, open source) tech stack, but then are MIA when there are issues... I am of two minds.

But yes at the end of the day you're right.

ervine··on Why I'm using Next.js
I never claimed middleware doesn't work when self hosting. I claimed that it's not as useful as it could be, because your company has prioritized edge deployments over supporting self-hosting.

As someone in that discussion rightfully says: "We are grown-ups with access to the same tracing and profiling tools as you. There is nothing dangerous about us using Node.js as far as I’m concerned."

Additionally, your comment just reeks of PR to me. I don't know if you do it on purpose or what, but to read my comment and then come back with "Middleware works when self hosting"... it has to be intentional on your part to misunderstand my comment that badly.

ervine··on Why I'm using Next.js
Are you against typescript or types in general?
ervine··on Why I'm using Next.js
Yep their github management is atrocious. I understand it's a popular product so you get a lot of low quality issues opened, but there tons of real problems where no developer ever appears, and then are closed by the bot because of inactivity.

Infuriating. The longer I do this, the more that issue management responsiveness becomes a real consideration when choosing a dependency.

ervine··on Why I'm using Next.js
It's easy but there are decisions made that hamstring you - like being unable to change cache-control headers in the next.config.js or middleware or have your middleware use node APIs, which is especially stupid because when self-hosting... it's running in node!

They are optimizing for deploying to the edge, which when self hosting you don't need to.

So whether malicious or not, their guard rails conveniently make it frustrating to self host once you need to do anything outside of their garden.

ervine··on Next.js 14
Listen there are so many examples in that thread that this question is nothing but disingenuous. I'm sorry man.
ervine··on Next.js 14
https://github.com/vercel/next.js/issues/22319 https://github.com/vercel/next.js/discussions/46722

Let us take control when self-hosting, please!

ervine··on Next.js 14
Absolutely, this is the number one issue I have with next.js - they did a huge ecosystem-splitting update, but now recommend switching to the new paradigm for any issues with the old all while saying they are maintaining the old.
ervine··on Next.js 14
Please take this seriously: stop advising in github issues to switch to App router as a solution to bugs in page router.

It's not an option for large next.js projects, and certainly does not convey what you're saying here.

ervine··on Amazon instructs New York workers “don't sign” union cards
Why is stevespang's comment flagged as dead?
← PreviousPage 3 of 4Next →