8,634 karma · joined Jun 23, 2011 (15y ago) · 7,679 submissions
comment 2y ago · link · parent
He is saying that there was no meaningful change to the Twitter software that would diminish previous value found in posting on Twitter. You post your dumb quip and it shows up in other people's feeds just as it did before Musk.
comment 2y ago · link · parent
I'm old, but feel the same reluctance (it slips sometimes; I am only human). Not because I fear any particular reprisal, but because I cannot comprehend that that someone else gives a rat's ass about whatever random firing of neurons happens to be going on in my mind. I certainly couldn't care less about theirs.
comment 2y ago · link · parent
Oh well. This recent obsession with truth is quite strange to begin with[1].
Enlightened minds do not concern themselves with absolute truths, but rather focus on establishing models that can stand up to experimentation. The model does not even have to follow truths as long as it provides sufficiently accurate results.
[1] On second thought, it is not really that strange that we've seen that recent emergence. It is a great social device for nefarious actors to sway opinion in their favour – "I don't need to experiment because what I have before me is the truth!" There is a lot of incentive by those nefarious actors to promote truth seeking as being virtuous.
comment 2y ago · link · parent
Poilievre îs already the leader of the CPC. It would be quite odd to call him the front runner there when there is currently no race being run.
And there is never a race for the Prime Minister's position. If that was what "front runner" was in reference to, that would be nonsensical.
The only race Poilievre is likely to run any time soon, at least within the context of political races, is for the MP's position in the Carleton riding. I expect he really is bound to be the front runner there, but unless you live in said riding, he is of no relevance.
comment 2y ago · link · parent
Incorrect with respect to the documentation, yes. That's what I just said.
Tests are not intended to find undocumented incorrect behaviour. This is provable by taking it to the logical extreme of a codebase that is completely undocumented (no tests). When no tests run, no incorrect behaviour will be uncovered by it.
Only documented cases can reveal instances where the code does not conform to what is documented.
comment 2y ago · link · parent
Not really. While you may end up testing third-party code incidentally in the process of you testing your first-party code, explicit tests directed at third-party code necessarily requires testing implementation details, and testing implementation details is how you get constantly breaking tests every time you try to change something and developers giving up on testing in frustration.
The value proposition of testing is that it documents the user interface in a way that is independent of implementation, allowing you to continue to iterate on the implementation while having assurances that, no matter what you do under the hood, the user experience does not deviate from what is documented.
comment 2y ago · link · parent
That's fine. It all happens within a single unit. A unit should mutate shared state within the unit. Testing would be pretty much useless without.
> If we call that entire sequence of steps a "unit" test, would you start with testing the entire sequence of steps, or would you recommend testing the individual steps first?
For all intents and purposes, you can't test the individual steps. All subsequent steps are dependent on the change in inventory state in step 1. And the product of step one is undoubtedly internal state, so there is no way for the test to observe the state change in isolation (unless you do something stupid). You have to carry out the subsequent steps to be able to infer that the inventory was, in fact, updated appropriately.
After all, the whole reason you are testing those steps together is because you recognize that they represent a single instance of functionality. You don't really get to choose (unless you choose to do something stupid, I suppose).
> And if we did test the individual steps first, we would give that testing a different name?
If the individual steps can be tested individually (ignoring a case of you doing something stupid), it's not actually and end-to-end process, so your example would make no sense. Granted, we have already questioned if it is a bad example.
comment 2y ago · link · parent
If you have first-party code that is adjacent to a third-party library in a way that the library hinders testing of that first-party code, you would substitute a (minimal) implementation that you control in for the third-party library while under test.
If the library is open source or similarly code accessible, you would fork it or coordinate control with its stakeholders to see the testing of it in that codebase (and refactor it as necessary to support that). This is where the library needs to ensure it does what the documentation claims. It is not the concern of your application.
Otherwise, if the code is truly beyond your reach, you just have to trust that the vendor's claims are true. If you cannot establish that trust, use a different library that you can trust. Testing concerns are the least of your problems when you have no trust for the library you are using.
comment 2y ago · link · parent
Then have your worker collect video evidence and information from multiple sources to have on hand when you need greater assurances. You're the boss. They're simply there to relieve you from having to do the job yourself. It is reasonable to expect them to do the job like you would.
> you have many more representatives than any normal manager has direct reports.
Government systems can differ, but typically you hire one employee for any one government that you oversee. It is likely that you are in charge of a few governments (e.g. federal, state, municipal), but unlikely more than a small handful. It would be quite unusual for a manager to have fewer direct reports in an organization of any meaningful size.
> You have nowhere near that level of control over your representatives
You most certainly do as long as you have the rest of the board on your side. Finding consensus with the board may be a challenge, but that's true of any organization. The sitting board at the widget factory isn't bowing to your every wish either.
> While I trust my direct reports and employees, I very much occasionally verify that their work is being done.
So why not do the same with the employee you hire to watch over political matters?
comment 2y ago · link · parent
Certainly not, but there is no redefinition that is anything more than gobbledygook. Look at the very definition you gave: That's not a unique or different way to write tests. It's not even a testing pattern in concept. That's just programming in general. It is not, for example, unusual for you to use an alternative database implementation (e.g. an in-memory database) during development where it is a suitable technical solution to a technical problem, even outside of an automated test environment. To frame it as some special unique kind of test is nonsensical.
If we can find a useful definition, by all means, but otherwise what's the point? There is no reason to desperately try to save it with meaningless words just because it is catchy.
comment 2y ago · link · parent
Bad example, perhaps, but that's also a unit test[1]. Step 8 is dependent on the state of step 1, and everything else in between, so it cannot be reduced any further (at last not without doing stupid things). That is your minimum viable unit; the individual, isolated functionality.
[1] At least so long as you don't do something that couples it with other tests, like modifying a shared database in a way that that will leave another test in an unpredictable state. But I think we have all come to agree that you should never do that – going back to the reality that the term unit test serves no purpose anymore. For all intents and purposes, all tests now written are unit tests.
comment 2y ago · link · parent
There is no single "front runner". The front runner is entirely dependent on the riding. That may describe the front runner in one particular riding, but there are 337 others where that is probably not the case.
comment 2y ago · link · parent
Hence why he states it is formal verification for the "unwashed masses". The "washed" will use a language with a type system that is advanced enough to express a formal proof, but most people can't hack it, and thus use languages with incomplete type systems and use testing to try and fill in the gaps.
comment 2y ago · link · parent
If you have decided that your software is going to do something different, you probably want to deprecate the legacy functionality to give the users some time to adapt, not change how things work from beneath them. If you eventually remove what is deprecated, the tests can be deleted along with it. There should be no need for them to change except maybe in extreme circumstances (e.g. a feature under test has a security vulnerability that necessitates a breaking change).
If you are testing internal implementation details, where things are likely to change often... Don't do that. It's not particularly useful. Test as if you are the user. That is what you want to be consistent and well documented.
comment 2y ago · link · parent
Kent Beck, who invented the term unit test, was quite clear that a unit test is a test that exists independent of other tests. In practice, this means that a unit test won't break other tests.
I am not sure why you would want anything other than unit tests? Surely everyone agrees that one test being able to break another test is a bad practice that will turn your life into a nightmare?
I expect we find all of these nonsensical definitions for unit testing appearing these days because nobody is writing anything other than unit tests anymore, and therefore the term has lost all meaning. Maybe it's simply time to just drop it from our lexicon instead of desperately grasping at straws to redefine it?
> It seems to be tied up with some sort of idea that unit testability/DI just makes code inherently better.
DI does not make testing or code better if used without purpose (and will probably make it worse), but in my experience when a test will genuinely benefit from DI, so too will the actual code down the line as requirements change. Testing can be a pretty good place for you to discover where it is likely that DI will be beneficial to your codebase.
> The idea that test realism might actually matter more than test speed.
Beck has also been abundantly clear that unit tests should not resort to mocking, or similar, to the greatest extent that is reasonable (testing for a case of hardware failure might be place to simulate a failure condition rather than actually damaging your hardware). "Realism" is inherit to unit tests. Whatever it is you are talking about, it is certainly not unit testing.
It seems it isn't anything... other than yet another contrived attempt to try and find new life for the term that really should just go out to pasture. It served its purpose of rallying developers around the idea of individual tests being independent of each other – something that wasn't always a given. But I think we're all on the same page now.
comment 2y ago · link · parent
And, really, general quality of life. When you just want to spend quiet time at home, somewhere outside of the big city is going to provide something more quiet and comfortable. And when you want to do the things that the city uniquely has to offer, you go there while you do those things. NYC, nor anywhere else you might want to be, is certainly not walled off to outsiders. There is no advantage to being there all the time.
comment 2y ago · link · parent
I don't know about the US, but here in Canada the 2016 census was already showing meaningful decline in communities with >100,000 people, with communities of 1,000-29,999 people picking up most of the slack. COVID may have accelerated things, but signs of a 'counterubranization' movement were already presenting itself long before we ever heard of COVID.
comment 2y ago · link · parent
comment 2y ago · link · parent
In practice, when you write those tests for where the type system is lacking, you end up also incidentally testing where there is type system coverage, so there likely isn't much for industry to talk about.
comment 2y ago · link · parent
2. If you cannot establish enough trust with the employee you are choosing to hire, why are you selecting anyone? If you are going to do the work yourself, why not do the work yourself?
3. As before, there is nothing special about cities and countries when as compared to any other organization. If you have a widget factory, how do you ensure that your hired engineers are designing widgets that meet your expectations and requirements? Do you simply push them aside and design the widgets yourself in case what they designed wasn't up to snuff?
comment 2y ago · link · parent
While there is nothing wrong with testing an internal function if it helps with development, so long as it clearly identifiable as such, you still need the public interface tests to ensure that the documented API is still conformant when the internals are modified. Remember that public tests are not for you, they are for future developers.
This is where Go did a nice job with testing. It provides native language support for "public" and "private" tests, identifying to future developers which can be deleted as implementation evolves and which must remain no matter what happens to the underlying implementation.