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

It's tricky because you're now cropping into rectangular apps which may actually use all the pixels they get and want hit testing in them.

When Windows went to a 1 pixel border and shadow effects, it still had hit testing in a region around the window to account for that. No idea what they're doing with rounded corners in Win11.


Eh. AvE was amusing for a while, but the shtick grew old to me and it all feels much more theatrical and artificial (not necessarily artificial as in faking data, but artificial as in the entire process designed to be amusing rather than useful) as opposed to the no-nonsense "here's the methodology and the data" of project farm.

Not sure why this is getting downvotes, it's absolutely true. For a very long time you couldn't even set different scroll directions for external mice and the touchpad - even if it's (maybe? I forget) supported now it's always been an area Apple didn't care about and was far behind Windows and Linux.

I assume it’s getting down votes because it’s off-topic. The parent comment was suggesting external mice as a temporary measure to debug the intermittent issue they’re facing.

Whether or not external micr suck on MacOS doesn’t really matter. The objective was to diagnose an issue.


It's not supported as of now. Tools like Scroll Reverser are still needed to specify scrolling behavior between the touchpad and an external mouse.

Recent switcher to macos. I can't find a way to separately set mouse acceleration and scroll wheel momentum.

I use a trackball for RSI reasons, in order to get across the screen in a single flick means high sensitivity, mouse acceleration is absolutely needed to be able to make small movements. This makes my scroll wheel useless because a single scroll moves the page about 1/10 of a line


I will pile on here and claim Apple is shockingly hostile to accessibility. From the weird way tabs work for focus to the limited options for text clarity, to the lack of control for mice customization, it feels like it has been a low item on their priorities for some time.

Have you tried Better Mouse? IIRC, it can set different settings per HID.

Oh is that supported now? I've always used some tool (ScrollReverser) to fix this.

Another comment suggests that third-party tools are still required and that Apple still hasn't added support for this, which makes me wonder if anyone at Apple uses an external mouse or if this is a scenario they literally don't care about.

Whether powered by human or computer, it is usually easier (and requires far fewer resources) to verify a specific proof than to search for a proof to a problem.

Professors elsewhere can verify the proof, but not how it was obtained. My assumption was that the focus here is on how "AI" obtains the proof and not on whether it is correct. There is no way to reproduce this experiment in an unbiased, non-corporate, academic setting.

What bias?

It seems to me that in your view the sheer openness to evaluate LLM use, anecdotally or otherwise, is already a bias.

I don't see how that's sensible, given that to evaluate the utility of something, it's necessary to accept the possibility of that utility existing in the first place.

On the other hand, if this is not just me strawmanning you, your rejection of such a possibility is absolutely a bias, and it inhibits exploration.

To willfully conflate finding such an exploration illegitimate with the findings of someone who thinks otherwise as illegitimate, strikes me as extremely deceptive. I don't appreciate being forced to think with someone else's opinion covertly laundered in very much. And no, Tao's comments do not meet this same criteria, as his position is not covert, but explicit.


>Beautiful code only tends to exist in open source.

This hasn't been my experience at all. Beautiful code happens when strong experienced developers are present - either as the authors or as leads instilling good culture on teams. It exists where teams acknowledge that someone (maybe even them) will have to come back to this code in the future. There is plenty of beautiful code inside the non-OSS repositories of Google, Microsoft, and others.


Oh, I didn't know that, I guess from the outside it never seems that way.

This is all irrelevant - it's completely unacceptable for the US President to send the military into another without Congressional approval, and to kidnap a leader at all (especially without a declaration or war or UN authorization).

The War Powers Act actually does allow this. Congress has to be back filled within 48 hours after the action (and they were). He can also station troops up to 60 days without congressional approval.

As Jonathan Turley reports https://jonathanturley.org/2026/01/03/the-united-states-capt... this operation will be justified as executing the criminal warrant (issued by the Biden DOJ and outstanding since 2029) and responding to an international drug cartel, a very similar legal framework to the one used against Noriega in 1989 - which was tested in multiple US courts. So like it or not there is longstanding court affirmed precedent supporting that earlier operation, which will now be used to defend the actions in Venezuela.

Does this mean trump will be pardoning Maduro on receipt of a sufficiently large bribe? That seems like the only explanation for recent pardon of former Honduran president Juan Hernandez.

I assume that's rhetorical question?

Even before Trump v. United States, Maduro would have enjoyed immunity as a head of state. They still need him as a source of info on the generals. And if the drug smuggling explanation works, cartel details justifying maneuvers in Mexico.

