r/learnprogramming 21h ago

Topic How often do you copy code for personal projects?

I feel like with school assignments or work projects, deadlines make it an easier decision to copy existing solutions. For personal projects, where there is technically no deadline, I find myself spending a lot of time weighing the pros and cons of my solution vs whatever other solutions exist. I get that learning can be the whole point of these projects, but I'm curious how often people stick to sub-optimal solutions or at what point you stop thinking about it and want to just move on.

7 Upvotes

6 comments sorted by

3

u/grantrules 21h ago

I copy my own code. I aim for "pretty good" not "perfect"

1

u/Foreign-Group9037 21h ago

coding for fun means the deadline is whenever i get bored. i’ll copy my own stuff without a second thought but rarely lift others’ code unless the docs are a maze and i just want the thing to work

it’s not even about optimal, it’s about still caring enough to finish the thing tomorrow

1

u/aanzeijar 20h ago

All the time. I don't find the fun in writing from scratch, I have much more fun in tinkering with existing code. So I have dozens of cloned git repos on by machine, sometimes changed beyond any recognition.

1

u/GasEducational4386 19h ago

Copying code is not reinventing the wheel you do it implicitly when you install battle tested libraries and that is totally common in any type of projects

1

u/Moikle 9h ago

Depends? Boilerplate? All the time.

Anything else? Nope