Hacker Newsnew | past | comments | ask | show | jobs | submit | thefz's commentslogin

Can't really understand if this is the boutade of a 13 years old COD player, but: lots of countries don't have military supremacy nor enslavement and pillaging on their shores. There are LOTS of shades in between which you obviously don't get.

Can you name some countries that don't have military supremacy, e.g. through alliances?

Many non-EU eastern Europe countries; middle African countries; south American countries

> Why do you think AI is producing low quality code?

I asked for a very, very simple bash script to test code generation abilities once. The AI got it spectacularly wrong. So wrong that it was ridiculous. Here's my reason why I think it does produce low quality code; because it does.


I feel like sooner or later the standard for these types of discussions should become:

> "Here's a link to the commits in my GitHub repo, here's the exact prompts and models that were used that generated bad output. This exact example proves my point beyond a doubt."

I've used Claude Sonnet 4 and Google Gemini 2.5 Pro to pretty good results otherwise, with RooCode - telling it what to look for in a codebase, to come up with an implementation plan, chatting with it about the details until it fills out a proper plan (sometimes it catches edge cases that I haven't thought of), around 100-200k tokens in usually it can knock out a decent implementation for whatever I have in mind, throw in another 100-200k tokens and it has made the tests pass and also written new ones as needed.

Another 200k-400k for reading the codebase more in depth and doing refactoring (e.g. when writing Go it has a habit of doing a lot of stuff inline instead of looking at the utils package I have, less of an issue with Spring Boot Java apps for example cause there the service pattern is pretty common in the code it's been trained on I'd reckon) although adding something like AI.md or a gradually updated CODEBASE.md or indexing the whole codebase with an embedding model and storing it in Qdrant or something can help to save tokens there somewhat.

Sometimes a particular model does keep messing up, switching over to another and explaining what the first one was doing wrong can help get rid of that spiraling, other times I just have to write all the code myself anyways because I have something different in mind, sometimes stopping it in the middle of editing a file and providing additional instructions. On average, still faster than doing everything manually and sometimes overlooks obvious things, but other times finds edge cases or knows syntax I might not.

Obviously I use a far simpler workflow for one off data transformations or knocking out Bash scripts etc. Probably could save a bunch of tokens if not for RooCode system prompt, that thing was pretty long last I checked. Especially good as a second set of eyes without human pleasantries and quick turnaround (before actual human code review, when working in a team), not really nice for my wallet but oh well.


That's a lot of words to defend the undefendable

> Here's my reason why I think it does produce low quality code; because it does.

I’d say that the original claim is so context dependent that it bothers on being outright wrong.

That’s like saying that Java sucks because I’ve seen a few bad projects in Java.


How long ago? What model? How did you prompt it?

Well, finance and banking can do even worse and be bailed out with public money.

> Ironically when Apple introduced their solution it was actually better than what we have now. It was interesting to watch people lose their minds because they didn't understand how the current or proposed system worked.

What, the cloud scanning of user photos was a good idea for you? The private companyt deciding what is good or bad idea? The automated surveillance that could lead to people wrongfully accused idea?

> f it didn't get flagged then it stayed encrypted on the cloud and no one could look at it.

If Apple can decrypt your data when they find a match, they can decrypt ALL your data. Who says it will be used for good? Do you trust a private company this much?


> What, the cloud scanning of user photos was a good idea for you?

That is what is happening before Apples suggestion and is still happening.

> The automated surveillance that could lead to people wrongfully accused idea?

A hash scan is perfectly fine. It can tell you nothing about what is in your file except that if it matches another file that they know is CP.

Even then a flagged item has to be reviewed by law enforcement in case of a mistake and a single file is normally not enough to convict.

The chance is very slim of a mismatch. Facebook for example report a 1 in 50 billion chance of a mismatch.

To put that in context. The chance of a miss is 1 photo every 10 years across all users of facebook (approx 3 billion active users).

> If Apple can decrypt your data when they find a match, they can decrypt ALL your data.

Again. This is what is happening now for ALL service providers.

Apples suggestion was that if a file wasn't flagged it could only be decrypted by the owners device and nothing else. Not even Apple.


Are you OK with private companies basically playing the police with your data?

Let me give you a better answer to your question.

Yes I am OK with how CSAM works.

1. It is not owned by a private company.

2. Hash checking requires a 1:1 match to be flagged.

3. Any match is reviewed by law enforcement to confirm it matches what is recorded in the CSAM. This is checking your file against a descriptive record of what the file is.

4. The chance of a mismatch is so remote that its not even an issue for me. Even if you do get a mismatch it is a human that reviews it.

5. To submit a file to CSAM requires a lengthy detailed process where multiple humans review and approve before creating the Hash.

6. Every hash has a chain of custody. So if in the unlikely chance of something else being put into CSAM, you can see all the people that interacted with the system to put that hash in.

7. Service providers can be sued for content they submitted, so they have a prerogative to ensure what goes in is valid.

This process has been in place for 15 years or so.


Now reverse sexes and imagine if such an app would be allowed to exist in the first place

I never understood the appeal of "social" trail discovery when everyone can open up a map of the area and plan their own route.

Until you will not have access to it and be outperformed by people used to thinking every day.

> US tax system is the most progressive in the OECD [1]

Except that being paid in shares is not really calculated as a pay and top levels borrow money from banks with shares as a collateral so basically they pay zero taxes on their income. Even kids know that.


I guess kids don't know how to read or the Internet then.

Simply google "do ceos pay taxes on shares" and you'll see plenty of places making it clear they do. Part of my income at several places has been in shares, and they're always taxed.

Borrowing against assets isn't taxed for anyone, as it's not income, whether it's a common homeowner getting a mortgage, a person spending on a credit card, or any other loan.

Zero of this affects the facts I linked. And your claims are demonstrably wrong.

Even kids know that.


> Bash might not be difficult, but it is very annoying

Just shellcheck the hell out of it until it passes all tests.


I wanted to test Gemini's code generation so I asked it for a bash script iterating through an array of directory names and executing a command for each one.

It got it wrong. The command was generated outside of the for, and never updated inside the loop effectively making it useless.

Luckily I know bash so I spotted it immediately. But I wonder how it's "removing programming language barriers" when one that does not know its output language can not spot even such a glaring issue.


That’s a bash problem, not LLM.

I’ve done similar tools with Go and haven’t had any issues.

One goes through a tree of dirs, finds zip files with images, unzips, benchmarks which image format is the most compact and creates a new zip with that.

Got it right the first go (hehe pun)


I think this is more of a criticism of bash than of Gemini.

Also, I out-of-hand reject any criticism of an AI that specifies only the brand ("ChatGPT") and not the specific model version, settings, etc...

So, for example, Gemini 2.5 Pro (Jan 2025) with temperature 0.15 prompted with: "Write a short, idiomatic bash script that takes a file containing a list of directory names, changes to each one, runs a command, and then returns to the original working directory."

Spits out this:

    #!/bin/bash

    # A script to run a command in a list of directories.

    # Exit if the wrong number of arguments are provided.
    if [[ $# -lt 2 ]]; then
      echo "Usage: $0 <file_with_dirs> <command> [args...]" >&2
      exit 1
    fi

    DIR_FILE="$1"
    shift # The rest of the arguments ("$@") are now the command.

    # Ensure the directory list file exists and is readable.
    if [[ ! -r "$DIR_FILE" ]]; then
      echo "Error: Cannot read file '$DIR_FILE'" >&2
      exit 1
    fi

    # Read the file line by line.
    while IFS= read -r dir; do
      # Skip empty lines or non-existent directories.
      if [[ -n "$dir" && -d "$dir" ]]; then
        echo "==> Entering '$dir'..."
        # Run command in a subshell to keep the 'cd' local.
        # '&&' ensures the command only runs if 'cd' succeeds.
        (cd "$dir" && "$@")
        echo "<== Finished with '$dir'."
      else
        echo "--> Skipping invalid directory: '$dir'" >&2
      fi
    done < "$DIR_FILE"

    echo "All done."
That worked for me, but I was testing it in WSL 2 where I got a gibberish error... which was because I edited the file in Windows Notepad and the line endings were confusing bash. Gemini helpfully told me how to fix that too!

Something that I found amusing, and again, is a criticism of bash instead of the AI, is that this fails to process the last line if it isn't terminated with a \n character.

PS: This is almost a one-liner in PowerShell, and works with or without the final terminator character:

    Push-Location
    Get-Content dirs.txt | cd -PassThru | Foreach-Object { echo "Hello from: $pwd" }
    Pop-Location
Gemini also helped me code-golf this down to:

    pushd;gc dirs.txt|%{cd $_;"Hello from: $pwd"};popd

> I think this is more of a criticism of bash than of Gemini.

I can write correct bash; Gemini in this instance could not.

> Also, I out-of-hand reject any criticism of an AI that specifies only the brand ("ChatGPT") and not the specific model version

Honestly I don't care, I opened the browser and typed my query just like anyone would.

> PS: This is almost a one-liner in PowerShell, and

Wonder how this is related to "I asked Gemini to generate a script and it was severely bugged"


> typed my query just like anyone would.

Yes, well... are you "anyone", or an IT professional? Are you using the computer like my mother, or like someone that knows how LLMs work?

This is a very substantial difference. There's just no way "anyone" is going to get useful code out of LLMs as they are now, in most circumstances.

However, I've seen IT professionals (not necessarily developers!) get a lot of utility out of them, but only after switching to specific models in "API playgrounds" or some similarly controlled environment.


> Yes, well... are you "anyone", or an IT professional? Are you using the computer like my mother, or like someone that knows how LLMs work?

I have more than 15 years of programming experience. I do not trust the output of LLMs a single bit. This just proved my point. I honestly don't care if I used the "wrong" model or the "wrong" query, which was already quite descriptive of what I wanted anyway.

No need to get super defensive, you can keep spending your time playing code golf with Gemini if you want. My experience just corroborates what I already thought; code generation is imprecise and error prone.


> I honestly don't care if I used the "wrong" model or the "wrong" query

If you used the wrong SQL query, would you expect the right answer?

If you used the wrong database, would you expect your app to work well?


Not even remotely comparable

  for dir in $(cat dirs.txt); do ( cd "$dir"; echo "Hello from $(pwd)" ); done

Unbelievable how long and convoluted the other answer is, and that it is presented as proof that the AI provided a good solution.

I asked for a "script". Asking for a one-liner does just that, with no input validation, comments, etc...

Fundamentally, bash is just... verbose.

I.e.: Here's the same task implemented in two scripting languages:

PowerShell is 5 lines of code: https://learn.microsoft.com/en-us/azure/virtual-machines/ena...

Bash is several pages: https://learn.microsoft.com/en-us/azure/virtual-machines/ena...


That's more of a reflection of the environment than the scripting language. On a mostly bare linux (debian netinstall or alpine), you are left with loads of text to parse. But as soon as that script becomes unwieldy, then the next option is write an actual program. Windows can afford to do that, because there's only few version out there. But there are lots of different Linux installations. And even the kernel is not guaranteed to be vanilla. So you're either write a script like this, or you go find programs that can help you out.

Out of curiosity isn't () spawning a subshell?

Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: