Hacker News new | ask | show | jobs
by musingsole 1586 days ago
> Is it true that "90% of code is crud"? It is, if you want it to be.

You're being way too generous from a false sense of compassion. Most code is not written from a place of serene comprehension. It's written under the pressure of getting features out the door fast enough to justify a paycheck.

Add in that programming is a task that is rapidly changing over time -- so what's good today, is a naive implementation tomorrow...yeah, practically all code ever produced or ever to be produced will be crap from any reasonable perspective.

1 comments

Kind of my main point, I just choose not to think of it as "crap", but as the best expression of the coder's intent given the all the constraints at the time it was written, including deadline pressure, context, experience. Try it out. Now instead of "wading through crap" you can think of it as "sifting for nuggets of wisdom". Or whatever you like.
Alright, I can accept that. We're mostly describing the same thing, and it's a question of focusing on the silver lining -- golden nuggets -- over the rest of the thing, which could be seen as crap or could be seen as the casing of a gold nugget.

Given that framing, what expectation can there be that an automated platform like CoPilot can acquire the wisdom to recognize gold from dirt? I believe it may be a question of does the overlapping, correlated portions of code from the corpus of repos signal the gold or signal the common dirt encasing the gold?

I largely expect it's the latter, and that the trends copilot is likely to recognize and use as foundations for its suggestions are motivated from dirt. To accept them and to learn from them is to internalize a horse without a cart philosophy.