Ask HN: I am a copy/paste programmer, is that bad?
I wouldn't be able to write a simple HTML page from scratch. Google (more specifically Stackoverflow) is a vital part of my IDE! I'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?
15 comments
[ 2.9 ms ] story [ 45.8 ms ] threadThis 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 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.
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.
For many snippets there is no license so they're assumed to be under full copyright.
I was at a company that was required to send their code through Black Duck once, and they caught a 3-line function that was lifted from the Java runtime classes (because it couldn't be overridden). We had to issue a new release over this.
Also, I'm surprised how positively copy-paste coding is received here. Looking at docs is one thing, but otherwise it's not very good to rely on snippets from the web. A lot of things you want to program are not found by googling. Can you imagine a journalist saying they don't write their own their own stories, they just copy-paste paragraphs from already published stories and add some sentences to connect them?
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).