• 0 Posts
  • 15 Comments
Joined 10 months ago
cake
Cake day: January 15th, 2024

help-circle


  • I’ll write an explanation here, but I’ll try to answer all questions from the thread. Also quantum mechanics is complicated, so sorry for the long text.

    Electron orbitals are weird and complicated, for hydrogen we can solve them analytically and depending on the quantum number of the energy levels we are looking at, they take the forms as in the picture on Wikipedia:

    https://upload.wikimedia.org/wikipedia/commons/thumb/e/e7/Hydrogen_Density_Plots.png/1280px-Hydrogen_Density_Plots.png

    Now whatever energy levels and quantum numbers are, what we are seeing is the probability of the location of the outer most electron (ok hydrogen only has one).

    To understand bonds, we don’t really need the picture of orbitals, but what’s important is understanding that electrons occupy shells. A certain number of atoms can fit into a shell and when it’s full, the electrons start a new shell. It gets complicated quickly with more electrons, however in the simpler case, a shell can fit 2n^2 electrons, where n is the shell number. So for n=1, a maximum of 2 electrons can fit, for n=2, a maximum of 8 electrons can fit.

    Shells want to be filled, so that leads to two possible bond types. If an atom with a free electron comes close to an atom that has a free spot for an electron, the electron can hop over to the other atom, at which point we have an ionic bond (the atom that loses the electron loses one electric charge and is thus positively charged, the other atoms gains an electric charge and is then negatively charged, so they want to be together).

    Another option is covalent bonding, where instead of an electron jumping to another atom, the atoms actually share the electron.

    Now do orbitals overlap? I wouldn’t give that question a yes or no, because, at that level, we can’t really separate atoms anymore. When the atoms are far apart we can draw separate orbitals for both, but when they get together, new orbitals form that is the solution of the electronic configuration of the new molecule we just created. It’s more like the orbitals that we have get deformed into new orbitals.





  • Denying entry for people in need can’t be the answer. Honestly, it’s unfair that we were lucky enough to be born into a stable country. It’s unfair that other people have to live under dictators looking only for their personal interest. It’s unfair that people have to live under the consequences of global power struggles and it’s also unfair that Western countries exploit other nations and then don’t lend assistance when everything turns to shit.

    How can you justify sending away these people that are fleeing from warzones or due to global warming. They are losing family and their homes and yet, they spent their life worrying while we can go to restaurants, cafes, play in parks, go hiking, swimming or biking without ever having to worry.

    Leaning into the immigration policy of the right cannot be the answer, there has to be another solution.





  • AngryPancake@sh.itjust.workstoProgrammer Humor@programming.devC++
    link
    fedilink
    arrow-up
    27
    arrow-down
    1
    ·
    5 months ago

    Given that you probably are using pointers, and occasionally you are allocating memory, smart pointers handle deallocation for you. And yes, you can do it yourself but it is prone to errors and maybe sometimes you forget a case and memory doesn’t get deallocated and suddenly there is a leak in the program.

    When you’re there, shared_ptr is used when you want to store the pointer in multiple locations, unique_ptr when you only want to have one instance of the pointer (you can move it around though).

    Smart pointers are really really nice, I do recommend getting used to them (and all other features from c++11 forward).