HN user

nesarkvechnep

942 karma
Posts11
Comments539
View on HN

This is my mentality but when it comes to my company. I want to have clients for which I consistently produce solid work, no flash, no news headlines. Doing the work and quietly building a reputation.

Unfortunately, it made me even more sad because the project I'm working on now is complete trash. Every line outdoes the previous in the dumbest thing possible. Four years at the company and not a single greenfield project for me, only well established piles of... you get the idea.

In what way the article convinced you that Andrew Kelley is not professional enough for a serious project like Zig? Isn't his contribution to the language what's important?

This is exactly what happens in a typical Elixir project even though Ecto is a query builder and not an ORM. People define their domain entities as database tables. The result is, from my latest project, you have user and organisation memberships which are a list of membership records. This is carried throughout the application while it should be a hash map of organisation IDs and membership data, so you can check if a user is a member of an organisation in constant time. Of course keeping ourselves coupled to the database representation is easier than defining a view, for example, which takes care of presenting the data in a useful form for the application.

I still don't get the need for QUERY. One can create a search or filter resource with a POST request and then query it using GET. As a bonus, creating a resource allows it to be shared and cached.

There's no such thing as REST spec. The closes mechanism to actual REST is to create a resource using POST and then query it using GET. You have the added benefit of the resource being cacheable.

Unix GC Remastered 1 month ago

Thank you for the clarification. I guess authors these days assume they don't need to state the Unix flavour they're talking about.

As a student I used to work as a network administrator in the summer breaks. The place had a very nice library of technical books. I had the pleasure to read "Database Design for Mere Mortals" there, in the hours when work was slow.

The disagreement is on Ecto schemas used to represent databases tables from the persistence layer to the UI. Of course, use changesets to normalise user input but using the same schemas everywhere is a sign of immaturity as a developer. You really sound like someone who only does CRUD services. Real world is often more complex.

Yeah, one of the worst practices. I've been working with Elixir professionally for 6 years now and I still see this sh*t everywhere. Bad APIs, bad UIs because someone coupled themselves to the database structure and can't escape. List of memberships? Keep them as a list with the same fields as the junction table. Top-level APIs taking maps with string keys as "params" so they can very easily be cast for a changeset.

Why not Erlang?

It's is great in everything which requires talking to and/or listening on a socket. It's amazing for writing and running daemons.

I did the same integration with an Erlang daemon. All relevant key presses are sent to it and based on the current focused application the daemon does different things. I built an Erlang library i3_IPC to listen for events and send commands to Sway.