Live data from Hacker News

If AI writes your code, why use Python?

medium.com

471–480 of 1001 posts

Re: If AI writes your code, why use Python?

#473
post #397

Read the first few comments and surprised I didn’t see it, but training data. The voluminous amount of Python in the training data. I could write in brainfuck with ai, but I presume, wouldn’t get the same results than if going with python. My follow up question: with AI now, why care about a lang until you need to?

I had an itch to give Perl another go after a 5 year hiatus. I wanted a super simple way to spawn a proxy I was building in Go, along with writing various integration tests. I used Claude Code to write the bulk of it and found Claude to be remarkable good at Perl. I told Claude to only use what’s built into Perl’s standard library rather than reaching for anything in CPAN. Turns out everything from HTTP clients, TLS…

Many are saying this! https://til.andrew-quinn.me/posts/llms-make-perl-great-again...

Re: If AI writes your code, why use Python?

#474
post #272

Earlier quoted context omitted.

This post wasn't written in English, it was written in AIglish. (For god's sake, please tell me you see it at this point and you don't need to punch the opening into Pangram to see '100% AI' to recognize it by now?) So in a way it's proving its own point. Why painfully write out by hand in English when the LLM will do a better job by porting your English prompt to AIglish and get +235 points and #3 on HN?

> For god's sake, please tell me you see it at this point and you don't need to punch the opening into Pangram to see '100% AI' to recognize it by now? I was not able to detect it's written by LLMs from the opening paragraphs. Can you please share some insights as to what gives it away. I didn't find any blatant stuff like em dashes or "it's not just x it's y".

> Can you please share some insights as to what gives it away.

The article uses too much contrast even if not as obvious as "it's not x, it is y". Also some too punchy or over confident stuff like "that era is over blah blah".

Amusingly, you can feed it to an AI to extract the patterns that gives away that it is AI written.

Re: If AI writes your code, why use Python?

#475

One obvious reason is Python's extreme readability, it has often been described as being as close to executable pseudo-code as one can get. If you're using an LLM to write code I think the rules would be 1. Use a language you know really well so you can read it easily, and add to it as needed. 2. Use a language that has a large training set so the LLM can be most efficient. 3. Use a language that is easy to read. If…

So in short, use Javascript /s

Re: If AI writes your code, why use Python?

#477

One obvious reason is Python's extreme readability, it has often been described as being as close to executable pseudo-code as one can get. If you're using an LLM to write code I think the rules would be 1. Use a language you know really well so you can read it easily, and add to it as needed. 2. Use a language that has a large training set so the LLM can be most efficient. 3. Use a language that is easy to read. If…

I would assume it's important to know what's in that training set too

Because I get reliable generation out of "niche" languages already

Is it code with lots of SQL injections used in a different domain to your own?

It's maybe not good to conflate quantity with quality

Re: If AI writes your code, why use Python?

#479

One obvious reason is Python's extreme readability, it has often been described as being as close to executable pseudo-code as one can get. If you're using an LLM to write code I think the rules would be 1. Use a language you know really well so you can read it easily, and add to it as needed. 2. Use a language that has a large training set so the LLM can be most efficient. 3. Use a language that is easy to read. If…

I never really understood what exactly is so readable about python. I've been developing in Python for 8 years now, and before that I was a C# developer, and I don't find Python to be that more readable.

Sure there's less ceremony, and yes, you can have your project going with just a single file, but other than that...?

Re: If AI writes your code, why use Python?

#480
post #476

How about modern Java? Any experiences?

The reason why Java is such a terrible choice now is not technical, it's the Lawnmower Nazi argument:

https://news.ycombinator.com/item?id=15886728

masklinn on Dec 9, 2017 | parent | context | favorite | on: Larry Ellison allegedly tried to have a professor ...

And remember,

> Do not fall into the trap of anthropomorphising Larry Ellison. You need to think of Larry Ellison the way you think of a lawnmower. You don't anthropomorphize your lawnmower, the lawnmower just mows the lawn, you stick your hand in there and it'll chop it off, the end. You don't think 'oh, the lawnmower hates me' -- lawnmower doesn't give a shit about you, lawnmower can't hate you. Don't anthropomorphize the lawnmower. Don't fall into that trap about Oracle. — Brian Cantrill (https://youtu.be/-zRN7XLCRhc?t=33m1s)

And

> I actually think that it does a dis-service to not go to Nazi allegory because if I don't use Nazi allegory when referring to Oracle there's some critical understanding that I have left on the table […] in fact as I have said before I emphatically believe that if you have to explain the Nazis to someone who had never heard of World War 2 but was an Oracle customer there's a very good chance that you would explain the Nazis in Oracle allegory. — also Brian Cantrill (https://www.youtube.com/watch?v=79fvDDPaIoY&t=24m)

Post reply on HN