Live data from Hacker News

AI made coding more enjoyable

weberdominik.com

41–50 of 103 posts

Re: AI made coding more enjoyable

#41

I feel the same way. > That includes code outside of the happy path, like error handling and input validation. But also other typing exercises like processing an entity with 10 different types, where each type must be handled separately. Or propagating one property through the system on 5 different types in multiple layers. With AI, I feel I'm less caught up in the minutia of programming and have more cognitive space…

Are you not concerned that this world is deeply tied to you having an internet connection to one of a couple companies' servers? They can jack up the price, cut you off, etc.

Seeing how things are moving, I'm expecting for compute requirements to go down over a longer time horizon, as most technologies do.

I'd rather spend my time preparing for this new world now.

Re: AI made coding more enjoyable

#42
post #23

AI led to me writing code outside of work for the first time in years. I completed a small project that would've taken me months in a couple weeks. I'm excited to work on more things that I've been curious about for a long time but didn't have the time/energy to focus on.

AI also led me to experiment a bit more. In my case it helped remove the barrier to getting that initial bare-bones skeleton of code in a new environment by helping setting up libraries and a compile chain I was unfamiliar with and then giving me a baseline to build off of. Did you find that AI helped you evenly all the way through the experience or was it more helpful earlier or later on?

Re: AI made coding more enjoyable

#43

Earlier quoted context omitted.

I think you just have to give up ownership of the _code_ and focus on ownership of the _product_.

Do you think the product is not the code?

From a user perspective, yes. The product is what it does, not how it does it.

Re: AI made coding more enjoyable

#44
post #18

At what point do LLMs enable bad engineering practices, if instead of working to abstract or encapsulate toilsome programming tasks we point an expensive slot machine at them and generate a bunch of verbose code and carry on? I'm not sure where the tradeoff leads if there's no longer a pain signal for things that need to be re-thought or re-architected. And when anyone does create a new framework or abstraction, it d…

How much of "good engineering practices" exist because we're trying to make it easy for humans to work with the code?

Pick your favorite GoF design pattern. Is that they best way to do it for the computer or the best way to do it for the developer?

I'm just making this up now, maybe it's not the greatest example; but, let's consider the "visitor" pattern.

There's some framework that does a big loop and calls the visit() function on an object. If you want to add a new type, you inherit from that interface, put visit() on your function and all is well. From a "good" engineering practice, this makes sense to a developer, you don't have to touch much code and your stuff lives in it's own little area. That all feels right to us as developers because we don't have a big context window.

But what if your code was all generated code, and if you want to add a new type to do something that would have been done in visit(). You tell the LLM "add this new functionality to the loop for this type of object". Maybe it does a case statement and puts the stuff right in the loop. That "feels" bad if there's a human in the loop, but does it matter to the computer?

Yes, we're early LLMs aren't deterministic, and verification may be hard now. But that may change.

In the context of a higher-level language, y=x/3 and y=x/4 look the same, but I bet the generated assembly does a shift on the latter and a multiply-by-a-constant on the former. While the "developer interface", the source code, looks similar (like writing to a visitor pattern), the generated assembly will look different. Do we care?

Re: AI made coding more enjoyable

#45
post #10

I used to share this sentiment but the more I used AI for programming, the less I enjoyed it. Even writing "boring" code (like tests or summaries) by hand increased my understanding of what I wrote and how it integrates into the rest of the codebase, which I think is fun. Letting a robot write code for me, however tedious it would be to write manually, made me feel like I was working in someone else's codebase. It re…

I think you just have to give up ownership of the _code_ and focus on ownership of the _product_.

I don't care about the product as much as I care about the code.

Re: AI made coding more enjoyable

#46

Earlier quoted context omitted.

I think you just have to give up ownership of the _code_ and focus on ownership of the _product_.

Do you think the product is not the code?

It isn't, no one is buying code on it's own - but it's a component of the product. I dislike the phrasing above since it assumes the two are distinct things.

Re: AI made coding more enjoyable

#47
post #18

At what point do LLMs enable bad engineering practices, if instead of working to abstract or encapsulate toilsome programming tasks we point an expensive slot machine at them and generate a bunch of verbose code and carry on? I'm not sure where the tradeoff leads if there's no longer a pain signal for things that need to be re-thought or re-architected. And when anyone does create a new framework or abstraction, it d…

How much of "good engineering practices" exist because we're trying to make it easy for humans to work with the code? Pick your favorite GoF design pattern. Is that they best way to do it for the computer or the best way to do it for the developer? I'm just making this up now, maybe it's not the greatest example; but, let's consider the "visitor" pattern. There's some framework that does a big loop and calls the visi…

LLMs have limited working memory, like humans, and most of the practices that increase human programming effectiveness increase LLM effectiveness too. In fact more so, because LLMs are goldfish that retain no mental model between runs, so the docs had better be good, abstractions tight, and coding practices consistent such that code makes sense locally and globally.

Re: AI made coding more enjoyable

#48
post #32
post #11

Not to be that curmudgeon (who am I kidding), but it's made reviewing code very much less enjoyable, and I review more changes than I write. Engineers merrily sending fixes they barely understand (or, worse, don't think they need to understand) for the rest of us to handle, and somehow lines-of-code has become a positive metric again. How convenient!

It has always been my opinion (and born out by our statistics internally, when counting self-review in the form of manual testing and automated test writing) that reviewing code (to the level of catching defects) often takes more time than actually building the solution. So I have a pretty big concern that the majority of AI code generation ends up adding time to tasks than it saves because it's optimizing the cheap…

as much as you or i may be against it, inevitably AI coding will move away from human review and toward more automated means measuring program correctness

this was already happening even before AI - human review is limited, linting is limited, type checking is limited, automated testing is limited

if all of these things were perfect at catching errors then we would not need tracing and observability of production systems - but they are imperfect and you need that entire spectrum of things from testing to observability to really maintain a system

so if you said - hey I'm going to remove this biased, error prone, imperfect quality control step and just replace it with better monitoring... not that unreasonable!

Re: AI made coding more enjoyable

#49
post #7

I feel the same way. > That includes code outside of the happy path, like error handling and input validation. But also other typing exercises like processing an entity with 10 different types, where each type must be handled separately. Or propagating one property through the system on 5 different types in multiple layers. With AI, I feel I'm less caught up in the minutia of programming and have more cognitive space…

Not going to last long though, at least not professionally. AI will do the spec and architecture too. The LLM will do the entire pipeline between customer or market research to deployment. This is already possible with bug fixes pretty much. And many features too depending on the business.

I don't know. LLMs are great at writing code; but you have to have the right ideas to get decent output.

I spend tons of time handholding LLMs--they're not a replacement for thinking. If you give them a closed-loop problem where it's easy to experiment and check for correctness, then sure. But many problems are open-loop where there's no clear benchmark.

LLMs are powerful if you have the right ideas. Input = output. Otherwise you get slop that breaks often and barely gets the job done, full of hallucinations and incorrect reasoning. Because they can't think for you.

Re: AI made coding more enjoyable

#50
post #32
post #11

Not to be that curmudgeon (who am I kidding), but it's made reviewing code very much less enjoyable, and I review more changes than I write. Engineers merrily sending fixes they barely understand (or, worse, don't think they need to understand) for the rest of us to handle, and somehow lines-of-code has become a positive metric again. How convenient!

It has always been my opinion (and born out by our statistics internally, when counting self-review in the form of manual testing and automated test writing) that reviewing code (to the level of catching defects) often takes more time than actually building the solution. So I have a pretty big concern that the majority of AI code generation ends up adding time to tasks than it saves because it's optimizing the cheap…

[deleted]
Post reply on HN