• 14 Posts
  • 732 Comments
Joined 5 years ago
cake
Cake day: May 31st, 2020

help-circle




  • Right, so you might want ask about this on !askscience@lemmy.world or such, as science-y folks tend to not be comfortable with what I’m about to say, but to the best of my knowledge, that’s all just complete horseshit. Like, no, your understanding of the photograph is not somehow incorrect. It’s just two halves of a photograph and because you know the first half, you know what’s on the second half. The second half does not get changed by you looking at the first half. Nor does the entangled quantum get changed by you looking at the first quantum.

    I think, a big part of this mass confusion is that at the size that quanta have, looking at them does actually change/move the quantum that you look at (not a potentially entangled one). This is not for crazy reasons, but because looking at them requires light, which is the equivalent of blasting them with photons, and photons are themselves quanta.
    It’s like if you had a dark room with a ball in it and you can only throw other balls into there to try to figure out where the first ball is. You need to hit the first ball, in order to have a chance of working out where it might be based on the angle that your thrown ball returns at. If you do hit the first ball, it will move. So, you only really know where it was at the time of impact. Quanta are not balls, but they do still interfere with each other when they get close to each other.

    Entanglement in this analogy is that you’ve spun up two balls next to each other like cogwheels, so you know them to have the opposite (and equally strong) spin. Then you’ve released those into the dark room and start throwing other balls at them to try to work out their spin. If you hit one of the spinning balls, your thrown ball will come back out with a spin opposite to that and the spin of the ball that was hit will have reduced. In this moment, you know that the other spinning ball also has an opposite spin, because you originally spun the two balls like cogwheels. The other ball does not get changed by you measuring the first, but there’s no way for you to know, because you have to measure it to find out, which means also throwing a ball at it and therefore changing it, too.

    As far as I can tell, this is the other big part of where the confusion comes from. Because measuring necessarily also involves changing the thing and because it’s actually impossible to disprove that the entangled quantum didn’t get changed by us measuring the first, you get folks that follow a school of thought of things being non-deterministic. Of things only being set in stone once you measure them. There’s lots of vested interest in things being non-deterministic for religious or moral reasons and there is no way to disprove it at the quantum level. These folks then propagate concepts like superposition and that when you open the box, you’re the one that forces the cat to be killed. (Schrödinger was not one of them, by the way. The cat analogy was a critique of superposition as an idea.)

    To my knowledge, there’s no evidence for non-determinism (folks will sometimes argue with quantum fluctuation showing it, but it doesn’t happen in complete isolation, so that disqualifies it in my opinion) and given that the rest of our reality seems to be perfectly deterministic, I think we should assume the quantum stuff to be like that, too, unless proven otherwise, but unfortunately not everyone goes along with that.



  • I’ve heard this explanation of it once from a physicist: Imagine you have a photograph. You rip that photograph in half. Now you put both halves into envelopes and mix them up. At this point, you don’t know which half is in which envelope. Now you send one of the envelopes to Australia. You open your half. Because you see that you have the left half of the photograph, you gain instant knowledge that the right half is in Australia.

    With quanta, you can for example have a subatomic particle which decays into two quanta and then you know those quanta to have certain similar properties. As Wikipedia puts it:

    For instance, a spin-zero particle could decay into a pair of spin-1/2 particles. If there is no orbital angular momentum, the total spin angular momentum after this decay must be zero (by the conservation of angular momentum). Whenever the first particle is measured to be spin up on some axis, the other, when measured on the same axis, is always found to be spin down.
    https://en.wikipedia.org/wiki/Quantum_entanglement#Meaning_of_entanglement



  • Wildly depends on the complexity of the feature. If it only takes 4 hours to implement, you might have good enough of an idea what needs to be done that you can estimate it with 1-hour-precision. That is, if you’re only doing things that you’ve done in a similar form before.

    If the feature takes two weeks to implement, there’s so many steps involved in accomplishing that, that there’s a high chance for one of the steps to explode in complexity. Then you might be working on it for six weeks.

    But yeah, I also double any estimate that I’m feeling, because reality shows that that ends up being more accurate, since I likely won’t have all complexity in mind, so in some sense my baseline assumed error is already 100%.


  • Well, I think your idea would be simpler, if we weren’t talking about Java.
    Pretty much everything is an object in Java. It’s only logical that a type would also be an object and have associated fields.

    Similarly, what you’re thinking of as “reference types directly” doesn’t make sense in Java, because it lacks many of the systems to make that actually usable like a type. What you get from .class is a Class object, which you can’t stick into a generic type parameter, for example.
    It basically uses reflection to give you e.g. the name of that type and you can also instantiate an object of that type, if no parameters need to be passed to the constructor function.

    And then, yeah, I think for explaining that you merely get an object which roughly describes the type, the separate .class field is a good idea.



  • Well, it also avoids running instantiation code, which could be doing all kinds of things. In theory, it could have a side-effect which modifies some of your application state or issues a log statement or whatever.

    Even if it doesn’t do anything wild right now, someone could change that in the future, so avoiding running such code when it’s not needed is generally a good idea.


  • Ephera@lemmy.mltoProgrammer Humor@programming.devCode analyzer lore
    link
    fedilink
    English
    arrow-up
    15
    arrow-down
    1
    ·
    5 days ago

    I don’t believe there is much deeper of an explanation than “because the Java designers didn’t implement support for that”.

    That feature is called “types as a first-class value” and you need to implement some special casing or an entire system in the language to make it work. Telling devs there’s a special static variable .class is conceptually simpler to implement and understand.


  • Well, vegan foods with lots of proteins include: Beans, lentils, peas, nuts, peanuts, tofu, soy.
    Personal favorites are red lentils (cook pretty quickly and don’t need to be soaked before) and pre-cooked white beans (I just have a jar of those in the fridge and will scoop a spoonful into all kinds of meals).

    Proteins are cool, because they stick around in your stomach for a while, but they’re bad at filling you up. For that, salads and veggies are the best. Sometimes, I’ll eat an entire bowl of salad, which is not a lot of calories, but still fills me up.

    I would also recommend slowly changing your diet over. Your gut microbiota need time to adjust to a different diet. If you don’t give them that time, they can kill your will pretty effectively.







  • I think, it’s a combination of things.

    To some degree, it may make the player choice seem broader, as you can go full hero or full villain. In some sense, you can also go into the middle by kicking a puppy at one point and then helping an elderly lady at another.

    But then, it’s also just hard to portray nuance. If the options are “pet kitty” and “punch kitty”, you know what’s what. But if it says “pet kitty” and “ignore kitty”, it becomes a lot less clear. Maybe the kitty does not want to get pet by a random stranger. You probably won’t be able to gauge its reaction from the character model to know what’s the right choice.
    But you also won’t know what “pet kitty” really means. Will your character be gentle and back off, if the kitty does not appreciate the gesture? Or will they stroke that kitty until it bites them?