Software Engineer 👨💻 | Curious Mind
Linux • OS • DBMS • AI • Tech
World Affairs • Geopolitics • General Knowledge
Breaking down complex ideas into simple
Hey, I'm Arjun 👋
I'm into software engineering, Linux, AI, startups, world affairs, and learning how things work. 🌍
I love building things, exploring new ideas, and learning from curious minds.
If we share any interests, let's connect! 🤝✨
Be careful when someone says “software is dead.”
Some of the people saying it are building software and making money from it.
Personal software is real. But that doesn't mean SaaS is dead.
Are they predicting the future—or selling you FOMO while they profit from it?
🐧 99% developers must know these Linux Tricks
1. View command history
history
2. Repeat your last command
!!
3. Run command #42 from history
!42
4. List files with details
ls -lah
5. Search command history
Ctrl + R
💡 Bonus: ll is a shortcut for ls -l on many Linux setups, but it isn't available everywhere by default.
Save this for your next terminal session!
#Linux #Bash #DevTips #SoftwareEngineering #programming #javascript #linuxcommands
🧠 Two things happening together doesn't mean one caused the other.
Correlation ≠ causation.
Question the connection before believing the conclusion.
#CriticalThinking
Sorting Algorithms: Understand the Code, Don't Memorize It. 🧵
1/10
Before writing code, understand this:
"n = arr.length"
If the array is "[5, 3, 4, 1]", then "n = 4".
We use loops because we need to compare, find, or insert elements repeatedly.
Let's break down all 3 algorithms.
2/10
🫧 BUBBLE SORT — Two Loops
for (let i = 0; i < n - 1; i++) {
for (let j = 0; j < n - i - 1; j++) {
if (arr[j] > arr[j + 1]) {
[arr[j], arr[j + 1]] =
[arr[j + 1], arr[j]];
}
}
}
• "i" counts completed passes.
• "j" compares adjacent elements.
• "arr[j] > arr[j + 1]" checks their order.
• Swap puts the smaller element first.
3/10
Why "n - i - 1"?
Imagine 5 playing cards.
• After one pass, the largest element reaches the end.
• After two passes, the two largest elements are settled at the end.
• Those positions no longer need comparison.
"n - i - 1" limits the inner loop to the remaining unsorted portion.
The final "-1" ensures "j + 1" stays within the array.
4/10
🎯 SELECTION SORT — Find the Minimum
for (let i = 0; i < n - 1; i++) {
let minIndex = i;
for (let j = i + 1; j < n; j++) {
if (arr[j] < arr[minIndex]) {
minIndex = j;
}
}
[arr[i], arr[minIndex]] =
[arr[minIndex], arr[i]];
}
• "i" is the next position to fill.
• "minIndex = i" assumes the first unsorted element is the minimum.
• "j = i + 1" starts searching the remaining elements.
• "minIndex = j" records a newly found minimum.
• After searching, swap the minimum into position "i".
5/10
What does "j = i + 1" mean?
Imagine this array:
"[1, 3 | 5, 4, 2]"
The bar separates the sorted and unsorted portions.
• "[1, 3]" is already settled.
• "5" is the first unsorted element.
• Selection Sort searches from the next position.
The sorted prefix grows from the left after every pass.
6/10
🃏 INSERTION SORT — Two Loops?
for (let i = 1; i < n; i++) {
let key = arr[i];
let j = i - 1;
while (j >= 0 && arr[j] > key) {
arr[j + 1] = arr[j];
j--;
}
arr[j + 1] = key;
}
• "i = 1" starts from the second element.
• "key = arr[i]" saves the element to insert.
• "j = i - 1" checks the element immediately to its left.
• "arr[j] > key" checks whether shifting is necessary.
• "arr[j + 1] = key" inserts the element in the correct position.
7/10
Why does "j >= 0" matter?
Array indexes start at "0".
If "j" becomes "-1", we've moved past the beginning.
• "j >= 0" prevents invalid index access.
• "arr[j] > key" ensures we shift only larger elements.
Both conditions must be true for the "while" loop to continue.
8/10
Why "j + 1" instead of "j"?
Suppose the sorted portion is "[3, 5]" and "key = 4".
• "5 > 4" → shift 5 one position right.
• Decrease "j" to check the previous element.
• "3 > 4" is false.
• Insert 4 at "j + 1".
Result: "[3, 4, 5]"
We save "key" before shifting to avoid losing its value.
9/10
The biggest difference
• Bubble Sort: Compare adjacent elements and swap.
• Selection Sort: Find the minimum and swap.
• Insertion Sort: Save a key, shift larger elements, and insert.
Their sorted portions differ:
• Bubble → Sorted suffix grows from the right.
• Selection → Sorted prefix grows from the left.
• Insertion → Sorted prefix grows as each element is inserted.
10/10
How to think like a developer
Don't memorize "n - i - 1" or "j >= 0" blindly.
Ask yourself:
• What does this loop control?
• Which elements are already settled?
• What happens after each pass?
• Why does the next comparison start here?
• Which positions can safely be ignored?
When you understand the reasoning, you can recreate the code without memorizing it.
Sorting Algorithms Teach You How to Solve Problems. 🧵
1/7
Sorting isn't just about arranging numbers.
It's about learning different strategies to solve the same problem.
Let's understand 3 sorting algorithms using a simple example: arranging playing cards by value.
2/7
🫧 BUBBLE SORT — Compare & Swap
• Compare two adjacent elements.
• If they're in the wrong order, swap them.
• Repeat until the array is sorted.
Example: "[5, 3] → [3, 5]"
🧠 Life lesson: Small, consistent corrections can create bigger results.
3/7
🎯 SELECTION SORT — Find & Place
• Search the entire unsorted portion for the minimum.
• Swap it with the first unsorted element.
• Repeat for the remaining elements.
Example: "[5, 3, 4, 1] → [1, 3, 4, 5]"
🧠 Life lesson: Identify your priority before taking action.
4/7
🃏 INSERTION SORT — Find the Right Position
• Keep the left portion sorted.
• Take the next element.
• Shift larger elements to the right.
• Insert the element in its correct position.
Example: "[3, 5] + 4 → [3, 4, 5]"
🧠 Life lesson: Build on what you've already organized.
5/7
What's a SWAP?
A swap exchanges the positions of two elements.
"[5, 3] → [3, 5]"
But Insertion Sort often uses shifting instead of repeatedly swapping elements.
A shift makes room for the element being inserted.
6/7
Which one is more efficient?
• Bubble Sort: O(n²) average and worst case.
• Selection Sort: O(n²) average and worst case.
• Insertion Sort: O(n²) average and worst case.
• Insertion Sort can achieve O(n) time on already sorted input.
The best choice depends on the data and the problem.
7/7
The real takeaway:
• Bubble Sort teaches comparison.
• Selection Sort teaches prioritization.
• Insertion Sort teaches incremental progress.
Same destination. Different strategies.
That's algorithmic thinking.
Marcus Aurelius wrote:
“You have power over your mind — not outside events. Realize this, and you will find strength.”
Read that again.
• You can't control who believes in you. You can control how hard you work.
• You can't control how fast life moves. You can control how you spend your time.
• You can't control every setback. You can control whether it makes you bitter or wiser.
• You can't control what people think of you. You can control the person you become.
The older I get, the more I realize:
Peace begins when you stop trying to control everything except yourself.
BEFORE YOU MOCK INDIA’S OLYMPIC DREAM, LOOK AT THE FACTS. 🇮🇳
India’s sporting infrastructure is real. So is the work still ahead.
→ 332 sports infrastructure projects supported under Khelo India.
→ 1,067 Khelo India Centres established across India, according to the government’s July 2026 factsheet.
→ 60,000-seat Jawaharlal Nehru Stadium in Delhi, built for the 1982 Asian Games and upgraded for the 2010 Commonwealth Games.
→ India’s 2036 Olympic vision: “Rising Together.”
Is India ready to host the Olympics today? That deserves serious scrutiny.
But racist stereotypes are not serious scrutiny.
Question the bid. Examine the facilities. Judge the results.
Don’t confuse prejudice with facts.
#India #Olympics2036
Introducing Anatomy
Describe a machine in one line. Claude brings it to life.
- Interactive isometric wireframes you can rotate, inspect and explore
- WebGL shaders for fire, water, plasma and more
- Real 3D motion, with individual parts that rotate and move
Install it as an agent skill. Fully open source.
THE COMPARISON TRAP
James Clear wrote:
“Somewhere, at this very moment, someone appears to be doing better than you.”
Here's what this means for your life:
Someone will always earn more than you.
Someone will always reach a milestone before you.
Someone else's progress doesn't make yours worthless.
Measure your life against your past self, not someone else's highlight reel
Your life isn't a race you have to win against everyone.
Source: James Clear — Keep Your Eyes on Your Own Paper
🧠 Two Pointers: Think Smarter, Not Harder.
Imagine searching for two people in a row of seats.
Instead of checking every possible pair, you start at both ends and move based on what you discover.
That's the Two Pointer Technique. 👇
📌 What is it?
- Use two variables to track positions in an array.
- Move them strategically to solve a problem.
💡 Example: Find two numbers that sum to 9
"[1, 2, 4, 7, 11, 15]"
- "1 + 15 = 16" → Too big. Move right pointer left.
- "1 + 7 = 8" → Too small. Move left pointer right.
- "2 + 7 = 9" → 🎯 Found!
Why does it work?
Because the array is sorted. Moving the right pointer left gives a smaller value; moving the left pointer right gives a larger one.
⚡ Why use it?
- Avoid checking every pair.
- Often reduces "O(n²)" to "O(n)".
- Each pointer moves through the array instead of restarting the search.
🛠️ Where is it used?
- Finding pairs with a target sum
- Reversing an array
- Checking palindromes
- Removing duplicates from sorted arrays
- Comparing values from both ends
🎯 The real lesson:
Don't check every possibility. Use what you already know to eliminate the impossible ones.
#DSA #100DaysOfCode #Coding #programming
🇮🇳 INDIA IS MORE THAN THE WORST PICTURE YOU CAN FIND
India has cities recognised for cleanliness world-class sporting venues, and the ambition to host the 2036 Olympics
Criticism is fair. Reducing a nation to its worst images isn’t
#India2036#Olympics#cleanindia#india#sports
Indore was recognised among India’s cleanest cities in Swachh Survekshan 2024–25, the national cleanliness survey conducted by the Ministry of Housing and Urban Affairs, Government of India. The awards were presented by President Droupadi Murmu on 17 July 2025.
Official proof: https://t.co/BSbjYfs6Wo
@StudioXRadio Hi @StudioXRadio@dhh , Can I run Omarchy smoothly on an M2 Mac with 8GB RAM? My system already freezes when building code with Chrome and two VS Code windows open