• 0 Posts
  • 7 Comments
Joined 3 years ago
cake
Cake day: July 2nd, 2023

help-circle
  • duh, it’s part of the IEEE 754 standard. every language that handles floating point numbers has NaN handling, and in every language NaN is a float. the only reason this is brought up as a javascript thing all the time is that js doesn’t have separate float and int types (aside from special structures like typed arrays and dataviews), it just defaults to float64 for simplicity and calls it number, which lines up with the “NaN is a number? nani???” joke.

    you don’t like it? consult the sorry excuse of thinking sand in the device you’re reading this on, because this is etched straight into it. every FPU capable of handling float32 and float64 numbers knows what NaN is and handles it the exact same way.

    this is one of the many things that sound unintuitive about programming but if you bother to understand the context you realise that if it wasn’t this way, it would be way worse. one of the most important skills in our field is to understand computers for what they are, rather than be puzzled that they aren’t what you thought they were, and it especially comes out in edge cases like this.


  • a magic link is not 2FA if it doesn’t also require a password. it’s 1FA, they just replaced the one factor.

    honestly i really hate websites that do that and yet don’t allow password-only 1FA. like sure, i understand that the average user’s password discipline is crap, but as a power user i’d really like it if all my accounts weren’t tied to all my other accounts sometimes.






  • honestly, i think it’s an overarching issue with the education system. ai is not the cause, it’s the symptom, people had a million ways of dodging tasks before it too. it’s just easier now than it’s ever been.

    if you know anything about indie game design, you know that learning is fun. as in, not that learning is a fun activity, but that learning is literally what fun is. you just need an environment that’s actually conducive to that, and it will be extremely gripping, because you will have created a flow state generator.

    but it turns out that doing that, while also ensuring what you’re learning is at all useful (as opposed to, y’know, how to pop heads in counter-strike or something) is difficult enough that most teachers just gave up and decided that learning must suck. which is a problem for many reasons, but i think the biggest one is that if it’s not fun, you’re not actually learning: if it’s boring, it’s because you already know how to do it, and doing it more doesn’t make you do it better, and if it’s frustrating, it’s because you keep failing and all that failing doesn’t teach any skills. practice is important, sure, but good practice lies halfway between these ends, and it’s fun. but a lot of people don’t get there, and they’re told it doesn’t matter if you get there, what matters is if you get through.

    i think that’s why all these courses are getting skipped by ai. because a staggering amount of people in education programs, in any kind pretty much, aren’t there to really learn, they are there to get through, by any means. because the whole social contract is that this is a thing that sucks, but if you get through it, you get a piece of paper and that paper will give you a nice life. it’s a nice thought, it’s understandable, human brains are wired to understand tradeoffs intuitively. but it skips the bloody point of why we do all this in the first place.

    and yeah, i get why you’re frustrated that uni students don’t know this. but honestly, how would they? no one told them the world they were raised in since the age of 6 is a lie.