Hacker News new | past | comments | ask | show | jobs | submit | subbu's comments login

I struggled with Ecto. It seemed too complex. I missed find_by_sql and the scopes of ActiveRecord. But once I went past the initial learning curve Ecto is a seriously well designed library. I have not written a single sql query by hand. Now I feel find_by_sql is an anti-pattern as I was mixing sql with ORM.

Once your database becomes sufficiently complex you start writing a lot more sql.

ActiveRecord's way of chaining scopes to combine multiple scopes is brittle. You can't customize the conditions. Ecto solves this by giving you composability. You can build on top of your earlier commands. If you combine this with pattern matching in the functions or Enum.reduce you have an extremely powerful and a flexible query engine.

Ecto also relies on the strengths of underlying database engine rather than treating it as a black box. If you are dealing with 100s of tables Rails way of polymorphic design doesn't give you referential integrity. I like Ecto's recommendations: https://hexdocs.pm/ecto/polymorphic-associations-with-many-t...


I am building a property management software (PMS). It's a specialized form of CRM. I have dumped MVC entirely in favor of LiveView. handle_event and handle_info are a better programming model for high-level of interactivity in a page. It also gets you closer to the database, entirely bypassing GraphQL and client-side JavaScript. I had to expose a whole API endpoint to set a flag here, a preference there. No more of that.


Speaking of "closer to the database" Ecto is now one of my all-time favorite libraries.

Every time I think "this is going to be tricky".. nope. Ecto seems to have thought of that.


I implemented this feature in a shared flat context. The problem gets simplified as the users are all part of a group already and even the settlement happens without exchanging any money. Your share gets added to the monthly rent. Full write-up: https://blog.simplyguest.com/flatmate-expenses.html


I have been on the fence for using Redux in a large-scale project and I am still not convinced about its usefulness. I feel its too much code for too little gain. You have listed it as one of the tools you have used in org-web. Does it add value?


The short answer is yes it added value, but I wouldn't use it if I started on org-web today. Largely this is because of the new hooks API in React (particularly useReducer).

Redux also helped me grow a lot as an engineer. I'm sure the concepts that it builds on aren't new, but they were new to me when I first started using Redux and I now spend a lot of time thinking the way Redux taught (or forced) me to think.


Thanks. That helps. Looks like you can build a middleware using hooks alone. I found a good video from a React guru: https://www.youtube.com/watch?v=nUzLlHFVXx0. He builds a few Redux concepts in the video.


Like in process flow diagrams we need different shapes to represent different ideas. Circles alone can't be used for it.


I am a long time user of OVH. I don't care about fancy UI; I have hardly used it to get anything done except pay bills. I just wish they open a data center in India. That's the reason I was looking at DO; they have a DC in Bangalore.


1000x time this. OVH only has a bad datacenter in Singapore. I tried and left.

OVHs need to be in India and East Asia to interest me again.


Bandwidth and power are too expensive in most of Asia, OVH's business model is founded on building DCs next to cheap, plentiful power, then peering at the surrounding IXes for bandwidth. Most of the local IXes in Asia do not have local incumbent carriers participating, and those incumbents want hellish rates to peer.

Routing in Asia will remain crappy due to these peering problems, and volume wholesalers will be few and far between so long as power is spendy.


One of the biggest problems with react-table is you end up with 2 headers. There doesn't seem to be a way to get rid of it. Its annoying if you have to fit the table in small space, or if you have just a few rows.


Not sure what you mean. You don't have to have 2 headers with react-table, but you can if you want to. Just look at the example screenshots of tables in the Polar app (the comment to which you replied). The tables have a single header. It's simply a matter of how you structure your `columns` input to the React-table component.


Where do you see 2 headers? It only renders a single header per column unless you do something else, and everything is a customizable set of sub-components that you can switch out. Do you have an example of the double headers?


B2 is cheaper than OVH object store?


Yes


How did you implement such fast search results? Do you cache the results locally or its all just Algolia?


Algolia is very fast.


It's easy to be fast when the results are wrong! Search for Perl, get Python and Javascript videos.


But paying $35/month to search 1289 videos doesn't make sense.


You're not paying to search 1,289 videos, you're paying to not worry about implementing search.


Nah, I can just get my nephew to do it, and he'll do it for cheap!


Algolia pricing page is intentionally misleading - there is a free "community" tier that has to display "search by algolia", but is otherwise free to use.


He heard you. Check this video: https://courses.totalreact.com/courses/250055/lectures/38973.... The content is same, a bit refined, but the length is 34:51.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: