23
16
Aijan

@programming.dev

Aijan 15 points 2 years ago

Thanks for the tip. password.trim() can indeed be problematic. I just removed that line.

path: 0 13001735 13001792, hotness: undefined, score: 15, children: 0
Aijan 7 points 2 years ago

Author here. In case it’s not clear, this article isn't about installing Linux packages; it's about deploying multiple versions of software to development and production environments.

path: 0 10165872 10166002, hotness: undefined, score: 7, children: 2
Aijan 7 points 2 years ago

Seriously, why the negative tone? If I've offended you, I'm sorry. You might think that I'm wasting time, but there are multiple ways to skin a cat. I prefer not to use DEB packages for deployment, though others might.

path: 0 10165872 10166002 10170212 10171787, hotness: undefined, score: 7, children: 0
Aijan 4 points 2 years ago path: 0 13658386 13658425, hotness: undefined, score: 4, children: 1
Aijan 4 points 2 years ago

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.

path: 0 10167038 10167353, hotness: undefined, score: 4, children: 0
Aijan 3 points 3 years ago

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"
}
path: 0 9291386 9292110, hotness: undefined, score: 3, children: 5
Aijan 3 points 3 years ago

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.

path: 0 9280328 9280542, hotness: undefined, score: 3, children: 0
Aijan 3 points 2 years ago

Author here. My blog is also generated with Hugo, and it's great. I just prefer not to generate HTML and CSS from JavaScript unless it's necessary.

Sorry, I haven’t seen that movie. Thanks for the recommendation though.

path: 0 9621989 9622628, hotness: undefined, score: 3, children: 1
Aijan 2 points 3 years ago

That idea crossed my mind too, but you can’t really use the full capabilities of SQL in graph databases, and that’s a deal breaker for me.

path: 0 9291386 9292110 9298048 9309631, hotness: undefined, score: 2, children: 0
Aijan 2 points 3 years ago

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.

path: 0 9291386 9292110 9292882 9293288, hotness: undefined, score: 2, children: 0
Aijan 1 point 10 months ago

I think you might be focusing on the execution of the request rather than the orchestration. The decision of when and why to make an API request is absolutely business logic. In imperative code, that logic is hard-coded to the execution. By separating the intent from the execution, we can test that decision flow without spinning up the infrastructure.

path: 0 21228891 21228892 21230123 21230124, hotness: undefined, score: 1, children: 0
Aijan 1 point 10 months ago

You can still test the functions individually or run the entire flow against a test database, but without an effect system like this, it's very hard to test business logic in isolation.

path: 0 21227424 21227425, hotness: undefined, score: 1, children: 0
Aijan 1 point 10 months ago

Integration tests against a real database can and should still be performed. The idea here is the ability to test business logic in isolation without using mocks. Effect systems also have other benefits. You basically get cross-cutting concerns like logging and profiling for free. Every single database call, API request, and file read in your entire application can be easily logged and profiled.

path: 0 21228891 21228892, hotness: undefined, score: 1, children: 2
Aijan 1 point 3 years ago

That idea crossed my mind too. AFAIK, you can't really use SQL in graph databases, and that's a deal breaker for me.

path: 0 9221801 9222034, hotness: undefined, score: 1, children: 0
Aijan -1 points 2 years ago

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.

path: 0 13013830 13017342 13018104 13018204, hotness: undefined, score: -1, children: 1
Aijan -6 points 2 years ago

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.

path: 0 13013830 13017342, hotness: undefined, score: -6, children: 5

thanks for using Leebra!

go to feed...