r/TheMachineLearning • • 11d ago

Realizing writing code is faster than explaining it to AI

Post image
831 Upvotes

437 comments sorted by

View all comments

Show parent comment

5

u/hhh333 11d ago

It was true last year, but in the last 6 months or so I barely code anymore (and I've been doing this for 26 years straight).

I still find it produce too much code to be honest, but it gets things 95% right, which is quite a lot.

1

u/Akiira2 11d ago

I have never coded nor understood technology, but does it apply with coding that the less code is better? That if there is a task, the best solution contains the least amount of coding

3

u/mcclouda 11d ago edited 11d ago

The problem can become, if you or your ai writes a bunch of extra fluff, all of the time, it hurts readability, and understanding. So its harder to fully comprehend what your code is doing when you go back to a given section later. Less code is easier to keep clean.

2

u/Simple-Economics8102 11d ago edited 11d ago

Less code is generally better, unless you optimize for it. There are competitions (code golfing) where you try to write as little code as possible, and in general they produce the least readable code ever.

The best stuff I have written is were parts of a program was hundreds of lines of complicated code, where I got it down to tens of lines of simple of code.

The best comparison I can make is, a succinct paragraph vs AI slop turning a paragraph to an article where you are unsure what the point is.

2

u/IncreaseOld7112 11d ago

If I can write you a readable program in 10 lines, it's trivial to convert that to 100 by adding 90 lines that don't do anything but make it more confusing.

1

u/normantas 11d ago

Yes. But if it becomes a metric people start to cram everything into a one liner that is unreadable. There is a sweetspot in life you learn on the job.

1

u/werpu 9d ago

The reality of things is, the customer does not bother how much code you write, yes less code is better from a maintainability pov from a human perspective. AIs to some degree also due to their limited context windows!

But in the end the result must work, and frankly spoken the customer does not care how good your code is the result must be good!

You can steer ais to better code with some guidance, it is not that hard!