Skip to main content

How to Inject Environment Variables During Build in GitHub Actions

· 12 min read
Anand Raja
Senior Software Engineer

When deploying applications with GitHub Actions, you often need to inject environment variables during the build process. These variables might include API keys, database URLs, feature flags, or configuration settings. GitHub provides a secure way to manage and inject these values into your build pipeline using GitHub Variables and GitHub Secrets.

Hidden Health Risks of Maida and White Sugar: Why You Should Avoid Them

· 2 min read
Anand Raja
Senior Software Engineer

Issues with Maida (Refined Flour):

  • Nutrient Loss: Maida is produced by removing the bran and germ from wheat, stripping away fiber, vitamins, and minerals. This leaves only starchy endosperm, offering little nutrition.
  • High Glycemic Index: Causes rapid spikes in blood sugar, increasing risk of insulin resistance, type 2 diabetes, and metabolic syndrome.
  • Digestive Problems: Lack of fiber can lead to constipation and poor gut health.
  • Weight Gain: Empty calories promote overeating and fat accumulation.
  • Chemical Processing: Often bleached with benzoyl peroxide or chlorine, and softened with alloxan, which is linked to pancreatic damage in lab studies. Benzoyl peroxide is also used in hair dye and skin treatments.
  • Inflammation: Regular consumption may trigger chronic inflammation, raising risk for heart disease and other conditions.
  • Additives: Processed foods made with maida often contain preservatives and artificial flavors.

VS Code Essential Shortcuts Cheat Sheet

· 4 min read
Anand Raja
Senior Software Engineer

⌨️ Critical Keyboard Shortcuts

Multi-Line Editing (Most Important!)

  • Add Cursor Above/Below: Ctrl + Alt + Up/Down (Windows/Linux) | Cmd + Option + Up/Down (Mac)
  • Add Cursor at Mouse Position: Alt + Click (Windows/Linux) | Option + Click (Mac)
  • Select All Occurrences of Current Selection: Ctrl + Shift + L (Windows/Linux) | Cmd + Shift + L (Mac)
  • Select Next Occurrence: Ctrl + D (Windows/Linux) | Cmd + D (Mac)
  • Insert Cursor at End of Each Line Selected: Shift + Alt + I (Windows/Linux) | Shift + Option + I (Mac)
  • Column (Box) Selection: Shift + Alt + Drag (Windows/Linux) | Shift + Option + Drag (Mac)

Library vs Framework: Understanding the Difference and Why React is a Library

· 5 min read
Anand Raja
Senior Software Engineer

🔍 The Fundamental Difference

Control Flow Principle

  • Library: You call the library - You control when and how to use it
  • Framework: The framework calls you - It controls the application flow via Inversion of Control (IoC)
Library Pattern:          Framework Pattern:
Your Code → Library Framework → Your Code
(You control) (Framework controls)

SOLID Principles and DRY: Complete Development Guide

· 10 min read
Anand Raja
Senior Software Engineer

🎯 What are SOLID Principles?

SOLID is an acronym for five design principles that make software designs more understandable, flexible, and maintainable. These principles were introduced by Robert C. Martin (Uncle Bob) in the early 2000s, building on work from the 1980s and 1990s.

The Five SOLID Principles:

  1. S - Single Responsibility Principle (SRP)
  2. O - Open/Closed Principle (OCP)
  3. L - Liskov Substitution Principle (LSP)
  4. I - Interface Segregation Principle (ISP)
  5. D - Dependency Inversion Principle (DIP)

Concurrency Control in Seat Booking: Complete Guide

· 8 min read
Anand Raja
Senior Software Engineer

When multiple users try to book the same seat simultaneously, we need concurrency control mechanisms to ensure only one user succeeds. Let me explain each approach step by step.

The Core Problem

Timeline of Concurrent Requests:
T1: User A checks seat C1 → Available ✅
T2: User B checks seat C1 → Available ✅
T3: User C checks seat C1 → Available ✅
T4: User A books seat C1 → Success
T5: User B books seat C1 → Success (PROBLEM!)
T6: User C books seat C1 → Success (PROBLEM!)

Result: Triple booking without concurrency control

NoSQL vs SQL: Types and Comparisons

· 3 min read
Anand Raja
Senior Software Engineer

Why NoSQL is Used Over SQL

NoSQL databases are chosen over traditional SQL (relational) databases in scenarios where:

1. Flexible Schema

  • NoSQL allows dynamic, schema-less data structures (e.g., JSON, BSON).
  • Useful when data models change frequently or are not well-defined upfront.

2. Scalability

  • NoSQL databases are designed for horizontal scaling (adding more servers).
  • Ideal for handling large volumes of data and high-traffic applications.

3. Performance

  • Optimized for high-speed read/write operations.
  • Can handle big data and real-time web apps more efficiently.

4. Handling Unstructured Data

  • Supports storage of unstructured, semi-structured, or nested data (e.g., documents, key-value pairs, graphs).
  • Suitable for use cases like social media, IoT, and content management.

5. High Availability and Fault Tolerance

  • Many NoSQL databases offer built-in replication and distribution.
  • Ensures data is always available, even if some nodes fail.

6. Big Data and Real-Time Analytics

  • NoSQL is often used for big data analytics, streaming, and real-time processing.