Hacker Newsnew | past | comments | ask | show | jobs | submit | leoff's commentslogin

>In a sense, it is the difference between the way an entrepreneur might approach doing a startup versus how we build modern skyscrapers. Evolution versus Engineering.

There are core differences in software engineering that, unlike in construction work:

- making changes is often cheaper

- we might not know beforehand everything that is needed to be built, especially unknown unknowns

I would still agree that the truth is somewhere in between, but I would argue that, for software, it's closer to the evolutionary approach.


Exactly this. OP fails to understand that there are reasons why it was done this way, and that someone who spent thousand of hours working on this might know something that they don't.


Well, usually, the reasons are to support every single use-case. A great selling point, but ultimately why I don’t like using things like this and importing loads of other libraries. Most of the code your importing is for some other user and any one app will probably be using a slither of the functionality.

I know if the lib is written well then you won’t be introducing unused code into your code base but you still often are left with an overly complex scaffold or other infrastructure to support all the stuff you’re not using. Just use a radio button for gods sake.


"There are reasons" is a pretty bland defense of why something was done in a bad way. You'd have to show that the reasons are valid, which I highly doubt. Also, somebody spending thousands of hours on making a worse version of something existing, isn't a good justification either. That's on the level of counting lines of code as a measure of productivity.


Perhaps this is the original PR for the Radio/RadioGroup[1].

It does seem the complexity was a deliberate decision.

[1] https://github.com/radix-ui/primitives/pull/121


Half of that complexity springs from the requirement of being able to put any element as the radio button. If you’re willing to say “you can only use anything that can be expressed with CSS applied to the <input type=radio>, including psuedoelements” (which is plenty for thing like shadcn), it melts away.

The other half of it looks to come from an overloaded Label component which should probably have been split into two. There’s a reason that HTML has <fieldset> and <label> as different things. The implementation is also trivially incorrect: role=label isn’t a thing. Other parts of it are wrong or dubious too. In general, if the HTML way of expressing something isn’t permitted, the ARIA way of expressing the same thing is probably wrong too.

And so it goes, through the entire system. They assume you might want something ridiculously complex, and so they complicate and make worse the normal case.


Bingo!

For the "requirement of being able to put any element as the radio button.", Dan Abramov tells you that this is exactly the point of React, see his comment above:

> For what it’s worth, the point of React is that you can just fix that Radio component to be an input (if that makes sense) and it’ll just be an input. [0]

[0] https://news.ycombinator.com/item?id=46690762


You’re misunderstanding. This isn’t about React, it’s the Radix UI primitives library which is being overcomplicated by it allowing you to put any element as the visual part of the radio button.

As for “the point of React” being that you can just do such and such… there’s nothing special about React there, that’s what any of these component libraries achieve (React, Vue, Svelte, &c., even basic templating systems like Handlebars a lot of the time).


Am I?

I was just quoting the React creator.


Radix UI Primitives has placed this requirement on itself. What you’re quoting amounts to “component abstractions allow you to easily throw Radix UI Primitives away” which is irrelevant.


Quite an ironic use of the word "fix" there.


Author here.

Thanks for sharing the PR. Frankly that raises more questions for me. Why do they want to wrap a label in a label? What is the actual goal here?


Can here to say this exactly. Not saying they don’t raise an interesting point but the complete lack of curiosity why a group of experts in simplicity and accessibility decided to take this path is jarring


> a group of experts in simplicity and accessibility

According to who? This alone is a pretty damning case against such a claim.


I mean, that much is obvious just based on casual reading of a few articles/discussions about "modern" front-end dev.

I am 100% convinced that "Modern" front end developers are in fact, afraid of CSS and HTML. Like, "it will steal my eyeballs and look back at my face with them" scared.

Nothing else explains things like this, tailwind, JSX components, etc. Nothing. There is no explanation besides absolute morbid fear of the underlying technology - because the browser support has improved immensely but apparently they're all deathly scared of using it.

