RSSAmplifier

Blog

Hemath - Software engineer

Recent content on Hemath - Software engineer

hemath.devRSS feed ↗54 posts

Latest posts

Functions in mathematics

Hey folks, 
 Functions in maths is like a machine. A machine that takes an input, does something with that and produces an output. 
 Let’s take a vending machine as an example. Let’s assume that we don’t need money to buy food from the machine. Just pressing a button will give us the food. 
 Here the vending machine is the function. It’s output (food) depends on…

Say bye with JavaScript Beacon

Sometimes we want to send a piece of data to our servers when user leaves our website or webapp. Maybe it’s for for analytics or even auto-logout when they leave the website. But do you know what is a reliable way of doing it? 
 Most of you might say use XMLHTTPRequest (or fetch) in beforeunload or unload events. Like, 
 window . addEventListener ( 'beforeunload' , () => {
 fetch…

Before you cut the fence, ask why it is there - Chesterton's Fence

There is an old idea from G.K. Chesterton that I keep coming back to. 
 He said, if you find a fence in the middle of the road and don’t know why it’s there, the worst thing you can do is tear it down before you understand its purpose. Only once you’ve figured out why someone put it there can you decide whether it still needs to stay. 
 It might sound obvious, but in…

Why Angular ages better than React

When we talk about React and Angular, people often assume they were created for the same mission. After all, they both let you build interactive UIs. They both have components. They both run the web these days. But if you dig a little deeper, you’ll find their origins couldn’t be more different. 
 And that difference still shapes how they feel to use. 
 Angular was designed…

Answer once

Hey lads, 
 If you’re fixing bugs, rewriting something, or building a feature without documenting what you did, you’re doing your future self and your team a huge disservice . 
 Yeah that’s a bold statment. 
 I’m not talking about writing a dry wiki page nobody reads. I’m talking about clear, human-written explanations of what the thing does, why it exists…

Connecting the dots (Backwards)

When I was in school and college, I ask “Why are we learning this concept in the first place?” all the time. I won’t learn it until I can see a real use of it. It’s good in one perspective because you save time and just learn what matters at that time. But there is another perspective which tells you that you are losing lot just by skipping things because you don’t…

Feedback vs Validation


 If you’re not prepared to be wrong, you’ll never come up with anything original
– Sir Ken Robinson 
 
 I’ve seen this play out too many times. 
 Someone shares their side project in a group chat or dev forum and says, “Would love your thoughts!” But when you actually give thoughts, real ones, like “Nice, but this part feels…

Use AI like a supplement, not a steroid

I’ve been thinking a lot about how people use AI tools, especially LLMs like ChatGPT. Something doesn’t sit right with me. 
 I use AI. Yes, I do. 
 People I interact with recently started asking me why I myself argue to not use AI but end up using it. 
 Call me rude, but it’s not my job to explain them individually. So this post is kinda a reply to them as well as a…

Why good engineers think in terms of trade-off, not trends

Back in 2021, I remember being obsessed with GraphQL. Everyone on Twitter was praising it. Conferences were all about it. I thought, “This is the future of APIs”. 
 So, as a naive engineer, I rewrote a small project that was working perfectly fine with REST. Just to be on the “right” side of tech. 
 What followed was a week of edge cases and overengineered queries.…

The art of reading code

Most people talk about writing code. Writing the clean and performant code. Writing code like poetry. But no one tells you how to read code. That’s what I’m gonna tell you now. 
 If you think a bit, it will be obvious that we spend most of our time reading the code. It’s not only about the code written by others, also the old ones which we wrote years back. 
…

100% code coverage is a lie we like to believe

When I was a junior, I learned to write unit tests. In every project, whenever I got sometime, I wrote unit tests. So far so, in one of the organizations I worked in, people called me as “that unit test guy”. Wasn’t sure how to take this. 
 One fine day, I wrote a re-usable function. As a good engineer, I wrote unit tests for that function. 
 Remember, it was the time…

It's not the Problem, it's the Framing


 Real engineering wisdom is knowing when to stop building. 
 
 A while ago, I was asked to build a feature for exporting reports. It was a prettry straightforward ask. 
 “As an user, I should be able to download my activity history as PDF”. 
 This story was defined by the product-owner. She asked for the estimations, everyone jumped in and quoted 4, 5 story-points.…

Command-Query separation

There is a small rule I follow that’s made my code easier to work with. It is called Command Query Separation. 
 Don’t worry, it’s not one of those academic things you forget in five minutes. It’s actually very simple. 
 “Functions should either do something (a command) or return something (a query), but not both”. 
 Don’t be furious on me for…

You are an engineer, not a lifestyle brand


 In a world full of personal brands, be a person who builds. 
 
 There is something strange happening in the dev world lately. 
 More and more engineers are starting to post contents in social media (especially in LinkedIn) like they’re auditioning for a brand deal. You know what I mean. 
 Perfect lighting, loud captions, every other sentence ends with “this…

Examples, not rules


 Rules tells us what to aim for. But examples show how it’s done. 
 
 There’s something funny about how we try to teach or learn things. We often start with rules. But the truth is, that’s rarely how anyone actually learns anything meaningful. 
 Ever noticed how the stuff that really sticks with us doesn’t come from someone telling us what to do? 
 It…

Temporal coupling


 “Everything should me made as simple as possible, but not simpler” 
 – Albert Einstein 
 
 When we talk about software architecture, we might discuss around the word “coupling” a lot. But I don’t think we always pause to feel what it really means. 
 At its core, coupling is about dependency. One piece of something (say code) depending on…

Shotgun debugging


 The bug you fix without understanding is the bug that returns when you least expect it. 
 
 Some bugs are very sneaky. You stare at the code, add console logs, move things around out of pure frustration. Nothing changes. You copy paste that .babelrc file or something else from the internet. Nothing changes. 
 Then you start commenting out random lines, rewriting a function or…

Premature optimization is not good

Alright, we all done it. At least once in our career. We tried to make something faster, cleaner, or more flexible, way before it needed to be. It feels like engineering. But if you zoom out, a lot of it ends up being wasted time. 
 Not because the work was bad, but because it wasn’t necessary. 
 And, that is exactly what Premature Optimization is. 
 We write code for something,…

Use Streams to improve memory usage

Let’s say you’re writing a Node JS script to clean up some log files. Maybe it’s part of an internal tool. You want to read each line, remove the timestamp, and save the cleaned file somewhere else. Easy, right? 
 So you write, 
 const fs = require ( 'fs' );
 
 const data = fs . readFileSync ( './logs/2025-04-23.log' , 'utf8' );
 
 const cleaned = data 
 .…

Thank you, Stack Overflow

I didn’t write this because something happened. Nothing dramatic. Just felt like putting it out there. 
 Thank you, Stack Overflow. 
 Back when I was starting out as a software engineer, I ran into issues all the time. I didn’t have people around who could help, not because they didn’t want to, but because most of them weren’t from a Computer Science or Software…

Mentorship is the new buzzword


 Everyone wants to be Yoda on LinkedIn but forgets that Yoda barely spoke. 
 
 I’ve been mentoring for a while now. Not in the grand, dramatic, “I’m changing lives” kind of way. Just helping folks when they need it. Most of the time, I don’t even say I’m mentoring. Because I don’t guide people unless there’s something genuinely…

You don't have to speak in every room


 Wisdom is knowing when to speak. Intelligence is knowing when not to. 
 – Socrates of Athens 
 
 I’ve been in a bunch of rooms, tech meetups, office standups, Discord calls, random weekend “let’s brainstorm” sessions and I’ve noticed this pattern. There’s always that pressure to say something. To contribute. To appear smart. Like if you…

Are we abusing algorithms?


 “We shape our tools, and thereafter our tools shape us.” 
 – Marshall McLuhan 
 
 We all kind of know it. But we don’t really say it out loud. 
 We’re gaming the system. And not just once in a while. It’s become a habit. A way of doing things online. Every blog post, every tweet, every YouTube video, we’re constantly thinking,…

The art of code reviews


 Good code is nice. Good reviews make the team unstoppable. 
 
 You ever open a pull request, feeling good about it, only to come back later and see comments like “Can we clean this up?” or “This logic feels off”? Yeah. It can be hurdle, but also, kind of beautiful, when done right. 
 I’ve seen both sides. I’ve shipped code that got merged with…

Not Everything Needs to Be Written by ChatGPT


 We’re not replacing writers with AI. We’re replacing thinking with AI. 
 
 I’ve been spending some time on LinkedIn lately. Scrolling through posts, reading updates, trying to stay connected with what other devs are doing. And honestly? A lot of what I see feels… off. 
 Like, you can just tell when something’s been written by ChatGPT. The structure…

Stop using Next JS for everything


 Simplicity is not a step back. It’s a sign you know where you’re going. 
 
 I don’t hate Next.js. In fact, I think it’s one of the better things that happened to React in the last few years. It made server-side rendering and static site generation feel approachable, and gave developers a solid structure to build on. Especially the front-end developers can now…

Now

Stop Waiting for Motivation. Build Systems Instead.


 “You do not rise to the level of your goals. You fall to the level of your systems.” 
 — James Clear, Atomic Habits 
 
 We all know the feeling. You’ve got a new side project idea, a dusty Udemy course, or a blog post sitting in drafts with a title like “Why Async/Await is Underrated” — but somehow, you’re just not feeling it today. 
 So…

Why Being a Funny Developer is a Double-Edged Sword


 “You’re funny, man. But are you serious about your work?” 
 If I had a bitcoin for every time I heard this, I’d probably buy Twitter and rename it console.log(). 
 
 In every team, there’s always that one person who lightens the mood, cracks jokes during standups, and adds a meme or two in the sprint retrospective. That person is often me — and if you’re reading this, maybe it’s…

Why I prefer RSS over email subscriptions

Hey folks, 
 If you don’t know, I switched to RSS lately. It was end of 2024 and my inbox was flooded with 13k emails. I know I subscribed too much and didn’t read them, it’s my mistake. And I don’t think I can keep up with the world’s pace of producing content. 
 Almost everyday I’ll wake up with at least 3 new blog posts/newsletters in my inbox. If I…

Why I prefer email conversations over chat messages

I prefer email and letters more than chat messages, and you might to. We live in a wolrd of instant messages. Everything is just a quick tap away. 
 But over sometime I realized that chat messages seem mindless and disposable. I often reply without thinking much, sometimes even on autopilot, and completely forget about the conversation later. It’s like my brain doesn’t register…

Great WebAssembly Resources

Hi makkals, 
 I just wanted to quicky share some of my favourite WebAssembly resources which I used to learn. There could be other great resources out there, I’ll keep updating this list as I find. 
 To learn 
 
 MDN docs 
 webassembly.org 
 WebAssembly in web.dev 
 Lin Clarke’s blog series 
 Debugging WebAssembly 
 A simple tutorial by Marca…

Build a video to gif converter with ffmpeg using webassembly

Hey makkals, 
 This post is a part of a multi-part series on WebAssembly. Check out other parts of the series here 
 Alrighty! We have now learned the theoretical basics and even built a small practical application with WebAssembly. Let’s step it up and try to build an application around a native library and see how that goes. 
 In this post, we will build an application that…

Build an image processor application with webassembly

Hey makkals, 
 This post is a part of a multi-part series on WebAssembly. Check out other parts of the series here 
 At this point we have a good amount of working knowledge in WebAssembly. Its time to create something decent enough to understand more about WebAssembly. 
 In this post, we’ll build an application that converts colorful images to grayscale without using any…

Components of WebAssembly

Hey makkals, 
 This post is a part of a multi-part series on WebAssembly. Check out other parts of the series here 
 Now that we have a good idea about what WebAssembly is, it’s time to understand the architecture that powers such a technology. WebAssembly comprises the following key components, 
 
 Module 
 Execution environment 
 Stack machine 
 Memory 
…

Why WebAssembly is faster than JavaScript

Hey makkals, 
 This post is a part of a multi-part series on WebAssembly. Check out other parts of the series here 
 Alright, you might now be wondering why exactly WebAssembly is faster than JavaScript. And that’s the question we are gonna answer in this post. 
 How is JavaScript executed? 
 Before we can understand how WebAssembly is faster, we need to understand how…

Build your first webassembly project

Hey makkals, 
 This post is a part of a multi-part series on WebAssembly. Check out other parts of the series here 
 Have you ever heard about WebAssembly and thought, “That sounds cool, but it’s probably too complex for me”? 
 Well, today you’re going to build a simple WebAssembly project from scratch. Let me set the right expectations. We are going to build a…

Introduction to WebAssembly

Hey makkals, 
 This post is a part of a multi-part series on WebAssembly. Check out other parts of the series here 
 WebAssembly, or WASM for short, is a low-level assembly-like language. It lets us run applications built with different programming languages in the browser. It’s a truly cross-platform way to build applications. It is low-level so that it runs at near-native speed…

WebAssembly - a beginners guide

Hello makkals, 
 It’s been a while since I jumped in WebAssembly. I fell in love with the idea of WebAssembly. Built and worked in some cool projects. Now I decided share my knowledge with you all. This is going to be a series of blog posts that dives into many topics involving WebAssembly. At this point, I really don’t know how many posts are going to be published. My rought…

The perfect interview question for web developers

Hi makkals, 
 So I recently about this somewhere, I forgot where it was. But that made me think of writing this piece down. 
 If someone is hiring for a web developer, they can ask one question to the candidate with which we can determine the depth of knowledge that the candidate has in the web development. The question goes by, 
 
 What happens when you click a link in a website?

I finally understood Integral Calculus

Hello makkals, 
 I always wanted to learn Machine learning in the right way. I initially read about types of ML algorithms and even built some projects in college. But I don’t have a knowledge about how things internally work. In ML, as per my knowledge, every thing boils down to mathematics. And I’m super bad at that. 
 I completed Linear algebra May last year. And was about…

2024 - Q4 - a lookback

Hey guys, 
 Q4 was a rollercoaster of emotions and events. From night cycling adventures and spotting Bitcoin graffiti to launching SnapNostr, which received overwhelming support. I ran my first 5K marathon, faced bittersweet personal news, and navigated the trauma of Sanjay’s accident and recovery. Volunteering at SheBuilds wrapped up the year with a sense of purpose and gratitude.…

2024 - Q3 - a lookback

Hey makkals,
Q3 of 2024 was a whirlwind of growth and change for me. From buying my first Mac and resigning from Sysvine to attending an Amazon interview and embarking on unforgettable trips, every moment brought new lessons. I joined Comcast, volunteered with JS Lovers, and entered the world of Nostr, all while cherishing time with friends before they left for their next adventures. It was a…

2024 - Q2 - a lookback

Hey buddies, 
 Q2 of 2024 was full of activities and personal milestones. From a calm night cycle ride to Mahabalipuram and an unplanned hike at Kona Falls to becoming a mentor at Think Digital and attending my first tech meetup, April was eventful. May and June brought new experiences, including a spiritual trip with my mom, learning to drive, and purchasing my first vehicle. This period was…

2024 - Q1 - a lookback

Hey folks, 
 Q1 of 2024 was filled with surprises and new experiences. From an unforgettable birthday surprise and an unintentional pre-birthday celebration to a spontaneous trip to Pondicherry and my mom’s first BBQ dinner, these months were all about laughter, exploration, and creating lasting memories. 
 January 
 Started with a great birthday which I ever had. A surprised…

Why am I unable to finish my projects?

Hey folks, it’s been a while since I came up with a project idea. No pun intended. I started a lot of projects and finished nothing. I do have some finished ones, but they are not that big or something I would call “achieved”. My project ideas range from building chess boards, 2D engine, website generator, component library, quiz apps, comment system, etc., None of these came to…

New project - Investments tracker

Starting up another hobby project here. It’s an investment tracker. This little tool’s gonna help me keep tabs on my investments and figure out how much I’m making from each one. 
 I’ve seen loads of investment trackers out there, but not many of them show the profit breakdown for each investment. My main jams are BTC and Gold; no stocks, nothin’ else. 
…

Designers should test UI, not the QA team - Change my mind

Yep, this has been buzzing me for some weeks. I’ve been working with QA teams in multiple projects and heard stories from my developer/manager friends as well. 
 Obviously, the QA team should test the UI, but not at first. Designers who designed that good looking page or navbar should first see it in action. Test it. Well, visually test it. Once designers are happy, then it can be moved…

Jan 2024 - journal

It feels like this month passed by quite quickly. Feel like I didn’t accomplish that much. But still it’s a good month. I discovered certain aspects of my life, asked a lot of questions to myself and some problems within me. 
 Problem solving streak 
 I was solving data structure and algorithms problems for a while given by Daily byte as well as some leetcode ones. And I wanted…

Git branch cannot lock ref while creating a new branch

I just encountered a Git error yesterday. I was trying to create a branch in some_branch/feature/ticket. But Git thrown the following error, 
 fatal: cannot lock ref 'refs/heads/some_branch/feature/ticket': 'refs/heads/some_branch' exists; cannot create 'refs/heads/some_branch/feature/ticket'
 Initially I didn’t understand it. Because I already created similar kinda branches like…