Additionally, don't copy and paste anything until you understand it. If you don't understand what code golf is being spewed, don't take the top answer. If you don't understand any answer, you probably don't understand the underlying systems well enough and need to re-evaluate what your asking for.
The only difference between a novice and a professional is that a professional checks what they are copying to understand it first before allowing it into their codebase.
Novices copy code to avoid having to understand it. Professionals copy code to avoid reinventing the wheel.
Haha right? Not saying this is you but whenever people try to tell me I have impostor syndrome, I'm thinking like "incompetent people exist. I'm just one of them".
I may do that already when I get stuck...
Tbf I am trying to learn and only ask it to explain how to do something or if I have a bug I can't figure out. I feel sometimes it's just best to get an answer if I've been stuck for a while because I'm not making progress anyway.
I feel like most of my googling of simple code is because I know what I'm trying to do, but I don't remember the correct function name and or language structure for the language I'm currently using.
Funny, I've been in my current support/devops role for 9 years and every year I wonder more what the hell I'm doing. It somehow seems like I get dumber/lose knowledge/the field expands much more rapidly than my broken mind can keep up with.
I feel like a glorified script kiddie most of the time. I couldn't program my way out of a wet paper bag if my life depended on it.
I spent years getting great with powershell so I can now confidently copy code out of chatgpt. Chatgpt's ability to spit out close to correct code faster than I can type it is amazing, but useless if you don't understand what the hell it's trying to do.
Pretty much this, it's the one use case for copilot, I know what I want to type anyway and copilot is usually close enough that 2 edits is faster than typing the whole thing and better for rsi.
Real answer, learn how to paste several code snippets from stack overflow into a ChatGPT window and ask it to do what you need. Sprinkle in some copilot to tweak as needed. Congrats, Mr Programmer.
Honestly, I hate these memes. As an old school hacker/programmer who has been doing this for many decades, I can usually just start thinking in code and start dumping out everything I need from my brain through my fingers to the keyboard. I never copy-and-paste code from online for something I’m coding (I don’t count something like copying a script to do a quick shell task of some-sort; for something like Amazon’s directions for installing Corretto I’m not going to type all that out manually; and I don’t really consider that “programming”).
But as a tech manager (and former University comp.sci instructor), I know this happens more often than I’d prefer. But some of the worst code I’ve had to review has been copy-and-paste jobs where the developer didn’t understand the task correctly and jammed in something they found online as a quick solution. I get that I started in a generation where you had to understand the problem and code the solution from scratch (because the Internet crutch wasn’t what it is today) — but the fact that so many younger developers revel in the fact they copy-and-paste code on the regular makes me sad.
+1 ai tools are fine if you already know what you want to write and it speeds up the process of coding. But when ai tools are writing code you don't understand, you cannot verify that any of the code is actually correct and doesn't introduce bugs. Ditto for copy-pasting.
Because, as I can attest as someone in their forties...
Boomers spent my youth telling me that I just needed a college degree, any college degree, and I would have a great job lined up for me almost anywhere.
Later, after many of us had graduated into a world that was absolutely fucking us we were told "Your degree was useless, why did you invest in something stupid that nobody uses like Early Childhood Education?" (something literally every child needs, adults with competent knowledge of early childhood education...)
Further, they would go on to say "Look at the tech industry, there's good jobs there. Only STEM degrees matter, who gives a fuck about art or the human condition or literature. Who needs fucking "media literacy" and who needs to learn from the past to make sure we don't make the same mistakes! LEARN TO CODE!"
"Learn to code" has been shoved down people's throats by Boomers in positions of power for two decades now. After massive layoffs in the tech industries, it has become an even bigger joke than it was, because what are all those coders without jobs supposed to do? Learn to code? Pretty sure they already did that step.
Depends on the language. I'm not gonna find shit to copy-paste for what I'm doing in Scala 3 or F#, but in Rust or C++ I'll frequently Google an issue I can't figure out and someone will have some fancy black magic hacker solution with super-iterators and turbofishies and weird type inference that I couldn't think of myself and just throw it in my code with some minor modifications :)
I’ve been professionally programming for 18 years now. And honestly, I hate writing code from scratch. I copy/paste code from other parts of my codebase and just tweak as needed. Writing code from scratch feels like I’m doing something wrong.
The feeling before writing a piece of code in an empty file isn't unlike the feeling I get when I'm about to step into the hot tub. Once I'm in I'm good, but I really have to psyche myself up to get in
Edit: Come to think of it, it's the same with writing
Funny you say that. I’m 18 days from having a 10-page paper due that will determine whether I graduate in May or not, and I have yet to start it. Like you, I just need to get past that initial hump, and then it’ll go smoother.
And yeah, a lot of people in the comments are running away from the joke, but realistically, to copy+paste code and have it work, you generally have to have a grasp of the code, at least to ask what you want and to paste it and change the variable names, and write the lines to stitch it all together.
Add imposter syndrome on top of that, and it may seem like you don't do anything of use because you copied 3 functions out of a 1k line file.
Do people really constantly copy-paste code? If I don't know something I'll look it up, but then I'll read the answer and apply it to the code I'm writing rather than copying it directly. I rarely see a piece of code that I can copy over directly into what I'm doing, and even if I can it's usually not thr best idea because the naming etc would be inconsistent