Before you tell me that I don't know what challenges these problems solve: I was primarily doing front-end development.... 20ish years ago. One of my first jobs in the space was adapting the client side code for a J2EE app - mostly this meant removing an IKEA worth of tables and using CSS - in IE6 of all fucking things. Subsequently I created reusable UI frontend components (i.e. output some HTML, maybe this little bit of corresponding JS, you'll get a usable interactive components in a browser) for two different organisations.

I have said it before and I'll say it again. I think JavaScript developers heard about (or saw over someone's shoulder) how J2EE guys had ant/etc build toolchains, and had abstraction like FactoryFactoryImplementationFactoryBuilderFactory and said HEY THAT LOOKS COOL, and if it's harder to understand they can't fire me!!

It's like NIH syndrome but for an entire community of people whose primary goal is chasing the shiny, followed closely by resume padding.


well said!


Okay, what exactly are those reasons?

Why does it need so much complexity to draw a radio button that doesn't look all that different to the normal one you'd get with a perfectly ordinary <input> field, except it takes around ten seconds to draw and then doesn't work properly?


That's an incorrect answer. A light-day means "the distance covered by the speed of light in a day (24h)". The day length is related to Earth's turn speed, it's not related to its distance to the sun.


also, a light-day is a unit of distance while the question asked about time.


I think the models are under high load right now, and not working properly.


So the error messaging is wrong, giving the user the impression it's their fault for not paying. I think that's worse..


It's both.

Free tier users get to use what's left over from Google's capacity. They pay with their data, Google uses their inputs for training.

Paid tier users pay with money, Google doesn't use their inputs. They get priority when capacity is running out (like right after a launch as happened here).


There is no paid tier on Antigravity currently.


I don't know what a

haiku is. can anyone

please explain it?


It is a poem.

Not too many words allowed.

Not too few either.


I seriously thought they meant "it's not possible to have a chess game with more than 218 moves"


Yeah, I'm still confused.


There is no reachable[1] chess position[2] at which a player has more than 218 valid moves[3] to choose from.

[1] Able to happen while following the rules of chess

[2] The arrangement of chess pieces on the board

[3] A valid move is the motion of one piece to a place on the board, which doesn't break the rules of chess - e.g: "King to E4."


Seriously? I don't care what you call your tables, as long as it's consistent and it's nothing egregious.


Sure, unless most the team is international, and the referenced "quote" was actually meant to function as "quota"... you just haven't earned your grey beard till you spent days chasing down a developer to explain their code.

Nice guy, but a conditional recursively defined polymorphic class on a transaction server should be a crime. lol =3


>>My best wasn't good enough. I'm not good enough. >what an awful way to talk about yourself

He's is not completely wrong with his line of thought, but I agree it's awful.

It took me long to figure this out for myself, the truth is that OP needs to grow up, and this is the perfect opportunity to do it.


>The less your core logic depends on specific tools or libraries, the easier it becomes to maintain, test, or even replace parts of your system without causing everything to break.

It seems like the author doesn't like depending on `pydantic`, simply because it's a third party dependency. To solve this they introduce another, but more obscure, third party dependency called `dacite`, that converts `pydantic` to `dataclasses`.

It's more likely that `dacite` is going to break your application, than `pydantic`, a library used by millions of users in huge projects, ever will. Not to mention the complexity overhead introduced by this non sense mapping.


> simply because it's a third party dependency

Not simply. This is one one of the most important reasons NOT to propagate something through your code. How many millions codebases use it is irrelevant.


>How many millions codebases use it is irrelevant.

It is relevant, because it speaks to the reliability of the dependency. `pydantic` has 24.7k Github stars and was last updated 52 minutes ago.

Adding a random dependency `dacite`, which has 1.9k Github stars, no one has ever heard of, and was last updated 4 months ago, introduces way more complexity and sources of instabilities than propagating `pydantic`.


More updates means more changes and more instability. I have never seen dacite, but it’s pretty easy for a small library to just be complete. If it’s complete, why the need for constant changes?


wrong: given that we got this result, what's the probability the null hypothesis is correct?

correct: given that the null hypothesis is correct, what's the probability of us getting this result or more extreme ones by chance?

from Bayes you know that P(A|B) and P(B|A) are 2 different things


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

Search: