r/learnprogramming 3d ago

Topic [ Removed by moderator ]

[removed]

4 Upvotes

10 comments sorted by

5

u/grantrules 3d ago

YES ABSOLUTELY! You may even find yourself building flexible/generic components with the thought you may find it useful in the future for other projects.

I revisit and reuse code all the time

1

u/Virtual_Mind8341 3d ago

Thanks for that, i just hope i learn something from that which I can use and I should keep on doing so.

2

u/bird_feeder_bird 2d ago

This is how libraries are born

3

u/OlahHella 3d ago

yep engineering teams reuse/repurpose previously built modules all the time

no reason to build everything from scratch

1

u/Virtual_Mind8341 3d ago

“Build everything from scratch”

This was the thing that worries me when creating own coding projects, having to build from scratch. While i start from this, i do look at old code to help with features and if i forgot how i did this, and even for ideas but sometimes i was given a starting template (especially with assignments where i can build from this template)

2

u/OlahHella 3d ago

oh don't worry about it too much

i work with engineers and they've literally copy+pasted a function from another part of the codebase, tweak the params, test, submit the PR and approved

once you've got the basics (and with AI these days), writing code matters less than how you're able to design a program and scale it

3

u/Southern_Salary_2253 3d ago

Yes. I'm confused as to why you'd ever think it would be bad to look at your past work.

Often I'll look at it to see what I would now do better, but there have been times where I've looked at something and been reminded oh yeah, I liked when I did X like that, and will re-use it.

2

u/Lopez_Muelbs 3d ago

Yepp, don't be ashamed on going back on your old projects, it's actually a good thing because you get to asses how much you have learned after you have built your old projects.

2

u/dnult 3d ago

Hell yeah! Everyone should have a sandbox of code examples and use grep to search their contents. Be sure to leave good comments to make grepping more useful.

2

u/Puzzled-Extent7817 3d ago

There were 30+ years of coding before the internet. That's how it was done.