11
Friend told me to just copy-paste code instead of writing it from scratch
My buddy Dave who works at a startup told me last year that beginners waste too much time rewriting things that already exist. He said find a working snippet, test it, then tweak it for your project. I spent 3 months trying to code a login system from memory and kept breaking it. Finally tried his way and got it running in an afternoon. Anyone else have a friend who gave advice that actually worked?
2 comments
Log in to join the discussion
Log In2 Comments
kim_nelson16d ago
My cousin Jim told me to start using npm packages instead of hand-rolling everything and I told him that was cheating... fast forward two weeks and I had ten broken dependencies and a node_modules folder the size of a small car. Took me longer to fix the version conflicts than it would have to just type it out myself. So yeah, great advice in theory, real fun in practice.
9
margaretw4116d ago
Wait, @kim_nelson did you end up giving up on npm entirely or just got better at managing it? I used to be exactly like you actually, I thought reusing code was basically plagerism. But then I had to build a simple search bar and spent two days writing date formatting from scratch. My friend was like "dude, just use moment.js" and I finally caved. Now I copy small utility functions all the time and it saves me so much headache.
9