CBChirag Bhugrainjacked.dev·Feb 27 · 3 min read5 Clean Code Habits for Writing Better FunctionsIn this blog post I'll go through five functional patterns help you write code that doesn't make your coworkers want to pull their hair out. 1. Verbs over Nouns Have you ever opened a file and seen a 00
CBChirag Bhugrainjacked.dev·Feb 26 · 2 min readUnderstanding Objects in JavaScriptI’ve been diving deep into JavaScript lately, and the best way to make sure I actually understand something is to write it down and explain it. What Exactly is an Object? The easiest way to think abou00
CBChirag Bhugrainjacked.dev·Feb 25 · 3 min readControl Flow in JavaScript: If, Else, and Switch1. The if Statement The if statement is the simplest way to make a decision in code. It basically says, "Check if this condition is true. If it is, run the code inside the block." let age = 20; if (a00
CBChirag Bhugrainjacked.dev·Feb 24 · 3 min readProduction-Grade Logging in Node.js with WinstonWhen you're building a side project, console.log is perfectly fine. But the moment you deploy a distributed system, where you have multiple instances of an app running behind a load balancer console.l00
CBChirag Bhugrainjacked.dev·Feb 23 · 2 min readBuilding a Validation Layer with ZodWhile building any backend API, you can never fully trust the data coming in from a client, a third-party webhook, or even a frontend application you wrote yourself. Every robust API needs a strict va00