Ankhers
Joined 11 years ago
Joined 11 years ago
You may want to take a look at the partisan[0] library written in Erlang. It is basically that, a reimagination of distributed Erlang, except that it can be multiplexed over multiple connections.
It was a cat and mouse game for a while, but ultimately, if you want to detect if someone is using adblock, you need to do it in JS. And then the ad blockers will just add that piece of JS to their block lists.
In this project I do not believe the IDs were always encrypted when being sent to the user. So we sometimes had to guess whether we received an encrypted ID vs a regular integer ID because it is possible for the encryption algo that was used to return a sequence of numbers.
I personally use Emacs and magit which has great support for worktrees. I do not know if the VSCode git integration supports it.
This may just be the simplicity of the example they have, but they also have an `update_changeset`, which I think is an anti-pattern. You should be creating a different changeset for each operation that can be applied to a given schema. In the case of a user, you may be able to change a password, or an email address separately from being able to change a screen name or something. You should be creating separate changeset functions for each of those operations.
The author also puts a foot note at the end stating that they would usually create a `base_changeset` function that can be reused for common parts of a changeset. Please don't do this. Just create multiple reusable functions for each check. For example, you may create private functions in the schema for `validate_email`, `validate_password`, etc. These are the reusable pieces that you most likely want to have and can be used from within any changeset. Then you will be able to mix and match them as needed instead of trying to come up with a truly base changeset that applies to everything and still have a lot of validation rules duplicated between various changesets.
I'm not saying this is the entire answer, but Drew has some issues with Zig https://news.ycombinator.com/item?id=15494222.
So yes, companies absolutely can get cheap(er) labour and have the same, or at least similar, quality.