Intro
Hey, I just wanted to write this real quick as a warning and suggestion on how to use AI with coding.
Also whenever I'm referring to AI in thsi article, I am using it as a shorthand for Generative AI, the one that most people are familiar with.
Feel free to comment on your opinion on this topic, Im interested to see what others think about this.
What is AI in coding
There are three types of use cases for AI in coding
Vibe coding
This is one of the most contreversial topic of discussion, its is the idea where you dont do any coding, you do "prompting" and guide an AI while it codes.
Obviously this is a topic of debate with two sides
- We should use all the tools we have to code
- This isnt coding, this is just editing. In this article im not going to weigh in on either side, just give you the facts
Debugging
One great and useful feature of AI in coding is for debugging purposes. ChatGPT and others are great for spotting the one error in hundreds of lines of code.
As far as I can tell this isnt that contraversial, its just widely accepted as a tool
Concepts and Learning
The main reason I am where I am in Java and Lua is because I utilized ChatGPT for learning. It is great for bouncing ideas off and for learning what things do / new methods to do things. There is one but though, which brings me to the main point of this article.
Pitfalls of AI
AI can be a great learning tool, if used correctly. If you just copy paste code from ChatGPT into your editor, unless you are reading and making an effort to understand it, you aren't learning anything.
This is also my main issue with vibe coding. You eventually become dependant on your AI of choice needing it to do coding problems. I myself have fallen prey to this. A couple of years ago, I started "coding" in python, and by that I mean I vibe coded with ChatGPT before that was a popular thing. And I have to say it was one of the most frustraiting times of my life. It would never be able to generate good code, and was just me trying to salvage an already broken code base while understanding none of it. ChatGPT and others also like to flat out lie. Its rare but I've had times where it refused to admit it was wrong. And thats a big problem, if you are trying to learn through ChatGPT, it producing false information can be detrimental if you dont know how to spot it.
The Problem Now
The thing is, now, ChatGPT and competitors are good enough to effectively vibe code. Thats the problem so many people fall victim to. Its so easy, especially with python to just have an AI generate code for you and then decipher. It is a very easy habit to just go to ChatGPT and say
Hey can you generate ___ for me?
And just copy paste the output. And thats the topic of debate. I haven't gotten too much into it but like I said above its a question of "is prompting coding?"
The Answer
Kind of. People have been using new tools for a while, and if you use it right AI can become a valuable tool for you to use, but thats all it should be, a tool. It should not become your main driver. Especially if you consider the fact that you are probably willing to use libraries from other people for convinience, and thats exectly what AI is, a library created by programmers to help people. Some people tend to think AI is alive (by that I mean an entity) and while we dont fully understand it we did create it. Its best explained in this video. All it is is tranformers quite literally doing their name and transforming information.
How to Effectively us AI
Now in my philosiphy, I believe its okay to use AI for coding with a few stipulations.
- Never have it generate code for you to directly plug into your programs
- Have it generate psuedocode instead
- Ask it questions, not commands
- Try and learn from it, not just mindlessly copy paste
These are my base rules for a couple of reasons. One, it forces you to write things down, which is apparently proven to help your memory (what all my english teachers told me at least), makes you translate psuedocode yourself, so you are applying your base knowledge onto more advanced topics, and for the questions part, in my opinion ChatGPT is a more effective learning tool than others. Sure, W3Schools is an amazing reference (seriously, check it out),but ChatGPT can teach you tailored ideas for you. For example, I have it set up so that it knows exactly what coding software im using, my current favorite language, and what game engine im using. It can then give me specifics on how to use elements for my projects. For me, I really think actually putting your code into practice is the most effective way to learn.
What do I Use Instead?
Start off on a project you are passionate about. You will learn less things from a boring project your heart isnt in and potentially get burnt out compared to a passion project. For a while, the thing that got me into coding was softbody sims (my implementation if your interested), and it got me a lot of practice with the intricant details of Java and Lua.
Moral of the Story
If you are just copy and pasting stuff from AI, I would strongly reccomend against that, its the same logic as calculators. Your taught math without them so you can do it if needed, but calculators are convenience tools thats the way AI should be used. If you can't do do a basic project without AI's help (think simple data parsing), you may want to go back and relearn it.
Outro
Anyways, thanks for reading, all of the statements in this article were my opinion, and I am not advocating for harrasment of people who use AI to vibe code, I am merely asking for a self reflection. You do not have the responsibility of what others are doing. There is nothing wrong with vibe coding and I think its really cool that AI has come this far. Have a nice day :)
Top comments (0)