So a thought experiment: If China were to put out a warrant for Trump's (the most unpopular president in US History, someone the majority of Americans disapprove of, a convicted criminal, and a pedophile who raped young people and has not been brought to account for these crimes as of yet) under the pretense that some of his victims were Chinese nationals and then invaded the Whitehouse to forcibly remove him to China, would that also be legal and justified ? What would you expect the reaction in the US to be ?

To be very clear I do not support this -- out leaders should be held to account to their people, not foreign invaders deciding for us. Even if it seems unlikely that they ever will be, it's our process and people.

This argument doesn't really hold water because the jurisdiction of a nation isn't the whole world.

If we have a warrant for a Sovereign or someone else with Diplomatic Immunity we -- at the very least -- should not invade their territory to carry it out. That's not how the civilized society works, and that's not how we want it to work as evidenced by the thought experiment above.

If we are at war with a nation or people, and reject the premise of their fundamental sovereign or diplomatic nature of course it's a different story since we are talking about a fundamental disagreement of reality. There's a separate process for that weighty decision by the US people's representatives.


well, there are ICC warrants. They do ignore diplomatic immunity. And opinion of many people that, for example, Netanyahu should be at least arrested if he lands in Europe and at most "somebody" should send extraction team to kidnap him

It seems like we should not invade another sovereign country unless we are at war -- a weighty process we should undergo because it's how the will of the people manifest in power.

The US isn't a participant to the ICC, so I'm not sure what exactly your implication is... ?

I do not think we should invade Israel and kidnap their leader. I believe the people of that country should self-govern within their sovereign rights. I don't think China should invade the US and kidnap it's leader. I believe the people of the US should self-govern within their sovereign rights. I don't believe the US should invade Venezuela and kidnap their leader. I believe the people of Venezuela should self-govern within their sovereign rights.


i was pointing out that diplomatic immunity (of head of state) that you mention is trashed by ICC warrants (in countries who are party to it. i.e. good chunk of europe).

so, in the moment that something as basic as diplomatic immunity can be violated by warrants for investigation (not for trial), invading another country to arrest somebody based on warrants that you had issued domestically is not that big of leap


You are talking about a after a country has decided that they want to participate in the this process by ratifying their participation intentionally. How does this relate to a unilateral invasion ?

Vienna Convention (1961): This treaty standardized the rules, making diplomatic immunity a binding obligation for its over 190 signatory nations

And then comes ICC (via Rome statue, ratified by 125 countries and half a dozen of them in process of withdrawal) and trashes with it warrants diplomatic immunity.

So in case international law/treaty from 1961 is all of sudden not binding, why wouldn't uniliteral invasion (actually it looks like it more of arrest operation) (which is probably prohibited by some other international treaties) not be ok ?


I do not understand the point you are making. You cite a treaty that countries explicitly agree to protect diplomats while they are guests in another country -- I'm not sure what relationship this has with one sovereign nation using force to rendition someone from another country.

The only country that has agreed to the terms of the ICC here is Venezuela -- but there is no ICC arrest warrant for anyone involved, nor is the US acting on behalf of the ICC nor does it have any authority to do so.

The invasion (which was required to perform the arrest, since it was within the territory) was definitely an invasion and morally wrong.

As noted several times, there are many ways that this could have been done that are in accordance with civil society it. It wasn't, and that is bad.


my point is that diplomatic immunity is international law. signatories to rome statue said that they will violate it (diplomatic immunity of Israeli head of state) because of icc warrant.

this is violation of international law that multiple countries openly stated that they will perform.

essentially it means that international law is not binding and selectively enforced. this is slippery slope.

if you can ignore vienna convention why not ignore whatever other part of international law that prohibits invasion ?

PS. UK and France just bombed ISIS in Syria. Is it also invasion and morally wrong ?


I still do not understand your point because as you state there is no conflict between the two agreements, and further there are no pair countries involved that mutually agreed to the ICC:

- Diplomatic Immunity (through various treaties): Countries that participate will respect diplomats - ICC: Countries that agree will participate in ICC judicial process

From what I can tell, you seem to be under the impression that there's some conflict here. If that is your position then you are wrong. A country can both simultaneously respect foreign diplomats and work with the ICC to ensure that local citizens are held accountable in the ICC.

BUT, a further point -- international law can never be binding. It's between sovereign peers, and is based on the concept of reciprocal benefit. International treaties give the participants some benefit in exchange for something else. This has to be the case because there is no superior entity to arbitrate violations of the law. If you don't keep up your end of the bargain, you risk the other participants not keeping up their end of the bargain.

