

Ask HN: I am a copy/paste programmer, is that bad? - bikamonki

I wouldn&#x27;t be able to write a simple HTML page from scratch. Google (more specifically Stackoverflow) is a vital part of my IDE! I&#x27;ve always sucked at remembering stuff but in compensation I got logical and analytical skills. I do not blindly paste the code, I do read it and see if it fits, but I would certainly have a bad time if not code references where around while coding. So, am I a bad programmer? Or is this way of programming more common than I think?
======
tete
I disagree with most people here. If it's remembering it's one thing. It just
takes a while to remember certain things, but if you can't start out own
projects or just write a project (or part of a project) that you feel like you
know it may be a reason to worry.

But in the end it really depends on this. The problem is not the looking part,
but if you have to copy stuff and can't start projects on your own, I don't
know how that makes you a programmer.

Also it must be really hindering. What's important I guess is that it doesn't
hinder you, that you are able to get into flow while programming, that you
don't get stuck.

In other words. If you can't get into flow or if you don't understand the code
it's a pretty big problem. If you are sometimes in flow and understand what
you are doing it's nothing you should worry about. If you are in between it
probably means you need more practice. For that maybe find something that
interests you and write a small project (with as much looking as you like).

~~~
ulisesrmzroche
Do you use any 3rd party libraries?

------
amirouche
> I do read it and see if it fits, but I would certainly have a bad time if
> not code references where around while coding.

This is the most positive part of your copy/pasting practice: reading and
understanding.

Reading the documentation alone is time consuming if the documentation does
not contain example code, which visually put together what must be understood.

That said, looking up SO can also be a time sink: checking two or three
questions until finding the correct question/answer. Maybe in no time
[http://devdocs.io](http://devdocs.io) would have answered the question. I
also have a private gist app to gather snippets that I can quickly search.

> So, am I a bad programmer?

I read that a lot, experts don't need to look up the documentation. I'm not
sure how true it is. That said I recognize that knowing basics perfectly,
common Object, Array & jQuery methods, common modules in ruby/python etc...
helps to build things faster.

Having good tools helps a lot.

~~~
hellsing357
+1 for devdocs.io - very useful extension

------
timetraveller
That's normal don't let the online video tutorials fool you. They have it on
another screen or a paper to make you think they are super genius by typing
long snippets of code without even a typo.

------
jpetersonmn
I often look up things as I jump between a couple different languages
depending on what I'm working on. I'm not really looking how to do things, but
more like how something worked, or maybe a more efficient way to do something.
Usually if I'm going to copy/paste something it's just to paste into my code
as a comment to use as an example. If I had to program without access to the
internet, I'd need to have reference books around or I'd get stuck pretty
quick.

------
jordsmi
To be honest I think alot of programmers copy and paste, unless it is
something that they use often. If there is a module that you rarely use, or
have never used before, why would you know how to use it off the top of your
head? Also, some things you may be able to do on your own but copy and pasting
could save you the time that it would take you to type those X amount of
lines.

------
kidgorgeous
A great man by the name of Einstein said something to the effect of: "Never
try to remember anything you can easily look up in a book." (paraphrasing
here). I don't think I've ever met a programmer that codes complicated
programs by memory alone.

------
coralreef
Every programmer probably does this.

If I see a function that works perfectly, is short and clean, and solves my
problem, why not use it? That lets me spend less time reinventing the wheel
and allows me to move onto more difficult problems.

~~~
_RPM
It isn't fair to say that "Every programmer probably does this." I know for a
fact I don't.

~~~
coralreef
So what do you do? Study the code, close the browser, and rewrite it line for
line?

------
auganov
I don't think it's strictly bad. Having said that there's nothing more
blissful than spitting out 100-500+ lines of code that work (or makes sense as
an outline) without looking anything up.

------
eldelshell
If you ever meet someone who says they can code with Spring without Google,
they're lying.

