• 13 Posts
  • 14 Comments
Joined vor 7 Monaten
cake
Cake day: 8. April 2024

help-circle
  • AijanOPtoProgrammingSelf-documenting Code
    link
    fedilink
    arrow-up
    1
    arrow-down
    2
    ·
    vor 26 Tagen

    Perhaps I was unclear. What I meant to say is that, whenever possible, we shouldn’t have multiple versions of a field, especially when there is no corresponding plaintext password field in the database, as is the case here.


  • AijanOPtoProgrammingSelf-documenting Code
    link
    fedilink
    arrow-up
    1
    arrow-down
    7
    ·
    vor 26 Tagen

    I appreciate the security concerns, but I wouldn’t consider overriding the password property with the hashed password to be wrong. Raw passwords are typically only needed in three places: user creation, login, and password reset. I’d argue that having both password and hashedPassword properties in the user object may actually lead to confusion, since user objects are normally used in hundreds of places throughout the codebase. I think, when applicable, we should consider balancing security with code maintainability by avoiding redundancy and potential confusion.









  • Cleanup can be as simple as deleting the latest deployment directory, if the script gets that far. The article is about using built-in Linux tools for ‘easy’ application deployments. One can also use dedicated tools, as you suggested, to further automate the deployment process.








  • AijanOPtoProgrammingBeyond Foreign Keys
    link
    fedilink
    arrow-up
    2
    ·
    vor 7 Monaten

    There’s certainly the danger of creating too many ad-hoc or sparse relationships, which can cause issues. That said, when used for supplementing foreign keys, Tie-in can be a useful tool in a production system as well.


  • AijanOPtoProgrammingBeyond Foreign Keys
    link
    fedilink
    arrow-up
    3
    ·
    vor 7 Monaten

    Yes, that’s correct. Here’s how an entry in the join table looks like:

    {
      "id": 6,
      "sourceComp": "user",
      "sourceId": 2,
      "targetComp": "post",
      "targetId": 3,
      "type": "author",
      "createdAt": "2024-03-28T13:28:59.175Z",
      "updatedAt": "2024-03-28T13:28:59.175Z"
    }
    

  • AijanOPtoProgrammingBeyond Foreign Keys
    link
    fedilink
    arrow-up
    4
    arrow-down
    1
    ·
    vor 7 Monaten

    AFAIK, no NoSQL database fully supports SQL, and only some offer support for transactions and joins. The idea here is to augment a relational database by adding capabilities for dynamic relationships.










Moderates