Indeed. "Oh but SPAs are so complex!" Folks are completely and utterly brainwashed by Vercel's marketing.
Pondering an SSR rendered SPA with a wildcard route that calls `React.renderToPipeableStream` (or even simpler, uses `react-streaming`) and some `import()` statements sprinkled about, dropped into a tiny vite config: OMG! a handful of lines of code. Such complexity! Such slow performance! and massive bundle sizes!
Capture the market, complexify everything, then overcharge for hosting. Thanks Vercel. Love your docs!
> What exactly does it improve over lets say PHP or Rails
Uses the same code to render on server and in browser, enables moving render logic from browser to server and vice versa without doing a complete rewrite.
That is greatly compensated by the low quality of the generated code. Vercel's landing page for example takes 12 seconds and 1.4mb of files to load just a bunch of text.
Difficult question to answer because it's difficult to know what you're asking. What is "it" here? Next.js? OpenTelemetry? This specific implementation?
PHP is a programming language, Rails is a framework. They're quite different propositions. What you're seeing here is equivalent to poking around in the guts of Rails, which assuredly has plenty of complexity hidden inside it. I personally have a negative reaction to this amount of stuff in a project but I feel similarly about Rails.
Next’s big “thing” is one codebase that runs both on the server and client. That introduces complexity where you might not expect it. But a Rails app and a totally disconnected JS front end will also introduce complexity, just a kind you’re more familiar with.
It's far too much magic for my taste. I'm really looking forward to the first non-beta release of Tanstack Start. It offers many of the same advantages without the overkill.
I don’t think this answers the parent question. Database queries still needs to be made and a view still needs to be rendered. What complexity does next.js solve?
> Uses the same code to render on server and in browser, enables moving render logic from browser to server and vice versa without doing a complete rewrite.
However, the next question is, does it solve these without adding needless additional complexity of it's own?
I can't help but feel, while I'm using it, that surely it shouldn't feel this overengineered and unintuitive. I mean, I like React, and I understand it well, footguns and all.
I feel like there might be better solutions out there - even using React - and if it wasn't being heavily promoted by a large corporation then something else would be in it's place.
Also, how much of the functionality of Next.js (Image component processing, for example) is designed to funnel you into using Vercel rather than being genuinely the best solution?
in our case it solves performance, it actively keeps cache warmed up preventing it from ever serving a stale page or serving a non cached hit, preloads content for fast navigation, optimizes images, it's lightweight, scales horizontally, it's stable.
it has all the bells and whistles the big boys have, for free, you almost don't need to think about it, just follow some guidance.
while people say it's too much magic (there are 4 cache layers), you are always free to pop up the hood and read the documentation, which is excellent.
document.domain returns the current domain used in the document because no redirect occurred. Similar to if you typed it in your address bar right now, it should show you the HN domain.
It's commonly used as a placeholder in an alert-box XSS PoC. Weaponising this into an actual exploit could have been a fetch(), css inclusion, or enumerating localstorage.
Forced to make difficult decisions impacting his and his family life, decisions about living under dictatorship going insane, living in a country reorganizing itself for war economy. No doubt.
Is this US or EU or somewhere else? I have some experience in Europe.
I (male early thirties then) once was sat in an exit row (replaced with some other passenger) when flying EasyJet. As I understood then only because I seemed to be more fit to sit there.
Once travelling with Ryanair stewardess exclaimed that "oh no you will be sitting with a baby in an exit row". We said "no no we are sitting the row behind". She said "thanks god I thought I will need to rearrange passengers". Of course a baby in an exit row MUST be a big no no anywhere.
So I have a feeling that it is being looked quite seriously.
IDK, maybe I might have ADHD or something, because I open every interesting link in a tab thinking I'll get back to it soon to finish reading or trying it out, but then never do because in the meantime I discover another more interesting tab, so they keep piling up.
I suffer from the same problem and my new solution has been to install a Firefox extension that, when I have more than 5 tabs open, closes any tabs that’s been idle longer than 5 minutes.
I found that with this approach I still get the dopamine hit without getting stuck sifting through 30 articles.
For the same reason you need a stack or a queue for depth/breadth first search. Open tabs represent yet to be completed work. It took work in the first place to open those tabs. If you close them you lose that work.
>Under the health care law, insurance companies can account for only 5 things when setting premiums.
>Age: Premiums can be up to 3 times higher for older people than for younger ones.
>Location: Where you live has a big effect on your premiums. Differences in competition, state and local rules, and cost of living account for this.
>Tobacco use: Insurers can charge tobacco users up to 50% more than those who don’t use tobacco.
>Individual vs. family enrollment: Insurers can charge more for a plan that also covers a spouse and/or dependents.
>Plan category: There are five plan categories – Bronze, Silver, Gold, Platinum, and Catastrophic. The categories are based on how you and the plan share costs. Bronze plans usually have lower monthly premiums and higher out-of-pocket costs when you get care. Platinum plans usually have the highest premiums and lowest out-of-pocket costs.
As a generally healthy person it's very disappointing that catastrophic plans are only available for under 30s. [0] For me it makes the most financial sense to pay out of pocket for incidentals/annuals, but be covered for catastrophes e.g. get hit by a bus and wake up in a hospital.
What magical event happens to people at age 30 that led the legislators to ban catastrophic? Would love to see the actuarial data on that. I have no knowledge/evidence of the reasoning but to me it definitely smells like lobbying.
I imagine this was a political compromise to let politicians advertise the availability of low cost insurance plans for low earners like young people in jobs without health insurance so they were not hit with the tax penalty that used to exist for not having health insurance.
Over 30 is likelier to be making more money and in jobs that do subsidize health insurance so they are likelier to buy it. And since the whole scheme is actually a mechanism to tax, you cannot let everyone opt out of the tax.
It's pretty hard to hide cigarette usage (smell, color of teeth). Vaping is likely to be much easier to conceal though (does that count as "tobacco" though?)
The age one is completely insane considering the amount of unchecked age discrimination that American employers engage in. We decided to fire Bob because he’s 51 and it’s cheaper to employ a 27 year old. Oh Bob, sorry, BTW your market place plan is now also $1500 a month.
Everyone pays for everyone else’s healthcare, whether it be insurance pools, Medicaid, CHIPS, Medicare, etc. In America, we just do it in an especially dumb, cruel, and expensive way because it makes some assholes a lot of money.
We is in quotes because various demographics/political tribes want to pass the hot potato.
The beauty of the health insurance system is it allows you to deliver differing qualities of healthcare to different voter groups.
For example, high voter participation groups like old people can get Medicare that pays providers more and hence more providers are available. And Medicaid for poor people on the other end that pays much less and has stricter rules on prior authorizations. And you can give Senators healthcare that pays providers more than other federal employees, and so on and so forth.
No, we do it that way because both political parties are bought and sold by the assholes who run insurance companies. They use this corruption to impose a private tax on everyone. No one in the US is saving money. We spend more than most wealthy country for worse outcomes.
The insurance companies are not that powerful. Pharmaceutical companies are far more profitable, as are healthcare software, other tech, doctor groups, hospital groups, etc. You may want to look into liability laws and tort reform for other big reasons for why healthcare in the US costs a lot.
Do you work in the industry or something? Yes, all of for profit healthcare is a monstrosity that should be abolished. Everyone I’ve ever met knows the first part of that and it does not excuse how awful health insurance companies are or all the terrible things they’ve done, both past and present. Tort reform has been tried on the state level and it has no impact. It’s just a canard trotted out by those who are trying to keep the human suffering money pump pumping.
If I had to chose between making more money off screwing over an unemployed middle aged person seeking medical treatment or less money not doing that, I would choose the latter. As would most people, because they’re not depraved.
That's not true at all. No need to speculate, insurance companies are real. In fact, you're complaining about the fact that most people have already chosen the former. Is the medical industry really filled with depraved individuals? I suspect you're looking at this differently than them, and I'm interested to know where you think that disconnect might be.
Most people don’t work in the health insurance industry…? But the management of health insurance companies are almost certainly filled with depraved individuals. They’re repeatedly caught engaging in all kinds of evil and deceptive tactics to deny people necessary treatments, including those in quite desperate circumstances. The lower-levels? Who knows. Like a lot of other human suffering industries in the US, they probably just compartmentalize it away or are steered away from thinking about by the c-suite sociopaths who run them.
The comment I replied to specific medical insurance.
When governments restrict insurers underwriting criteria, they are providing a subsidy from one subset of the population to another. I think those are best accounted for as taxes and government benefits.
In the United States, my understanding is that your medical & employment discrimination scenarios are already illegal due to the Genetic Information Nondiscrimination Act of 2008.
There was already an effort to weaken this law in 2017. It didn’t pass, but if corporations are lobbying for loopholes it would be entirely unsurprising to see some slip into future legislation. https://www.vox.com/policy-and-politics/2017/3/13/14907250/h...
Any law could be subverted via these justifications. "Why should I register my gun when the government itself breaks laws, and its politicians corrupted by bribes!"
They'll get sued immediately by everyone who is denied a job following a genetic screen.
There's a reason companies who require a physical or medical history (usually done to find pre existing conditions to protect against future workman's comp claims) do it after the job offer has been extended (it's risky to rescind an offer for no reason by the way) - if they did it before, every applicant with a disability (and their pro-bono lawyers taking a slam dunk case) who did not get the job would sue.
> Medical insurance - oh you have cancer/hear attack/etc gene. You premiums skyrocket.
This is how insurance is supposed to work. It should reflect your actual risk levels.
Now, if what you actually want is socialised healthcare then implement that, trying to backdoor it via insurance gives you the worst of both worlds.
> Job opportunities - oh so sorry you have bipolar gene...
Then the company that looks at actual behavior rather than genes hires people slightly under market and makes bank. Then other companies start copying them.
> This is how insurance is supposed to work. It should reflect your actual risk levels.
Of course not. This is how perverse insurance works. Proper insurance systems work by pooling risks into large groups so that the few who are unlucky to have problems at a given point in time are covered.
The whole custom risk factor at the individual level is pure exploitation and a travesty of what insurance systems used to stand for.
> Of course not. This is how perverse insurance works. Proper insurance systems work by pooling risks into large groups so that the few who are unlucky to have problems at a given point in time are covered.
No just regular insurance before insurance companies figured out they could make more profits by making individual customization, which should be completely forbidden by regulations in the first place.
I'm not sure that I follow. Whats wrong with insurance companies factoring in DNA markers to put people at risk of cancer or heart attack in a higher risk pool?
That's not a custom risk factor at the individual level. Its just using data they believe indicates risk to decide what larger pool the person gets put into.
I don't know insurance law well enough to say if that's legally discrimination.
Now if you're asking me personally, I dislike the insurance industry in general. Insurance shouldn't be required, legally or otherwise. At that point insurance companies can use whatever data they want to price policies, as long as the terms are clear customers would actually have a choice whether they want insurance or not.
Companies use many forms of data to change premiums, many you don't have much control over (e.g. what area of the country you live in). Why is that wrong?
So car insurances shouldn't account for past driving experience?
Are you talking private insurance or socialised risk mitigation?
The goal of private companies is to make profits. There is space and use cases for both models. Of course large private companies put efforts into making people believe that's not the case.
Don’t compare car insurance with health insurance. Past driving incidents are perfectly okay to take into consideration for car insurance, some people need incentives to drive safely. But genetics is nothing people can change, it’s fixed.
This all assumes two perfectly definable categories of characteristic - fixed, unchangeable category, and incentiv-isable behaviour / changable category.
It's not always that clear e.g. genetic disposition to alcoholism is linked to actual alcoholism and related behaviours.
All the evidence I have seen points to “what you were born with”, including the parent(s), family, neighborhood, etc to be very heavily correlated with GPA.
Right, but for some reason it lets claim the moral high-ground. Right now individual taxes account for more revenue than all companies combined, perhaps barring payroll taxes.
Socialize medicine, please. A million dollars for a cancer treatment is insanity, when nearly 50% of the US population will get cancer at some point in their lives.
In the Netherlands insurance is provided by for-profit insurance companies. However, there are very strict rules - they are not allowed to refuse any applicant based on any medical reasons (including preexisting conditions), there is a list of treatments they have to cover, there are rules for the minimum/maximum deductible, etc.
I would not say that this is the 'worst of both worlds'. I actually think it has the best of both worlds, - namely coverage for everyone that needs it (benefit of social healthcare) and competition between insurance companies on price, convencience/reliability of apps, service, etc.
No, that isn't exactly how insurance works, and it would be almost pointless for individuals if it did work that way.
Instead, it works by bucketing risk. In the simplest form, everyone is in one bucket, ignoring individual risk. That means that all other things being equal (e.g. size and value of your house), despite you have low risk of your house flooding, you would be paying exactly the same premium as the person who who has very high risk because their house is built on a flood plain.
Of course people paying more for their risk than it warrants may see that as unfair - so insurers use more buckets - e.g. bucketing high, medium and low risks.
But there's a delicate balance here - for instance, insurers may just decide not to insure the high-risk category. Or even if they do, the premiums may be unaffordable or the insurance benefits substantially restricted. And the natural extension of categorizing like this is to put an individual in a category by themselves - and then to limit payout. Essentially making the insurance not any better than a savings account, and probably worse if you don't claim at the beginning of the policy, before there's a large pot in the savings account.
From the point of view of perfect capitalists, the insurers would like to insure people with negligible risk, for high premiums, for low benefits - to make the most profit. From a social-good point of view, we would like insurers to cover risk that people cannot control (e.g. genetic risk) for reasonable premiums and good benefits. Categorizing lives somewhere between these two - a kind of necessary un/fairness.
> From a social-good point of view, we would like insurers to cover risk that people cannot control (e.g. genetic risk) for reasonable premiums and good benefits.
You're using the wrong tool for the job there, if you want people to be supported regardless of their actual risk levels then you should get socialised medicine rather than artificially restricting what factors insurance companies can take into account (and there will be plenty of information leakage from due to other factors they are allowed to consider correlating with the banned ones).
> This is how insurance is supposed to work. It should reflect your actual risk levels.
This assumes the relation correlation between genes and adverse health outcomes are actually known. By definition that ignores personal
behavior and epigenetics.
If an insurance becomes to specific to the individuals it stops spreading the risk.
(Potentially in some US states): Your biological material was found in the bio-waste can of a facility that was performing illegal gynecological operations. You're under arrest for the murder of a fetus.
In general, a person's performance in their job is the best evidence for their future performance, followed by tests you can give them, followed by their genes. That's not to say that there aren't pointy haired bosses who could be sold a load of snake oil on the subject but that's probably nowhere you'd want to work anyways. And with medicine pre-existing conditions are a much worse problem than genetics could ever be but thankfully in the US at least our existing laws seem to have that in hand.
> sue the first two, get $$$. This is textbook discrimination
Ah but they did no wrong! They just licensed the AI du jur that functions pretty much like a black box, but just so happens to feed on multiple sources of data from dozens of data brokers. One of those brokers aggregates data from other brokers, including DNA data from DNA services.
Meanwhile, all the recruiter saw was "37% match" before reading your resume and moved on.
I don't think the first two are necessary a big deal in a western liberal democracy. We already have fairly strict legislation around data protection and selective hiring based on certain characteristics (like ethnicity - which is really just a much less accurate form of genetic classification).
There might be a period where we haven't legislated against that sort of stuff. But once we do there's going to be a pretty big paper trail if a potential employer or insurance provider is searching a genetic database for you.
Dictators? Yes, they could do that. But they could already send you to the gulag because of how you look, who you're friends with, what you said in the pub etc. It's another tool in their arsenal maybe, but it's not like they don't have a lot anyway.
Would it be possible to combine machine learning with something like 23andMe and match 100 000 person photos with their DNA. Would we have an AI model which basically can tell how the persons looks like from a strand of hair?
Imagine finding some DNA on a crime scene. Witnesses can say that this person was a bit overweight so you slide some slider to the right a bit and get a pretty good AI generated portrait of a criminal.
When playing with a custom LoRA (dreambooth / SDXL) trained on my brother’s photos of himself something interesting happened, when we used the prompt “as a women” instead of “a man”, the result looked incredibly similar to one of our cousin, so much that my parents asked how come she was now in the pictures generated.
There are already features you can extract from DNA. 23andMe shows you your traits and confidence level depending on the research.
But you know just bring it to the real thing: With DNA, Video and ML you will be able to track and find that person through face recognition and probability automatically.
Seems like more fodder to abuse minorities behind the guise of fancy tech and supposedly "objective" algorithms. "All [minority] look the same" isn't just something racists say, it is pretty well documented that many people struggle to discern distinguishing facial features of other ethnicities and consistently perform more poorly on facial recognition tasks involving races other than their own.
Now you have an AI generated photo to go by that further does some fudging and blurring of distinctive features... Can you imagine which races in America, for instance, would be subject to more false positives to receive police/prosecutor attention and ultimately be more likely to wand up with charges drawn against them unjustly?
If you are poor, having charges drawn up by the DA means a plea deal and time in jail or prison 9 times out of 10. If you have money for a good lawyer your odds are better, but overall are still significantly worse than if you don't have charges drawn in the first place, despite the fact that there is no evidence of a crime beyond circumstantial crap, maybe some testilying by the arresting officer (their own term, not mine), and a bogus facial match.
I think it's fundamentally possible but the training set needed might be so large that you're better off just actually cataloging the DNA of most humans and pulling up the picture of the closest match.
reply