HN user

Ankhers

199 karma
Posts0
Comments37
View on HN
No posts found.

I think it depends on what you mean by "cheap foreign engineers." I am born and raised Canadian. I make a decent chunk less than my American counterparts, even when working for the same company. Not because they are necessarily better suited for the job, but literally because of the country I live in. The same is true for engineers all over the world.

So yes, companies absolutely can get cheap(er) labour and have the same, or at least similar, quality.

It really isn't this simple, no. I remember a number of years ago someone tried to do this. Pardon the language, but the "product" was called "Fuck adblock" I believe. It was a piece of JS that you could include on your site that, if I remember correctly, tried to see if certain JS objects existed. If they did exist, you could disable aspects (or the whole thing) of your site. Very soon after, someone released "Fuck fuck adblock" that essentially disabled this piece of JS.

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.

You may very well be living in your own circle. My anecdata is that most engineers use VSCode these days. In my current organisation I am the only person that uses Emacs that I am aware of (and I use evil-mode). I know a handful of people use (n)vim. But by far the most common editor I see being used is VSCode.

Not the person you replied to, but I have had some issues with this in the past. Though it is more with how it was done than the approach itself.

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.

If this is just for being able to easily switch branches, have you considered using git worktrees? Essentially you have have multiple branches checked out into different directories at the same time. The key point though is that all git refs are still maintained in a single place so you are not actually having full clones for each worktree that you have.

I personally use Emacs and magit which has great support for worktrees. I do not know if the VSCode git integration supports it.

I will agree that not every situation will require multiple kinds of updates. For those situations an `update_changeset` may be considered okay. I now realize how definite my wording sounds. But I just meant that if you have multiple update operations, that should be exposed as multiple changeset functions. If you have multiple update operations but a single update_changeset function, it is possible to send the server data you did not intend to be sent together and now you are changing things that were not originally meant to be changed together. This has happened in previous projects I have worked on and now prefer the be explicit with multiple changeset functions.

I'm not really following this. The only problem the author has is with the name `create_changeset`. It may not be obvious to someone just starting with Elixir and Ecto what that means, but it is a naming convention that most (all?) projects use. You should be able to get the hang of it fairly quickly.

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.

Just my experience when I was trying out OCaml (I was mostly trying it out for frontend using the bucklescript-tea package) was that most people in that space used the ReasonML syntax. I don't remember my exact issues, but I was trying to avoid using the reason syntax because I preferred OCaml's. There were a couple of hurdles I needed to get over before being able to even really begin. This was probably 3-4 years ago, so things may have changed.

Now that is why if I ever have to send my CV to someone it will only be a PDF version.

This doesn't always help either though. I have only ever sent PDFs to recruiters for this reason. Yet I have still had a recruiter completely rewrite my resume and add false information.

I generally keep a resume on me when I go to an interview just in case an interviewer had not seen it. I'm glad I do that.

I think it is more if Node A calls something on Node B, things should be correct initially. But then I update the code on Node B and didn't change anything on Node A, the code is now "incorrect". In this case, just because it compiles, doesn't mean it works.

This is also a fairly bad time to try and put a measurement on how effective WFH is. The fact that schools and daycares are currently closed means that parents are having to take care of their children while also working.

It is also hard on people that are used to working in the office to be told that they now have to work from home suddenly. I'm sure a non-trivial amount of people did not have a space for themselves to be able to work and they are trying to figure things out as they go. Not to mention figuring out how to communicate properly while everyone is remote.

There is also not a one size fits all solution. People will be more productive being where they are more comfortable. That may be at home, in a coffee shop, at a library, in the office or any other number of places. People are expected to work from home right now, so a lot of those other options are out of the question.

TL;DR, don't judge work from home when everyone has to do it during a pandemic.

Not OP, but I read the one week part to mean that it is a deadline. So the task may only take an evening to complete, but having some agreed upon deadline will prevent having to deal with continually stretching out the interview process longer than necessary.

An issue that I was having is that LV did not have any releases on hex. So you had to pull from github and pray you got a working version. This was recently fixed though, so you should always try pulling for hex if you are able.

My last "problem" is less of a problem with LV and more of a contraint of my system. I cannot guarantee that everyone using this application will have network access 100% of the time. So for a certain subset of my users, LV would not be ideal.

I believe I have only heard about automatic recovery for forms. Would this "stash" you mentioned be more general for recovering state?

For what it's worth, I very much appreciate the work you and everyone involved has done for LV (and more generally, Phoenix).

As someone that writes Elixir at $DAYJOB, I was really looking forward to replacing some JS with LiveView. However, after having used it for a simple feature, I'm not entirely sure if I will continue to use it. I realize it is still pre 1.0 and that there is still a lot of work being done on it.

My biggest complaint is that if your server restarts for any reason (say, a rolling restart), you currently lose all state that was on the server[0]. There appears to be some kind of workaround for forms currently, but for anything more complex, I would need to write JS in order to attempt to not have my page get reset to the default view. So if I need to write JS already, I may as well just write JS (or something that transpiles or JS/WASM) to have fewer moving parts.

[0] https://elixirforum.com/t/liveview-and-rolling-restarts/2397...

But they never actually entered the Chinese market. They just had a counterfeiter that was based in China. And, through the help of Chinese officials, they were actually able to shutdown the counterfeit manufacturer. Tim, the ABRO rep from that podcast, even claims that the Chinese government is doing a great job at protecting foreign IP.

Not quite. Erlang's VM (BEAM) uses supervision trees in order to keep track of the various processes and their crashes. Each supervisor and worker in the tree is it's own process. So, if you have 5 supervisors, and each of those start 2 worker processes, you will have 15 processes in your supervision tree (the VM will spawn a bunch for itself to use, so do not think you only have 15 processes running in your system).

Basically, at the top level of your application, you will have a supervisor that will look after all of the processes that are important to your application. Each of these processes could have any kind of functionality (e.g., database connection, HTTP server, etc), or be another supervisor. When you start these applications, they too may start a supervision tree of processes that are important to them (e.g., the database connection may actually start a pool of processes).

In "fail fast" or "let it crash", only the process that actually threw the exception will die. The supervisor that is looking after that process will be notified of it being killed and, depending on how you have the supervisor configured, it may or may not start a new process to replace the one that died.

Another thing to note, depending on how the supervisor is configured, it may actually crash if a particular process it is monitoring crashes too many times. This will make the supervisor crash and it should bubble up to it's supervisor. Unfortunately, it is possible to take down your entire application this way.

TLDR: There is no master process that does all of this. Though, each supervisor is sort of a master process for each of its supervisors and workers and the processes a supervisor watches may or may not be restarted upon failure.