If a test is worth having, it’s worth writing by hand.
Throw away mandatory code coverage tech debt instead of adding artificially-intelligent tech debt on top.
The best I can see a use for something like this is more like a linter than a test writer. “Robot, find weird things in the code and bring them to me for review.”
Some of us just panic and react without thinking about why food is getting more expensive or what policies will improve the world for us now and our children in the future.
When people are hangry, they vote for the loudest monkey.
hey, I want to interpret this charitably but the language here is pretty bad: “achieving […] dead Slavs […] isn’t […] useful”.
Yeah I know I used a lot of editing but the sentiment and word choice is there. I don’t want the US to be the world police but I don’t want to dismiss that Putin is deeply rotten. And I don’t think whether something is “useful” is the only concern.
Are we helping? Are we making things worse? These are how we should talk about things.
When Russia invaded in 2022 it looked like they were going to conquer Ukraine. Then they'd have to stop because they would bump into the NATO border.
Then the US intervened. Maybe the European powers too, I dunno what the politics in the NATO war room looked like. Now it looks like the country is levelled, Europe is undergoing an energy crisis because of their response, it is now a realistic possibility that NATO might not be able to coerce Russia, China or even Iran on the outside. My money is still on the US but they're making it look like a struggle.
And the plan for Ukraine recovering seems to involve them being bankrolled by a bankrupt US so I don't see that working out well either. This isn't the 1950s, the US is not in a position to go rebuild Europe. They have enough problems figuring out how to build prosperity in the USA without trying to do it overseas. That is a core complaint of the right wing and a significant part why said right-wingers are trying to vote a wrecking ball into the presidency.
Is the US helping? Maybe. Not a very clear picture yet.
Compare this to Iraq or Afghanistan where nobody stood up for them after the US invasion. It was bad for the countries, I don't know if it was worse than what is going on in Ukraine but I suspect we'll discover that US intervention has made things worse.
I’m not strictly isolationist. I’m also not smart enough to predict what happens when playing Risk with real countries.
It’s definitely possible that sending weapons into a conflict just makes it worse. Especially when soldiers are just people on both ends.
My only dispute with your text is that we definitely have the ability to get our shit together financially in the US. The opposition is purely ideological. “We can’t” becomes “we don’t try” becomes “we can’t”.
> My only dispute with your text is that we definitely have the ability to get our shit together financially in the US. The opposition is purely ideological. “We can’t” becomes “we don’t try” becomes “we can’t”.
One the one hand yes. On the other that is true of all countries, and most of them are basket cases when it comes to financial governance and they aren't in any position to be putting their finger on the scales in wars half a world away. The US just doesn't have a resource surplus and it is in question whether they can sustain their interventionist foreign policy without first sitting down and getting the house in order.
Where are the resources going to come from? Going back to the thread root, that is the core of the right wing backlash that is brewing on this topic. All this stuff going to Ukraine to get blown up could be going to the US to make life better for people.
Why does the right insist on a massive military budget, then complain about sending surplus supplies overseas?
You’re debating two things: whether the US should intervene in Ukraine, and whether the US should get its internal affairs in order.
Your points are that war is expensive*, the US has a poor ability to run its internal systems (yes and no, but how does this imply we should sit on our hands with foreign policy), this war isn’t useful.
*The monetary cost of this war (to the US) is just not a legitimate part of the debate. It’s pittance what we’ve supplied.
> Why does the right insist on a massive military budget, then complain about sending surplus supplies overseas?
Well we're crossing from the point where I can talk about "the right" because the stances I've heard are too mutually incoherent; this is the part where everyone has their own opinions. My argument is if you have an unreasonably large budget, then you donate some stuff, then the budget needs to get bigger again to cover the donations.
Fair summary of the thread so far by the way, not often I get to say that in threads that go beyond 2 posts.
> The monetary cost of this war (to the US) is just not a legitimate part of the debate. It’s pittance what we’ve supplied.
I have a few problems with that line of thought.
Firstly, describing it as a pittance is unreasonable. The resources sent to Ukraine could have been used in the US to achieve good things. It is 10s of billions of dollars; it could get dumped on some random small struggling town in the rural US and no-one there would ever have to work again (across multiple generations if they managed their investments right). There is an opportunity cost to wasting that much money that means the US is worse off.
Secondly, if you add all the "pittances" up that the US wastes on foreign war you get real money. The the war in Afghanistan ended up being around 2 trillion over 20 years which comes to a burn rate in the range of the US spending in Ukraine (~100 billion/yr in Afghanistan vs ~75 billion/yr in Ukraine [0]). These pittances aren't pittances from that perspective either.
And finally US doesn't look like it can afford a pittance. It is like someone with a deep debt problem buying lottery tickets. The financial situation in the US is dire; the threshold has been crossed where the principle on their debt isn't going to be paid back and we're looking for the point where either they stop borrowing or the interest doesn't paid back either. It is unreasonable to be talking about just finding a little surplus to give away - the US exhausted those options years ago. There has to be an answer to the "what is being given up?" question.
Now if the US was getting some sort of payoff or helping the Ukrainians in some way then that cost might be justifiable, but it seems that all the US involvement is doing is transforming Ukrainians into other-countrians and corpses while securing China's geopolitical position. We have established international norms for how theses invasions should play out, they were established in the 2000s by the US's adventurism. They're getting broken here with no obvious upside gained.
Also event-driven programming. (especially the idea of delaying effects, e.g. so in an RPG someone can perform a Reaction which disables the effects of an Action performed by another character before they’re applied).
Learn about stacks.
When you’re ready to make your brain bleed a little, try designing on paper the data structure to make D&D turns work.
Hints: player initiative is a circular array, reactions are a stack, actions/reactions are events. Actions are events which modify characters, reactions are events which modify other players events.
Ignore abilities which e.g. create new terrain or whatever. Ignore movement, positioning, targetting entirely.
This will be fun!
Also I can recommend the free book Game Programming Patterns. It’s useful for programming concepts even if you don’t make games
I agree: take the time to learn about state machines.
I remember the first time hearing about them and being totally confused by the wikipedia page. I think the first article that made sense to me was this one, because it used a webapp example: https://www.infoq.com/articles/robust-user-interfaces-with-s...
And then developing a few sample applications, especially with Elm or another language with custom types, really completed my understanding. The diagrams and math notation are more intimidating than the actual code.
Thanks for sharing that link! I've tried reading about them in the past and always walked away more confused, but this article seems more readable. I'll give it a thorough read this weekend. Thank you!
If you enjoy your job, you’re lucky. If you don’t enjoy retirement, you’re not trying.
Human psychology is dominated by getting stuck in emotion-behavior cycles, and those cycles wind up in local maxima.
Change is scary. Self-actualization is hard.
I highly, highly, highly doubt what you’re saying would be true for most people. Regardless of social class. I think most people would view retirement as freedom.
Would they immediately feel secure, content, and know their next direction to take? Probably the fuck not, but hey that’s just being human.
I would feel sad though to see someone give up on retirement and personal development to go back to working on business web apps. You have so much potential, don’t be afraid
The right way to handle this is - store both the user input and the validated value (potentially null) and an error state (potentially null.) Then, when the user takes action to submit the form, validate and set the error state if needed. That way you’re not constantly setting the error state on typing, but when some concrete action is taken you can signal what went wrong.
Admittedly, anecdotal, but most of the guys in my career who have been really into UI = f(state) only consider the validated state, and wish the stuff that’s purely user input and never sent to your backend would just go away.
And when you consider that state is both what you want to send to the server, and a bunch of intermediate state that only ever means something to the client, the UI = f(state) idea (while true!) doesn’t seem all that helpful. Technically every app is a function of state, but if your definition of state is that broad what help is the idea?
For 32-bit x86 it's certainly not. The C standard permits intermediates to preserve excess precision, and the only way to avoid that is by flushing to memory, which is slow. On Windows you usually get 64-bit intermediates and on other OSes usually 80-bit.
64-bit x86 and modern non-x86 architectures are usually deterministic for primitive operations at least, but libm differences abound.
Simple operations like addition and multiplication are generally bit-for-bit deterministic, even across different architectures. More complex operations like fused multiply-add can have slightly different rounding behavior. But the big issue is with the more complicated operations, like trigonometric functions or non-integer exponentiation. Those often have differing implementations between platforms, and the only way to guarantee determinism is to essentially roll your own sin/cos/tan/sqrt/etc.
It details how Age of Empires decided to make the game deterministic, how this had significant benefits, and how it's extremely difficult to do:
> At first take it might seem that getting two pieces of identical code to run the same should be fairly easy and straightforward -- not so. The Microsoft product manager, Tim Znamenacek, told Mark early on, "In every project, there is one stubborn bug that goes all the way to the wire -- I think out-of-sync is going to be it." He was right. The difficulty with finding out-of-sync errors is that very subtle differences would multiply over time. A deer slightly out of alignment when the random map was created would forage slightly differently -- and minutes later a villager would path a tiny bit off, or miss with his spear and take home no meat.
Do you think you look good by announcing that, since you don't know the subject you're discussing, you're not going to trust someone who does?
I don't trust new accounts whose instinct is to insult me. I don't need to justify that heuristic. Also I was right, chaotic behaviour doesn't mean non-deterministic, which the quote you posted affirms.
So not only was I insulted, I was insulted even though I was right. Also I have studied chaotic dynamical systems, so I have formal education in this.
The interesting thing about chaotic systems is that they have very divergent futures for very similar inputs, not that they're random.
Also I don't really care about being considered a genius, and I think it's sad that anyone would want to be thought of as one.
Saying stupid things is pretty likely to draw insults. They were obviously warranted here.
> The interesting thing about chaotic systems is that they have very divergent futures for very similar inputs, not that they're random.
If you were paying attention... that's exactly what ape_key was referring to. The problem under discussion is that very similar inputs to the game logic lead to radically different states of the game at a later time. The nondeterminism is what gives rise to the fact that the inputs are "very similar" rather than "identical".
Insults are warranted because I affirmed what he said? What? You’ve been a member of this site for 12 years. Maybe you are a bit too jaded from your interactions here. I have reported your comment
Code coverage metrics are most easily met by writing unit tests. Unit tests are tedious to write.
If you have a robot writing unit tests, I do not want to see your codebase. Refactor all day long. I’m not going near it.