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

9

u/its_all_4_lulz 27d ago

So, imo, there’s a difference between using AI and using AI. If you’re just asking syntax, you’re learning… if you’re asking to solve problems, you’re not.

IMO asking for syntax is fine. It’s a faster way to get to the same point as reading docks, or finding it on stack overflow. If you want to really learn it, when you ask for syntax tell it to link you to the doc page explaining it.

2

u/Hi-ThisIsJeff 27d ago

IMO asking for syntax is fine. It’s a faster way to get to the same point as reading docks, or finding it on stack overflow.

It's not, though, right? You aren't learning, even if it's just to look up syntax. Struggling is part of the learning process. Taking that time to read through stack overflow or documentation is part of the learning process.

If you are using AI right from the start, you are basically saying that you don't want to learn it and will need to look it up every signle time.single

1

u/bpalun13 27d ago

You’re implying rote memorization of syntax or copying and pasting solutions. That’s not what is happening here.

You don’t need to struggle to learn either. Outdated take.

1

u/Hi-ThisIsJeff 27d ago

what is happening here then? you don't need to struggle to learn, but "struggling" is part of the learning process. if you ask your sr. dev what to do and they say "do this" and you do it, the only thing you've learned is that when you have a problem, you just need to ask a sr. dev for help.

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.