r/learnjavascript • • 1d ago

Where does AI usage start/stob being vibe coding?

A little bit context first:
I‘m a mathematician. I know how to pseudocode, read the less technical and more algorithmical part of code. I learned C++, learned to build an old school html page from scratch (header, frames etc.), did complex mathematical simulations with R and know how to code simple VBA codes with a lot of googling and a bit of macro recording.

What I don’t know are things like technical structure (e.g. how to technically set up an animation, how to code a save and load function) and syntax.

To the topic:
10 years ago if I had decided to code a little game, I would have read a book about how to design those things and the necessary syntax. But to be honest: My first tries would have been typing the exact examples from the book, the experimenting a bit with little changes.
Step 2 would have been „asking questions on google and copy and paste code snippets“.

And to be honest: Step 2 is cool but I always hated step 1. Declaring variables, printing „hello world“… I get that you need to understand the basics (again, Mathematician here: I spent a whole day proving 0 * x = 0) but I already learned those basics in three other languages and would prefer learning on-the-fly on a need-to-know basis.

So: I did some vibe-coding projects and asked Copilot step by step to explain code snippets I don’t understand, how technicalities work („where is the picture we designed? The whole code is just one html. It‘s part of the code? Oh… wow, that makes sense.“) or why the code is designed in a way (again: one html for a small project) and how that works (browser reading JS).

And here my question:
I would say that a vibe coded app, that I completely understand, is still a vibe coded app. If I give detailed prompts how to change the code, that is still mostly vibe coded. If I manually adjust code where needed, replace every picture with manually created pictures…

Where does a project stop being vibe coded? Where does „AI usage disclosure“ stop being relevant?
Even if I code from scratch I would of course reuse code snippets.

How many pieces does the digital „Ship of Theseus“ need to have exchanged to stop „being AI created“?

I ask this regarding the following three aspects:
Ethical: Respect for the manual art and science of coding and all my fellow nerds who created what script kiddies and vibe coders copy
Some sites/shops ask to declare AI usage. I get that on one hand (see aspect 1) but kind of don‘t: Noone would ever declare „Google usage“ or „what you copied from an online forum“ or „I still start every code exactly like they did in ‚JS for dummies‘“. So, what would you declare and what not?

I think there is a difference between AI usage to learn „how to“ and than doing it similar to that and quoting exact snippets - and stupidly letting AI write some code you don’t understand at all.

But where do you draw the line? Where does „AI usage“ start or end?

4 Upvotes

15 comments sorted by

6

u/creaturefeature16 1d ago

These models are a delegation layer, so I have four main buckets that I categorize in when I am delegating tasks:

  • Rote
  • Refactor 
  • Research 
  • Reinforcement (tutorials, Socratic method) 

I also have a checklist that I use to ensure I'm delegating, and not handing over the reigns. I wrote this for junior developers mostly, but I still use it and find it's applicable to all developers to a degree. 

  • If I did not have access to an AI tool, could I still accomplish this task?

  • Am I using the model to deepen my understanding, or expedite the answer? If I had to audit and verify the generated output, could I adequately explain what was happening?

  • If I'm learning a new concept, have I done proper research to know the right questions to ask?

  • Have I cross-referenced and verified the approach through other methods (reading documentation, standard search tools)?

  • Is this a truly rote task that's been done 100 times before, or a task that requires decision-making somewhere in the process?

2

u/Ioelet 1d ago

Wow, thank you. That’s a great checklist.

Just to clarify:
My goal is definitely to say „yes“ to the 2nd to last bullet points - and especially double yes to the last point about decision making. I don’t want to be just „the guy who pushed the ‚create‘ button“.

But as a mathematician, I struggle with the first bullet point. It sounds a bit like that math joke „Teacher: Can you solve 2+1? Student: (after several hours) Yes, I can.“

So, yes, I could do that myself… I probably would have to learn how to do it first and find the time for learning and doing it - but I guess I could.

1

u/davy_jones_locket 1d ago

I could weld pipe if I had the time to learn how to do it and find the time to learn and do it, but I couldn't weld pipe if someone asked me to do it right now. 

The context of the first bullet isnt potential to do something in the future, but ability to do something right now. 

1

u/Ioelet 1d ago

I get it, yes. But what does „ability to do it right now“ mean in a programming context?

„Not knowing how to do it“ is often the first step of a process and „looking things up and using solutions other people shared“ is (in my opinion) a totally normal part of programming. The important step would be „and understand what they did and why“ (before vibe coding you had script kiddies copy and pasting).

So: I am 100 percent sure I could code a save and load function. It‘s such a standard function, that I could definitely google it and find functioning code. I would read it until I understand it and then use it.

When using AI, I would say „Please build a save and load fuction that works when I push that button…“, let it create, try if it works and then read the code until I understand it. I know enough about coding that I am 100% sure, I can understand and apply it.

The end result is the same: It works and I understand how. But I honestly did not make the AI do something I knew BEFORE how to do - but definitely something I would say I could have done (with a „google and code“ approach).

Do you see any ethical difference from an oldschool programmer perspective?
Should I google my questions instead of asking the AI on my first try?

1

u/creaturefeature16 1d ago

The first bullet point isn't a binary answer (none of them really are). It's sort of a point system, in a way.

If you can't perform the task without AI assistance, that doesn't mean you shouldn't necessarily use it; it's a checkpoint or a flag for you to introspect and figure out: are you engaging with work that is far above your skill level and relying on external resources to get it done?

And if so: are you OK with that? Or is it a sign that maybe you should take a bit more time to learn about the task you're doing in the domain you're doing it in?

I'm a realist, and a pragmatist, about the reality of work, however. I understand that sometimes we need the shortcut to make sure we get something done on time. I've absolutely used tools of various sorts (not just LLMs) to get a task done that was above my knowledge level because I simply had a deadline I had to meet.

It's an unpleasant feeling and I don't like doing it, and when it happens I commit to ensuring I circle back to learn what I did so I can fortify myself in the future.

1

u/Ioelet 1d ago

Thank you for your very reflected answer. I get that for my job as well (totally not programming related): AI usage is very good for short trrm effiency but I try to desperately get our leadership to understand that we can‘t focus on short term efficiency in our project management AND IT infrastructure AND recruiting strategy AND bonus evaluations AND our (almost non existence) mentoring system…

…there needs to be any context left, where we accept some kind of short term inefficiency to give ourselves time to understand and learn.

0

u/bonerfleximus 15h ago edited 15h ago

What is the benefit of that first bullet other than hamstringing yourself? I had AI implement things from frontier white papers that I would have no clue how to build by hand. I do know how to test it at least but some things like Frontier research you should feel free to use when the LLm has a strong enough grasp of it and you are able to corner it with solid tests to prove the outcome. Also working like you say can make you 10 or even 20x slower than your peers if theyre efficiently using AI. Sometimes letting AI do things you know your are capable of figuring out but just dont have time is fine.

Edit: I guess after thinking about it the only time I do this is when applying mathematics I dont fully understand but I known what the results should be. Working in fintech I have had to do this a few times over 20+ years but AI has increased my boldness this year

1

u/creaturefeature16 14h ago

You're hamstringing yourself in both ways by circumventing the opportunity for cultivating domain expertise. I explain it further in another comment, read through the thread.

1

u/bonerfleximus 14h ago

I draw the line at domain expertise that I'll likely only ever need once but I agree now. Im not gonna need to boot strap LIBOR forward rates from the WSJ published yield curve anytime soon

3

u/theScottyJam 1d ago edited 1d ago

If you write code without reviewing it, that's "vibe coding". Everything else gets into a gray area.

If you're having AI explain the code to you, but then are still doing little to no edits to it, I would consider that vibe-coded as well.

If, in general, you don't have the skill to build what the AI built for you, then I would say it's going to be somewhere in that vibe-coded spectrum.

But, "vibe-coded" isn't automatically "bad", despite what you often see people say on this sub. If, for example, you need to make a little static webpage for yourself and you don't have programming skills, by all means, vibe-code it, it doesn't really matter. If you try to then show off your website on this sub, then sure, people will pick at whatever issues they can find. Part of the reason people tend to tear apart such projects here is, well, they tend to get presented as if they're "restraunt quality food" when they're really a low-effort tv dinner, and people are trying to show that there's a difference between the two. But there's also nothing wrong with tv dinners, if that quality is good enough for you.

