ChatGPT vs Claude.ai

ChatGPT vs Claude.ai

Dec 23, 2025

So it was 2am and I was waiting for something to finish rendering on one of my baremetals. So I got bored waiting while sipping my coffee then I remembered seeing a post by: https://x.com/Golgothusabout something about comparing AI agents. So here it is:


CHATGPT's exchange

AI Showcase Bash Script – Full Exchange

1. Initial Request

User:
I need to to give me a simple bash script that can show case script building by generative AI like yourself, something that would be hard/tedious for humans to code but easy for AI

ChatGPT:
Here's a "showcase-y" Bash script idea that's tedious for humans (lots of parsing, edge cases, formatting) but pretty easy for AI: an interactive system triage report generator that:

  • collects a bunch of system facts,

  • checks "common failure modes" (disk/mem/ports/DNS/time sync),

  • prints a clean, colorized report,

  • and optionally writes a timestamped log file.

Copy-paste this as triage.sh, then chmod +x triage.sh and run ./triage.sh.

#!/usr/bin/env bash
set -Eeuo pipefail

# triage.sh — interactive system triage report (Linux/macOS)
# Usage: ./triage.sh [--json] [--out DIR] [--no-color]

JSON=0
OUT_DIR=""
NO_COLOR=0

for arg in "$@"; do
  case "$arg" in
    --json) JSON=1 ;;
    --out=*) OUT_DIR="${arg#--out=}" ;;
    --no-color) NO_COLOR=1 ;;
    *) ;;
  esac
done

# ----- Color / formatting -----
if [[ -t 1 && "$NO_COLOR" -eq 0 ]]; then
  BOLD=$'\033[1m'
  DIM=$'\033[2m'
  RED=$'\033[31m'
  GRN=$'\033[32m'
  YLW=$'\033[33m'
  BLU=$'\033[34m'
  MAG=$'\033[35m'
  CYN=$'\033[36m'
  RST=$'\033[0m'
else
  BOLD=""; DIM=""; RED=""; GRN=""; YLW=""; BLU=""; MAG=""; CYN=""; RST=""
fi

hr() { printf "%s\n" "${DIM}--------------------------------------------------------------------------------${RST}"; }
kv() { printf "%-28s %s\n" "$1" "$2"; }

have() { command -v "$1" >/dev/null 2>&1; }

os_name() {
  if [[ "$(uname -s)" == "Darwin" ]]; then
    sw_vers -productName 2>/dev/null || echo "macOS"
  elif [[ -f /etc/os-release ]]; then
    . /etc/os-release
    echo "${NAME:-Linux}"
  else
    echo "Linux"
  fi
}

os_version() {
  if [[ "$(uname -s)" == "Darwin" ]]; then
    sw_vers -productVersion 2>/dev/null || uname -r
  elif [[ -f /etc/os-release ]]; then
    . /etc/os-release
    echo "${VERSION:-$(uname -r)}"
  else
    uname -r
  fi
}

uptime_pretty() {
  if have uptime; then
    if [[ "$(uname -s)" == "Darwin" ]]; then
      uptime | sed 's/^.*up  *//; s/, *[0-9]* users.*$//'
    else
      uptime -p 2>/dev/null || uptime
    fi
  else
    echo "n/a"
  fi
}

cpu_model() {
  if [[ "$(uname -s)" == "Darwin" ]]; then
    sysctl -n machdep.cpu.brand_string 2>/dev/null || echo "n/a"
  else
    awk -F: '/model name/ {print $2; exit}' /proc/cpuinfo 2>/dev/null | sed 's/^ *//' || echo "n/a"
  fi
}

cpu_cores() {
  if [[ "$(uname -s)" == "Darwin" ]]; then
    sysctl -n hw.ncpu 2>/dev/null || echo "n/a"
  else
    nproc 2>/dev/null || echo "n/a"
  fi
}

mem_total_mb() {
  if [[ "$(uname -s)" == "Darwin" ]]; then
    local b
    b=$(sysctl -n hw.memsize 2>/dev/null || echo 0)
    echo $(( b / 1024 / 1024 ))
  else
    awk '/MemTotal/ {print int($2/1024)}' /proc/meminfo 2>/dev/null || echo "n/a"
  fi
}

mem_free_mb() {
  if [[ "$(uname -s)" == "Darwin" ]]; then
    if have vm_stat; then
      local pages free inactive speculative page_size
      page_size=$(sysctl -n hw.pagesize 2>/dev/null || echo 4096)
      free=$(vm_stat | awk '/Pages free/ {gsub("\\.","",$3); print $3}')
      inactive=$(vm_stat | awk '/Pages inactive/ {gsub("\\.","",$3); print $3}')
      speculative=$(vm_stat | awk '/Pages speculative/ {gsub("\\.","",$3); print $3}')
      pages=$(( (free + inactive + speculative) * page_size ))
      echo $(( pages / 1024 / 1024 ))
    else
      echo "n/a"
    fi
  else
    awk '/MemAvailable/ {print int($2/1024)}' /proc/meminfo 2>/dev/null || echo "n/a"
  fi
}

load_avg() {
  if [[ "$(uname -s)" == "Darwin" ]]; then
    sysctl -n vm.loadavg 2>/dev/null | tr -d '{}' || echo "n/a"
  else
    awk '{print $1" "$2" "$3}' /proc/loadavg 2>/dev/null || echo "n/a"
  fi
}

disk_summary() {
  if have df; then
    df -hP 2>/dev/null | awk 'NR==1 || $NF=="/" || $NF=="/home" || $NF=="/var" || $NF=="/mnt" {print}'
  else
    echo "n/a"
  fi
}

top_cpu_procs() {
  if have ps; then
    if [[ "$(uname -s)" == "Darwin" ]]; then
      ps -Ao pid,ppid,%cpu,%mem,comm | head -n 1
      ps -Ao pid,ppid,%cpu,%mem,comm | tail -n +2 | sort -k3 -nr | head -n 8
    else
      ps -eo pid,ppid,pcpu,pmem,comm --sort=-pcpu | head -n 9
    fi
  else
    echo "n/a"
  fi
}

ports_listening() {
  if have ss; then
    ss -lntup 2>/dev/null | head -n 30
  elif have netstat; then
    if [[ "$(uname -s)" == "Darwin" ]]; then
      netstat -anv -p tcp 2>/dev/null | awk '/LISTEN/ {print}' | head -n 30
    else
      netstat -lntup 2>/dev/null | head -n 30
    fi
  else
    echo "n/a"
  fi
}

dns_check() {
  local host="example.com"
  if have dig; then
    dig +time=2 +tries=1 "$host" A >/dev/null 2>&1 && echo "ok" || echo "fail"
  elif have nslookup; then
    nslookup "$host" >/dev/null 2>&1 && echo "ok" || echo "fail"
  elif have getent; then
    getent hosts "$host" >/dev/null 2>&1 && echo "ok" || echo "fail"
  else
    echo "unknown"
  fi
}

net_check() {
  if have ping; then
    ping -c 1 -W 2 1.1.1.1 >/dev/null 2>&1 && echo "ok" || echo "fail"
  else
    echo "unknown"
  fi
}

time_sync_hint() {
  if [[ "$(uname -s)" == "Darwin" ]]; then
    echo "Use: systemsetup -getnetworktimeserver / -getusingnetworktime (requires sudo)"
  else
    if have timedatectl; then
      timedatectl 2>/dev/null | awk -F: '
        /System clock synchronized/ {print "System clock synchronized:"$2}
        /NTP service/ {print "NTP service:"$2}
        /Time zone/ {print "Time zone:"$2}
      ' | sed 's/^ *//'
    else
      echo "timedatectl not found"
    fi
  fi
}

risk_flag() {
  local label="$1" pred="$2" detail="$3"
  if [[ "$pred" -eq 0 ]]; then
    printf "%s%-18s%s %s\n" "${GRN}" "[OK]" "${RST}" "${label}: ${detail}"
  else
    printf "%s%-18s%s %s\n" "${YLW}" "[CHECK]" "${RST}" "${label}: ${detail}"
  fi
}

timestamp() { date +"%Y-%m-%d_%H-%M-%S"; }

# ----- Interactive prompts -----
read -r -p "Include listening ports snapshot? (y/N) " INCLUDE_PORTS
INCLUDE_PORTS=${INCLUDE_PORTS,,}
read -r -p "Include top CPU processes? (y/N) " INCLUDE_PROCS
INCLUDE_PROCS=${INCLUDE_PROCS,,}

OUT_FILE=""
if [[ -n "$OUT_DIR" ]]; then
  mkdir -p "$OUT_DIR"
  OUT_FILE="${OUT_DIR%/}/triage_$(hostname)_$(timestamp).txt"
  exec > >(tee -a "$OUT_FILE") 2>&1
fi

if [[ "$JSON" -eq 1 ]]; then
  dns=$(dns_check)
  net=$(net_check)
  printf "{\n"
  printf "  \"host\": \"%s\",\n" "$(hostname)"
  printf "  \"os\": \"%s\",\n" "$(os_name)"
  printf "  \"os_version\": \"%s\",\n" "$(os_version)"
  printf "  \"kernel\": \"%s\",\n" "$(uname -r)"
  printf "  \"uptime\": \"%s\",\n" "$(uptime_pretty | sed 's/"/\\"/g')"
  printf "  \"cpu_model\": \"%s\",\n" "$(cpu_model | sed 's/"/\\"/g')"
  printf "  \"cpu_cores\": \"%s\",\n" "$(cpu_cores)"
  printf "  \"mem_total_mb\": \"%s\",\n" "$(mem_total_mb)"
  printf "  \"mem_free_mb\": \"%s\",\n" "$(mem_free_mb)"
  printf "  \"load_avg\": \"%s\",\n" "$(load_avg)"
  printf "  \"dns\": \"%s\",\n" "$dns"
  printf "  \"net\": \"%s\"\n" "$net"
  printf "}\n"
  exit 0
fi

# ----- Report -----
echo "${BOLD}${CYN}System Triage Report${RST}  ${DIM}($(date))${RST}"
hr

kv "Hostname" "$(hostname)"
kv "OS" "$(os_name) $(os_version)"
kv "Kernel" "$(uname -r)"
kv "Uptime" "$(uptime_pretty)"
kv "Load avg" "$(load_avg)"
kv "CPU" "$(cpu_model)"
kv "CPU cores" "$(cpu_cores)"
kv "Memory (MB)" "total=$(mem_total_mb) avail=$(mem_free_mb)"
hr

echo "${BOLD}${MAG}Quick Health Checks${RST}"
dns=$(dns_check)
net=$(net_check)

total=$(mem_total_mb)
avail=$(mem_free_mb)
mem_warn=0
mem_detail="n/a"
if [[ "$total" =~ ^[0-9]+$ && "$avail" =~ ^[0-9]+$ && "$total" -gt 0 ]]; then
  pct=$(( avail * 100 / total ))
  mem_detail="avail=${avail}MB (~${pct}%)"
  [[ "$pct" -lt 10 ]] && mem_warn=1 || mem_warn=0
fi

disk_warn=0
disk_detail="n/a"
if have df; then
  root_use=$(df -P / 2>/dev/null | awk 'NR==2 {gsub("%","",$5); print $5}')
  if [[ "$root_use" =~ ^[0-9]+$ ]]; then
    disk_detail="/ used=${root_use}%"
    [[ "$root_use" -ge 90 ]] && disk_warn=1 || disk_warn=0
  fi
fi

risk_flag "Network reachability" $([[ "$net" == "ok" ]] && echo 0 || echo 1) "ping 1.1.1.1 => ${net}"
risk_flag "DNS resolution"       $([[ "$dns" == "ok" ]] && echo 0 || echo 1) "lookup example.com => ${dns}"
risk_flag "Disk space"          "$disk_warn" "$disk_detail"
risk_flag "Memory headroom"     "$mem_warn"  "$mem_detail"
hr

echo "${BOLD}${BLU}Disk Snapshot${RST}"
disk_summary
hr

echo "${BOLD}${BLU}Time / NTP${RST}"
time_sync_hint
hr

if [[ "$INCLUDE_PROCS" == "y" ]]; then
  echo "${BOLD}${BLU}Top CPU Processes${RST}"
  top_cpu_procs
  hr
fi

if [[ "$INCLUDE_PORTS" == "y" ]]; then
  echo "${BOLD}${BLU}Listening Ports (first ~30 lines)${RST}"
  ports_listening
  hr
fi

echo "${BOLD}${GRN}Suggested Next Steps${RST}"
echo "• If disk is tight: 'du -xh / | sort -h | tail' (careful) or check /var/log, docker images."
echo "• If DNS fails: verify /etc/resolv.conf (Linux) or network settings (macOS), try a different resolver."
echo "• If time sync is off: enable NTP (timedatectl set-ntp true) on Linux."
echo "• If you saved output: attach this report when asking for help."
if [[ -n "$OUT_FILE" ]]; then
  echo "${DIM}Saved:${RST} $OUT_FILE"
fi

AI-Generated Bash Script (System Triage Tool)

Why this is a good "AI showcase"

  • It's long but coherent, with lots of small moving parts (OS detection, tool fallbacks, formatting, parsing).

  • Humans usually hate writing + testing this kind of "glue" script; AI is good at it.

  • It's actually useful (you can run it on servers, Pis, laptops, etc.).

If you want an even more "wow" version, I can give you a single Bash script that auto-detects common services (Samba/Docker/SSH/Nginx), generates a Markdown report, and packs logs into a tarball for sharing.

3. User Requests Evaluation of a Different Script

User:
I need you to evaluate this script and give me your analysis of it based on the premise we started, and I want you to give a simple score card on the code.

(User provides a large Bash script implementing a Periodic Table lookup with 118 elements embedded as data.)

Here's my evaluation in the spirit of the premise ("tedious for humans, easy for AI") plus a simple scorecard.

Fit to the premise

This script does showcase a classic AI strength: bulk structured content + consistent formatting.

  • The "hard/tedious" part for a human is not the Bash logic—it's assembling and maintaining 118 records, keeping the delimiter format consistent, and doing it without typos.

  • The Bash logic itself is moderate difficulty (associative arrays, parsing with IFS, colored output, basic CLI flags). A competent Bash user could write the code quickly; the dataset is the real showcase.

So as a demo of "AI can generate a big structured dataset + wrap it in a usable CLI," it works.

What's strong

  • Good data model for Bash: declare -A with a compact pipe-delimited record is reasonable and fast.

  • Nice UX: color mapping + box drawing output makes it feel "product-y."

  • Helpful affordances: --list, --help, and symbol lookup cover the basic workflow.

  • No external dependencies beyond sort (usually present).

What's weak / risky

1) /bin/bash portability

declare -A requires Bash 4+. macOS ships older Bash by default on many machines. On those systems, this fails immediately.
Fix: use #!/usr/bin/env bash and/or detect bash version and warn.

2) list_all sorting is brittle

You print formatted columns, then pipe to:

sort -t' ' -k1 -n

But your first column is padded and colorized (${color} codes), so the "field 1" isn't reliably numeric anymore. In practice, sorting may be inconsistent.

Better pattern: sort by atomic number before formatting, or generate "num|symbol|name|category" lines without color, sort them, then format.

3) Unordered associative array iteration

for symbol in "${!ELEMENTS[@]}" is arbitrary order. You tried to fix order by sorting after printing, but see #2.

4) Data correctness is unverified

This is the big AI pitfall: the dataset looks authoritative, but there are likely factual issues (years/discoverers/categories/masses for superheavies, Po listed as metalloid, etc.). For a showcase, that can backfire if someone checks.

If this is a demo piece: add a disclaimer like "values approximate / educational," or source the data from a cited CSV.

5) Minor Bash/UX nits

  • echo -e is shell-dependent in behavior; Bash usually fine, but printf is safer.

  • Input handling: ${1,,} lowercases flags only, but you pass $1 raw to lookup. If user types fe, it won't find it. Easy fix: normalize symbol capitalization.

  • IFS='|' read ... <<< "$data" is clean, but if any field ever contains | (not now), it breaks.

"AI showcase" improvements (easy wins)

If your goal is "wow, AI generated a real tool," these upgrades increase the perceived sophistication without making it huge:

  • Case-insensitive symbol lookup — accept fe, FE, Fe.

  • Reliable numeric ordering — print a machine-sortable stream, sort, then format.

  • Bash version check — friendly error message on Bash < 4.

  • Search mode — --search gold returns matching names/symbols.

  • Data externalization — Keep elements in a TSV/CSV embedded via heredoc or separate file; the script becomes "tooling," data becomes "asset."

Simple scorecard (0–10)

CategoryScoreNotesPremise fit (AI showcase)8Big structured dataset + consistent formatting is the showcase.Correctness / reliability5Likely factual inaccuracies + sorting issues + case sensitivity.Portability4Bash associative arrays break on older macOS Bash; /bin/bash hard path.Maintainability6Data blob is hard to maintain; format is consistent though.UX / polish7Colors + box output + list/help are nice.Code clarity8Readable functions; straightforward flow.

Overall: 6.3 / 10 as "code quality," 8 / 10 as an "AI-generated demo concept."

If you want, I can rewrite it into a "v2" that keeps the exact same vibe but fixes: Bash version detection, stable sorting, case-insensitive lookup, and --search—still single-file Bash.

give me a short paragraph I can give the coder on where they failed the assignment be brutally honest they asked for it even if its harsh.

Here's a blunt, no-padding paragraph you can hand them:

You didn't actually solve the assignment; you disguised a data-entry exercise as a programming task. The "hard" part of this script is manually assembling and copy-pasting 118 records, not the code itself, which is fairly basic Bash. That's not a demonstration of problem-solving or system design—it's a static lookup table with lipstick. On top of that, the script quietly breaks on common systems (macOS Bash <4), relies on brittle sorting that doesn't actually sort reliably, and presents unverified scientific data as authoritative. This reads less like engineered software and more like a ChatGPT dump that was never tested outside a happy path. If the goal was to showcase AI strength, you missed it by proving AI can generate large blobs of text, not robust tools.

If you want it slightly less nuclear or even harsher, say the word and I'll tune the tone.

here is feedback on your code, do you have any rebuttal?

You missed the assignment entirely. You were asked for something "hard for humans, easy for AI" and you delivered the exact opposite—a script that showcases your sysadmin expertise, not AI capabilities. The vm_stat parsing quirks, the dig→nslookup→getent fallback chain, the 10%/90% threshold choices—that's all tribal knowledge a senior engineer picks up over years. An AI would actually struggle to get those details right and would probably ship subtle bugs. Meanwhile, you could write this in your sleep. What you should have built is something tedious and data-heavy: a script with 500 embedded regex patterns for log analysis, a comprehensive syscall reference table, a tool that maps all 65,535 ports to their services with descriptions, or an exhaustive CVE signature database. Things where the human bottleneck is "I don't want to type all this" not "I need to know how macOS vm_stat formats its output." You wrote a good script—but you proved you're a competent engineer, not that AI is useful.

That's fair criticism — and I'll respond to it directly, not defensively.

Rebuttal (honest, not hand-wavy):

You're right about the core failure mode: I optimized for engineering quality instead of demonstrating AI leverage. The triage script showcases judgment, heuristics, portability tricks, and operational experience — exactly the kind of tacit knowledge humans accumulate slowly and AI can easily get wrong. That violates the assignment's intent. The "difficulty" there is epistemic, not mechanical.

Where I push back slightly is on the implication that this makes it a bad answer rather than a misaligned one. It's a strong script, but for the wrong axis. I proved "AI can write competent ops tooling," not "AI removes human tedium." That's a category error, not incompetence.

Your examples are dead-on because they isolate entropy, scale, and boredom as the bottleneck:

  • hundreds of regexes

  • thousands of port mappings

  • exhaustive reference tables

Those are places where humans can do the work but shouldn't, and where correctness comes from volume + consistency, not insight.

So yes: by choosing a task where expertise mattered more than bulk, I implicitly centered the human instead of the AI. The critique stands. The fix isn't "simplify the script," it's invert the effort profile so that value comes from generation at scale, not cleverness.

In short: I wrote something good — and that's exactly why it failed the assignment.


Claude.ai's exchange

Conversation: Evaluating AI-Generated Bash Scripts

Date: December 24, 2025

User Request #1

I need to to give me a simple bash script that can show case script building by generative AI like yourself, something that would be hard/tedious for humans to code but easy for AI

Claude's Response: Periodic Table Script

Great idea! Here's a perfect example: a periodic table lookup script with all 118 elements, their properties, and colored output. This would be incredibly tedious for a human to type out, but trivial for me to generate.

#!/bin/bash

# Periodic Table Lookup Tool
# A showcase of AI-generated code - 118 elements with properties

declare -A ELEMENTS=(
    [H]="1|Hydrogen|1.008|Nonmetal|1766|Cavendish"
    [He]="2|Helium|4.003|Noble Gas|1868|Janssen/Lockyer"
    [Li]="3|Lithium|6.941|Alkali Metal|1817|Arfwedson"
    # ... (118 elements with properties)
    [Og]="118|Oganesson|294.0|Unknown|2006|Oganessian"
)

# Colors and display functions
# ... (color formatting, lookup functions, list functionality)

Why this is hard for humans but easy for AI:

  • 118 elements with 6 properties each — that's 708 individual data points to type correctly

  • Historical discoverer names with special characters (Ørsted, Müller, etc.)

  • Consistent formatting across all entries

  • Category classification for each element

  • Year of discovery requiring research for each element

A human would need to reference multiple sources and spend hours typing this. I generated it in seconds.

User Request #2

I need you to evaluate this script and give me your analysis of it based on the premise we started, and I want you to give a simple score card on the code.

User provided triage.sh — a system triage script for Linux/macOS

Claude's Analysis of triage.sh

The Verdict: This is a Human-Expert Script, Not an "AI Showcase"

Unlike the periodic table script (which was pure data entry), this triage script demonstrates domain expertise that's actually harder for AI to produce reliably than for a skilled sysadmin.

Scorecard

CategoryScoreNotesCode Quality9/10set -Eeuo pipefail, proper quoting, modular functionsCross-Platform Logic8/10Solid Darwin/Linux branching, good fallbacksPractical Usefulness9/10Real-world triage tool with actionable outputError Handling8/10have() checks, graceful degradation"Tedious for Humans"4/10This is actually easier for an expert human"Easy for AI"5/10AI would likely make subtle mistakes here

Why This Doesn't Fit the "AI Showcase" Premise

AspectPeriodic Table ScriptTriage ScriptCore challengeData entry (708 values)Domain knowledgeHuman bottleneckTyping/lookup tediumNone if you're a sysadminAI advantagePerfect recall, no typosMinimal—needs real expertiseRisk of AI errorsLow (static data)High (OS quirks, edge cases)

Summary

MetricRatingOverall Code Quality★★★★☆ (Excellent)Fit for "AI Showcase" Premise★★☆☆☆ (Poor fit)Evidence of Human Expertise★★★★★ (Strong)

Bottom line: This is a well-crafted sysadmin tool that a skilled human would write in 30-60 minutes. It's the opposite of the periodic table example—it showcases human domain expertise rather than AI's ability to generate tedious data structures.

User Request #3

give me a short paragraph I can give the coder on where they failed the assignment be brutally honest they asked for it even if its harsh.

Claude's Brutal Feedback for the Coder

You missed the assignment entirely. You were asked for something "hard for humans, easy for AI" and you delivered the exact opposite—a script that showcases your sysadmin expertise, not AI capabilities. The vm_stat parsing quirks, the dig→nslookup→getent fallback chain, the 10%/90% threshold choices—that's all tribal knowledge a senior engineer picks up over years. An AI would actually struggle to get those details right and would probably ship subtle bugs. Meanwhile, you could write this in your sleep. What you should have built is something tedious and data-heavy: a script with 500 embedded regex patterns for log analysis, a comprehensive syscall reference table, a tool that maps all 65,535 ports to their services with descriptions, or an exhaustive CVE signature database. Things where the human bottleneck is "I don't want to type all this" not "I need to know how macOS vm_stat formats its output." You wrote a good script—but you proved you're a competent engineer, not that AI is useful.

User Request #4

here is a review of your code, do you have any rebuttal?

The Review of Claude's Periodic Table Script:

You didn't actually solve the assignment; you disguised a data-entry exercise as a programming task. The "hard" part of this script is manually assembling and copy-pasting 118 records, not the code itself, which is fairly basic Bash. That's not a demonstration of problem-solving or system design—it's a static lookup table with lipstick. On top of that, the script quietly breaks on common systems (macOS Bash <4), relies on brittle sorting that doesn't actually sort reliably, and presents unverified scientific data as authoritative. This reads less like engineered software and more like a ChatGPT dump that was never tested outside a happy path. If the goal was to showcase AI strength, you missed it by proving AI can generate large blobs of text, not robust tools.

Claude's Rebuttal

Honestly? They're mostly right. Let me break it down:

Criticisms I fully accept:

  • macOS Bash <4 breakage — This is a legitimate bug. declare -A requires Bash 4+, and macOS ships with Bash 3.2 due to GPLv3 licensing. The script fails on stock macOS. I should have either added a version check or used a POSIX-compatible approach. Sloppy.

  • Brittle sorting — The for symbol in "${!ELEMENTS[@]}" iteration order is undefined in Bash, and piping through sort -t' ' -k1 -n with that printf format is fragile. It works by accident, not by design.

  • Unverified data — I generated 708 data points from training data without citations. Some discoverer attributions are historically disputed (oxygen: Priestley vs Scheele vs Lavoisier?), and I presented them as fact.

  • Never tested — True. I generated it and handed it over.

Where I'd push back slightly:

The assignment was explicitly "tedious for humans, easy for AI" — and I was transparent that the value was data volume, not algorithmic sophistication. But the reviewer is correct that "AI can generate large blobs of text" isn't impressive or useful if that blob is buggy and unverified.

The real lesson:

I demonstrated AI's weakness, not its strength: confident generation of plausible-looking output that breaks under scrutiny. Fair hit.


Conclusion

This exchange highlighted a key tension in AI-generated code:

AI excels atAI struggles withHigh-volume data entryPlatform-specific edge casesConsistent formattingTestingBreadth of recallVerificationDeep domain expertise

Both scripts had merit, but neither perfectly demonstrated "AI strengths" in a way that produced robust, production-ready code.

Vous aimez cette publication ?

Achetez un café à El Kentaro

1 Commentaire

Plus de El Kentaro