20 Mar 2026

When the System Breaks: Why Protests Fail and What Ordinary People Can Actually Do to Stabilize the World

 TL;DR

Chaos in the Middle East (Israel-Iran-Lebanon war, French aid planes, ignored ICC warrants, US sanctions on the court). Same story in India: PM Modi’s name in the 2026 Epstein files, a US trade deal that hurts farmers and jobs, Election Commission under government control, and BJP’s IT cell flooding phones with “Muslim threat + Hindutva” messages. Voting, UN coalitions, boycotts, and new forums (e.g. BRICS) are blocked. Here are four things normal people can start today: (1) fund independent watchdogs, (2) trade in local currencies, (3) switch to open-source tools, and (4) build encrypted citizen networks. Small, quiet actions that actually shift power back to citizens.

The Problem A few powerful players create wars and suffering while others send aid or slap sanctions. Lebanon has over a million displaced people; France is flying in 60 tons of medical kits because someone has to help the victims. Iran faces open “regime change” talk. The ICC issues warrants for Netanyahu but the US sanctions the court’s own staff.

In India it feels exactly the same. Critics say PM Modi got compromised when his name surfaced in the latest Epstein files (emails where Epstein claimed he advised Modi on his 2017 Israel visit). Soon after, Modi signed a big US trade deal that many ordinary Indians call a sell-out — it opens Indian markets to American goods while hurting our farmers, textile workers, and small industries. No one in power is held accountable. Protests happen, but nothing changes.

Why the Usual Solutions Don’t Work

  • Voting is almost useless in captured systems. In the US, the Israel lobby dominates. In India, the Election Commission is heavily influenced by the ruling BJP government, and the BJP’s IT cell runs massive campaigns scaring people with “Muslim threat” and “Hindutva” messages on WhatsApp and social media. Even if you vote next time, the system is already tilted — votes matter very little.
  • Coalitions and BRICS-style forums collapse because countries fear US sanctions and regime-change pressure.
  • Full boycotts fail because people need what they need. e.g. you can't have computer without Apple/Intel/AMD chip.
  • Waiting for governments to act is pointless — fear and money rule.

What Actually Works Right Now

  1. Fund Civil Society for Domestic Accountability Small monthly donations (₹300–500 via UPI, crypto, or privacy platforms) to Amnesty International, Human Rights Watch, or Indian groups like the People’s Union for Civil Liberties keep investigators and lawyers working. These are the people who produce reports that embarrass governments and feed court cases.
  2. Trade and Pay in Local Currencies Every time you or your business pays in rupees, yuan, or dirham instead of dollars, you weaken the US sanction weapon. Indian traders and small exporters are already doing this with BRICS partners.
  3. Switch to Open-Source Tools Use Signal/Element messaging, and ProtonMail. You keep earning, stay productive, and stop feeding companies that pressure governments.
  4. Buy from local market.
  5. Build Encrypted Citizen Networks Use a reliable VPN (hides your location so no one can track what you donate or post) plus Signal or Matrix groups to share facts safely and coordinate small actions. Governments can’t easily spy on what they can’t see.

These steps need no permission from Delhi, Washington, or the UN. When lakhs of Indians do them quietly, the leverage that currently sits only with the powerful starts slipping away.

What can you do Pick one today. Donate ₹500 to a watchdog group. Install Linux this weekend. Start one Signal group with friends. The world (and India) won’t fix itself overnight, but we don’t have to stay spectators.

21 Oct 2025

Whispering to the Server: The Magic of AJAX

This is part 3. Part 2 is here

The traditional form submission we just discussed is powerful, but it feels a bit clunky by modern standards. Every time you submit, the entire page reloads. What if you just want to "like" a post, check if a username is available, or add an item to a shopping cart without losing your place on the page?

This is where AJAX comes in. 🚀

AJAX stands for Asynchronous JavaScript And XML. That's a mouthful, but let's simplify:

  • Asynchronous: It means your code can send a request to the server and not wait around for the response. It continues doing other things, and when the server replies, a function you've defined will handle it. It doesn't block the user.

  • JavaScript: Instead of the browser automatically building the request from an HTML form, you write JavaScript code to build and send the request. You have full control.

  • XML: This is a bit of a historical name. While you can use XML, today we almost exclusively use JSON for sending and receiving data with AJAX.

The key takeaway is this: AJAX lets you send and receive data from the server in the background, without a full page reload.


## How It Works: JavaScript Takes the Wheel

Let's revisit our login form, but this time, we'll supercharge it with JavaScript using the modern fetch() API.

The HTML (with a small addition):

HTML

<form id="ajax-form" action="/login" method="POST">

  <label for="username-input">Username:</label>
  <input type="text" id="username-input" name="username">

  <label for="password-input">Password:</label>
  <input type="password" id="password-input" name="password">

  <button type="submit">Log In</button>

</form>

<div id="response-message"></div>

The JavaScript Magic ✨:

JavaScript

// Get the form element from the page
const loginForm = document.getElementById('ajax-form');

// Listen for the form's 'submit' event
loginForm.addEventListener('submit', function (event) {

  // VERY IMPORTANT: Stop the default form submission (the page reload)!
  event.preventDefault();

  // Create a FormData object to easily grab the form's data
  const formData = new FormData(loginForm);
  // Convert the data to a plain JavaScript object
  const data = Object.fromEntries(formData.entries());

  // Use the fetch API to send the request
  fetch('/login', {
    method: 'POST', // We still specify the method
    headers: {
      // Tell the server we're sending JSON data
      'Content-Type': 'application/json',
    },
    // Convert our JS object into a JSON string for the body
    body: JSON.stringify(data),
  })
  .then(response => response.json()) // Parse the JSON response from the server
  .then(result => {
    // SUCCESS! Now, update the page without a reload
    const messageDiv = document.getElementById('response-message');
    messageDiv.textContent = result.message; // e.g., "Welcome back, dev123!"
  })
  .catch(error => {
    // Handle any errors that occurred during the request
    console.error('Error:', error);
    const messageDiv = document.getElementById('response-message');
    messageDiv.textContent = 'An error occurred. Please try again.';
  });
});

Here's what this JavaScript does:

  1. It "hijacks" the form's submit event.

  2. event.preventDefault(); is the crucial line that stops the browser from doing its normal page reload.

  3. It manually gathers the data from the form.

  4. It uses fetch() to create and send an HTTP request in the background. Note that we're explicitly setting the Content-Type header to application/json and converting our data to a JSON string.

  5. When the server responds (with JSON data like {"message": "Login successful!"}), the .then() block runs.

  6. Instead of reloading, our code simply takes the response message and uses JavaScript to place it inside the <div id="response-message">. The page itself never changed!


## HTML Forms vs. AJAX: The Showdown

FeatureClassic HTML Form SubmissionAJAX Request
TriggerUser clicks <button type="submit">Any JavaScript event (click, keyup, submit, etc.)
Who Builds Request?The Browser (automatically)You (via JavaScript code)
Page BehaviorFull Page Reload. The entire page is replaced.No Page Reload. The page stays, and you use JS to update parts of it.
User ExperienceCan feel slow and disruptive. 뚝딱Smooth, fast, and interactive. ✨
Typical Use CaseInitial site login, multi-page wizard processes.Likes, comments, live search, shopping carts, modern web apps.

By mastering AJAX, you move from building static web pages to creating dynamic, responsive, and modern web applications that feel like desktop software. It's a fundamental skill for any web developer today.

Your First Conversation with a Server: How HTML Forms Work

This is Part 2. Part 1 is here

So, you've learned that browsers and servers talk to each other using a language called HTTP. That's great! But how do you, as a developer, give the user a way to start that conversation? The most classic and fundamental way is by using an HTML form.

Think of an HTML form like filling out a physical postcard. 📝 You have specific fields to fill in (name, address), and when you're done, you drop it in the mailbox to send it off to a specific destination.


## The Anatomy of an HTML <form>

Let's build a simple login form and see how its parts create an HTTP request.

HTML

<form action="/login" method="POST">

  <label for="username-input">Username:</label>
  <input type="text" id="username-input" name="username">

  <label for="password-input">Password:</label>
  <input type="password" id="password-input" name="password">

  <button type="submit">Log In</button>

</form>

Let's break down the key pieces:

  • <form>: This is the main wrapper, our "postcard." It has two crucial attributes:

    • action="/login": This is the destination address. It tells the browser which URL path on the server should receive this information. This corresponds to the path in the HTTP request line (e.g., POST /login HTTP/1.1).

    • method="POST": This is the shipping method. It specifies which HTTP verb to use. The two most common methods for forms are:

      • GET: The data is appended directly to the URL in the address bar (like writing on the outside of the postcard for everyone to see). Good for search queries, but terrible for passwords!

      • POST: The data is placed inside the body of the HTTP request (like putting your message inside a sealed envelope). This is the standard for submitting sensitive or large amounts of data.

  • <input>: These are the fields the user fills out. The most important attribute here is name.

    • name="username": This acts like a label for the data. When the browser packages up the information, it uses this name as the key. The value the user types in becomes, well, the value! This creates a key-value pair.
  • <button type="submit">: This is the "Send" button. When a user clicks this, the browser springs into action.


## The Journey: From Click to Request

Let's say a user types "dev123" into the username field and "p@ssword" into the password field and then clicks "Log In." Here's what the browser does behind the scenes:

  1. Look at the <form> tag: "Okay, the method is POST and the destination is /login."

  2. Gather the data: It finds all <input> elements with a name attribute inside the form.

    • It finds an input with name="username" and its value is "dev123".

    • It finds another with name="password" and its value is "p@ssword".

  3. Build the HTTP Request: The browser now constructs the HTTP request you learned about, automatically. It looks something like this:

    HTTP

    POST /login HTTP/1.1
    Host: yourwebsite.com
    Content-Type: application/x-www-form-urlencoded
    
    username=dev123&password=p%40ssword
    
    • Notice the Content-Type header. This is the default for HTML forms, telling the server how the data in the body is formatted (key-value pairs joined by &).

    • Look at the body! It's the data from our form, neatly packaged. The browser even URL-encoded the @ symbol to %40 to ensure it's transmitted safely.

  4. Wait for the Response: The server processes this request. If the login is successful, it might send back a brand new HTML page (like a welcome dashboard).

  5. Full Page Reload: The browser receives this new HTML page and discards the old one completely. It then renders the new page from scratch. This flash and reload is the classic behavior of a form submission.

That's it! An HTML form is simply a user-friendly tool for constructing a standard HTTP request, which results in a full navigation to a new page.

8 Sept 2020

Here are 7 tips for working remotely

1. Get started early

One way to work from home productively is to dive into your to-do list as soon as you wake up. Simply getting a project started first thing in the morning can be the key to making progress on it gradually throughout the day.

2. Get your technology in order

Make sure to take your laptop home, and don't forget your charger — anything that might make working on your laptop from home a little easier. Make sure you have the right applications. Lots of remote workers are leaning heavily on Slack, Microsoft Teams, Skype, Zoom, or GoToMeeting.

3. Structure your day as you would in the office

To stay on schedule, segment what you'll do and when over the course of the day. If you have an online calendar, create personal events and reminders that tell you when to shift gears and start on new tasks. Google Calendar makes this easy.

4. Creating an “Office Environment” is important

Just because you're working from home doesn't mean you can't have a dedicated workspace or office. Try to set up your workspace in a well-lit room or one with as much natural light as possible. Have a good chair. Stand up.

5. Track your every hour

You must track how you're spending every hour of your day. Self-tracking will help you to decide when you're most productive (and when least). And where you're wasting your precious time.

6. Manage expectations

Have a discussion with your boss about what can actually be accomplished from home. Ask your manager what the priorities are and discuss how tasks will get done.

7. Schedule a distraction break for you

You schedule your tasks, meetings, and calls in the calendar, right? There's one more thing that you MUST plan: Distraction Breaks. Set the time when you'll use the phone or social media. Set the time for lunch. Set the time for a nap. These breaks will recharge you.




24 Sept 2018

CSS learning resources

To understand the fundamentals, http://learnlayout.com/ is a really good website.
  
Documentation

https://developer.mozilla.org/en-US/docs/Web/CSS (This one is the best and most comprehensive, much better than w3school)


Important concepts to understand:





- clear fix (this one is by far the best and easiest to implement) - http://nicolasgallagher.com/micro-clearfix-hack/



Advanced links to improve techniques and code clean and maintainable code:

- this is a mini-game that helps understanding flexbox and all its possibilities, very fun and interesting! - http://flexboxfroggy.com/





CSS/Sass frameworks and tools that can be helpful

http://postcss.org/ - css post-processor, provides very useful tools such as an autoprefixer to handle browser-compatibility

http://bourbon.io/ - sass library

https://purecss.io/grids/ - there are many other grid frameworks. knowing at least one can really help understanding how to create clean and standardised layouts


Blogs of great front-end developers, full of interesting posts!










19 Feb 2018

Conversation between 2 developers in 2016

I bet you won't stop laughing. for front end people ->
https://hackernoon.com/how-it-feels-to-learn-javascript-in-2016-d3a717dd577f

for open stack backend people->
https://circleci.com/blog/its-the-future/

It also made me realise how much I don't know/understand. Again speed at which industry is changing in terms of "new needs after every new solution" and that is a cycle.

19 Jan 2017

Understanding a merge commit - git

This is what I sent today to my colleagues while explaining the reason for mysterious changes in a pull-request
That blank merge commit is the culprit. All changes which should be result of merge are blown away.
Explanation:-
First let's understand that a merge commit is also a commit with changes. Changes in source branch since its diversion (from destination branch) are auto-magically done as part of merge commit in destination branch. 
So a merge occurred without any changes (if its been blown away as it has been the case) in merge commit, is basically a reversal of all changes that have occurred in source branch since the destination branch diverged from it. Hope this clarifies the mystery.
To visualise how chain of commits are formed, diverged and merged, you can refer to the image in Understanding what GIT does under the hood rather than only learning commands and wondering