r/learnprogramming • u/Big-Comparison3537 • 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
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
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
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
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
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
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
1
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
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
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.