No relation to the sports channel.

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

help-circle





  • fubo@lemmy.worldtoProgramming@programming.devHow to be a -10x Engineer
    link
    fedilink
    arrow-up
    62
    arrow-down
    1
    ·
    edit-2
    9 months ago

    Some other ways:

    Cultivate bitterness.

    Find the pessimists in your organization, and disappoint them.

    Make mean cynicism a part of your workplace culture. Do this by example: Promote mean cynics and put them in charge of things. But do it also by conversion: Behave in a way that makes mean cynics’ view of the world correct.

    Reward bad personal habits to create internal conflicts between work and health.

    If someone skips sleep to finish a project, give them a bonus. This gives them an internal conflict between approval and health, and teaches them that they can sacrifice their health to receive a reward.

    Encourage a hard-drinking culture in teams that have stressful roles that demand team cohesion, like SRE or Ops teams with on-call requirements. This gives them an internal conflict between their support network and health.

    If someone is sick, injured, bereaved, or otherwise suffering: Make it clear how much their condition is inconvenient to their coworkers, and how much their projects are impacted by their absence. Assure them that all will be well once they can conclude their personal problems and commit to the team. Do not, however, offer them any specific help; if they express specific needs for accommodation, disregard them as idle and unrealistic wishes.


  • If DNS is transiently down, the most common mail domains are still in local resolver cache. And if you’re parsing live user requests, that means the IP network itself is not in transient failure at the moment. So it takes a pretty narrow kind of failure to trigger a problem… And the outcome is the app tells the user to recheck their email address, they do, and they retry and it works.

    If DNS is having a worse problem, it’s probably down for your mail server too, which means an email would at least sit in the outbound mail spool for a bit until DNS comes back. Meanwhile the user is wondering where their confirmation email is, because people expect email delivery in seconds these days.

    So yeah … yay, tradeoffs!

    (Confirmation emails are still important for closed-loop opt-in, to make sure the user isn’t signing someone else up for your marketing department’s spam, though.)


  • fubo@lemmy.worldtoProgramming@programming.devStrings do too many things
    link
    fedilink
    arrow-up
    10
    arrow-down
    2
    ·
    edit-2
    9 months ago

    The only way to correctly validate an email address is to send a message to it, and verify that it arrived.

    If you’re accepting email addresses as user input (e.g. from a web form), it might be nice to check that what’s to the right of the rightmost @ sign is a domain name with an MX or A record. That way, if a user enters a typo’d address, you have some chance of telling them that instead of handing an email to user#example.net or user@gmailc.om to your MTA.

    But the validity of the local-part (left of the rightmost @) is up to the receiving server.



  • fubo@lemmy.worldtoProgramming@programming.devStrings do too many things
    link
    fedilink
    arrow-up
    68
    arrow-down
    1
    ·
    edit-2
    9 months ago

    Any time you’re turning a string of input into something else, what you are doing is parsing.

    Even if the word “parser” never appears in your code, the act of interpreting a string as structured data is parsing, and the code that does parsing is a parser.

    Programmers write parsers quite a lot, and many of the parsers they write are ad-hoc, ill-specified, bug-ridden, and can’t tell you why your input didn’t parse right.

    Writing a parser without realizing you’re writing a parser, usually leads to writing a bad parser. Bad parsers do things like accepting malformed input that causes security holes. When bad parsers do reject malformed input, they rarely emit useful error messages about why it’s malformed. Bad parsers are often written using regex and duct tape.

    Try not to write bad parsers. If you need to parse something, consider writing a grammar and using a parser library. (If you’re very ambitious, try a parser combinator library.) But at least try to recall something about parsers you learned once way back in a CS class, before throwing regex at the problem and calling it a day.

    (And now the word “parser” no longer makes sense, because of semantic satiation.)

    By the way, please don’t write regex to try to validate email addresses. Seriously. There are libraries for that; some of them are even good. When people write their own regex to match email addresses, they do things like forget that the hyphen is a valid character in domain names.




  • KeyKOS, EROS, and other capability-based mainframe OSes could offer security and data integrity guarantees that “modern” OSes are only now just catching up with. Nothing from the Unix or VMS lineages, including Linux and Windows¹, really comes close.

    The next chance for widespread adoption of a capability-based system is maybe Fuchsia; if Google ever deploys it for anything other than Nest devices, or if its open-source core gets picked up by someone else.


    ¹ Windows isn’t literally a VMS, but modern Windows descends from Windows NT, which was led by Dave Cutler, who had also been the tech lead on VMS. And there’s the joke about “WNT” and “VMS”.


  • To be fair, Samuel had tried to convince the people of Israel not to do the king thing in the first place. See 1 Samuel 8:10-22.

    And he said, This will be the manner of the king that shall reign over you:

    He will take your sons, and appoint them for himself, for his chariots, and to be his horsemen; and some shall run before his chariots. […] And he will take your daughters to be confectionaries, and to be cooks, and to be bakers.

    And he will take your fields, and your vineyards, and your oliveyards, even the best of them, and give them to his servants. And he will take the tenth of your seed, and of your vineyards, and give to his officers, and to his servants. And he will take your menservants, and your maidservants, and your goodliest young men, and your asses, and put them to his work. He will take the tenth of your sheep: and ye shall be his servants.

    And ye shall cry out in that day because of your king which ye shall have chosen you; and the Lord will not hear you in that day.

    Nevertheless the people refused to obey the voice of Samuel; and they said, Nay; but we will have a king over us; that we also may be like all the nations; and that our king may judge us, and go out before us, and fight our battles.