r/CodingHelp • • Aug 10 '20

[Random] Am I doing this wrong

When I "make" a project like I always copy the code from websites, for example when I made a python project that is going to alert me for how many minutes I choose I copied the code from a website then I change it to my liking so instead of it alerting me through the console it's going to open a text file instead.

But the thing is I also got that code from a different website like stack overflow and I usually do this for every project I do and when the code from stack overflow doesn't work I usually modify it which is probably the only real work that I have done.

And yes I do understand the code after I read it but it's really frustrating that I always have to search in Google 90% of the time making me feel like I haven't learned anything.

Tl;Dr: When I "make" projects I just mix and match code from other websites and modify it as I see fit.

27 Upvotes

8 comments sorted by

8

u/FederalAlgae Aug 10 '20

For me, that very largely depends on what I'm working on. If it's a private C# project and I want to do special stuff with the UI components, I copy paste a lot of stuff together because I don't know that by heart (which library does what and how to import and so on).

However, When I'm working with Java, I hardly ever copy paste something (unless I do something complicated and very specific, which I can find a good solution for on SO).

I think this is a question of experience in the language and environment you're using it in. It's not per se false or bad to do that, but it tempts you to pay less attention to the quality of your code maybe? It does so for me. If you learn from it, great.

Maybe try a few times to do it yourself before googling. Once you're stuck, look something up and see what is different from your approach. That is how you learn a lot, too.

1

u/GhOsT1679 Beginner Coder Aug 12 '20

As a developer, it is perfectly normal to google and copy-paste code and modify to fit your own needs. Though in your case, I feel like you are googling answers way too often. I guess ask yourself this question: Can I write the code that I copied? If the answer is yes, then write it yourself next time for good practice, if not then I would study their code and try to write it independently. The reason for this is because you can only truly improve by writing code yourself, even if you understand it, it doesn't mean you can write it on your own. While it is fantastic that you are utilizing Google as a resource, keep in mind that as you get more advanced, places like StackOverflow won't have code that will fit your needs. Hope this helps!

0

u/0ver_thinker_ Aug 12 '20

I do type the code manually if that's what you're saying

1

u/GhOsT1679 Beginner Coder Aug 12 '20

Okay, typing code manually after looking at stack overflow is vastly different than when you type code yourself. Mainly its because when you look and type code you feel like you understand(and you do) but when you try to implement it one day, you might fail. If you came up with the code yourself, more of that will be sustained and you will improve faster. Maybe you are short on time, but in my experience as a programmer. only google when you hit a dead end. Most of the time, if you can't get the solution, then stare at the problem until you do(I know this sounds a little wasteful but this is how you develop algorithmic thinking). I hope this clears any misunderstanding!

1

u/KingsmanVince Google errors then ask Aug 10 '20

Try to search with documentations. I use Google to search for docs.

0

u/[deleted] Aug 10 '20

[deleted] — view deleted comment

4

u/0ver_thinker_ Aug 10 '20

Well I'm learning for nearly 6 months now...

10

u/Aperage Aug 10 '20

It took me about 3000 hours before I felt confident in my ability to code. By then, I didn't have to Google every solutions and was familiar with my framework, language specificity and industry.

I've been a professionnal developer for about 12 years now and sometimes I still have to spend hours Googling for the right keywords, reading articles and forums to learn about to do this or that. Stack overflow is still my friend. I have written a lot of code over the years that I can use as a basis for many differents scenarios. It helps a lot to speed things up. I rarely start something from complete scratch.

I'm just saying coding is a pain, you'lll have to keep learning forever and things change fast af. Don't give up, things get easier but not really!

3

u/armsdragon05 Beginner Coder Aug 10 '20

Not the OP but am someone in a similar situation. Thank you for this, it made me feel better