> Apart from parsing the SQL query, I also considered an alternative testing approach that I might implement in the future: go through each migration one by one, and insert some dummy data into the database before applying it, to make sure that we test each migration being applied on a non-empty database. The data would either have to be generated automatically based on the current database schema, or we could commit some example DB dataset together with each migration, to make sure that we have some representative data sample available.
Suggests that this may also be a fairly complicated direction. Although it's not entirely clear to me why he can't just put one record in the db before any migrations, and then pull it all through. Plus it has the added drawback of removing your coverage for the (not unimportant) zero case.
It takes more than a few minutes, yes. But this one-time investment will prevent the next 10 migration-related bugs that he'll otherwise blog about.
Grab some representative data from production and keep feeding that into your migration tests. Keep updating those. Worth each minute if you care about quality.
If I only insert data into the DB once, I could miss important states. Like, I could add non-NULL data to a NOT NULL column, then make it NULL, and then make it NOT NULL again. If I don't insert NULL into the column in-between the last two migrations, I won't trigger the issue.
But sometimes some innocent blog posts get criticised as if they claimed that they solved world hunger. They don't. They are often just some random thought in a rarely-read blog. Nobody intended to go convince a gang of seasoned hackers that they have undisputable wisdom.
> This wasn’t caught by the existing test suite (even though it runs almost 200 end-to-end tests), because it always starts from an empty database, applies all migrations and only then runs the test code.
Isn't that where the test coverage has a hole?
I somehow expected the blog post to extend testing for this. A pre-populated database which is then migrated. That seems to catch a wider class of issues than parsing sql and shielding against just checking for non-null without default.
Twice a year? That's only recommended by dentists in north america because most insurances cover it because of lobby pressure. Every 1-2 years fully suffices, depending on your risk profile (smoker, genetics, ...). That's what countries where the insurrance doesn't have skin in the game recommend.
And the average european has much better tooth health than the average u.s. citizen, in my experience.
Only a few. American Republican voters consistently show a pattern of not regretting their vote because bad things happen to other people, but only because bad things happen to themselves.
It doesn't appear to be that way. If that 1% difference lies in how each country _fundamentally_ defines freedom, then I’d argue that’s more than enough to say Americans and Canadians are not alike. When the core values differ at such a foundational level, the rest of the cultural similarities become irrelevant.
Personal freedom ≠ "freedom of communities"—there is no such thing. Freedom applies to individuals, not collectives. When a community makes a decision that affects all its members, that’s democracy, but democracy is not unlimited authority. A majority vote does not grant the right to infringe on individual autonomy, which is why safeguards exist against the tyranny of the majority.
Banning fluoride does not restrict freedom—it prevents government overreach. In contrast, forcing fluoride on everyone would violate personal autonomy. Protecting individual choice is a fundamental principle, backed by real-world safeguards like constitutional rights, judicial review, and bodily autonomy laws. The burden of proof is always on those seeking to impose a policy, not on those defending individual freedom.
> Freedom applies to individuals, not collectives.
In the US, it most certainly does. We have freedom to associate, and associations also have freedoms. Were it not so, we wouldn't have even been able to arrive at the conclusion we have with regard to corporate money in politics.
Yes, in the US associations are granted certain legal rights, including the right to political expression and collective action. That's a matter of legal precedent.
But law doesn't define philosophy — philosophy defines law. And from a philosophical standpoint, freedom is a property of individuals, not collectives. Only individuals possess consciousness, agency, and moral responsibility. Associations, corporations, and groups are abstractions — tools created by individuals, composed of individuals, and led by individuals. They cannot make free choices; they can only be directed.
Freedom of association means individuals are free to join or leave groups as they see fit. But the moment something is mandated, such as being forced to participate in a fluoridated water system, or coerced into accepting the political will of a corporate “person,” the individual's freedom is compromised in favor of an artificial entity.
Philosophically speaking, rights flow from individuals to associations, not the other way around. The association has no legitimacy that exceeds or contradicts the will of its participants, especially when it undermines individual liberty.
So yes, associations may have freedoms under law, but only because individuals granted them those freedoms. The moment those freedoms infringe on individual rights, they lose their moral legitimacy, regardless of legal precedent.
Then the community is exactly forcing people to seek other, and way more expensive and way more inconvenient, sources of water. That's the opposite of a freedom.
It isn't. But as a society, we voted for providing clean, affordable water to everyone was a public good. That's why municipal water exists.
The issue arises when that water is fluoridated against the will of a significant portion of the population. It effectively forces dissenters to either accept it or go through the hassle and expense of sourcing their own water — which defeats the original purpose of providing low-cost, universally accessible water.
Today, the marginal benefits of fluoridation are questionable, especially with fluoride available in toothpaste. So forcing it on everyone, despite objection, becomes harder to justify — and that's why some places have stopped adding it.
Really? 'Why is the government providing potable water'? Because that's the point of governments: to provide a framework and the bare essentials of civilization.
And well, libertarian led governments are TERRIBLE.
I think they're saying that the logical conclusion of kebman's libertarian line of argument is that no-one is entitled to municipal water anyway, so it is moot whether or not municipal authorities decide to add a particular substance to the water or not. After all, if you trace things back far enough, the municipal water supply depends on the government 'forcing' lots of people to do things (such as paying taxes and following various regulations).
The whole argument gets weirdly metaphysical. Not many people have a problem with local authorities removing things from the water. That is, I don't see many Americans demanding that their local authority provide them with completely untreated water. But apparently modifying the water by adding something to it is importantly different. You'd think that a more interesting discussion would be a practical one (about the pros of cons of treating water in different ways). But a certain current of American discourse would rather return again and again to essentially theological arguments. We must locate the original sin against freedom in our local water infrastructure!
The opposite is true. If there was no municipal water supply, then you would in theory have a freer market where there would be multiple suppliers and consumers could theoretically make this decision themselves- assuming it doesn't result in a natural monopoly.
Because there is a government monopoly on water, you need these protections to prevent government overreach, because this is the only way for the consumer to express their preferences.
Some people would prefer there to be fluoride added to the water and some people would prefer there not to be. There's one set of pipes (in a given municipality), so you can't please everyone. You might as well complain that the government doesn't offer you a choice of voltage or frequency for your electrical supply.
Looking around the thread, the idea seems to be that there is some kind of important metaphysical distinction between the government "adding" something to the water that people could in principle add themselves or merely "filtering out" bad stuff like pathogens — and that this metaphysical distinction is somehow linked to the difference between positive and negative liberties. As an aside, I think this probably makes no sense on a chemical level, as you generally can't remove stuff without also adding something else. But in any case, this strikes me as a uniquely American perspective. I think a more common perspective is the following:
* Essentially no-one wants raw untreated water supplied to their homes.
* The local government therefore needs to decide in which ways the water is going to be treated.
* This has to involve some compromises (because there's one set of pipes).
* These compromises are boring practical issues of municipal infrastructure and have no interesting philosophical or political implications.
> I think they're saying that the logical conclusion of kebman's libertarian line of argument is that no-one is entitled to municipal water anyway
Oh, I very much understand the libertarian 'argument', and I dismiss it as childish anarcho-primativist horseshit.
Almost all (aside the rare Lefty libertarian types) libertarians utterly leave out the fact that helping each other and coming together collectively can fix problems in what amounts exponentiation, compared to the collective action problem of individualism.
If everyone generated their own power, then grids would be mismatched and slow everyone down.
If water grids were individual wells, we would tap out natural aquifers in short notice. By collectively coming together, desalination plants and mass water purification is doable.
Libertarian types will demand absolute indepenendence for everything, but also want the spoils of a framework of governance. But even when they get their own community, as I linked, they so overwhelmingly fucked it up.
Communism is a better idea than rugged right-wing libertarianism (the common one in the USA). Turns out, none of the richies want to pay for anything.
But adding fluoride WAS everybody coming together to solve a problem (poor dental health). We could have a reasonable argument about whether or not fluorine in the water continues to serve that goal. Instead we’ve got this weird quasi-debate about types of freedoms.
In the political philosophy of the US, the unit whose freedoms matter is the individual, not the community. Freedoms for individuals necessarily come from reducing the freedom of "the community."
yes, and i think that’s a pretty recent reading of the US comprehension of freedom. my sense is that the collective individualistic tendencies have ballooned.
even as recently as the early 90s, my civics classes emphasized the importance of other people’s rights and that of the expression of your individual rights infringed on the rights of others then it was an irresponsible and improper use of individual rights.
it seems like this has devolved into people whose perspective on individual rights loosely aligns enough to coalesce and shout the loudest to create policy. until someone in the in-group’s individual freedom is impacted and the group fractures into smaller coalitions. rinse. lather. repeat.
I disagree with you that this is a recent idea. It goes back to Locke, Hobbes, and the social contract theorists. The "collective freedoms" idea is more recent, if anything, coming from the subsequent generation of philosophers.
i can agree with the theory behind what you’re saying, but also sense that the practical application of individual freedoms has become increasingly prevalent and acute
In some ways, though, this is a reaction to the move in the other direction. The US in the 1800's was very much in favor of individual freedoms, but by the 1920's-1960's things swung heavily towards the idea of "positive freedom" and "community freedom."
But, taking the individual freedom argument to its ultimate implications, the Free individual is also Free to not drink tap water in a community that decided to add fluoride to their water supply, and is also Free to move to a community that decided against it.
It's not a "freedom" to be forced to move away from a community just because you want pure water. Moral philosophy: A democracy should not act as the tyranny of the majority, and governments (local or otherwise) should not overreach their mandate with monopolistic policies that negatively affect individual freedoms.
Use the same argument on air and it falls apart. "The Free individual is also Free to not breathe air in a community that decided to add lead to their air supply." This was a big debate in the 70's btw due to car emissions.
the point was good until you tried to compare it to lead in the air. there are a few factors that make it impossible to use the same argument between lead in the air and fluoride in the water
>A democracy should not act as the tyranny of the majority, and governments (local or otherwise) should not overreach their mandate with monopolistic policies that negatively affect individual freedoms.
Then it shouldn't ban fluoridation when it could instead simply not mandate it.
In reality though, the freedom of the companies, which is just the freedom of the super rich ~100 - 1000 people (proxied via companies without taking direct responsibility: The sacred duty of company is to maximize shareholder returns!)
10,000 food additives that are banned in Europe are perfectly fine in US.
>This ban is anti-freedom. (Just like forcing them could be argued to be, even though that's what you argued against.)
By that logic is the first amendment "anti-freedom", because it prevents communities from instituting censorship laws, even if they actually want them?
You joke, but a lot of these freedom-rah-rah-rah people absolutely cried like babies and resisted seatbelt laws back in the 80s and 90s, too. Half my family believed it was evidence a communist takeover, and they all had those little defeat devices that you plugged into the latch, which silenced the car's seatbelt-off indicator.
"You can't tell me what to do" has been a religion in the USA for a long, long time.
You built this? Would you like to comment what your future plans are?
Your self-description is "entrepreneur love for automation". Is it fair to assume that if this takes off then you are planning to introduce paid plans (perhaps with some revenue sharing with the signal folks to lift rate limits for you)?
I built this for fun and my own notifications. I don't think there's much commercial value here since there's zero moat. But it would be nice if we could raise funds for Signal.