I take my shitposts very seriously.

  • 0 Posts
  • 166 Comments
Joined 1 year ago
cake
Cake day: June 24th, 2023

help-circle

  • You’ll encounter math eventually. It could be as simple as implementing linear interpolation for a custom type, or understanding why a type is not suited for a particular application (e.g. never use floating points to represent money). If you delve into low-level networking, you’ll need a good understanding of binary/decimal/hexadecimal conversions and operations. If you go into game development or graphics, you won’t survive without a deep understanding of vectors, matrices, and quaternions. Any kind of data science is just math translated to a machine-readable language.

    In my opinion, knowledge of the basic concepts is more important than being good at actually performing mathematics with pen and paper. For example, if you need to apply a transformation to a vector, nobody expects you to whip up a program that does the thing. Instead, you should immediately know:

    • what a transformation is (translation, rotation, scaling, projection, etc),
    • that each transformation has a corresponding transformation matrix,
    • that you’ll have to deal with inhomogeneous and homogeneous coordinates, and
    • that you’ll have to combine the transformation matrices and the original vector.

    That abstract knowledge will give you a starting point. Then you can look up the particulars – the corresponding transformation matrices, the method to convert between inhomogeneous and homogeneous coordinates, and the process of matrix multiplication. I know because I failed calculus.





  • It’s a convention set by early programming languages.

    In most C-like languages, if (a = b)... is also a valid comparison. The = (assignment) operation returns the assigned value as a result, which is then converted to a boolean value by the if expression. Consider this Javascript code:

    let a = b = 1
    
    1. It first declares the b variable and assigns it the value of the expression 1, which is one.
    2. It returns the result of the expression b = 1, which is the assigned value, which is 1.
    3. It declares the a variable and assigns the previously returned value, which is 1.

    Another example:

    let a = 1
    let b = 2
    let c = 3
    console.log(a == b) // prints "false" because the comparison is false
    console.log(a = b) // prints 2 because the expression returns the value of the assignment, which is 'b', which is 2
    
    // Using this in an 'if' statement:
    if (b = c) { // the result of the assignment is 3, which is converted to a boolean true
        console.log("what")
    }
    

    You can’t do the same in Python (it will fail with a syntax error), but it’s better to adhere to convention because it doesn’t hurt anyone, but going against it might confuse programmers who have greater experience with another language. Like I was when I switched from Pascal (which uses = for comparison and := for assignment) to C.



  • My uneducated guess is money.

    Manufacturers likely have factories (either theirs or a contracted company’s) where they can mass produce the power bricks for a low cost. Upgrading to a USB power supply doesn’t offer significant benefits compared to the power brick of similar wattage, and the up-front cost of setting up a new supplier is financially unjustified. The old technology works just as well, so why change?

    High power USB is still a relatively new technology. I’m sure it will proliferate, but the consumer market has a fuckton of inertia.




  • Never ask:

    • A man his salary
    • A woman her age
    • An audiophile how much they paid for their hoard

     

    On second thought, ask all of those questions.

    • Secrecy is how employers get away with wage inequality.
    • “I didn’t know she was 17” does not work in a court of law.
    • An audiophile will proudly point at their favourite budget headset. I mean, the Samson SR-850 is just insane value for its price. Sure, it’s a symphony of plastics, the design is just a straight rip-off of the AKG K240, and the fixed cable is a bummer, but the frequency response and the soundstage are out of this world. Plus the impedance is only 32 ohms: it easily runs out of a smartphone.







  • rtxn@lemmy.worldtoNo Stupid Questions@lemmy.worldWhy are people impressed with SpaceX?
    link
    fedilink
    English
    arrow-up
    22
    arrow-down
    1
    ·
    edit-2
    30 days ago

    Rapidly reusable orbital launch vehicles were unheard-of until Falcon 9. The Space Shuttle was supposed to fill that role, but NASA, ULA, and government elements have made it a horrid overbuilt pile of feature creep that was, at the same time, the crowning achievement of American aeronautical engineering, which was impossible to refurbish quickly. The same thing that is currently happening to SLS.

    Propulsive landing of a first stage booster was an insane idea. Even massive space nerds like Everyday Astronaut were skeptical, and I watched him cream his jeans live when the first booster landed. That alone, the ability to reuse both the structure and the engines of the booster, as opposed to ditching them in the ocean (or in China’s case, on top of villages), has made access to low Earth orbit significantly cheaper, and affordable to underfunded scientific organizations.

    That being said, competition is closing in. Rocket Lab (New Zealand) is targetin the same industry with the Neutron rocket (CEO Peter Beck literally ate his hat when the announcement was made) and is experimenting with recovering its smaller Electron rocket using mid-air capture by a helicopter. Astra (USA) is developing a rapidly deployable small orbital launch rocket that can fit inside a standard shipping container. There’s also Jeff Bezos and his massive overcompensation of a dick rocket that can also land propulsively, but not worth discussing.