domain-driven-design
domain-driven-design
optimistic-locking
Rails optimistic locking, pessimistic locking and how to solve StaleObjectError
Rails locking strategies for concurrent updates: optimistic locking with a lock_version column that works out of the box, pessimistic locking with lock! and with_lock, and practical ways to rescue and resolve the StaleObjectError that optimistic locking raises.
ruby
Rails eager_load, joins and includes - when to use what
Rails eager_load, includes, preload, and joins each fight slow queries differently: LEFT OUTER JOIN versus separate queries, how includes picks its strategy, and when a plain joins is enough. Clear examples showing which loading method to choose for each situation.
Latest
Enums with Typescript - why it's bad? Possible solutions
TypeScript enums generate extra JavaScript at compile time and numeric enums are not even type-safe. Why enums can hurt bundle size and correctness, and two safer alternatives: assigning explicit string values or replacing enums with plain objects.