It's All Boring in the End
I don’t know if it happens with you, but for me, once the core ideas of something are figured out, my interest is more or less lost. Now, dont’t take me wrong; I’m not saying that I’m not excited about software anymore – quite the opposite, in fact! But my point is, once I know how something is done, it ceases to be the shining star of mesmerization that it once was for me.
Using Postgres as a Message Queue
These days, I’ve been given a lot to think about message queues. While their utility is undeniable, the most important architectural question is: which messaging service/backend do you use? If we don’t get into the managed vs. self-hosted debate, the impulsive answer is “Redis!”. It’s simple, it’s ridiculously fast, it’s mature, and it’s more popular than energy drinks. Other answers are RabbitMQ, SQS, ZeroMQ, your favorite higher-level abstraction library (BullMQ, etc.
Declarative, Imperative, and all that
For the last few years, concepts from Functional Programming have been trickling into the mainstream. Whereas earlier these alien ideas were met with shrugs and raised eyebrows, now it’s cool to be seen as one who writes monads or dishes out wisdom on paradigms and whatnot. I was quite happy, therefore, to see that the latest edition of the React newsletter by ui.dev had an article on what it means for React to be declarative.
Understanding recursive queries in PostgreSQL
Perhaps 3-4 years ago in an interview, I was asked a query to print a product hierarchy or something in the context of an e-commerce site database. I couldn’t, of course, as I barely had a handle on basic aggregations at that time. To be fair, I still don’t know whether there’s a non-brain-twisting query that’d print the entire hierarchy of a tree-like system. However, I do know now have to do a subset of it – i.