I thought copy pasting code from Stack Overflow was cheating until I tried it at my kitchen table in Toledo
Last week I sat at my kitchen table in Toledo for 3 hours trying to write a simple loop that adds numbers in a list. My friend who codes for a living looked at my screen and laughed, then said the exact words I needed were already on a site I had been avoiding out of pride. I typed the problem into Google, found a post with 47 upvotes, and my code worked in 90 seconds. For years I assumed real coders write every line from scratch and that looking things up means you do not actually understand anything. Now I keep a little text file of snippets I find, and I read each one out loud before I use it so I at least know what it does. It is the same as using a recipe the first time instead of inventing soup. Does anyone else here keep a personal file of borrowed snippets, and how do you organize yours?
Learning from other people instead of starting from zero is how humans have always worked, and coding is no different. Cooks follow recipes, carpenters copy joinery they saw someone else do, and nobody calls that cheating. The weird thing about programming is that we somehow got it in our heads that looking stuff up means you failed, when really it just means you skipped the part where you waste 3 hours being stuck. Your read it out loud trick is smart because it turns copying into actual learning, which most people skip. I keep a folder of snippets too and honestly half of them I could not write from memory, but I understand what they do and that is what counts. The pride thing fades fast once you see how much faster you move.