Part 2: The Second Date

Part 1 highlighted the complexity of handling date and time. Part 2 focuses on design-time considerations, including schema, validation, and defining operations. I have been part of multiple teams where we had to design data schemas. When it came to storing date and time, we just slapped on the ISO 8601 format (which, if you ask me, is the only format you would ever need). ISO 8601 format has date, time, and timezone information. Most programming languages also have good support for this format. ...

July 10, 2023 · 5 min

Part 1: The Date

First, let’s talk about the basics. We all know the usual data types – strings, numbers, and booleans. They’re like the bread and butter of programming. Databases and programming languages have matured to the point where they can safely handle these data types, and we don’t think twice about how we store, retrieve and perform operations on them. They know that we know that there are a set of expectations, and it should work. And most of the time, it works. ...

July 9, 2023 · 4 min

The Promiscuity of PUT

From Single-Document Updates to Multiple-Document Mayhem When creating or supporting HTTP APIs for database operations, the technique is to connect HTTP methods to database operations. The widely accepted mapping is as follows: GET: Find POST : Insert/Create PUT: Update DELETE: Delete/Remove (Unless you’ve adopted GraphQL, in which case, what in Middle-earth?!) In general, everyone agrees on how POST, GET, and DELETE operations are supposed to behave. There isn’t much room for ambiguity there. ...

July 9, 2023 · 6 min

2FA tokens via CLI

Generating 2FA tokens on the terminal so that i don’t have to reach for my phone #lazyTech Securing your accounts with 2FA or two-factor authentication is a great idea, and what I use most of the time are time-based OTPs (TOTPs). The process is simple; you only need an app like Google Authenticator (iPhone | Android) or Twilio Authy on your phone. But I’m lazy when I have to get codes from my phone and type them into my laptop. Cloud-based clipboards are also not my thing either. ...

July 9, 2023 · 3 min

Being vegan!

Going vegan was a surprisingly easy decision for me! As a proud Malayali, I was raised on a diet rich in meat and seafood, especially dishes like beef fry and seafood curry. The bright side of the Covid lockdowns was that I got to spend a lot of time with my family, and my mom’s cooking left me with no holds barred eating. However, by early 2021, my sedentary lifestyle and love for food caught up with me, and I put on a lot of weight. None of my old clothes fit. Social distancing and lockdowns meant that we were going out less often, and the freedom of a mundu meant finding clothes that fit was not a problem. ...

July 9, 2023 · 5 min

Mongo Express Middleware

I am super excited to share my latest open-source project with all of you — Mongo Express Middleware library! 💻 It all started with a fun weekend project where I was building APIs for a MongoDB database. I usually use Mongoose and mongoose-express-middleware, but I wanted to try something different and work with MongoDB directly this time. That’s when I realized I needed a library to handle the API layer, so I had to make a choice — find one or build one myself. And you know what I chose! 💪 ...

July 9, 2023 · 2 min