logoalt Hacker News

pydryyesterday at 1:22 PM1 replyview on HN

high quality code means boiling down code to its bare essentials, not spewing boilerplate. that means deleting code where you can and crafting good abstractions while leaving functionality intact.

if you find the ratio between typing and thinking to be very high then you're probably producing a lot of slop.

This is a common theme I find when I hear about people's AI coding success stories. Where they say "its good at X" where X might be "backfilling unit tests" or "writing boilerplate" I usually think "if you find you need to do X a lot youre definitely doing programming wrong.

Ive actually yet to hear an X applied to production code that doesnt make me think that.


Replies

Daishimantoday at 3:50 AM

> Ive actually yet to hear an X applied to production code that doesnt make me think that.

This is one of those things we value in theory in engineering but not in practice. Reducing code as an artifact might mean coming up with clever ways or compressing data, like making code that generalizes and abstracts. This is fine if you're experienced and clever. But a lot of organizations don't have that many clever or experienced engineers and those tools cause more harm in the hands of those people. Hence compromises must be reached and verbosity is valued because it is explicit.

I used to believe otherwise but then I worked in larger orgs with a lot of mediocre people who still provided value but needed to be given the means to add value.