5 Essential IT Concepts Every Developer Should Know.

Harsh SharmaHarsh Sharma
3 min read

Key Concepts in Software Development…..

In this post, we'll cover several important concepts in software development, including basic operations in programming, headless systems, HTTP methods, cookies, and API parameters. Let's break it down:


1. Division vs Modulus: The Difference in Programming

In programming, the division (/) operator and the modulus (%) operator are commonly used, but they behave differently depending on the language you’re working with.

In Static Languages (like Java):

  • Division:
    582243 / 10 = 58224
    This removes the last digit.

  • Modulus:
    582243 % 10 = 3
    This gives you the last digit.

In JavaScript:

  • Division:
    582243 / 10 → 58224.3
    (Note that JavaScript returns a floating-point value.)

  • Modulus:
    582243 % 10 → 3
    (This works the same as other languages.)

👉 Tip: If you want integer division in JavaScript (removing the decimal part), you can use Math.floor().


2. What Does "Headless" Mean?

In software, "headless" refers to a system or application that runs without a front-end or user interface. It focuses purely on the backend—handling the logic, data, and APIs—while the frontend (what users see) is handled separately.

  • Use case: Headless systems are commonly used for automation. Many tools, like n8n, are headless and can perform tasks without any visible interface.

3. Understanding HEAD vs OPTIONS in APIs

When working with APIs, you’ll often come across different HTTP methods. Two common ones are HEAD and OPTIONS. Here's a quick comparison:

HEAD Request

  • Purpose: Similar to a GET request, but it only returns headers (no body).

  • Use: Useful for checking if something exists or to get information like file size.

Example:

httpCopyEditHEAD /api/users/1

OPTIONS Request

  • Purpose: Asks the server which methods are allowed on a resource (like GET, POST).

  • Use: Mostly used by browsers for CORS (Cross-Origin Resource Sharing) checks before making real requests.

Example:

httpCopyEditOPTIONS /api/users

4. Cookies vs HTTP vs HTTPS

Cookies

  • Definition: Small pieces of data stored on the client-side (in the browser).

  • How they work: Set by the server using the Set-Cookie header and included automatically in subsequent requests to the same server.

HTTP vs HTTPS

  • HTTP: A non-secure protocol that transmits data in plain text.

  • HTTPS: A secure version of HTTP that encrypts the data using SSL/TLS to ensure secure communication.


5. Query Parameters vs Path Parameters in APIs

When working with APIs, data can be sent in two ways: query parameters and path parameters. Here's how they differ:

Query Parameters

  • Location: Found after the ? in the URL.

  • Purpose: Used to filter, sort, or provide additional information.

  • Example:

      httpCopyEditGET /api/users?age=25
    

Path Parameters

  • Location: Inside the URL path.

  • Purpose: Used to identify a specific resource (e.g., a user ID).

  • Example:

      httpCopyEditGET /api/users/123
    
0
Subscribe to my newsletter

Read articles from Harsh Sharma directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Harsh Sharma
Harsh Sharma

I'm a skilled developer with a passion for creating efficient, scalable solutions and a constant drive to learn and improve my craft.