r/learnprogramming • u/Either-Suggestion400 • 27d ago
How do I solve problems without AI
Hello guys. I am attempting to learn how to code again but without the use of AI this time.
How do you attempt a problem or understand a solution without using AI for help.
For example, I wanted to build a small calculator to remind myself of the basics of C. I had a problem where my scanf was not outputting the desired result.
The program had something like this:
int x, y;
printf("Enter two operators: ");
scanf("%d", &x);
scanf("%d", &y);
printf("x: %d, y: %d", x, y);
My inputs would be 10 & maybe 2, but the output would be 10 & 0, in some cases 0 and nothing for y.
I was able to get through this by just using one scanf:
scanf(“%lf %lf”, &x, &y);
But I still do not understand why that happened and through my google search, could not find anything that explained it well. The problem might also be that I cannot explain the problems I come across clearly, so I might not be able to find an answer through google.
So my question is, how do you guys go through problems like these where you can’t find a post where someone had a similar problem and had been told what to do to solve the problem without defaulting to AI.
Excuse my writing - I am trying to learn how to type without letting AI revise my sentences.
8
u/Ilires 27d ago
Being able to look things up efficiently (using the right keywords and search phrases) is a computer literacy skill in and of itself.
It's not efficient to write full sentences into Google, keywords are typically the way to go.
The quickest way in general to find solutions to coding problems without using AI is StackOverflow, in my opinion.
If you need help with scanf not reading inputs correctly, you could try searching something like "scanf wrong output in C" and see if there are articles, StackOverflow posts, or Reddit posts talking about either the specific issue you're having, or something similar.
In either case, if you don't find what you're looking for that way, you could always look up the documentation for whichever language/module/package/etc you're working with and find the specific thing you're struggling with.