There's reference to various animals, like crows or bees learning to "count" or knowing how to "count". However I'm highly skeptical that it's actual "counting".
I think it's just ability to learn based on whether there's more or less of something, in most cases. Which if you think about it, is an obvious skill all animals must possess in order to make decisions. And nothing new.
I don't think those studies are showing true "counting". For example as a person I can without counting tell if there's 1, 2, 3, 4 or 5 of something, I can tell how many characters are in shorter words on glimpse, but that's not counting. These amounts are just pattern recognition labels. However I can then use these in groups to do actual counting.
Animals certainly must be able to tell if something is smaller or bigger, because they must identify whether it's a potential prey, or a threat. Already this ability should lead to the ability of being able to differentiate between there being 1, 2, 3 or 4 of something.
There seems to be studies that are using this idea to prove that animals can count.
Ultimately these are the strength of certain stimuli and even a simple machine learning algorithm can produce different output based on the amount of that signal.
And then talking about planning and self-control. Many animals are willing to patiently stand still, waiting for their prey to make a move, I don't think it means that they are specifically "thinking" about it. A cat can patiently wait for the mouse when it notices the hole.
I totally understand writing tests on professional projects and on projects that I am working with others, but for my side projects, I could never. I don't feel like I have lost anything by not writing tests in my side projects.
My issue with tests in my side projects is that it kills my flow. I need to actively iterate on the code that matters and feel out the results. At what point should I be writing tests?
I can only think of a point where I am certain this is where I am going to stay at and then I write some sanity regression tests.
It is deeply unintuitive that writing tests for personal / side projects would be worthwhile. I found that my productivity on those projects increased dramatically when I adopted the same testing regime I had previously used in my day-job with an engineering team distributed across multiple continents. That's why I wrote that talk!
"At what point should I be writing tests?"
Once the code does the right thing, and you want it to keep doing the right thing. Don't try to write the tests first, that's a productivity anti-pattern.
>Don't try to write the tests first, that's a productivity anti-pattern.
Uh, this isnt great advice.
If you're spiking then sure, dont write a test at all.
If you're writing production code you should have a clear picture of what it should do before you start. Your test should validate that so it makes sense to write that next. It serves as a natural transition from your requirement to youe code.
Ive written a lot of code without tests at all for good reasons and a lot of tests before code but ive never witnessed a good reason to write a test after writing the code. At best it is almost as beneficial.
It's unconventional advice and goes against industry "best practice" - plenty of people will imply that if you're not writing your tests before your implementation you're "doing it wrong".
I think that advice causes people to skip writing tests entirely and feel guilty about it, because often writing test first really does slow down your development process substantially in many cases.
My experience is that writing tests after the implementation gives me all of the value of writing the test before but takes genuinely about half the amount of time.
You can't do snapshot testing if you force yourself to write the tests first!
Sometimes that happens, because the difficulty is not in getting it to do what you want, but figuring out what you want. That's the main theme of my top-level comment; I'm interested to hear what you think. https://news.ycombinator.com/item?id=43597869
I find them vital for side projects - especially if they get set aside for a week/month/year, I sometimes will lose track of assumptions I’ve made or use cases for apis that tests tend to expose.
Sure you can encode all of that as comments, but unless you reread each file when you return from a break, you can’t always trace those thoughts and see where they lead. On the other hand if you “find all references” in your ide or change some implementation so that a test breaks, past-you can save the day with that extra information about what they intended at the time.
I really value tests on projects I work on alone because the work is usually intermittent. I don't have the time or energy to deal with regressions, and I may not remember everything about the system by the next time I work on it.
I also find manually testing to be tedious, so I'd rather spend that time writing code that does it for me.
I tend to think that the most valuable tests are on the exact level of when something gets used by multiple consumers.
So shared functions get unit tested, but if there is a non shared function that gets triggered only from few layers up via user click, it is better to simulate that click and assert accordingly. However the exceptions are when the input can have tons of different permutations, when unit test might just become more optimal then.
Yes exactly. If you're writing a library, unit tests are likely a great investment. Your "customers" are using the things you are testing.
If you're writing an API, your customers are calling the endpoints. Very important they behave properly on happy path and fail appropriately when they should (permissions / security especially)
(I also ensure tests in the service/dao layer to protect developers from footguns and/or more "unexpected" behavior, but I'd argue the API layer is generally more important)
If you're writing a react app, playwright is very important (and using it properly / acting like a real user) as your customers are interacting with it via a browser.
Though the larger the codebase/ when you start having reusable components, the better tested they are, the less will go wrong in the future as an unfamiliar developer will inevitably hold it wrong.
They are burning the "cards" and "leverage" they had. The trust Europe, West and other democratic countries had in US will take generations to rebuild. And meantime US provoking other countries to ally against itself to punish this behavior. That's just game theory. It makes strategic sense for all other countries to co operate against the US now. Personally, I'm looking forward now for Europe to become self-reliant on technology.
I believe the image of the US in the West started changing considerably during Trump's first mandate. Biden coming back hasn't completely repaired that change, but really it mostly came back (as in, "The US screwed up with Trump, but that's done now").
I think the 6 weeks of this second mandate have already made irreparable damage. When during the first mandate people tended to be "fed up with the US bullshit", now they are genuinely scared. Trump was not a one-off mistake. The people not only confirmed it, but seems generally okay with what's happening now; some Americans complain, but mostly when they are personally affected, it seems. It doesn't seem like the US people is shocked by the idea of destabilising the West. Not saying it is the case, but that is how it seems.
The trust is gone, I don't think it will come back. To the West, the US are partners, not friends anymore. It's still better than enemies, even though the US has been considering it... seemingly with the support of the people.
> Personally, I'm looking forward now for Europe to become self-reliant on technology.
Yeah, in a way, if Europe managed to be independent militarily, that would bring some stability. Let's hope they go there!
Perhaps surprisingly, Europe has more nuclear weapons than China (France: 290 warheads, UK: 225 warheads, China: 500 warheads). China never really bought into the mutually assured destruction doctrine in the same way that the US and Soviet Union did.
China invested heavily into hypersonic delivery vehicles instead of scale. They didn't want nuclear winter, they want to make sure that ANY attempt by the US to project power in "Their" waters evaporates in a plasma ball. They don't seem interested in nuking the US mainland.
Instead, their focus has been on building invasion barges so that they can take Taiwan. So that's exciting. Hope none of you like computer chips!
They were able to nuke the west coast in the 90s. I don't think they have been sitting still with their ICBMs, the same ones that get your taikounauts into the space are the ones you use to deliver nukes.
Regardless, they only need enough to make nuclear war with them MAD, which I think they've had for a decade or so.
I mean, see Doctor Strangelove. If you have a doomsday weapon, that’s only helpful if you _tell_ people about it! If China had built loads of warheads, they’d hardly keep that secret, as most of these point of having loads of warheads is for everyone else to know you had them.
Realistically, by the time China and France got on the nuclear scene, doctrine had shifted from “nuclear torpedos, nuclear guns, nuclear landmines, nuclear everything” to “you have some submarines with missiles; you can have other stuff if you want, but no-one cares about it”. There’s little point in having thousands of warheads, these days.
(The UK did briefly go down the ‘nuclear everything’ road, but pulled back for cost/sanity reasons)
I meant that your data is out of date, and China has moved quickly in the last ten years. They went in the last ten years from being able to just hit the west coast to hitting all the way up to the Midwest, do you think they won’t have some amount of increased coverage in the next, especially with their space program accelerating their ICBM program?
The truth is that China hit MAD awhile ago and doesn’t really need to play up or even build much more on its nuclear arsenal. They are better off investing in conventional warfare for the near term, and especially in new arms like drones that give them an actual advantage in future conflicts.
reply