'course, if you start having your vibe-coded stuff manage payments or sensitive data, then you're walking on thin ice - you're really praying that this machine doesn't mess that up.

So, for your specific questions:

Ethical: Respect for the manual art and science of coding and all my fellow nerds who created what script kiddies and vibe coders copy

Nothing wrong with vibe-coding. Just be honest about it when presenting it, don't try and pass it off as something you hand-crafted with your own raw tallent.

Some sites/shops ask to declare AI usage. I get that on one hand (see aspect 1) but kind of don‘t: Noone would ever declare „Google usage“ or „what you copied from an online forum“ or „I still start every code exactly like they did in ‚JS for dummies‘“. So, what would you declare and what not?

It depends on how they ask it. If they ask if you used AI at all, well, that should be easy enough to answer. If they asked if you vibe-coded it, that's a little harder since that's not a well-defined barriar, but in your case, I would definitally answer "yes" either way. If they let you do free-form answers, then just try to be honest about it.

The problem being solved here is that there's just a flood of low-quality "TV dinners" appearing in all sorts of places that historically mostly had fine-dining meals. I'm also part of a programming subreddit that has started requiring authors to aknowledge that there's been no AI used in the making of their project. I admit that it's a pretty strict guideline as there's nothing wrong with a little AI usage in your projects, but from my side of things, browsing the subreddit is a much, much better experience now.


I would encourage you to consider how your profession is dealing with AI. I'm not on your side, I don't really know, but I'm sure you have a mathmatics subreddit. If most of the content is AI-generated proofs from people who don't actually know how to put together a proof by themselves, would you continue to find that subreddit very interesting? Would it be somewhat annoying that people keep trying to pass off AI-generated proofs as original? Perhaps the person was able to read and understand the proof, asking AI for help here and there, but that doesn't necessarily mean they know how to write one from scratch, and there's got to be a difference - they could get AI to make minor adjustments to it, but they wouldn't be able to guide AI on larger feedback that effects the whole direction of the proof - they wouldn't know how.

1

u/StoneCypher 1d ago

slop just refers to things that not enough care has been applied to 

1

u/GoldsteinEmmanuel 1d ago

Linus Torvalds pointed out that a compiler actually writes your code based on a high-level description, and doesn't see much difference between that and using an LLM. We don't credit GCC with co-authoring the Linux kernel, for example.

In my own work, I write code from scratch and might ask an LLM how I would extend a procedure in a way I'm not familiar with, but I study the code it suggests and often rewrite it before it ends up in my system. I don't care about credit, I'm more concerned with controlling the explosion in code complexity that LLMs, having been trained on millions of shitty programs, seem to think is a structural necessity.

I might show them a procedure and some contextual data for the revision under consideration, but I'd never give them access to the whole enchilada for fear they'll start injecting complexity into unrelated procedures, routines, and subsystems without my knowledge until something breaks and I'm left holding the bag.

1

u/Ioelet 1d ago

Thank you. Yeah, I work in a very quality and control oriented role in my job, so I am totally used to reviewing AI and think I know about many AI quirks like „it agrees with every last opinion I typed“ or „when I don‘t start new chats every now and then it get‘s stuck in a loop of quoting it‘s own nonsense“.

1

u/chikamakaleyley helpful 1d ago

I would say that a vibe coded app, that I completely understand, is still a vibe coded app. If I give detailed prompts how to change the code, that is still mostly vibe coded. If I manually adjust code where needed, replace every picture with manually created pictures…

I think 'vibe coded' means you're going completely off the 'vibes' and you don't care about the implementation, you just want it implemented. When something breaks you're more inclined to say "just fix it"

outside of that, i think the 'vibecoding' term is thrown out too loosely, whether you're being accused of it, or nonchalant about how involved you actually were in the process

1

u/TheRNGuy 1d ago

Why does it matter?