Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> I became unable to understand what I was doing, and as I read through the code very little of it made any sense to me, sure the individual lines were readable, functions made some semblance of sense, but there was no logic

Yes, this happens, and it’s similar to when you first start working on a codebase you didn’t write

However, if instead of giving up, you keep going, eventually you do start understanding what the code does

You should also refactor the code regularly, and when you do, you get a better picture of where things are and how they interact with each other






No. It is different, when working with a codebase written by humans there is always sanity. Even when looking at terrible codebases, there is some realm of reason, that once you understand can make navigating the code easy.

I believe you missed the part of my comment saying that I have been coding professionally for 20 years. I have seen horrible codebases, and I'm telling you I'd rather see the switch statement with 2000 cases (real story), many of which were 100s of lines long, with C macros used religiously (same codebase). At a bare minimum, once you get over the humps, with human written code, you will always find some realm of reason. A human thought to do this, they had some realm of logic. I couldn't find that with AI, I just found cargo cult programming + shoving things where they make no sense.


Have you requested code written in the most human-readable fashion, with human-readable commenting,

for you to choose to be minified later?


I respectfully disagree. I have about the same years of experience as you, and now also 1-2 years of AI-assisted coding

If you stay on top of the code you are getting from the AI, you end up molding it and understanding it

The AI can only spit out so much nonsense until the code just doesn’t work. This varies by codebase complexity

Usually when starting from scratch, you can get pretty far with barely even looking at the code, but with bigger repos you’ll have to actively be involved in the process and applying your own logic to what the AI is doing

If the code of what you are building doesn’t make sense, it’s essentially because you let it get there. And at the end of the day, it’s your responsibility as the developer to make it make sense. You are ultimately accountable for the delivery of that code. AI is not magic, it’s just a tool


It sounds like parent commentator is giving it tasks and trying to make it come up with logic. It’s bad at this. Use it as a translator, i knock out the interface or write some logic in pseudocode and then get it to translate it to code, review it, generate tests and bam half an hour or more of coding has been done in a few minutes. all the logic is mine, but i don’t have to remember if that function takes &foo or foo, or the right magic ioreader i need or whatever…

whenever i try to get it to do my work for me, it ends badly.

it can be my syntax gimp tho sure.


this is a good approach that I have admittedly not thought of.

At that point however, is it really saving you that much time over good snippets and quick macros in your editor?

For me writing the code is the easiest part of my job, I can write fast, and I have my vim configured in such a way where it makes writing code even faster.


>is it really saving you that much time over good snippets and quick macros in your editor?

I had someone say that to me ~a month ago. I had mentioned online that one of the things I had the AI tooling do that morning was to convert a bunch of "print" statements to logging statements. He said that was something he'd just have his editor find/replace do. I asked him what sort of find/replace he'd do that based on the content of the log message appropriately selected between "logging.debug", "info", "warning", and "error", because the LLM did a good job of that. It also didn't fall into the issues of "pprint()" turning into "plogging.debug()" and the like.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: