AI

AI Chats Unable to Solve Easy Coding Problem

Hacker News

AI Chats Unable to Solve Easy Coding Problem

I needed a bash script that, given a path, would detect empty directories. More specifically, I wanted the script to only list the highest parent directory (in other words, if there were no files anywhere beneath parent and within parent's subdirs, then just output the parent). I figured this would be quite simple, but since I was already working with a AI chat, I gave it a prompt with the rules and objective. After 30 mins of so, I switched to DeepSeek, thinking it would output a solution on the first try. Nope. Not even after more than 90 minutes of back and forth with debugging. I was very surprised. As an aside, I solved it on my own in a simple two step process: Step 1: Use find $dir -type d with the sorted output input into an array. Step 2: Set parent to 'start'; Iterate the sorted array and continue the loop if the array_ele was a child of parent - otherwise echo $dir and set parent=$dir Easy Peasy. But quite surprised both AI chats struggled to find a solution in bash (I limited the AI to bash).

Share card

Actual performance

2points
1comments
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Indie HackersFits the IH revenue-focused audience · Missing: supports, reddit linkedin, podcasting
79%79% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
AppSumoMay struggle as an AppSumo deal · Missing: plus, platform, intuitive
49%49% predicted probability of success on AppSumo, based on ML models trained on real launch data.
TrustMRRLess likely to generate early MRR · Missing: mobile apps, ios, personal
38%38% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
Hacker NewsMay not resonate with HN audience · Strong signals: ide, io · Missing: https docs, excited, just released
37%37% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
Product HuntUnlikely to reach the leaderboard · Strong signals: coding · Missing: mac, agents, macos
33%33% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Strong signals: arr · Missing: mrr, revenue, profit
16%16% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Strong signals: chat · Missing: web3, crypto, cryptocurrency
1%1% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

Ho
How to solve any problem...42%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

How to solve any problem...

Hacker News2
Pl
Platform to Solve Some of “First Impression Influence” Problem43%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Platform to Solve Some of “First Impression Influence” Problem

Hacker News2
Coso
Coso51%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Connect your problem and solve.

Indie Hackerscommitment-side-project
I
I built an app to solve my Texting problem32%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

I built an app to solve my Texting problem

Hacker News2
CO
COMTIFY 1.1 – Trying to solve the problem of too many tools at work40%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

COMTIFY 1.1 – Trying to solve the problem of too many tools at work

Hacker News1
Tr
Trying to solve the “too many tabs” problem42%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Trying to solve the “too many tabs” problem

Hacker News1
PluriHub
PluriHub19%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Organize all your prefered AI chats in one easy tab

Indie Hackers1productivity
So
Solve the Travelling Salesman Problem with the GPU51%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Solve the Travelling Salesman Problem with the GPU

Hacker News3
Ca
Can You Solve the Three Body Problem?47%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Can You Solve the Three Body Problem?

Hacker News1
(F
(For YC) Improvised Quora to Solve “First Impression Influence” Problem57%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

(For YC) Improvised Quora to Solve “First Impression Influence” Problem

Hacker News2