This is, for example, why having the top US officials committing war crimes is bad -- it's not because some superior nation will inflict justice upon the violator (because no such entity exists) but because other signatories have no legal obligation to not commit war crimes against us (although, many people are morally opposed to most war crimes and wouldn't commit them anyway).

A further note about your PS, which seems unrelated to the topic is that bombing isn't itself an invasion (it may be part of one), but for my opinion I think that killing people without due process is bad and should be a last resort for defense.


in my example countries stated that they will arrest diplomat covered by diplomatic immunity based on icc warrant. not local citizens.

in case international law is not binding, than whatever US did is ok.

and according to usa it was law enforcement operation. not invasion. just like uk and france didn't invade but casually bombed


I've had some additional time to reflect on this thread and I think I can spot the core disconnect.

Do you believe that the Vienna Convention requires that countries treat their diplomatic representatives in some special legal way ? For example, do you believe that the Vienna Convention obligates the US to extend diplomatic immunity to the US Ambassador to France ?

If so, that's backwards. It doesn't obligate one country to treat their own diplomats specially inside their own legal system, it defines how participants of the treaty will treat FOREIGN diplomats. The benefit of being part of the treaty is that your diplomats are treated specially when they are in foreign lands, and the cost is you treat foreign diplomats specially when they are in your land.

The currency of treaties is reciprocity.

A treaty can never be binding, there exists no superior entity for which to bring your appeal which can then ultimately use their monopoly on force to extract justice -- each nation is sovereign and a peer in that respect.

Finally, I didn't address your last paragraph but I will now: It does not matter if the USA calls it a law enforcement operation and not invasion, it was still an invasion. It was an invasion because it meets the definition of the word. But ALSO it wasn't a law enforcement operation because the laws of the US do not apply in Venezuela. Also, it's illegal in the US to use the US Military for enforcing US laws except in times of invasion... although it sadly specifies that the US must be the entity being invaded, not just there be an invasion.


So it sounds to me like you are stating that you are okay with the original premise that it would be okay for China to come to the US Whitehouse and forcibly remove Trump to China to stand trial for the crimes he may have committed against Chinese nationals ?

"This paper we wrote shows the legal justification for the kidnapping, so the kidnapping we performed is completely legal."

Well, in this case, yes. This is the trouble with growing executive power, they can indeed give themselves permission.

They don't have jurisdiction over another country that's not how this works

I would love to live in a world where every government was democratically elected by an informed populace and never tried to assert authority outside it's borders.

> not how this works

When you say this, what exactly are you referring to?


Reality is reality. There is only one reality and the man is on the ship. No matter what you think. Reality is "how this works".

Just because something is happening doesn't mean it's according to the law or even morally justified. We are discussing whether it is lawful, not whether it actually happened or whether they are capable of doing it with or without consequences.

Indeed, why bother having states of law at all? Jungle law works well enough in reality.

You believe in something which has never existed and will never exist. In international relations, there has never been anything besides "might is right". Anything else is an illusion. At most something that leaders pay lip service to, when it aligns with their own goals.

The law of the jungle is reality. World War II was won by terror bombing civilians. It is lamentable, but reality is reality. So to say "that's not how it works" is denying reality.


“Never”? Not once in the Story of Us has any dispute between large groups of humans been resolved by anything other than a superior application of brute force? Strong claim, but I’ll run with it.

And you appear to believe this is a pretext for humans to ignore their own laws and commit atrocities, when they could choose otherwise.

It may be reality that jungle law is currently how humans almost always handle conflict at nation-state scale. Non sequitur that it should remain so.


No one is claiming that humans should be at war with, or rely on violence to assert authority over, one another.

Every arrest is a kidnapping.

That is how any legal system works, just to be clear.

That's not how the international legal system works

I mean to be fair.. the "international legal system" generally doesn't really work. It only works when governments think it works for them.

This usually means weaker (militarily/economically) countries banding together to hopefully provide some dis-incentives for strong arming.

It only works until someone calls the bluff.


what is "the international legal system"?

Unfortunately thats how the politics and economics of violence work when you are the most powerful country in the world (n.b. I am not American and think this situation is deplorable, but the legal facts and construction support Trump’s actions)

No they do not

The USA does not have jurisdiction outside the US borders. Shocking, I know.

But it doesn't, so the charges of "possession of machineguns" [0] is an utter bullshit. Talk about kangaroo courts...

