I blow hot air.

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

help-circle


  • You probably already know this, or are talking about another language, but JavaScript is inherently single threaded, so unless you’re running blocking I/O in parallel, you won’t actually see any performance boost. Service workers get their own thread though.









  • All these answers read like they’re written for comp sci students rather than a general audience. Let me give an ELI5 (more like ELI12) a shot.

    Ports are just numbers. They aren’t physical pathways or doors or windows or anything like that. A better analogy is a street address, like an apartment number. Your IP address identifies your computer (apartment building), and the port identifies the program on the computer (the apartment). When a program needs to talk to the internet, which is very similar to sending a letter, it hands a packet/letter to your computer and your computer assigns the program a port number. It then puts that number on the return address of the letter so that the recipient knows where to send the response. The computer remembers that port number is associated with that program, so when it gets an incoming letter with that number, it gives it to the program. After the program is done talking to the internet, the computer frees the port up to be used by another program.

    Ports are “closed” when there is no program associated with them. Any incoming letters are ignored because they have nowhere to go.

    Ports are “open” when they’re associated with a program. This happens automatically when programs send outgoing letters, or you can manually open (or “forward”) ports by telling your computer/router what the port should be associated with and that it shouldn’t use the port for something else.

    ELI5 over.

    The internet is networks on top of networks on top of networks, so your computer will have an IP and assign a port number, then your router will remember that and change the address on the letter to its own IP with a different port number, then that process repeats a few more times until eventually it reaches its destination. You don’t have to deal much with your computer’s internal network, but occasionally you have to deal with your router’s by opening/forwarding a port because it has a NAT that has to deal with all of the devices on your network. Forwarding the port just tells your router to always send incoming letters with that port number to a specific device.










  • Vent@lemm.eetoAsklemmy@lemmy.mlHow do you ask for help?
    link
    fedilink
    arrow-up
    28
    ·
    edit-2
    1 year ago

    There was a study a few years ago that found that asking someone for help actually strengthens your relationship and makes them like you more. IIRC it was on workplace interactions. The basic idea being that if you ask someone for help, it shows you have trust and confidence in them and they get to feel useful, which people generally enjoy.

    Obviously that’s going to depend on the type of help. If I need help moving or with some mental issue, that’s going to be a more appreciated ask than if I ask for money. Not that asking for money is always a bad thing, so long as it’s a legitimate need and doesn’t become a habit I think most people would be happy to help out a friend low on cash. It’s better to get financial help from friends and family than from some predatory payday loan that is designed to keep you in debt for the rest of your life.