• 0 Posts
  • 7 Comments
Joined 1 year ago
cake
Cake day: July 1st, 2023

help-circle
  • Yeah, that's great, until you need to conditionally compose a query. Suddenly your pre baked queries are not enough. So you either:

    • create your own shitty ORM based on string concatenation
    • create your own shitty ORM
    • or use a well supported ORM, those almost always support query composition and native queries

    You write like it's ORM vs native. ORMs let you write native queries and execute them while also doing all the tedious work for you such as:

    • mapping results to model objects
    • SQL injection safety
    • query composition
    • connection builders
    • transaction management

    So if you love native queries write native queries in an ORM which will do all the tedious shit for you.





  • Microservices and document db's go brrrrrrr. Data duplication is completely fine as long as there is only one source of truth that can be updated, all copies must be read only. Then the copies should either regularly poll the source or the source should publish update events that the copies can consume to stay in sync. It's simple stuff but keeps your system way more available and fast than having multiple services talk to a shared db or worse, multiple services constantly fetching data through a proxy.


  • I find ChatGPT more coherent than stackoverflow in many cases. Sure it hallucinates and sometimes acts like it has dementia but at the very least it won't write 5 paragraphs about how the framework behind my issue works without giving any examples.

    Stackoverflow is good for finding alternative approaches, getting explanations for how stuff works in the framework, and error investigations. Useless for getting information on stuff you don't already know.