📝Daily

Day 63

Tony Duong

Tony Duong

Aug 12, 20261 min

Also available in:🇫🇷🇯🇵
#engineering#ruby#rails#multithreading#performance#connection-pool#puma
Day 63

Today, I:

  • learned about Ruby's and vs && — same boolean idea, but different precedence (&& binds tighter than and, so mixing them in assignments/conditionals can surprise you)
  • learned about multithreading in Rails for IO-bound work (HTTP requests, file reads) from this Medium post — can speed those up in-process instead of always shipping them to async jobs
  • reminded myself that in Ruby ternary / conditionals, [] and "" are truthy — everything is an object, and only nil and false are falsy
  • (re)learned how threads, workers, processes, and the DB connection pool relate — wrote it down simply in Rails Threads, Workers, Processes, and the DB Connection Pool (ELI5)
Tony Duong

By Tony Duong

A digital diary. Thoughts, experiences, and reflections.