I'm new to programming and often find myself stuck on exercises for hours at a time—sometimes four to five hours! While I usually manage to solve them eventually, I also occasionally seek help from AI to identify my mistakes or suggest what to do next. I'm curious whether it's a mistake to persist when I'm stuck, or if I'm wasting time. Should I rely on AI for assistance when facing coding challenges?
5 Answers
You can't waste time when you're learning, but I suggest a change in strategy: if you're stuck, try taking a break. Go do something unrelated—it might help clear your mind. Often, solutions come to you when you're not actively trying to solve the problem. Also, using AI can cut corners a bit, so think of it as a tool to guide you, but don’t rely on it too much.
As a beginner, getting stuck is totally part of the learning process, so don’t stress too much about time. The key here is to focus on truly understanding the concepts rather than just getting through each problem. When you're learning, spending time figuring things out isn’t wasted, even if it takes hours! If you get paid to code, then sure, consider using AI to cut down on time while still learning later on.
The most important thing is that you grasp why a solution works. If you’re just getting it to work without understanding it, you won’t be making real progress. But if you learn something valuable through those 4-5 hours, then you spent your time well. Focus on learning through the experience!
Make sure you understand what caused the issues you faced. Knowing the reasons behind the error, like a silly mistake or a deeper logic issue, is crucial for future challenges. The real goal is to make future problems easier to solve based on what you learned from past experiences!
It’s not unusual to feel stuck, and breaking down problems into smaller chunks can really help. When you take the time to understand each part, it builds up your skills for solving bigger challenges. It's fine to feel like you're struggling at times; this is how you grow.

Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically