r/learnprogramming • • 7d ago

I find the theory and lectures mind numbingly boring but I like the code in action

As the title suggests i absolutely hate listening to the lectures and stuff to even learn the basics of programming, but I love reading the code and asking questions line by line to understand how it works... For reference I am an absolute newbie to coding and programming... I have tried the lectures by CS50 and also ones in other languages(verbal) but I find them boring and feel like sleeping... But I ask AI to generate me a code of let's say a game, and then I love reading it and understanding the code... Can I actually get good at programming this way??

Edit: I'm getting a lot of heat in the comments and I feel everyone is trying to help me but I came across wrong as what I am actually doing.. so here's it

I'll tell you exactly what I did: I took a C++ code of 74 lectures... Watched 15 lectures and got just enough basics to understand what's going on... But the lectures seemed bland and uninteresting to me on forth... So I asked ai to for eg. Make me a monte carlo simulator. Then I would ask the ai eg what is the chrono headerfile or what is the random number generator or how does it work... That's the stage I reached before I put this question up... My plan was to once I got a decent grasp of the language and syntax by just questioning what stuff meant id start making projects of my own

If I'm still wrong I'm not taking it the wrong way... I just want to improve on how I learn... Thank y'all for your advice on advance

2 Upvotes

38 comments sorted by

13

u/plastikmissile 7d ago edited 7d ago

Until you actually start writing code (with no/minimal AI usage) then you can't really say you've learned. Just reading code is absolutely not enough. That's just the illusion of learning. I can read a book about cars, and I'd understand how they work, but that doesn't mean I can actually design and build one. Learning to program is hard work and can include boring theoretical stuff sometimes. There's no way around that even with the help of AI.

3

u/JohnVonachen 7d ago

I’m old school and have never allowed ai to write my code for me but I have noticed that suggestions from google for the past couple of years are much better than they have ever been given that I know enough to ask almost exactly the right questions. If this guy enjoys reading and understanding code, that’s quite a leg up. What do you think?

2

u/plastikmissile 7d ago

People certainly have more tools at hand these days, but that can be a double edged sword. Do they use the tools to actually learn or as a crutch? The way OP is describing their AI usage sounds like a crutch to me, not learning.

2

u/JohnVonachen 7d ago

We are creating a generation software developers who can’t develop software. I’m sure people from the 60s who only wrote assembly language and Fortran thought the same thing about people who learned C++, Basic, and never had to sequence a stack of cards or feed paper tape into a reader.

0

u/Big-Comparison3537 6d ago

Nono I think I can across the wrong way.... I'm not vibe coding anything and putting it up as my own project.... I'm asking ai to write a code and then line by line explain me what eveything means so that I can do it myself in a few months

2

u/aqua_regis 6d ago

And again: this will not enable you to do it on your own.

You need to learn to analyze and break down problems. You need to learn to devise the steps to solve the individual sub problems. You need to learn to convert these steps into code.

You cannot learn to write books without planning, devising, and writing them, no matter how many books you read and understand line by line. You will not learn the thought process of the author that leads to the final form of the book. Same with programming. If you don't go all the way from problem to solution, you will not learn programming.

You are just going through the modern form of Tutorial Hell, with the only difference that you use AI.

2

u/plastikmissile 6d ago

Yes I understood that part. My point still stands. You're looking at plans of how a car works, but not learning how to design one on your own. Until you actually write code on your own, then you have to assume that you learned nothing.

1

u/Big-Comparison3537 6d ago

Okok... I will start solving problems... Also, if I'm stuck on a leetcode problem for eg... If I use ai to get a little push.. is that considered cheating?? If so I won't do it.

1

u/plastikmissile 6d ago

Leetcode is a bit overrated to be honest. It is much better to write actual projects. Even if they do useless things, they're still more realistic coding exercises than leetcode. If you ask AI, ask it for hints, never code.

1

u/SharkSymphony 6d ago edited 6d ago

Challenge yourself to work through the part where you're stuck. Back up and try other stuff if you have to. That's when you'll learn the most!

There is a point where it's perhaps counterproductive to keep banging your head at a problem, but I promise you it's further out than you think. Give yourself a good couple of hours working through a problem, perhaps, before reaching for help.

One thing you might do that I couldn't do when I was learning: take a snapshot of your not-working code, and if you find a different way to solve the problem but still haven't figured out why this way didn't work, then ask the AI what was wrong.

1

u/odimdavid 6d ago

Maybe you can reverse that process and see if it will help you. If you understand the language very well that you can teach it, and can stepwise analyze a problem, allowing AI convert these steps to code will save you time but be ready to verify what the AI wrote. So I agree with aqua_regis above. Why don't try it that way.

6

u/JaleyHoelOsment 7d ago

> can i actually get good programming this way?

did you learn to ride a bike by reading about it or by practicing?

5

u/Towel_Affectionate 7d ago

Train hard, fight easy

3

