NeverDon’t just copy-paste code.

You are learning code, you are stuck. You can be either hasty, frustraded or both. I understand and absolve you from all this, but please, don’t “just” copy-paste code.

— — —

I’ve seen questions on the Internet (forums, IRC, Slack, StackOverflow…) that were obviously exercice for school or program.

There’s no shame in asking questions, but in the short attention-span world that is Internet, what you will likely get are answers that are each ugly in a way:

  • magic tricks
  • convoluted code
  • ill-fit habits from other languages
  • library or gem your teacher will disapprove

And so your call for help will bite you in the back: lose you right now, teach you bad code habits, and give the illusion that the problem is solved, when your understanding clearly isn’t.

— — —

Plus, these exercises are likely easy to find all over the web, so why ask it?

I want you as a junior dev to be an excellent searcher. This will give you the basic words, which you will find in the doc/ref.

Over years, this habit will give you awesome “problem solver” skills, strong basics, and a coworker I’d love to be with.

Looking for recipes is fine as long as you cross-check and make sure that every line you copy (which is not a sin) is well understood.

— — —

Oh, and take the time to read the whole page, but here’s short excerpt:

(sorry, ESR wrote it, it’s kind of offensive and dated, but still a good reference)

Go now! I get that you have no time and plenty of fun to have elsewhere.

I hope that wasn’t too patronizing, really not the intent, but I’ve seen too many juniors “broken by StackOverflow/Slacks”.