Coding Spirit

Coding Spirit This Page is Created for people who want to learn Coding and Programming. So, let's Code with Spirit.

We are trying to have a platform where we can discuss all about the past, present and future of computer coding. This platform is not specific to a single programming platform(existing or will exist in future) but its limit less, let discuss the future our way

πŸ‡΅πŸ‡° 14 August β€” A celebration of freedom, identity, and possibility.Pakistan’s future will be shaped by the people who ch...
13/08/2026

πŸ‡΅πŸ‡° 14 August β€” A celebration of freedom, identity, and possibility.

Pakistan’s future will be shaped by the people who choose to learn, create, innovate, and build.

Happy Independence Day! πŸ‡΅πŸ‡°πŸ’š

How JWT Authentication Actually Works Step by Step?Every time you log into an app something happens behind the scenes.Mo...
26/03/2026

How JWT Authentication Actually Works Step by Step?

Every time you log into an app something happens behind the scenes.
Most developers use it daily. Few can explain exactly what's happening step by step.

Let me tell you.

β†’ Step 1: You send your credentials
You type your email and password and hit login.
That data travels from your browser to the server as an HTTP request.
IMPORTANT: the request must always travel over HTTPS. Never HTTP. Your password is sensitive. Encrypting it in transit is non negotiable.

β†’ Step 2: The server verifies you
The server receives your credentials and checks them against the database.
But here's another important thing, your password is never stored as plain text. Ever.
It's stored as a hash. A one way encrypted version of your password. The server hashes what you just sent and compares it to the stored hash. If they match, you're in.

β†’ Step 3: The server creates a token
Password matched. Now the server needs to remember you without asking for your password on every single request.
So it generates a JWT -- JSON Web Token.
A JWT is a small encoded string that contains your user info like your ID, your role, your expiry time. The server signs it with a secret key so nobody can fake one.

β†’ Step 4: The token lives in your browser
The server sends the JWT back to your browser.
Your frontend stores it, usually in memory or an HTTP only cookie and attaches it to every future request automatically.
This is how the server knows it's still you without asking for your password again.

β†’ Step 5: Every protected request gets verified
You click on your profile. Your frontend sends the request with the JWT attached.
The server receives it, verifies the signature, checks it hasn't expired, and reads your user info from inside it.
If everything goes fine, you get your data.
If the token is expired, tampered with, or missing, you get 401 error. Who are you?

The whole flow in one line:
You give your credentials β†’ Hash check happens β†’ Token generated β†’ Token stored β†’ Token verified on every request.

That's authentication. Not magic. Just a well designed handshake between your browser and your server.

Follow me for more dev concepts and insights.

P.S. This is exactly what happens in a MERN app when you use JWT with bcrypt. Now when you implement it, you'll know what every single line is actually doing.

Every developer uses these two words daily.Most use them interchangeably.They shouldn't.Authentication and Authorization...
25/03/2026

Every developer uses these two words daily.
Most use them interchangeably.
They shouldn't.

Authentication and Authorization are not the same thing. They don't happen at the same time. They don't solve the same problem. And confusing them doesn't just sound wrong, it leads to real security holes in your application.

Here's the simplest way to remember the difference:

Authentication is the bouncer at the door checking your ID.
It doesn't care where you sit inside. It just needs to know you are who you claim to be.

Authorization is the VIP list.
The bouncer already let you in. Now the question is: which rooms are you allowed to enter?

Two different checks. Two different moments. Both non-negotiable.
Get authentication wrong and strangers walk into your app.
Get authorization wrong and the wrong people access the wrong things.

A secure application needs both, in the right order, every single time.

Follow for more dev concepts explained simply.

P.S. "401 means authentication failed. 403 means authorization failed. Two status codes. Two completely different problems. Now you'll never mix them up again."

Eid Mubarak!✨
21/03/2026

Eid Mubarak!✨

18/03/2026

How to break down a feature request?

A feature request lands in front of you.
"Add a user authentication system."

And you don't know.
Where do you even start?

Most of the juniors open their code editor immediately. That's the first mistake.

Here's the process that actually works.

β†’ Step 1: Understand it before you touch it.

Read the request twice. Then ask questions.
What does "done" look like? Who uses this feature? What happens
when something goes wrong?

This is where AI earns its place early.
Paste the feature request into Claude or ChatGPT and ask, "what questions should I be asking before I start building this?"

You'll catch assumptions you didn't know you were making.

β†’ Step 2: Split it into pieces.

A feature is never one thing. It's always many small things wearing a coat.
"User authentication" is actually:

Registration form. Login form. Password validation. Token generation. Protected routes. Error handling. Logout. And probably five more things you haven't thought of yet.

Write every piece down. Don't judge them yet. Just list them.

β†’ Step 3: Order the pieces.