[0] https://xcancel.com/AGPamBondi/status/2007428087143686611


“ it's completely unacceptable”

How do you reach this conclusion that you can’t help suffering?


You act as if they don't have loopholes for this or that there will be consequences when the military industrial complex is behind things. Were there any consequences for Iraq WMD BS

Why? It's not a war they were just capturing someone to face charges. In the same way we didn't need to declare war against Pakistan to go in and get Osama

Don't think we (Americans) would be happy if another country invaded and started capturing people to face trial in their country.

This is naive. No other country would dare do this to the US because the US would simply rain literal hellfire upon them.

Your mistake is in equating the US to other countries. You cannot. It is a superpower.

When other countries act hostile to the US, it can simply ignore their sovereignty at a whim, and this is a huge benefit to living in US.

Is it unfair? Sure. Who cares?


This is wrong and hilariously short sighted. Other countries don't respect America due to military might - they do so because of decades of mutually beneficial trade agreements. Soft power is infinitely more useful than hard power.

You can take that into the past tense now I think.

Both play a significant role. Many countries absolutely respect us because of our military might. They rely on it because they don't want to divert funding from welfare to build out their own militaries. As such, they ally with us, creating inroads to trade et al.

Obviously, there's more than just military might, we have the most innovative and powerful economy on the planet as well.

However, with a country like Venezuela, where none of our allies truly care what we do (sure, they might blow hot air but whatever), we are free to use hard power to achieve our objectives.


People who don't live in a superpower. People who care about international law. People who would rather the most powerful countries didn't act like bullies whenever it suits their interests.

"Who cares?" was glib on my part, I admit. It was obviously stated from the perspective of an American relying on that power, towards other Americans.

However, international law has always been a thin veneer over the reality of international relations. History shows that nations act in their own self-interest, regardless of the "rules."

The concept of one country "bullying" another is irrelevant moralizing. You are applying playground rules (or the rules of civil society) to a global stage defined by anarchy: there is no "teacher" to stop the "bullying" here. It is a zero-sum game of security and power. At this level, "bullying" isn't a meaningful concept, only leverage is.

Should the world be this way? I wish not. Political realism is a grim framework. Unfortunately, game theory tells us that so long as any one superpower believes in realism, the rest of us must as well, or risk getting outmaneuvered. And Russia/China certainly believe in it.


The United Nations was created to avoid future world wars by managing conflicts. If the US decides as the world's superpower to go on an imperialist rampage through the Americas without regard for what the UN, Europe or Russia & China thinks, eventually the rest of the world is going to team up like the Allies during WW2.

The UN is simply ignored by all superpowers, and many lesser powers. Failed experiment. It is, at best, a forum for communication, but with no real enforcement capacity of any "rules."

> "Who cares?" was glib on my part, I admit. It was obviously stated from the perspective of an American relying on that power, towards other Americans.

> there is no "teacher" to stop the "bullying" here.

It's funny how the same person can mention "realism" and then proceed to "leverage" in the same conceptual realm of thought about the present day US. Just wait until three to four (insignificantly) smaller powers collude, target, and act against you like hyennas do, then try applying your leverage of ... what exactly?


"Realism" is not being used in the sense of the colloquial word, but as in "political realism," the framework that governs international relations between most superpowers today and in which "leverage" through hard or soft power is the core concept.

> Is it unfair? Sure. Who cares?

What do you mean, "who cares"? Obviously a lot of us not from the US care, and many Americans care, too.


It should obviously be read as: "Who cares [that matters to the superpower at hand, and are they willing to actually do anything about it?]"

Even if the answer to the first part can be narrowed down to a few nations, the answer to the second part can be narrowed down to zero.


Israel did that in Argentina with Adolf Eichmann, and the US celebrated it.

They actually had 6 million good reasons.

And he was head of state? (retorical question).

What Trump just did is an act of war, undeclared and deceitful in every way.

It makes diplomacy much harder to do in the future. It makes the US untrustworthy.


> It makes the US untrustworthy.

That's explicitly been the case since 45 was elected a second time. Even if we get an adult in charge again, there is no guarantee of stability anymore with the way the population is.


Like who? Biden a puppet with dementia, Obama invading Libya and helping kill Gadaffi (and actually killing his family), as well as drone strikes on individuals in lots of middle eastern countries, Bush and Iraq/Afghanistan, Clinton and .. Iraq? but also war on drugs and Mexico border fence. Previous Bush - Iraq again?? Before that, South America again.