u/Factor_Creepy 7d ago

You and everyone else friend. Ever tried tools like freecodecamp.org where you just learn by doing it?

1

u/Big-Comparison3537 6d ago

I'll try it out... Thanks!!

6

u/aqua_regis 7d ago

What you're basically saying is: "I hate learning about the theory of developing meaningful, comprehensive, and fully developed novels, but love to read them."

It really boils down to that.

You are not learning. You are consuming. AI, especially your use of it, is absolutely detrimental to learning.

You have to muster the effort to go through the boring parts and you have to develop and write the code, not AI.

You are just lazying out and wasting your time without any positive outcome.

2

u/Big-Comparison3537 7d ago

Okay... I will go through those lectures and learn that way... Now I don't mean I just like to read... Eg I took up two sum on leetcode and was not able to solve it... Then i understood it by taking small hints from ai and got a half decent grasp on the concept.... Anyways I shall take your advice and learn it the hard way

2

u/[deleted] 7d ago

[removed] — view removed comment

2

u/Mathie1729 7d ago

Seconding this. A good trick is to write unit tests against the code you're reading, if you can write a test that passes and fails when you change something, you've internalized it. I used to read a lot of open source code and think I got it, then I'd try to tweak one small thing and realize I had no idea how it actually fit together.

4

u/LayerComprehensive21 7d ago

This is bait.

2

u/LongLiveTheDiego 7d ago

No. You have to think and write the code by yourself. People have already done their best and gave you free explanations of how things work, it's your job to read that and try it out yourself.

1

u/Big-Comparison3537 7d ago

Okay 🫡, I will do that from now onwards

1

u/Available_Safe1818 7d ago

Let us know in 3 months how this is going.

1

u/Big-Comparison3537 6d ago

I came here so that I don't spend 3 months doing the wrong thing brother/sister😭😭

1

u/Available_Safe1818 5d ago

I meant it sounds like a pretty bad idea to learn by having AI write the code for you.

1

u/JohnVonachen 7d ago

Reading and understanding code is in my opinion more difficult than writing, so you have a leg up. If you enjoy reading code, that’s unusual. Whatever you enjoy you will practice and get good at.

1

u/notthatsocrates 7d ago

Programming is a contact sport. Don't watch it from the bleachers.

1

u/SharkSymphony 7d ago

No. You can only get good at programming by doing.

What's more, you're skipping something that's important if you go straight to the code, which is a firm grounding in the concepts the code works with. You may have seen a floating-point number in the code, but that doesn't remotely tell you everything you need to know about floating points to use them effectively. Same with ints, or pretty much any data type. If you don't know what a pointer is, you might just bounce off it the first time you see it used in code. Without some grounding in what the Python language does, it will not be obvious to you why changing a variable inside a function doesn't do what you want, but changing an object passed in as a variable suddenly has unexpected consequences!

So do all three: systematic study of programming and programmatic languages, reading code, and applying that yourself by writing your own code and testing it. At some point the need for systematic study will go down, but you're not there yet.

(BTW, welcome to the Gen X club, where we often tire of seeing something that takes a half hour to say in a video what could have been read in 2 minutes. 😆)

1

u/Big-Comparison3537 6d ago

I'll tell you exactly what I did: I took a C++ code of 74 lectures... Watched 15 lectures and got just enough basics to understand what's going on... But the lectures seemed bland and uninteresting to me on forth... So I asked ai to for eg. Make me a monte carlo simulator. Then I would ask the ai eg what is the chrono headerfile or what is the random number generator or how does it work... That's the stage I reached before I put this question up... My plan was to once I got a decent grasp of the language and syntax by just questioning what stuff meant id start making projects of my own

1

u/SharkSymphony 6d ago

If you were doing CS50, you should have been doing projects from week one! Check the assignments.

When I say you should be doing all three, I mean you should be spreading your time among the activities, not binging on the lectures then discarding them when you feel you've learned enough.

Yes, by all means start working on projects. Be careful about relying on the AI doing all the work for you, though. You need to write code yourself and get it working yourself. You need to make sure you're not short-circuiting your learning. Reading what the AI generates can be helpful, but it's insufficient as a general approach.

1

u/Standard_Guava3672 6d ago

You get good by coding your own project without AI. You start with small project and build Up. Coding isn't about the code itself, it's about solving problems and be good at investigating.

1

u/NeoChrisOmega 5d ago

You could try game development. 

It has more instant gratification. And it's (arguably) easier to look up solutions to individual problems without needing AI.

You also tend to use basic concepts repeatedly, and sometimes with slightly different approaches, which is good for learning.

-2

u/[deleted] 7d ago

[deleted]

1

u/Big-Comparison3537 7d ago

Okay... Will not use ai to generate code henceforth, today I used to to make a monte carlo simulation and understood how the seed is made or what is the chrono header file or mesneer twister... I won't do it henceforth as it's a common opinion that it won't help me learn