What needs to exist before something else can exist?
You can't build protected routes before you have tokens. You can't have tokens before you have login. You can't have login before you have registration.

Every feature has a natural sequence. Find it.

Ask AI, "here are my pieces, what's the logical order to build them in?" Use it to sanity check your thinking.

β†’ Step 4: Identify what you don't know.

Go through your list and honestly mark the things you've never built before.
Not to feel bad about them. Just to see them clearly.

Those unknowns need research time before coding time. Budget for them or they will surprise you at the worst possible moment.

β†’ Step 5: Start with the smallest working piece.

Not the hardest. Not the most impressive. The smallest.
Get one piece working. Then the next. Then the next.
Momentum is a real thing in development. A small win at the start of a feature changes how the rest of it feels.

The feature that felt impossible at the start?
It was never impossible. It was just unsplit.

Break it down small enough and any feature becomes a series of problems you already know how to solve.

What's your process when a new feature lands on your plate? πŸ‘‡

16/03/2026

Confusion is not the enemy.

Staying confused is.

Every developer hits a wall. A concept that doesn't click. A topic you've read three times and still can't explain. A piece of code that works but you have no idea why.

The difference between developers who grow fast and ones who stay stuck isn't talent.

It's what they do with the confusion.

Here's what actually works for me.

β†’ Write it down. In your own words.
Not copy paste from the docs. Not the textbook definition.
Your words. As if you're explaining it to yourself.
The moment you try to write something down you instantly discover what you actually understand and what you just think you understand.

If you can't write it simply, you don't know it yet. And now you know exactly what to go back and learn.

β†’ Teach it to someone.

Anyone.

A friend. A LinkedIn post.

Teaching forces a completely different kind of thinking. You can't hide behind vague understanding when someone can ask you a follow up question.

The gaps in your knowledge show up immediately when you try to explain something out loud.

That's not embarrassing. That's the whole point.

β†’ Use AI as a student, not a teacher.

Most people ask AI to explain things to them.
Try the opposite.

Explain the concept to AI and ask it to find the holes in your understanding.

"Here's how I understand useEffect. What am I getting wrong?"

That one shift will teach you more than ten tutorials.

Confusion means you're at the edge of what you know.

That's exactly where growth lives.

Don't run from it. Don't skip it. Don't ask AI to shortcut past it.

Sit with it. Write it. Rewrite it. Teach it.

Clarity is just confusion you stayed with long enough. 🧠

What do you do when a concept just won't click? πŸ‘‡

12/03/2026

Everyone is listing the same full-stack skills.

React. Node. Databases. REST APIs. Git.

Learn them. But in 2026 that list is the floor. Not the ceiling.

AI can generate a React component. AI can scaffold an API. AI can write boilerplate faster than any developer alive.

So the question isn't what can you code anymore.
The question is what can you do that AI can't?

πŸ” Read and judge code. Not just write it.
AI generates. You decide.
Is this secure? Will this scale? Does this solve the actual problem?
The developer who can critically evaluate output is worth ten who just generate and ship.

πŸ› Debug what nobody else can.
AI fixes obvious bugs.
It struggles with race conditions. Environment specific failures. The bug that only appears in production at 3am.
Deep debugging is still deeply human.

πŸ—ΊοΈ Understand the system, not just the code.
Anyone can build a feature.
Understanding how it affects performance, security, and data flow - that's what separates good developers from dangerous ones.

πŸ—£οΈ Communicate what you built and why.
AI can write code. It can't represent your team in a meeting. It can't push back on a bad requirement.
You can.

🧠 Know when NOT to use AI.
The most underrated skill of 2026.
Knowing the limits of your tools is what makes you senior. Not the years.

Learn the tools. But become the developer the tools can't replace. 🧠

Which skill do you think is most underrated right now? πŸ‘‡

The bug isn't the problem. How you look for it is.Most Devs has a broken Debugging process. Here's how to actually fix i...
08/03/2026

The bug isn't the problem. How you look for it is.

Most Devs has a broken Debugging process. Here's how to actually fix it.

Most developers focus on frameworks.But the real growth comes from the invisible skills β€” communication, problem breakdo...
21/02/2026

Most developers focus on frameworks.

But the real growth comes from the invisible skills β€” communication, problem breakdown, patience, and documentation.

That’s what actually makes you reliable.

Which one do you think is most underrated?

Ya Allah, hamare Rozo ko qabool farma aur galtyo ko maaf farma. Aameeeen
20/02/2026

Ya Allah, hamare Rozo ko qabool farma aur galtyo ko maaf farma.
Aameeeen

Address

Gojra

Alerts

Be the first to know and let us send you an email when Coding Spirit posts news and promotions. Your email address will not be used for any other purpose, and you can unsubscribe at any time.

Shortcuts

Share

Category