AI - How to use it for coding and learning
How AI can help you the most
AI tools are excellent resources for learning, coding, and designing more efficiently. However, letting AI solve your problem and just copying a solution will not help.
Understanding your work and the output from AI is crucial. We encourage you to challenge the output from AI tools, understand them, and adapt them to your project.
Why use AI in Programming
Programming has always been linked to the programmer's knowledge and skills to solve problems. In the journey of learning to program, we face common challenges: "Where to start?" "Am I doing it right?" "I don't know how to fix this error."
While we have resources like Google and StackOverflow, how can we further boost our learning and work more efficiently and productively? The answer lies in leveraging an AI assistant.
Benefits of AI Assistants in Programming
An AI assistant is a tool that, through artificial intelligence and the information we provide, helps us increase our productivity. Here are some benefits:
Easier Code Understanding: It can assist in understanding code and concepts with detailed explanations and simplifying complex ideas, contributing to deeper and more effective learning.
Descriptive Code Generation: It transforms natural language descriptions into functional code, helping to translate ideas into implementations and strengthening understanding.
Refactoring for Clarity: It can help improve code structure to make it more understandable and maintainable, fostering orderly and precise coding.
Guided Error Resolution is very useful for identifying and solving errors, offering guidance to correct problems, and enhancing debugging skills.
Smart Autocompletion: It completes code intelligently, anticipates and suggests necessary snippets for specific tasks, and speeds up writing.
AI Assistants
These tools allow you to ask questions and hold conversations to get help:
How not to use AI when learning how to code
AI tools like ChatGPT are incredible for speeding up development but can also lead to bad habits. If you let AI write all your code, you may end up with an app that works, but you won’t understand how it functions. This is a problem when errors or vulnerabilities arise, as you won’t know how to fix them. AI can make assumptions or produce incorrect code, so relying on it without understanding the logic can hurt your growth as a developer. Use AI to assist your learning, but don’t skip the foundational work. Actual coding skill comes from solving problems yourself, not letting AI do it for you.
Resource: https://dev.to/nmiller15/how-not-to-use-ai-when-learning-to-code-4jgf
How to use AI
There are different ways to use AI to help your learning and coding process.
Coding Mentor with ChatGPT
Start a Project with ChatGPT
Use VS Code AI Extensions
Use them to reduce information overload
Create relevant examples
1. Coding Mentor
You can prompt ChatGPT to be your Coding Mentor. The video below explains how to do that.
2. Start a Project with AI
Starting a project can seem intimidating. But AI is here to help. Watch this video to find out how. The video, in general, is great and gives you more ideas on how AI can help. How it supports starting a project starts at the minute: 11:01.
3. Support in VS Code - VSCode Extensions
ChatGPT and other AI models are great supporters. However, in VS Code, you can integrate other tools that help you refactor the code, explain code, and support you hands-on while coding. Integrate these tools directly into your code editor to autocomplete code or add functionalities:
GitHub Copilot (Requires Payment)
You don't need to try them all. Choose one or two tools that fit your needs—they're meant to support, not replace, your learning. You’re in charge of your learning journey!
4. Use Them to Reduce Information Overload
When starting new projects or working with unfamiliar technologies, it is common to encounter a lot of information and even feel overwhelmed. The mentioned tools can be very useful for overcoming this challenge.
Let's see how an AI assistant can be beneficial in this situation:
Message: I am learning web development with JavaScript, HTML, and CSS. I need a scheme to help me understand what unit testing is, what it is for, and how it is used. Consider that I don't know anything, explain it to me simply and clearly.
If the result doesn't meet your expectations, consider exploring another perspective that aligns better with your way of thinking, for example:
Message: I'm not very clear, can you use a metaphor to help me understand it better?
Finally, you can strengthen your understanding by asking questions that confirm what you have learned.
Message: Can you confirm if I am correct? I understand that tests aim to ensure the quality of my code using a tool called Jest.
You also have the option to request questions you can answer to consolidate and reinforce your learning.
Message: Can you give me 5 questions to answer to validate if I understood what unit tests are?
5. Create Relevant Examples for Your Specific Situation
For example, if you are immersed in the Dataverse project and encounter challenges starting the filtering section, you might consider the following:
Message: I am learning JS and want to know how to filter even numbers. Can you give me an example? Explain how it works.
Explore your curiosity and ask questions that allow you to delve deeper into the topic.
Message: You mention something called callback, what is it?
Conclusion - Use AI wisely
AI tools can improve your learning and coding efficiency, but relying on them entirely can hinder your growth. You must understand your solution and your code. If you copy code from AI, adapt it to your project and understand the code entirely. Letting AI solve everything without learning its logic can lead to poor problem-solving skills. Actual coding skill comes from solving problems yourself, not letting AI do it for you.
Last updated