At first, this looked like one of the easiest features.
Click like → count increases → done.
That’s how every social media app works.
So I created a small challenge around this idea to see how systems handle it.
And the result was surprising.
The Problem
Here’s the basic logic:
- User clicks like
- System checks if already liked
- If not → store the like
Seems correct.
But there’s a hidden issue.
⚠️ What Can Go Wrong?
In real-world systems:
• The same user can like the same post multiple times
• Duplicate records can be stored
• Object comparison may fail silently
• Concurrent requests can bypass checks
And suddenly:
Like count becomes incorrect
System shows wrong engagement
Data becomes inconsistent
Why This Happens
The problem is not just logic.
It’s how the system compares and stores data.
For example:
Two objects that look the same are not always equal in memory.
So even if the system checks:
“Is this already liked?”
It may still fail.
What I Observed
When testing this type of problem:
• Many solutions checked basic conditions
• Some failed in object comparison
• Some ignored concurrency
• Very few ensured data consistency
The code works.
But the system is not reliable.
The Real Issue
This is not just about liking a post.
It’s about:
• Data integrity
• Unique constraints
• System consistency
• Handling real-world traffic
Because:
One user should equal one like

How Real Systems Solve This
Strong systems handle this using:
• Database unique constraints (userId + postId)
• Atomic operations
• Idempotent APIs
• Proper indexing
This ensures:
No duplicate likes
Correct counts
Reliable data
Try This Kind of Problem
If you want to explore how different solutions handle this, you can check here:
https://vibecodearena.ai/duel/131106af-1f77-48a8-8d66-cb9695a3640f
You’ll quickly see the difference between:
Code that looks correct
And systems that behave correctly
Final Thought
Like systems don’t fail because of clicks.
They fail because of data consistency issues.
And that’s where real engineering begins.
What do you think
Can AI handle these edge cases… or does it still miss something important?