My DB heavy app, when I run a Go unit test, it spins up a DB instance, populates it, runs the tests, and drops the DB. Never ever any mocks. The best part about unit tests isn't testing the Go code. It is testing the SQL.
We do the same thing. The core of our service is ingesting data and applying transformations to it. There’s so many permutations and complex interactions in here that the only way to ensure a refactor hasn’t broken one of these interactions is to document those edge cases by piping data through the system and reading it back out. We have thousands of these tests and it’s all tidy controlled via docker compose. It takes about 15 minutes to run the test suite. Sure I wish it was faster - but the real unlock is that we can make big sweeping refactors without breaking behaviors of the system. The organizational speed unlock this kind of safety net is well worth a bit of slowness in CI.
We also have mocks/stubs/spies in our unit tests. Those are great for producing hard-to-trigger edge cases. But contract testing? The contract is the data flow. In the end it’s all about using the right tool for the right test. There is no one-size-fits-all.
If your SQL is isolated to one place then you only need to test that single package with a real DB and can use mocks everywhere else. Your mocks can be tested with the exact same test suite as the SQL package, so you know it conforms to the same contract.
If you have SQL scattered all over the place... Leave the spaghetti for dinner.
Reasonable? They ALL boil down to "we need to get official comments, rationale and explanations from the administration". They refused to comment on the story, so you wait because if they CHOOSE not to participate you don't get to publish? That's never been how reporting works. Her comments about a lack of detail regarding the criminal records & charges? The administration is the party that refuses to share this! They are not even forthcoming with WHO EXACTLY has been deported.
Bari Weiss bending over backwards to accomodate an administration that has never shown any sort of honesty or humanity is exactly why she was rewarded so handsomely. "They seem reasonable" is not even remotely close, when comparing "evidence-based truth" reporting with the president's "I speak the truth".
If you wait for the administration to comment on a story before you publish it you’re effectively giving them the right to veto it. You ask, give them a deadline. If they don’t respond or say no comment (as they did in this case) then you publish.
> The person doing this 60 minute segment has also pushed false stories in the past
You’re going to need to elaborate on that. If it were true why wouldn’t Weiss just fire them?
The arguments are nonsense. A summary is Weiss wants to make a case for the administration, which already has the largest platform in the world. If the administration wants to make a case for itself, it has (and has had) ample time to do so. As it stands, there is already a lengthy paper trail of arguments the administration has made in court. These arguments should take precedence over throwaway statements an admin rep might make to a news program.
Briefly, on a couple of them:
- "We then say that only 8 of the 252 have been sentenced in America for violent offenses. But what about charged?" In the US, those people are known as "innocent," whether or not Weiss likes that fact.
- Holding a story until the administration is willing to go on record is exactly the same as giving the administration a veto over a story. We would not have adversarial journalism under these circumstances.
- "The admin has argued in court that detainees are due "judicial review" —and we should explain this" These men were sent for indefinite detention to a concentration camp outside the US borders, and then the administration argued in court that it could not affect any change in their status. This argument from Weiss is transparently false.
Bari Weiss is not a stupid person. She knows she can’t just openly say “I killed this because it’s critical to Trump”; she has to come up with some plausible fig leaf, which is what you’re posting here.
There's something about Ron desantis COVID shots at Publix. I didn't look into it but saw it on the right winger sites. You'll have to look into it yourself
Looks neat. What are all the genomic sequence comparisons in there for? Is this a grab bag of interesting string methods or is there a motivation for this?
Levenshtein distance calculations are a pretty generic string operation, Genomics happens to be one of the domains where they are most used... and a passion of mine :)
Google's DMARC report's seem just fine.
Microsoft's DMARC reports routinely report broken delivery, BUT the breakage is on their end. They forward to a custom domain, then their DMARC report says, look your email is broken. It is SO frustrating.
That being said, when I had some IPv4/IPv6 trouble on the email server, I did get good reports that helped my discover, diagnose, and fix the problem. So I like DMARC reports. Microsoft's support of custom domains appear to be lacking to say the least.
It isn't bigger news because it would expose many of the targets they like to throw things at (eg Groypers) are not American, but foreign agents masquerading as such.
Yeah, and they will delete their accounts and start over, only logging in when they're on a US terminated VPN.
Whoever was following these people aren't taking a hard look at themselves in the mirror now. They're just searching out the same content that is "really" American.
I agree with this. But I don't see the students rejecting this, but the education degreed peoples who choose texts and the publishers want to make all learning for all people. This is foolish. Most people don't need to know calculus. And if you do learn it, do so with rigor so you actually learn it and not just the appearance of it, which is much much worse.
> And if you do learn it, do so with rigor so you actually learn it
This is not strictly necessary for everybody. The conceptual ideas are what are important; else you are merely doing "plug-and-chug" Maths without any understanding. You need to focus on rigor only based on your needs and at your own pace. Concepts come first Formalism comes second.
A good example; In the Principia Newton actually uses the phrase Quantity of Motion for what we define today as Momentum. The phrase is evocative and beautifully captures the main concept instead of the bland p = m x v definition which though correct and needed for calculations conveys no mental imagery.
In Mathematics one should always approach a concept/idea from multiple perspectives including (but not limited to) Imagination, Conceptual, Graphical, Symbolic, Relationship, Applications, Definition/Theorem/Proof.
Thank you for the book link! One major problem I always had with calculus was that we didn't focus nearly enough on applications of it, outside of some optimization problems, which I loved.
I originally went for engineering, and took cal I and II, then switched to cs and poof all of the math heavy stuff vanished (except maybe some LA for graphics)
Not sure I agree with 'appearance [...] is much worse'.
Given the choice between a class room of first years who believe (in themselves and) an appearance of calculus knowledge or a room of scared undergrads that recoil from any calculus-inspired argument they 'have never learnt it properly', I'll take the former. I can work with that much more easily. Sure, some things might break - but what's the worst that can happen?
We'll sort out the rigour later while we patch the bruises of overextending some analogies.
I don't like this line of argument. It applies to many things, many of which we'd laugh at for suggesting.
Most people don't need to know how to read. Most people don't need to know how to add. Most people don't need to know how to use a computer. The foolishness of these statements are all subjective and based on what one believes one "needs". Yet, I have no doubt all of these things can improve peoples lives.
I'd argue the same with calculus. While I don't compute derivatives and integrals every day[0], I certainly use calculus every day. That likely sounds weird, but it is only because one thinks that math and computation is the same. When I drive I use calculus as I'm thinking about my rates of change, not only my velocity. Understanding different easing functions[1] I am able to create a smoother ride, be safer, drive faster, and save fuel. All at the same time!
The magic of the rigor is often lost, but the magic is abstraction. That's what we've done here with the car example. I don't need to compute numbers to "do math", I only need to have an abstract formulation. To understand that multiple variables are involved and there are relationships between them, and understanding that there are concepts like a rate of change, the rate of change of the rate of change, and even the rate of change of the rate of change of the rate of change! (the jerk!)[2].
That's still math. It may not be as rigorous, but a rigorous foundation gives you a greater ability to be less rigorous at times and take advantage of the lessons.
So yes, most people "don't need calculus" but learning it can give them a lot of power in how to think. This is true for much of mathematics. You may argue that this is not how it is taught, but with that I'll agree. The inefficiency of how it is taught is orthogonal to the utility of its lessons.
[0] Is a physicist not doing math just when they do symbol manipulation? I can tell you with great confidence, and experience, that much of their job is doing math without the use of numbers. It is about deriving formulations. Relationship!
I get the argument you're making but that's a bit like saying cavemen used to do calculus as they hunt, which is a valid way of looking at this maybe but they didn't really "use calculus" just intuition. Simillarly, when learning calculus, most people do not do so at a driving course, they do it in the classroom.
If you're willing to stretch the definition of what "using" maths is then it can apply to everything and that devalues the concept as a whole. I'm not on the toilet, I'm doing calculus!
I understand that interpretation but it's different from what I meant.
The difference may be in two different cavemen. One throws his spear on intuition alone. The other is thinking about the speed he throws, how the animal moves, the wind, and so on. There is a formulation, though not as robust as you'd see in a physics book.
> the definition of what "using" maths is then it can apply to everything
In a sense yes.
Math is a language, or more accurately a class of languages. If you're formulating your toilet activities, then it might be math. But as you might gather, there's nuance here.
I quoted Poincaré in another comment but I'll repeat here as I think it may help reduce confusion (though may add more)
Math is not the study of numbers, but the relationships between them.
Or as the category people say "the study of dots and arrows". Anything can be a dot, but you need the arrows
Yeah, I do understand your point of view. I'm just doubting if it applies universally, like you may superimpose that assumption on the thinking caveman, but is the thinking caveman really doing the same?
Yes, technique is one thing, but being really good at throwing spears doesn't make you really good at math, is my argument. And most people will encounter maths in a formal setting while lacking the broader perspective that everything is technically "math".
Yet, we need to see the argument from the common person's view, if we're talking about calculus and learning in the traditional sense. The view you stated is quite esoteric and doesn't generalize well in this setting imo.
It's like a musician saying they see music in every action, but to most non-musicians (even if the stated thing is kind of true) that doesn't make a lot of sense etc.
> but is the thinking caveman really doing the same?
Are you projecting a continuous space onto a binary one? You'll need to be careful about your threshold and I'm pretty sure it'll just make everything I said complete nonsense. If you must use a discrete space then allocate enough bins to recognize that I clearly stated there's a wide range of rigor. Obviously the caveman example is on the very low end of this.
> It's like a musician saying they see music in every action, but to most non-musicians (even if the stated thing is kind of true) that doesn't make a lot of sense etc.
Exactly. So ask why the musician, who is certainly more expert than the non-musician has a wider range? They have expertise in the matter, are you going to just ignore that simply because you do not understand? Or are you going to try to understand?
The musician, like the mathematician, understands that every sound is musical. If you want to see this in action it's quite enlightening[0]. I'm glad you brought up that comparison because I think it can help you understand what I really mean. There is depth here. Every human has access to the sounds but the training is needed to put them together and make these formulations. Benn here isn't exactly being formal writing his music using a keyboard and formalizing it down to musical notes on a sheet (though this is something I know he is capable of).
But maybe I should have quoted Picasso instead of Poincaré
Learn the rules like a pro, so you can break them like an artist.
His abstract nature to a novice looks like something they could do (Jackson Pollocks is a common example) but he would have told you he couldn't have done this without first mastery of the formal art first.
I know this is confusing and I wish I could explain it better. But at least we can see that regardless of the field of expertise we find similar trains of thought. Maybe a bridge can be created by leveraging your own domain of expertise
Maybe I can put it this way: gibberish is more intelligible when crafted by someone who can already speak.
reply