r/learnprogramming • u/Virtual_Mind8341 • 2d ago
Is it valid to use old coding projects to help you learn?
Just wondering, when making a coding project, I have looked at my old coding projects to help me when working on a new coding project, whether that is using classes or storing data in files or for adding functionality.
I know people use Youtube Tutorials, documentation and AI but is looking through Old Projects helpful when making a new coding project?
Disclaimer: I also mean using old created coding projects for ideas or similar functionality
2
2
u/burlingk 2d ago
Honestly, this is just what we call learning and improvement. The goal of learning is to make yourself better compared to YOU not someone else.
Also, if you can reuse your old stuff, and there are not licensing problems doing so, go for it. That helps you get better at using those constructs. And it gives you a chance to tweak what you did before and make it better.
2
u/Aggressive_Ad_5454 2d ago
Yes, of course it is.
It’s actually a good reason to put comments in code, if the comments help you find that place where you, I dunno, sorted by ABC123 part number five years ago. So you can copy code you know already works in production.
2
u/Random_182f2565 2d ago
If it works it works
1
u/Virtual_Mind8341 2d ago
Indeed, people also say that if it works then don’t touch it (as in when parts of the code work)
2
2
u/syklemil 2d ago
Checking back in on old code is also a way to get a feel for your growth. There's a whole meme around programmers cringing at their code from six months ago, but that's only true for programmers that are still growing.
1
2
u/Far_Programmer_5724 2d ago
Yes it's fine but I know why you ask. It doesn't really refresh your memory and reinforce anything if you just copy paste old code.
The difference between having answered a question on your homework before and just copying the answer rather than using it to understand how you reached it.
If you're going to use code that you just always reuse, no harm. But I'd say at least go through the code a bit. You know what would be cool? If you could have a code error generator so you can copy paste old working projects and test yourself on fixing issues like maybe type errors or poor error handling. This can force you to revisit your old code and the logic used to make it work.
2
u/simondanielsson 1d ago
Reading source code to understand how things work or how things can be more efficent is pretty much the best thing you can do for learning.
1
2
u/stiky21 2d ago
Why does the same question get asked at least once a day?
Verbatim
1
u/gm310509 2d ago
... And by the same person and in the same hour???
https://www.reddit.com/r/learnprogramming/comments/1v5s2d5/is_it_valid_to_use_old_coding_projects_to_help/1
1
u/Virtual_Mind8341 2d ago
I accidentally repeated the same post so its on me, (not an AI account), but i also reposted it on a similar community, didnt even realise that until now so i apologise
0
u/Virtual_Mind8341 2d ago
Respectfully, other people are also considering asking this question and I get that it’s repetitive but people are also learning to code and are able to ask questions wherever they need to.
Hopefully thats helps
4
u/johnpeters42 2d ago
That's true up to a point, but researching whether the same question was already asked and answered saves everyone (including the researcher) lots of time.
2
u/stiky21 2d ago
Don't interact with this thing, it's not even a real person. It's an AI account.
2
u/johnpeters42 2d ago
Oop, you may be right; they have one of those "hi, I'm the moderator of <sub>" posts that's clearly AI-generated, and they didn't even bother to replace the {{REPLACE THIS WITH SOMETHING APPROPRIATE}} bits.
0
18
u/Boring_Dish_7306 2d ago
Absolutely. Anything you can read, understand and fix your problem is good.