HackerTrans
TopNewTrendsCommentsPastAskShowJobs

ape_key

no profile record

comments

ape_key
·2 anni fa·discuss
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.
ape_key
·2 anni fa·discuss
Unit tests are dead weight during refactoring. Integration tests are useful.

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.
ape_key
·2 anni fa·discuss
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.”

Then you write the tests yourself.
ape_key
·2 anni fa·discuss
Weird how I write complete thoughts and supply references but this site full of tech geniuses mostly produces downvotes and single-sentence drivebys.

Come back when you have things worth contributing.
ape_key
·2 anni fa·discuss
Yeah it’s more useful to think of unvalidated state and validated state. Use different types if you can.

What I don’t care about is if the state is from a prop, a value inside a DOM object, a global…

If I have to know where the state comes from, the code is smelly
ape_key
·2 anni fa·discuss
I’d be deeply surprised if a webapp requiring Next.js doesn’t have a state machine in any components.

If you’re past the complexity threshold for Next.js, you’ve run into what’s really probably the most fundamental construct in computing.

They’re not that complex. They’re just presented in academic language.

If you can program professionally, you’re very capable of self-studying a bachelor’s degree’s worth of CS.
ape_key
·2 anni fa·discuss
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”.
ape_key
·2 anni fa·discuss
Nah, diagrammatic reasoning is part of it. Separate yourself from syntax.

Doodling on paper (or just mentally envisioning a data structure) is way more fun than writing actual code.

I certainly would dissuade the OP from trying Elm. Not as part of learning state machines at least. Too many things at once and not necessary.
ape_key
·2 anni fa·discuss
Inflation just turns people’s brains off.

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.
ape_key
·2 anni fa·discuss
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.
ape_key
·2 anni fa·discuss
You absolutely should learn about state machines.

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
ape_key
·2 anni fa·discuss
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
ape_key
·2 anni fa·discuss
The number of times I’ve started typing my email address into a form and the form yelling in DANGER ALLCAPS RED: “INVALID”.

Yeah I know “a” isn’t a valid email address, but let me finish typing lol.

This is for everyone. Please, please leave HTML form behavior alone as much as possible. Whatever it is you’re changing, you’re probably wrong.
ape_key
·2 anni fa·discuss
(a+b)-a doesn’t always equal (a-a)+b

It’s different behavior if the order of operations are non-deterministic.

Plenty of room for such things in games. Most of the time the effects are too small to notice. They can chaos-theory out of control, though.

So real time games nearly universally sync state instead of relying on deterministic synchronization via events/actions.

For a good read, look up lockstep deterministic networking.

There’s way too much nuance here to be so dismissive
ape_key
·2 anni fa·discuss
respectfully you haven’t written enough games

> real game

turn-based and real-time games have different kinds of complexity, so a platformer won’t expose you to all of it.

turn-based games are roughly going to give you an easier time separating the game code, but the UI code is going to feel like a debilitating slog.

> Many games are 100% deterministic

Until you use floating points, networking, or different platforms.

This is more likely to be true in turn-based games, and super unlikely in anything real-time and multiplayer.

Most games like that periodically sync state instead of relying on applying actions on each client