Remix.run Logo
lubujackson 3 hours ago

This misses the best use of AI in my opinion, which is to gain understanding. Whst is this bit of code doing? Is there a risk of data leaking here? Are permissions enforced downstream of this function?

Code review can go much deeper now if you use AI to aggressively attack a PR combined with your human insight. Same for planning a feature:

Can I consolidate this logic to a shared function? Does the error surface to the user and are there any gaps? What preexisting functionality is affected by this PR? Can this query be made more efficient?

LLMs are great with focused questions, up and down abstraction layers and across all kinds of concerns. Stack up these focused concerns into a rich understanding of what you are doing or writing.

Understanding is the real output, code is the byproduct.

frevib 2 hours ago | parent | next [-]

> Whst is this bit of code doing?

This only applies to bad code. A formal programmic language beats an informal language anytime. Why on earth would you translate an unambiguous formal language to English?

> Is there a risk of data leaking here?

> Are permissions enforced downstream of this function?

If you trust AI to give you that answer, you are going to run into serious issues.

raincole 2 hours ago | parent | next [-]

> Why on earth would you translate an unambiguous formal language to English?

Why on earth are all the books about programming, science and math written in English (and other natural languages) instead of a formal one then?

Why on earth did comments even got invented?

dghlsakjg an hour ago | parent | prev [-]

A formal programmic language beats an informal language anytime. Why on earth would you write a comment in an ambiguous informal language when you could translate it to code?

bryanrasmussen 22 minutes ago | parent [-]

programmer looks at formal programmic language which has so beaten the informal language that one cannot tell the reason why this stupid bit of code exists in the silly form it does is to prevent an edge condition in a particular browser while still working fine for other browsers.

Luckily genius programmer who understands formal programmic language and does not need weak comments to clarify why the world is not perfect, fixes the stupid looking code to be beautiful, opening company up to some really super neat, seemingly random bugs in one browser that nobody will understand for several months.

tldr: one important reason comments exist is to clarify why code you might expect to look another way looks the way it does, of course if the only reason it looks the way it does is this is the way the AI wrote it I guess I agree the comment is unnecessary.

ripe 2 hours ago | parent | prev | next [-]

> LLMs are great with focused questions, up and down abstraction layers and across all kinds of concerns. Stack up these focused concerns into a rich understanding of what you are doing or writing.

I agree. This is much better advice than what the article tries to do, which is to give best practices around how to use or not use AI to code.

fkozlowski an hour ago | parent | prev | next [-]

Agreed — I also always append to my agents.md — "If there are any technical choices available, please surface them to me so I can understand them and choose"

jondwillis 38 minutes ago | parent [-]

If your harness has an “AskUserQuestion”-like tool, you can prompt it to use that, or, as I have done, add a stop hook that uses a smaller model to check if there was any similar prose that was output toward the end of the previous response.

Happy to share the implementation or package it up if anyone is interested.

an hour ago | parent | prev | next [-]
[deleted]
plastic-enjoyer 2 hours ago | parent | prev | next [-]

> This misses the best use of AI in my opinion, which is to gain understanding. Whst is this bit of code doing? Is there a risk of data leaking here? Are permissions enforced downstream of this function?

Do I understand when I just let AI regurgitate the function and behavior of the code?

bkircher 3 hours ago | parent | prev | next [-]

Wish I could upvote twice or something

righthand an hour ago | parent | prev | next [-]

Do you need that analysis every time from an LLM? Those are things I’d expect anyone to grow out of pretty quickly once you get used to understanding code. Especially someone with Senior in their title.

wonnage 2 hours ago | parent | prev | next [-]

Doing this may give you understanding but won’t really teach you how to understand. For students (as the article is focusing on them), the latter is equally important.

api 2 hours ago | parent | prev | next [-]

Closely related: one of the biggest AI superpowers I've found is testing. "Please implement a comprehensive unit testing suite for this, making sure to test ..."

You still have to check the work and shouldn't trust it blindly, but in my experience it's pretty damn good.

isjjdndksks 3 hours ago | parent | prev | next [-]

SOMEONE didn't read the article

> You code and you have the AI check your work. Treat it like a reviewer. That’s my advice in a sentence.

Bro you're giving the same advice as the article

andai 2 hours ago | parent | next [-]

>Preferably, don’t give the AI access to the codebase. Copy-paste snippets of your code in the web interface.

Well, I can't ask it for an overview of a system it can't see.

qayxc 2 hours ago | parent [-]

> Preferably, don’t give the AI access to the codebase. [...] If the AI does have access to the codebase, this access is read-only.

also

> I don’t follow all these religiously.

So if you need an overview of a system, you can and should provide access to the entire codebase. Even the rule itself says "preferably", not "don't ever". If you have different needs, you can always just look at it as a useful guideline. It's just a blog post by some rando on the internet, not the epiphany of AI coding's Ten Commandments.

ithkuil an hour ago | parent | prev [-]

Using AI to review our own comments before posting could be a good idea

acedTrex 3 hours ago | parent | prev [-]

Exactly, i so wish the narratives around LLMs in most fields were around how they can enable us to be better ourselves...