HI WELCOME TO KANSIRIS

If you forgive the fox... he will take your sheep

Leave a Comment

 If you forgive the fox... he will take your sheep means that ignoring small infractions or showing weak, undisciplined forgiveness to someone untrustworthy will lead them to commit larger, more damaging acts later. It highlights that without boundaries, enabling harmful behavior ensures it will escalate.

Key Implications:
  • Escalation of Damage: The behavior is not a one-time mistake; it is in the "fox's nature" to continue exploiting you if not stopped.
  • Weakness Encourages Misconduct: Allowing initial, smaller thefts (chickens) signals that you are an easy target, encouraging the thief to take much more valuable assets (sheep).
  • Boundary Setting: It serves as a lesson on the necessity of firm boundaries in relationships or business to prevent greater losses.

🚀 How Software Engineers Can Use GitHub Copilot

Leave a Comment

 

1. Set Up GitHub Copilot

You can use Copilot inside:

  • VS Code
  • Visual Studio
  • Neovim
  • JetBrains IDEs

Steps (VS Code example):

  1. Install the GitHub Copilot extension.
  2. Sign in with your GitHub account.
  3. Enable Copilot suggestions.

That’s it—you’re ready to go!


2. Use Copilot for Code Suggestions

Copilot gives inline suggestions as you type.

Example:

If you start writing a Python function:

Python
def fibonacci(n):

Copilot may complete the entire function automatically.
Press Tab to accept.


3. Use Copilot Chat for Deeper Help

With GitHub Copilot Chat, you can:

  • Ask for debugging help
  • Generate unit tests
  • Explain code
  • Get documentation

Example prompts:

  • "Explain what this React component does."
  • "Generate unit tests for this function using Jest."
  • "Why is this code throwing a null reference error?"

4. Generate Boilerplate or Repetitive Code

Ask Copilot to create:

  • CRUD APIs
  • SQL queries
  • React components
  • Class structures
  • Terraform templates
  • CI/CD YAML pipelines

Example:

"Create a Node.js Express API with two routes: /users and /products."


5. Write Unit Tests Automatically

Copilot is strong at test generation.

Example prompt: "Write pytest unit tests for this function."

It will:

  • Create meaningful test cases
  • Suggest mocks
  • Cover edge cases

6. Refactor Legacy Code

Ask Copilot:

  • "Refactor this function to be more readable."
  • "Convert this callback‑based code to async/await."

It will suggest improved code versions.


7. Learn New Frameworks Faster

You can ask:

  • "Show an example of using FastAPI with JWT authentication."
  • "How to write a Kubernetes deployment file?"

Copilot becomes an on‑demand tutor.


8. Generate Documentation

Ask Copilot to write:

  • JSDoc comments
  • Markdown README files
  • API documentation

Example: "Write a README for this project explaining how to run and deploy it."


9. Debugging and Error Explanation

Paste an error and ask Copilot:

  • "Why am I getting this segmentation fault?"
  • "Fix this TypeScript type error."

It explains in simple language and suggests fixes.


10. Collaborate Better in Teams

Copilot helps maintain:

  • Coding standards
  • Faster onboarding for new engineers
  • Cleaner, more consistent code

⭐ Summary

GitHub Copilot helps software engineers:

  • Write code faster
  • Reduce repetitive work
  • Improve quality and consistency
  • Learn new tools quickly
  • Debug more effectively

Why Men and Women Cannot "Just" Be Friends - Chanakya Niti

Leave a Comment
 Chanakya didn’t trust emotions. He studied motives. He believed where desire and dependence exist, neutrality dies. Male female friendship sits exactly in that danger zone: emotionally comforting, socially acceptable, but psychologically unstable. Why? Because friendship assumes equality and emotional safety, but the human mind is designed for survival, possession, attention, and advantage. Let’s break this down, practically, unromantically, the way someone who wants to win at life and not get emotionally ambushed would think.

Attachment arrives as a quiet thief

Attachment slowly turns comfort into emotional dependency and imbalance.
Attachment slowly turns comfort into emotional dependency and imbalance.
“As soon as the fear approaches near, attack and destroy it.”

Emotional Attachment Is the First Trap You don’t fall in love suddenly. You drift.

Daily texting.
Sharing secrets.
Being the first person they call when something hurts.
This builds emotional addiction. The brain releases dopamine when you receive attention, and oxytocin when you feel trusted. Combine both, and the mind mistakes comfort for love. Attachment is not proof of purity; it’s proof the mind is hungry for validation. Once you depend on someone for emotional stability, you’ve already lost neutrality.

Do not offer or accept emotional reliance daily. Never depend on one person (especially an opposite-gender friend) to handle all your mental burdens. Spread your emotional reliance among friends, mentors, journaling, or disciplined solitude. Disrupt the Pattern. Delay responses. Reduce frequency. Rewire the brain’s expectation. Ask the Brutal Question Internally: “If this person walked away today, will I collapse?” If yes, dependency is already controlling you, not companionship.

Desire Doesn’t Start In The Body, It Starts In The Imagination

Desire starts in the mind, long before any physical act.
Desire starts in the mind, long before any physical act.
“There is no enemy like infatuation and fire like wrath.”

People think physical attraction ruins friendships. Wrong. It’s the imagination that ruins it first.

“What if we were together?”
“What if this hug lasted a bit longer?”
“What if they like me too?”
Once your brain starts simulating scenarios, you unconsciously change behavior:

You look better around them.
You get irritated when they mention someone else.

You start expecting more attention.

Whatever controls your thoughts will eventually control your actions. If someone starts living inside your mind, the friendship is no longer just a friendship.

The second your brain drifts into fantasy, snap out of it, move your body, breathe deeply, start a new task. You have 5 seconds to kill it before it grows. Remind yourself, “They don’t belong to me,” “They are not mine to imagine,” “Attachment is not agreement.” Stop imagining potential relationships, start observing flaws logically. Attraction shrinks when idealization dies.

Lack of Boundaries = Silent Permission for Chaos

When boundaries fade, friendship shifts into confusion and silent expectations.
When boundaries fade, friendship shifts into confusion and silent expectations.
“Before you start some work, always ask yourself three questions - Why am I doing it, What the results might be and Will I be successful. Only when you think deeply and find satisfactory answers to these questions, go ahead.”

Most friendships don’t break because of big mistakes. They break because of small permissions.

Late-night calls.
Sharing beds on trips.
“Harmless” flirting.
Emotional intimacy without defined roles. This is called boundary erosion, slow removal of lines until the mind no longer knows what is allowed and what isn’t. Result? One person thinks it’s friendship. The other starts thinking it’s love. Both are wrong. It’s confusion. If you do not build the wall, you will be surprised when the roof collapses.

Define the relationship publicly or privately. Not romantic? Say it. Out loud or in action. Small discomforts now prevent bigger disasters later. If the other person reacts negatively to boundaries, they weren’t here for friendship anyway.

Love and Lust Are Not the Enemies, Silence Is

It’s not love or lust that ruins friendships, but unspoken feelings.
It’s not love or lust that ruins friendships, but unspoken feelings.
The wise man should restrain his senses like the crane and accomplish his purpose with due knowledge of his place, time and ability.

Love can be handled. Lust can be managed. But silent expectations? They are lethal. When one person upgrades the relationship emotionally, but never says it out loud, three things happen:

They observe everything the other does.

They start blaming silently.

They eventually explode or disappear.

This is psychological warfare without words. This emotional espionage, pretending to be a friend, but internally monitoring like a lover.

Admit to yourself if your feelings changed. Self-lies are more dangerous than heartbreak. Three-Option Rule: Once you catch feelings:

Confess and reframe the relationship (if mutual).
Distance to detox and regain logic (if not mutual).
Stay and suffer quietly (unwise, but most people do).
Instead of disappearing overnight, slowly reduce emotional temperature. This avoids drama and dependency-collapse. If it's purely physical attraction, distance, distraction, discipline. Lust that isn’t acknowledged becomes manipulation.

Final reflection
Men and women can be friends. But staying just friends requires more self-awareness than most people have. Because: The mind wants to own what comforts it. The heart wants to believe attachment is purity. And desire doesn’t care about your principles. Chanakya would not say “Avoid friendships.” He would say, “Know the risks, set the rules, or be ready to pay the price.”

⚠️ Transient, Scoped, and Singleton — small choices with a big impact on performance, scalability, and data safety.

Leave a Comment


🔹 Transient
Creates a new instance every time it’s requested.
Best suited for lightweight, stateless services.

🔹 Scoped
One instance per request.
Shared only within the same user operation.

🔹 Singleton
A single instance for the entire application lifetime.
Shared by all users and must be thread-safe.

Rule of thumb:
Stateless → Transient
Per request → Scoped
Global shared → Singleton

⚡ 𝟭𝟮 𝗥𝘂𝗹𝗲𝘀 𝗳𝗼𝗿 𝗠𝗶𝗱𝗱𝗹𝗲𝘄𝗮𝗿𝗲 𝗢𝗿𝗱𝗲𝗿𝗶𝗻𝗴 𝗶𝗻 𝗔𝗦𝗣.𝗡𝗘𝗧 𝗖𝗼𝗿𝗲

Leave a Comment


These rules ensure your API is secure, performant, and predictable.

Break them, and you’ll debug for hours.

- Use UseForwardedHeaders() first if behind a proxy
- Force redirect to HTTPS early with UseHttpsRedirection()
- Call UseRouting() before any middleware that depends on route data
- Apply UseCors() after routing but before authentication
- Add UseAuthentication() before authorization
- Always place UseAuthorization() after routing to enforce policies
- Put UseExceptionHandler() near the top to catch all errors early
- Set UseRateLimiter() early to shield your API from overload
- Call UseResponseCompression() after routing and before endpoints
- Register UseStaticFiles() before routing only if serving static content
- Place custom middleware (logging, tracing) early to cover the full request
- UseEndpoints() must be last to execute matched endpoints and terminate the pipeline.

Most .NET Core APIs don’t fail because of bad code.

Leave a Comment

They fail because of bad assumptions.


After working with ASP.NET Core in real projects, this is what I’ve learned the hard way 👇

🔹 Async/await doesn’t mean scalable
If your async code blocks threads (.Result, .Wait()), you’ve already lost under load.

🔹 EF Core is not slow misuse is
Tracking everything, lazy loading blindly, and ignoring generated SQL is what hurts performance.

🔹 Stateless APIs are not optional anymore
If your API stores user state in memory, horizontal scaling will eventually break you.

🔹 Caching is a design decision, not a fix
Add caching without a clear invalidation strategy, and you’ll trade speed for bugs.

🔹 Most “slow APIs” are blocked, not busy
The database is waiting on locks, not executing slow queries.

🔹 Retries without idempotency are dangerous
They don’t improve reliability they multiply failures.

🔹 Rate limiting is about survival
Not speed. Not optimization. Survival.

🔹 Security is not just authentication
Authorization failures are the most expensive bugs in production.

🧠 Big takeaway
ASP.NET Core is powerful, but it doesn’t protect you from poor system design.

Frameworks don’t scale systems.
Engineering decisions do.

Sharing this for anyone building or interviewing for real-world .NET backend roles.