Muhammad Maaz retweeted
Give your honest answer:
How do you manage staying active on @X while also learning, building, and leveling up your skills? ๐ค
Muhammad Maaz retweeted
๐๐น๐ฝ๐ต๐ฎ-๐๐ฒ๐๐ฎ ๐ฃ๐ฟ๐๐ป๐ถ๐ป๐ด โ ๐ ๐ถ๐ป๐ถ๐บ๐ฎ๐
, ๐ฏ๐๐ ๐ฆ๐บ๐ฎ๐ฟ๐๐ฒ๐ฟ ๐ง
Minimax explores possible future moves to find the best decision.
The problem?
โ ๏ธ Game trees get huge.
โ ๐๐น๐ฝ๐ต๐ฎ-๐๐ฒ๐๐ฎ ๐ฃ๐ฟ๐๐ป๐ถ๐ป๐ด
โณ It skips branches that cannot possibly change the final decision.
โ ฮฑ (alpha) โ best value MAX can already guarantee.
โ ฮฒ (beta) โ best value MIN can already guarantee.
โข When ฮฑ โฅ ฮฒ, stop exploring that branch.
That's the pruning.
โ ๐ฆ๐ถ๐บ๐ฝ๐น๐ฒ ๐ฒ๐
๐ฎ๐บ๐ฝ๐น๐ฒ
โณ Suppose MAX is already found:
Left branch โ 3
So:
โ ฮฑ = 3
Now MIN explores another branch:
โ Right branch โ 2
MIN can only make this branch 2 or worse.
โ MAX already has 3.
So why explore the remaining moves?
โณ Prune. โ๏ธ
โ ๐ง๐ต๐ฒ ๐ถ๐บ๐ฝ๐ผ๐ฟ๐๐ฎ๐ป๐ ๐ฝ๐ฎ๐ฟ๐
Alpha-beta pruning gives the same answer as minimax.
It simply avoids computations that don't matter.
โค Better move ordering โ more pruning.
โค Worst case โ still exponential.
โ
Minimax: Explore the possibilities.
โ
Alpha-Beta: Explore only the possibilities that matter.
โ Would you be able to identify where pruning occurs in a game tree?
Muhammad Maaz retweeted
๐ง๐๐ผ ๐ฃ๐ผ๐ถ๐ป๐๐ฒ๐ฟ๐ ๐ ๐ฎ๐ฑ๐ฒ ๐ฆ๐ถ๐บ๐ฝ๐น๐ฒ ๐ถ๐ป ๐ฆ๐ฒ๐ฐ๐ผ๐ป๐ฑ๐ ๐
โณ Two Pointers is one of the most useful DSA patterns for efficiently solving array and string problems.
โณ Instead of checking every possible combination, you use two pointers that move through the data intelligently.
โ ๐๐ผ๐ ๐ถ๐ ๐๐ผ๐ฟ๐ธ๐
โ One pointer starts from the left.
โ The other starts from the right.
โข Both pointers move based on the current values.
โ ๐ฆ๐ถ๐บ๐ฝ๐น๐ฒ ๐ฒ๐
๐ฎ๐บ๐ฝ๐น๐ฒ
Find two numbers that add up to 10:
Sorted array โ [1, 3, 5, 7, 9]
โ Left = 1
โ Right = 9
1 + 9 = 10 โ
Found it immediately.
โข If the sum is too small โ move the left pointer forward.
โข If the sum is too large โ move the right pointer backward.
โข Keep moving until the pointers meet.
โ This works because the array is sorted โ that's what tells you which direction to move. Unsorted array = no shortcut.
โ ๐ช๐ต๐ ๐ถ๐ ๐บ๐ฎ๐๐๐ฒ๐ฟ๐
โณ A brute-force solution may check every possible pair.
Two Pointers can often reduce the problem to O(n) time.
โ
๐ง๐ต๐ฒ ๐บ๐ฒ๐ป๐๐ฎ๐น ๐บ๐ผ๐ฑ๐ฒ๐น
โณ Two pointers + smart movement = fewer unnecessary comparisons.
โณ This post covers the opposite-ends variant โ pointers starting apart and moving toward each other.
Once you recognize the pattern, many array and string problems become much easier.
โโ
What DSA pattern should I explain next? ๐ค
โโ
๐ Save for later.
๐ค Follow me @1devmaaz, for more!
Muhammad Maaz retweeted
Quick question for tech Twitter/X ๐
What do you prefer reading?
โณ ๐งต Short, structured threads
โณ ๐ Longer, detailed posts
Iโm trying to figure out what format is better for sharing what Iโm learning, building, and researching.
What works better for you? ๐
Muhammad Maaz retweeted
Just shipped a big update to my portfolio. ๐
โจ What's new:
โข ๐ Interactive metrics
โข ๐ ๏ธ Scroll-based build timeline
โข ๐ง "How I Think" section
โข ๐๏ธ Live architecture views
โข ๐ Mini case studies for every project
โข โ๏ธ Interactive system design whiteboard
โข ๐ Refined dark/light experience
Would love some honest feedback ๐
- What's your first impression?
- Anything confusing?
What would you improve?
๐ maaz.mikrotik.pk
Feedback from engineers, designers, and recruiters is always appreciated ๐
Muhammad Maaz retweeted
Why can't React talk directly to a database? Why do we always put an API in the middle?
What's actually happening under the hood that makes an API necessary? ๐ค
Muhammad Maaz retweeted
Finally got verified on X. โ๏ธ
Really happy to see that blue checkmark.
๐ I'm Muhammad Maaz, a self-taught software engineer from Pakistan ๐ต๐ฐ who loves building things, breaking them, and figuring out how they work.
I mainly share:
โข โ๏ธ Software Engineering
โข ๐ค AI Core
โข ๐ผ Entrepreneurship
โข ๐ง Things I'm learning and building
If any of those topics interest you, I'd love to have you along for the journey. ๐
Muhammad Maaz retweeted
What is Git, and why should every developer learn it? ๐ค
Imagine spending hours building a feature... and then accidentally deleting your code.
Yeah, not a great feeling.
That's just one of the many problems Git helps solve.
Let's get into it ๐
๐ Topics
โ What is Git?
โ ๐ฐ๏ธ Why was Git created?
โ ๐ ๏ธ What does Git actually do?
โ ๐ Why should every developer learn Git?
โ Collaboration
โ Version Control
โ Branches
โ ๐ฏ Conclusion
๐ฐ๏ธ Why was Git created?
Git was created by Linus Torvalds in 2005 to manage the development of the Linux kernel after the project stopped using its previous version control system.
โญ Git is a Distributed Version Control System (DVCS).โญ
In simple words:
โ It helps you keep track of changes in your project.
โ It stores your project's entire history.
โ It makes collaborating, experimenting, and recovering old versions much easier.
๐ ๏ธ What does Git actually do?
Every time you make a commit, Git saves a snapshot of your project.
Think of each commit as a checkpoint.
If you ever break something, you can jump back to an earlier version instead of rebuilding everything from scratch.
Every commit also gets a unique SHA hash.
With that hash, you can:
โ
View a specific version of your project.
โ
Compare changes between commits.
โ
Restore or revert to an older version if needed.
๐ Why should every developer learn Git?
๐ค Collaboration
Say you're working with a team.
๐ One person is building authentication.
๐ Someone else is working on the dashboard.
๐ Another developer is fixing bugs.
Git lets everyone work on the same project without stepping on each other's code.
When everything's ready, the changes can be merged together safely.
๐ Version Control
Git shows you exactly who changed what and when.
Made a mistake?
It happens.
You can compare versions, restore older commits, or undo unwanted changes without losing your whole project.
๐ฟ Branches
Probably my favorite Git feature.
Branches let you build new features without touching your main codebase.
For example:
You want to add an Edit Profile feature.
โ
Create a new branch.
โ
Build and test the feature.
โ
Merge it back into the main branch once it's ready.
This makes it easy to experiment without risking your stable code.
๐ผ Career
Whether you're a:
โ
Software Engineer
โ
Web Developer
โ
Mobile Developer
โ
DevOps Engineer
โ
System Administrator
...or anyone who writes code,
You'll probably use Git almost every single day.
It's become the standard tool for version control across the industry.
๐ฏ Conclusion
Git isn't just another tool to add to your toolbox.
It's one of the foundations of modern software development.
The earlier you learn it, the easier it'll be to collaborate, manage projects, and build software with confidence.
Now I'm curious...
What's the first Git command you learned? ๐
Mine was git clone. ๐
Muhammad Maaz retweeted
If you had to become a software engineer again...
But you could only use 3 resources for the next 12 months.
โข ๐ Books
โข ๐ฅ YouTube
โข ๐ค AI (ChatGPT, Claude, etc.)
โข ๐ป Documentation
โข ๐ ๏ธ Building Projects
โข ๐ฅ Open Source
What would they be? ๐
Muhammad Maaz retweeted
๐ Building SortIt โ SaaS for housing organizations.
Stack: Next.js + Expo + Express/Prisma
Learning a lot of stuff: JWT, RBAC, multi-tenancy, web sockets, push notifications, Stripe, uploads, reports...
Muhammad Maaz retweeted
You're only allowed to give one piece of advice to a beginner learning to code in the AI era.
What are you telling them? ๐
Muhammad Maaz retweeted
Which programming language would you recommend a beginner start learning DSA with?
- Python
- C/C++
- Java
- JavaScript
Muhammad Maaz retweeted
I'm starting a series breaking down how AI actually works. We'll build the intuition behind the algorithms, one concept at a time.
Here's everything we're going to cover ๐งต