Biden became worse in the last year, but he wasn't a 'puppet', certainly not like the current president is. I'm not a fan of Obama's actions but he at least gave justification instead of inventing it and lying like Bush.

Kamala was the obvious choice and the only adult running in the last election, but she lost largely due to sexism, racism and gullibility of the red state population.

Assuming we get to have another election, we'd hopefully have someone like Bernie or Elizabeth Warren.


Democratic rejected Kamala resoundingly in the primaries, and then the Democratic leadership tried to force her down everyone's throat. That's on them, not the voters. They asked people to eat a sandwich some shit on it instead of a shit sandwich and not surprisingly voters weren't too enthused.

No, it's on the voters, 100%. A primary would have been messy. She may not have been everyone's first choice, but she was 100% the responsible choice. People screwed over the country out of spite, but that's 100% in line with how immature and uneducated the US population is. Not to mention bigoted in various ways.

Obviously she was not everyone's first choice. She was almost no one's first choice. Democrat voters let her know that when they only gave her ~7% support in the 2020 primaries. Maybe a messy primary that everyone feels a part of would have been better than a few leaders of the Democratic party attempting to anoint the next president. Maybe you think it was the responsible choice, but that certainly isn't what Obama thought in 2024, since he was pushing for open primaries before his hand was forced into endorsing Harris.

Bernie Sanders and Elizabeth Warren both performed significantly better than Harris did in the 2020 primaries. Maybe one of them would have been the responsible choice.


> Obviously she was not everyone's first choice. She was almost no one's first choice.

Right, but that's irrelevant. It doesn't matter that she wasn't the ideal choice, it only matters that she was so much significantly better than the alternative.


Clearly that was a miscalculation then. Maybe because when people vote, most people don't think "Who is better - Trump or Harris?", they think "Do I like my party's nominee?"

I agree, the problem is the voting population. Democracy doesn't work when you have such a petty ignorant population.

Bernie Sanders vs. Trump. That would have been interesting. Two populists, but also two geriatric white men. Trump would have the advantage of insults and better media savvy, but Bernie would have the advantage of not being Trump (and not being tied to Biden either).

That other country will quickly learn why America doesn't have free healthcare ;)

If Trump successfully stole the election in 2021, I'm sure there would have been many Americans who would be happy for Canada or England or France to capture him and put him on trial..

Osama Bin Laden wasn't the leader of Pakistan, he was just hiding there.

Capturing the de facto leader (elected or dictator) of a country is an act of war.

You could argue the war is justified, or that this dictator was bad for both his country and the US, but it's still an act of war.

How come the US can engage in acts of war without legally declaring it? Shouldn't congress be involved?

We all mocked Putin's "special military operation", why are we not accusing the US of doing the same thing?


That will really be up to the new Venezuelan regime to decide whether it was an act of war or not. I don't think Maduro will have much ability to declare it as such.

Is your position that if someone commits a coup, some other country or the international community can't go in and uninstall that person from power?


Regardless of whether the leader of a country was a dictator, elected or not, another country going in and kidnapping the acting leader within the borders of his own country is an act of war.

This doesn't depend on what the successors think. They might later declare this act of war was necessary for the liberation or whatever, but it's still an act of war.

You may agree with the act, but it's an act of war.

Do you dispute this?


Well, I'm certain Maduro considered it an act of war. But he's not president any more. Does the current President of Venezuela consider it an act of war?

> Well, I'm certain Maduro considered it an act of war. But he's not president any more.

It doesn't matter what Maduro thinks. It doesn't matter whether he's a bad guy or a dictator. The situation after the fait accompli also doesn't matter.

