Live data from Hacker News

How to not use AI to code for you

mandaputtra.id

11–20 of 25 posts

Re: How to not use AI to code for you

#12
post #6

> Its just trivial problem like centering things in CSS Out of all examples you chose the hardest problem in computer science.

I had this same thought immediately and had a good chuckle.

Ironically, my colleagues and I used “but can it center a div?” just today. It has been our running joke to measure usefulness of LLMs as they advance.

Re: How to not use AI to code for you

#13
It seems to mostly be about risk management - knowing how to contain risk? What is the cost of this piece of code failing to do what it is supposed to? Is it easy to replace?

If the answer is low and yes, then speed matters more than perfection and you don't have to always know exactly how it works. We already accept some risk while outsourcing parts of our problems when using dependencies. The risk management puzzle is different but still fundamentally the same?

If you don't know how the thing work in principle though, it's not going to be easy to replace.

Re: How to not use AI to code for you

#14
I have caught my self a few times do this repeated prompting "fix the bugs" out of mere laziness to go down on the code and actually read it. Actually fixing the bugs oneself requires a certain kind of effort and focus that you are not into while "vibe coding", and this increases the less familiar you are with the language/code. If I do this on anything serious, as in anything I will need to maintain or reuse, I end up losing more time than gaining. If it is something I am gonna throw away anyway, I do not care as much. I don't know what the context in this example is.

I would say that the main reason to not do this for any actual code you work on is that you will need to go into the code and fix bugs anyway when the LLM will, at some point inevitably, start consistently failing certain tasks. All the time you (think you had) saved by avoiding actually delving into the code will come back as technical debt then.

Re: How to not use AI to code for you

#15
post #6

> Its just trivial problem like centering things in CSS Out of all examples you chose the hardest problem in computer science.

It was a fateful day in one of the Indian Monsoon in the late 2000s. I rode the ever-reliable tuk-tuk in the city of Mumbai to reach a coveted Indian outsourcing company that has taken on a multi-year, multi-billion-dollar contract. They had inherited a project and discovered that one of the programmers was me, as indicated by comments inside the code, and they had reached out.

Fortunately for me, they are stuck in the specific styling of an enterprise app that has been in operation for a quarter and is now starting to reflect in their P&L account.

After all the security check-ins through the gates, and after being seated and coffee-ed, I walked to a desk and spent as much time just staring at the codes. I pretended to be in some deep trance code-thinking thing. Then, as the clock ticked by, I did the hand-clap thing that Stanley did in Swordfish. I wrote a few lines of code - a utility CSS class to center align a block element, preferably a DIV.

I walked out with people clamoring for my autograph and selfies with their Nokia N95. Later that evening, I sent an invoice that was ten times the monthly salary of the project lead working on that project.

/s

Re: How to not use AI to code for you

#16

This is a bit circlekerky and the english is very broken Bit ironic considering running it through a LLM would've fixed the 2nd part

The article is still understandable, and someone took the time to write in their second (or third?) language. This was probably much more work for them than for us needing to reread some sentences because they mix up the order of some words.

Re: How to not use AI to code for you

#17
My interpretation of this is he feels that AI-assisted programming is okay if you still participate in the programming sometimes, but if you only prompt then you're not really a programmer. Or something.

He does say that you should provide more context rather than just repeating yourself.

There is a distinction as far as having some engineering skills and knowledge to give the AI hints, but it might be more of a symbolic one than people realize. And as AI continues to improve, that will be more so.

But it does bring up a valid point that if we don't do any problem solving or thinking for ourselves, we will be totally helpless.

I think this is something that all students should be taught pro-actively. Actually there should have already been a national standard reinforcing to kids what happens to your brain if you don't use it and how important it is to actually read, write and solve problems sometimes rather than feeding everything into an AI.

On the other hand, the robustness and general capabilities of ML models continues to improve. We have models that can roughly generate a video game frame-by-frame from a text prompt and input image. How long until we get this for application software? Or a diffusion LLM that just outputs a full WASM source/binary or update from a text prompt or series of images in 4 steps and 5 seconds.

I think it could be a really interesting experiment to create a diffusion LLM trained on thousands and thousands of 6502 games and programs, with the full manual (including images) as input and the output being assembly or machine code along with a bit of metadata for RetroArch or something. Or maybe also include recorded gameplay data/visuals.

Re: How to not use AI to code for you

#18

This is a bit circlekerky and the english is very broken Bit ironic considering running it through a LLM would've fixed the 2nd part

The article is still understandable, and someone took the time to write in their second (or third?) language. This was probably much more work for them than for us needing to reread some sentences because they mix up the order of some words.

My first language is french so I'm not convinced

To me it's mind boggling to not proofread a blog post. Posting it on HN is crazy too

I don't mind for online comments and the like but a blog post is crazy

Re: How to not use AI to code for you

#19

I sat next to a young aspiring software engineer, I just met him. And it's annoy me, to look at how he works. Prompting again - again and again till something is fixed, it's not how you do things. I think, if the AI could not answer it in the first place, you should fix it your self ~ or give it more context. I'm sorry, It's just ~ I don't think that's how I want to use AI to code. So I tell him, he needs to level up…

I think that a big issue here is the chat UX implementations in most IDEs. In contrast, in zed, in the text-based chat threads, one can directly edit an LLM's answer, making actually fixing bugs oneself much less complicated in terms of UX. In a classical chat interface, where you cannot edit an LLM's answer, you have to either continue the thread, start a new thread with a different prompt asking it to avoid the issue, or fix the code and provide it as context again. If you do it in a new chat, you lose the context of the previous chat (you need to provided it again). If you continue the chat with the added code, you have dirty context (which makes llms perform worse). Moreover, they most probably require you to get in and out of the chat to do things, which is not ideal UX compared to just prompting again. The fact that I can just change the generated code in the chat itself, run it in the repl, and continue from there is the best UX imo for when such problems occur. I would like if more IDEs actually accepted something similar.

Of course, my workflow is very repl based and I assume different experiences exist for other contexts. Moreover, agent workflows have probably different pros and cons. It is great timewise that they can test code and fix bugs themselves, but essentially that's a bit like automating this prompt-reprompt loop. It saves time compared to that (at the cost of a lot more $$$ in tokens overall), but if the agent fails to solve the issues, yet again we are at square zero. What helps a lot is that work is done inside the codebase at least, which is supposed to be a good thing, but personally I have not understood how to use agents efficiently tbh.

Re: How to not use AI to code for you

#20

Earlier quoted context omitted.

The article is still understandable, and someone took the time to write in their second (or third?) language. This was probably much more work for them than for us needing to reread some sentences because they mix up the order of some words.

My first language is french so I'm not convinced To me it's mind boggling to not proofread a blog post. Posting it on HN is crazy too I don't mind for online comments and the like but a blog post is crazy

I am not doubting your comment, but personally it did not cross my mind that something is wrong with the syntax or grammar before I read your comment. It is informal, brief and not getting that deep, but it was pretty much understandable for me, and it sets up an interesting point to discuss imo. It could have been more polished but it looks readable enough, and I do not think that a post like this should be flagged (not implying you specifically flagged it or not, either, but it is flagged and I assume some of the reasons for it may be this).

Moreover,

> My first language is french

well french is very close to english in many ways, much closer than many other languages, so I find it a bit unfair to judge other ESL authors by the standards of a french native speaker's experience with english.

Post reply on HN