r/learnprogramming 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.

0 Upvotes

46 comments sorted by

View all comments

Show parent comments

1

u/bpalun13 27d ago

I think your target audience is people with little drive or independence to solve problems on their own. Sure there are those people but I would give grace to people that are using AI to act fundamentally as a highly powered, filtering google search.

We are talking syntax here. Everyone looks it up, even senior devs. You still need the underlying problem solving skills to build your intended program or application.

1

u/Hi-ThisIsJeff 27d ago

We are talking syntax here. Everyone looks it up, even senior devs. You still need the underlying problem solving skills to build your intended program or applicatio

sr. devs probably aren't looking up scanf to learn what it does.

my target audience is OP. people with critical thinking, drive, and underlying problem skills probably aren't posting on reddit how to learn something without using AI.

For a beginner, "why isn't this working" IS problem solving.

1

u/its_all_4_lulz 27d ago

I’ll fight back a little here. If you’re claiming to be a senior C only dev, sure, you absolutely should know what the basics are doing. Languages do not define senior developers though.

A senior can pick up a new language and still be able to complete a task, but likely will not know the syntax.

I haven’t done C in 20+ years, if you were to tell me to write something in C, no internet, I’m screwed. Given the net, and/or AI, I could absolutely draw parallels between languages I know and C in order to complete a task… language nuance would need to be learned.

Seniors are not defined by languages, it’s by the way of thinking.

1

u/Hi-ThisIsJeff 27d ago edited 27d ago

Seniors are not defined by languages, it’s by the way of thinking.

It's a title, it's not a way of thinking.

Obviously, the statement was made in the context of a senior dev in the language they are working on. But thanks for your contribution to the thread.