TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: AI Chats Unable to Solve Easy Coding Problem

2 点作者 keernan大约 2 个月前
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&#x27;s subdirs, then just output the parent).<p>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.<p>I was very surprised. As an aside, I solved it on my own in a simple two step process:<p>Step 1: Use find $dir -type d with the sorted output input into an array.<p>Step 2: Set parent to &#x27;start&#x27;; Iterate the sorted array and continue the loop if the array_ele was a child of parent - otherwise echo $dir and set parent=$dir<p>Easy Peasy. But quite surprised both AI chats struggled to find a solution in bash (I limited the AI to bash).

1 comment

nullpoint420大约 2 个月前
I don’t know why, but I’ve found AI assistants to be less effective recently. They’ve just been outputting slop for me.