What matters is that the military of a country crossing the borders of another country without permission, to conduct a military operation, and kidnapping the (de facto or legal, doesn't matter) leader of said country is an act of war.

There's no "it depends". It might be a justified act of war, but it's an act of war.

It boggles the mind that you dispute this. You seem to be confused, mentally adding "evil" or "illegal" to the words "act of war".

> Does the current President of Venezuela consider it an act of war?

Yes. Why does it matter?


> Is your position that if someone commits a coup, some other country or the international community can't go in and uninstall that person from power?

I find the assumptions behind your question fascinating.

Where did I say anything about what a country can or cannot do? A country can do whatever its military might and ability to absorb repercussions allows it to do.

This is completely unrelated to whether the path the country does decide to take constitutes an act of war or not.

If you're asking me whether I like that the US is playing world police and deciding who must face the law, and take them by force anywhere in the world, weeeell... let's say it's really messy to try to justify the US when it supports some coups, some dictators, and some brutal regimes, but acts against others, and the overall rule seems to be "if they play ball with the US it's ok, if they don't then war".

A small consolation is that the US is seemingly stopping their horrifying practice of extraordinary renditions and torturing suspects abroad, outside the scrutiny of US society and institutions. I think that was Bush era, but maybe it persisted during Obama too.


> It's not a war they were just capturing someone to face charges.

Invading a foreign country with military force is a war even if the purpose is to effect an arrest. And when the President claims that the intent is also that the US will run the country afterwards, its even more clearly a war.

> In the same way we didn't need to declare war against Pakistan to go in and get Osama

Congress had already exercised its power to declare war with an open-ended declaration almost immediately after the 9/11 attacks, which covered the operation direct against the head of al-Qaeda.

https://www.congress.gov/107/plaws/publ40/PLAW-107publ40.pdf


charges for what? he is a Venezuelan in Venezuela. You can't say "he broke our laws" and take him to fucking New York.

I have yet to see it in this thread, but the WSJ reported that the "crime" they "extradited" him for is running a drug cartel and dumping tons of cocaine into the US.

I know this is what they claim (well, they also say because of oil and because he was friends with US rivals, but that's less defensible), but anyone really believe this is about drugs? Was there ever any proof Maduro was a cartel boss?

They are getting their message very confused. Is this about drugs? About the Venezuelan elections? About oil? All of the above? None of the above? Who knows anymore.


That said some people in the US ought to catch international charges for human rights violations of all sorts

Sure you can. Why do you think we could go into Pakistan and assassinate someone there?

Bombing a capital city and kidnapping its political leader and hijacking its oil tankers is not the same thing at all. Not to mention Pakistan was and is officially an ally of America, and despite them harboring terrorists, officially Osama was a criminal there too.

Still waiting for the shoes to drop on Osama and Saddam.

Who is "we"?

America

It's often impossible to make backwards-compatible changes to a format which wasn't designed to allow for future changes and which is designed to be as space-efficient as possible.

That doesn't mean that the limits of the old design won't hit anyway and force a switch off it.


IPv4 allows future changes. There are some reserved bits in the header that could change a big part of it.

v4 supports extension headers and over a thousand bytes of arbitrary payload so if the only thing you needed was a couple of bits in the packet, there was never any issue with finding them.

The problem is that you can't use those bits to expand v4's address space, without taking all of the same steps v6 needed to do. v4 has no mechanism to get v4 hosts to understand extra address bits, wherever you put them.

Oh, that and the fact that IP addresses are stored in many more places than just the v4 packet header. Consider DNS, DHCP, ARP, gethostbyname(), struct sockaddr_in, databases using VARCHAR(15), etc etc etc. The packet header is only a tiny part of the story.


They are. Every breaking change is a pain point for your users/customers. Every time they have to do something to work around your breaking change, it's an opportunity to reconsider whether they need you or whether using your product is worth the trouble.

Lol if you say so. I contribute to an OSS project with thousands of industry users and we break downstreams all the time - we literally have no stability guarantee. In the 2 years I've been a contributor I've seen exactly once when someone got upset about a breakage.

Each layer of your stack should have different types.

Never expose your storage/backend type. Whenever you do, any consumers (your UI, consumers of your API, whatever) will take dependencies on it in ways you will not expect or predict. It makes changes somewhere between miserable and impossible depending on the exact change you want to make.

A UI-specific type means you can refactor the backend, make whatever changes you want, and have it invisible to the UI. When the UI eventually needs to know, you can expose that in a safe way and then update the UI to process it.


This completely misses the point of what sharing types is about. The idea behind sharing types is not exposing your internal backend classes to the frontend. Sharing types is about sharing DTO definitions between the backend and the frontend. In other words, sharing the return types of your public API to ensure when you change a public API, you instantly see all affected frontend code that needs to be changed as well. No one is advocating for sharing internal representations.

Usually you only share API functions signature and response types.

It's tempting to return a db table type but you don't have to.


Mr. Buckley may or may not be shocked, but he's certainly a vocal opponent of a competent effective government, so all of his thoughts on how he'd prefer to be governed should be ignored with extreme prejudice.

Generally, inverting them would be superior to ignoring them, but the last thing you should do is take them as good ideas.

According to YOU. What a very poor all or nothing statement. And the reader should never listen to someone who claims all or nothing here or there. Nope. Perhaps throw a bridle on your unbridled "kindly fuck off nuance" view.

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

Search: