←back to thread

421 points briankelly | 1 comments | | HN request time: 0.337s | source
Show context
necovek ◴[] No.43575664[source]
The premise might possibly be true, but as an actually seasoned Python developer, I've taken a look at one file: https://github.com/dx-tooling/platform-problem-monitoring-co...

All of it smells of a (lousy) junior software engineer: from configuring root logger at the top, module level (which relies on module import caching not to be reapplied), over not using a stdlib config file parser and building one themselves, to a raciness in load_json where it's checked for file existence with an if and then carrying on as if the file is certainly there...

In a nutshell, if the rest of it is like this, it simply sucks.

replies(23): >>43575714 #>>43575764 #>>43575953 #>>43576545 #>>43576732 #>>43576977 #>>43577008 #>>43577017 #>>43577193 #>>43577214 #>>43577226 #>>43577314 #>>43577850 #>>43578934 #>>43578952 #>>43578973 #>>43579760 #>>43581498 #>>43582065 #>>43583922 #>>43585046 #>>43585094 #>>43587376 #
nottorp ◴[] No.43576545[source]
Here's a rl example from today:

I asked $random_llm to give me code to recursively scan a directory and give me a list of file names relative to the top directory scanned and their sizes.

It gave me working code. On my test data directory it needed ... 6.8 seconds.

After 5 min of eliminating obvious inefficiencies the new code needed ... 1.4 seconds. And i didn't even read the docs for the used functions yet, just changed what seemed to generate too many filesystem calls for each file.

replies(1): >>43576568 #
bongodongobob ◴[] No.43576568[source]
Nice, sounds like it saved you some time.
replies(1): >>43576603 #
nottorp ◴[] No.43576603[source]
You "AI" enthusiasts always try to find a positive spin :)

What if I had trusted the code? It was working after all.

I'm guessing that if i asked for string manipulation code it would have done something worth posting on accidentally quadratic.

replies(3): >>43577234 #>>43578219 #>>43579068 #
bongodongobob ◴[] No.43578219[source]
Why would you blindly trust any code? Did you tell it to optimize for speed? If not, why are you surprised it didn't?
replies(2): >>43579050 #>>43579184 #
nottorp ◴[] No.43579184[source]
So, most low level functions that enumerate the files in a directory return a structure that contains the file data from each file. Including size. You already have it in memory.

Your brilliant AI calls another low level function to get the file size on the file name. (also did worse stuff but let's not go into details).

Do you call reading the file size from the in memory structure that you already have a speed optimization? I call it common sense.

replies(1): >>43579753 #
miningape ◴[] No.43579753[source]
Yep exactly, LLMs blunder over the most simple nonsense and just leaves a mess in their wake. This isn't a mistake you could make if you actually understood what the library is doing / is returning.

It's so funny how these AI bros make excuse after excuse for glaring issues rather than just accept AI doesn't actually understand what it's doing (not even considering it's faster to just write good quality code on the first try).

replies(2): >>43579991 #>>43584840 #
1. bdhcuidbebe ◴[] No.43584840[source]
> It's so funny how these AI bros make excuse after excuse for glaring issues rather than just accept AI doesn't actually understand what it's doing

Its less funny when you realize how few of these people even have experience reading and writing code.

They just see code on screen, trust the machine and proclaim victory.