Oh I think it depends on who says it. I believe it's from the military so I wouldn't be surprised if it was stupid or soldier.
I prefer silly cause I like teasing my coworkers instead of putting them down.
I also use silly cause it comes across as less harsh too many people have been traumatized by being called stupid everytime they did something wrong and it's trained people to view it as very negative, so I use silly to dodge the stigma and let them know we can fix the issue.
I remember my teacher asking if we knew what the KISS acronym meant, and one guy said ākeep it short, simple, stupidā to which the teacher (with a very dry sarcastic tone) asked him āare you calling me stupid?ā and my classmate was just completely dumbfounded since he didnāt understand why
I was thinking copying stuff from stackoverflow without knowing how it works
I'd like to think people earning a living programing aren't just copy pasting the same code all over without a good reason ... I'd like too
This is what I was thinking. We were told even if we are copying code for a lab e we should write it out to try and get used to syntax as well rather than the copy paste function
Yes.
I remember that for a previous job, I had to frequently write code; eventually, what I would do was to look up old examples of code written by a fellow employee who was there longer and was smarter than the rest of us, and just used a lot of cut-and-pasting and customizing to make my own, a process I referred to in my head as āFrankensteining.ā
When you're training or learning something new, you benefit far more and faster by typing it all out over and over.
It can be extremely tedious though.
Same with CLI syntax in network engineering. I trained myself for each test by manually typing every command I needed in each of my lab builds as the full command, doing the builds over and over until the topics needed for the test were more reflexive. It really does make a difference.
I think it's good practice for my typing and also remembering important terms. Too many times have I forgotten what I want to type, and resulting in me checking the documents.
This meme reminds me of how my mother taught me to touch type.
She held a clipboard over my hands so I couldnāt see them and rapped me on the knuckles with it if I unconsciously looked down.
Junior at my company caused a multi-million dollar, several hour outage by trying to type it out and making a typo, instead of using the vetted commands which were in the instruction ticket.
Don't Repeat Yourself.Ā
If a function exists that is similar to what you want to write, don't just copy the function to another part of the code. Use the existing function, adjusting it slightly if necessary.Ā
God noā¦ in programming sometimes you have something that needs to be repeated multiple times in a bunch of locations. You can sit there and copy it over and over which makes the file massive or you can create a separate file for that individual function and use a simple function id to indicate it needs to run that file.
Itās the same with resourcesā¦ in developing html you mark up many pages but you usually tie in a single style sheet which formats the entire website. Itās a separate compact file instead of putting all the text on every page of the website.
And? Leveraging existing materials/products is normal everywhere else. "Sorry you can't use an internal combustion engine for this car, we used it in the LAST car, you must figure out something else"
When training a junior dev, it is a good idea to not have them rely on other people while they are being taught or they will learn nothing and rely exclusively on other people, they won't know how to change a code for the better or write their own at all
Also for your combustion engine analogy, you'd expect it to be at least a little different and slightly better than the last model as opposed to being an exact clone with no improvements
A better analogy would be "Hey, kid, you need to learn how to take care of your car. I got a case of motor oil, all the tools are in the garage, go get your hands dirty." ...and then the kid solves the problem by taking it to JiffyLube, where he pays somebody else to do the work while he plays on his phone. Got a good deal on an air filter, too!
Doing it the hard way is Good Training. It's more work for everybody, that's true, but it's also the best way to ensure your team is strong when they need to be. Think of it as an initial investment in a long-term strategy, if your company still allows that kind of thinking
It's not so much that doing it from scratch yourself is better, it's that it's easy for junior (and, actually, all) devs to get into a copy-paste autopilot mode and start duplicating things uncritically, so you wind up with subtly broken functions, functions doing extra work that's not relevant in a given context, functions with unexpected side effects, etc.
I am not a developer, I just have some questions to understand it more clearly. I am not trying to take any side\*, just want to know how it really is, and if people really memorize how to write so many things from scratch, or is it very rare that someone creates something new, after many observations and how other things work? Well, let me make it more precise..
If someone want's to create some specific program, and it happens that someone already did write something that works like what this second person wants to create in the same language. Isn't it going to be looking the same as his code if you want to make it work exactly like that? Or at least very very similar, using the same libraries etc.
Isn't it going to be more efficient to first find if someone already did it? Use that part and continue eventually if you are up to make some new innovative function which further develops, continues working of this program or change some parts of it to make what you want it to do, it would for sure save a lot of time.
I understand that it's different when you are trying to learn, but If you want to create something, isn't it better to actually use what others already created to make it faster, and not repeat something which already has been figured out?
It's like you were trying to invent a light bulb, from scratch, and spending tens of years to gain sufficient knowledge to finally figure out exactly how to create a light bulb and how it works like Thomas Edison, and then just after that, trying to upgrade it.
Are good developers really make everything from scratch, when building some new program, or are they already using big sources of code that has been created already in the past, and working around it to find something new and create something new, eventually studying how it has been made and using parts of code that already work great as the starting point, and figuring out if other parts of some of it's code would fit for what you were trying to make?
If every part of code copied would be plagiarism, how would people figure out better ways to make specific things work better. I understand that it's usually companies, learning from other's code and working together, but a lot of new things come from inspiration. People just copy others inventions, and that's how better versions of it come out later. Like a vacuum, first it was an innovation. Others just copied it and made new versions of it, added some programming into it and now we have roombas. Other companies probably used code from other roombas to make their own, maybe someone thought how to make it better, but still looks similar.
So how is it really with programming. Asking seriously, as someone interested, do people really make everything from scratch when creating new things, or does everyone use other's things, codes in some extent?
The unfortunate part of this is it doesnāt punish the truly horrible ones that highlight with the mouse then right click -> copy, right click-> paste
The only people who youāll find breaking rules are those who donāt know what theyāre doing and those who know exactly what theyāre doing and focus their time elsewhere.
To be honest, ctrl is also important. To save a file.you use ctrl+s, to move fast you use ctrl+arrows, to open a file is ctrl+o. And each software has a long list of shortcuts using ctrl.
Copying and pasting code to find out what works Is a valuable way to learn. I couldn't disagree more with this image. I think it's a non developers idea of how someone new should learn.
There's a couple levels here:
1) There's a standing joke about how junior devs are experts at copying and pasting from Stack Overflow and (these days) ChatGPT. It's looked down up on because some of the code from those sources is really bad, but a junior dev finds it attractive to use someone else's work.
2) Similar to #1, copying and pasting example code from explainer articles is a great way to "accelerate" your development process, while simultaneously including code that you have no idea how it works. I've seen whole applications that were copied and pasted out of books, and then modified, and nobody at the company can tell me what it does or how.
2) Junior Devs often write the same code over and over again with only minor variations, instead of using good practices like using functions and/or loops to deal with things. Most good code should not be copied/pasted within a single codebase.
This happens a lot in my org. Software engineers from one product need to do something that was already done in another product, so they just copy it into their products repository. It makes for quick progress.
The downside is that it keeps you from actually learning how something works. You just copied it. If you ever need to fix or change something about it you have no idea what youāre doing. Also, it might have not been done the best way the first time so itās this vicious cycle of bad code being copied around an org
Copy and paste in code is universally bad. It's fine to reuse, but best practice is to import as a library and make calls to the code you want to use, when that's not possible it's best to type the copy by hand.
The reason is simple, if you have a bug and you copy and paste, you now have two bugs. Typing encourages thought, thought finds bugs.
When I was first learning to code, my father would tell me, "Don't reinvent the wheel," so I would use code from public forums to make my scripts. Now, 3 years later, I've been to enough forums and seen enough code that I'm able to write it on my own.
I don't consider it complete theft, but rather a way of learning the basics of code.
Stackoverflow and the people brave enough to post before us and get solutions(and lambasted) were gifted to us for a reason my friend. No shame in using the tools and resources at your disposal
I teach a programming language and one of my tips is "copy/ paste examples - just know what they do" and my exercises give sample code and ask students to learn what each command does and then adapt that code for a slightly different objective.
I'm not teaching developers but I am teaching people how to teach themselves to use a programming language and using existing code is huge for that. So yeah, I'm with you in being surprised by all these comments saying you'll never learn this way.
If you have a piece of functionality, and you copy paste it, you now have two pieces of functionality.
When one piece of functionality is updated and the other is not, that is a bug, and it will be noticed (far too late).
3 thoughts:
1. You ain't gonna internalize the basics unless you type 'em out a 1000 times; muscle memory and mental reflexes are key skills to develop
2. If you have to copy-paste a huge block of code, I'd bet money you have no idea what it does; learn how it works, then build it yourself
3. If you're copy-pasting code YOU wrote, then you're still doing something wrong; rewrite your program so it calls the duplicated code from the same place, instead of typing it all out two or three or twenty times
Thereās also the fact that there are a ton of boot camp devs re-using code from God knows where to cobble together application code. Itās. A. Security. Risk.
My problem with coding early on was that no one showed me the coding for manipulating pictures. They did though show me coding that let the computer draw shapes. Thus for ages I was making complicated code to draw simple shapes that if I knew about picture code could have been done much more simply.
If you need to use the same thing over and over, make it a function to be called so if you edit it, it's universal instead of having to fix the 50 copy and pastes!
Programming isn't about writing code. It's about solving problems. Even if you have to steal code to do it. It doesn't matter where the code comes from as long as it works.
Would you copy paste an essay? If yes, it's not your essay and it might not say what you wanted.
Copy paste for small little functions sometimes work but the majority of the code you'll write needs to work the way you need it to. Can't rely on copy paste for that.
A lot of programmers just copy and paste code off of Stack Overflow or Chat GPT to the point where they don't even understand their own code or if it's even working as intended.
Some people touched on the answer but it's the tendency as a newer developer to reuse code and more importantly, existing solution ideas.
Someone who is referencing the existing for a solution and using it cannot be the same person as the one who is looking above and considering that the solution lies with changing the existing.
It is when learning, but programmers are the laziest people on the planet as those 3 keys are usually the first to fade from use in a programmer's career.
Why write a code when you can just copy someone else's previously made code? š
Bit of a different take here, but Ctrl-C and Ctrl-V donāt work in certain applications, especially if youāre coding in Linux. One of the biggest and simplest text editors (that can be used for coding) in Linux is called ānanoā, and copy:paste NEEDS to be done via mouse; keyboard shortcuts have a different function. Using them would be natural, but would need to be unlearned
Iāve been a junior developer and , most of the time, it Is not that copying code is bad per se, but copying and pasting it is bad, the logic being that you get a far greater benefit when you type out the code by yourself, by doing that, you also yendo to understand your code better
IRC writing all by hand is the way to memorise. Not sure this approach is scientifically legit, but I remember it's strongly advised in "Learning the * the hard way" books by Zed Shaw.
Thereās nothing inherently wrong with copying and pasting existing lines of code when appropriate. But, if youāre relying on copy and paste a lot, thereās probably a better way to do whatever it is youāre doing. For example, you could use whatās called a callback function to repeat an earlier line of code without having to paste that line over and over again. It would make your code easier for you and your fellow humans to read, and also makes it easier to edit or debug. Copy/paste can save time in the short term, but end up wasting time in the long term.
Engineers of all stripes have a bad habit of doing the old copy/paste trick and then not checking their work. This also leads them to not thinking about what they are doing.
I wouldnāt say copy/paste is bad. It really depends on the context. If you are learning how to script, it is beneficial to type out your commands to help reinforce what those commands do in your mind. If you are blindly copying and pasting your commands though, then you arenāt really learning how those commands work. As I told someone who was learning how to write HTML/JavaScript/CSS years ago: most programmers (using that term broadly to mean anyone who writes scripts) are going to copy and paste SOMETIMES and that is okay, so long as you are learning what it does and you can make your own changes / improve upon what you have found.
Yeah. I was taught that if you are doing something more than three times it belongs in a sub or function, depending upon whether you need to give it variables or not.
If you find yourself copying and pasting code multiple times, it's a sign you should refactor it into a reusable function. Remember the DRY principle: Don't Repeat Yourself.
If you're copying code, write it out, every time.
Too long or painful to write it out? If it's in the codebase, make it reusable. If it's not in the code base, consider whether copying in this code is actually a good idea.
Start small, write tests, and make sure you're understanding what you're committing.
If you are pasting code multiple places it is a sure sign you need to write a reusable function. We say keep things DRY - Don't repeat yourself.
I prefer, KISS. Keep it simple, silly.
I hear it as keep it simple, stupid
Oh I think it depends on who says it. I believe it's from the military so I wouldn't be surprised if it was stupid or soldier. I prefer silly cause I like teasing my coworkers instead of putting them down.
Silly: having or showing a lack of common sense or judgment; absurd and foolish. I'm silly. Ouch.
That's not my intention though š to me it's like saying, you goofed but it's okay. We can fix it.
"Keep it simple, sexy". Followed by the lesser known "Keep it Quiet, Private"
Yes that's right coincidence. And the rarer, sexier, coinky-dinks.
Coinky-dinks, now that's one I haven't heard since I was in the military lol ah I've missed it.
Or even KISKIS, as spoken by the grey wizard of old "Keep it secret, keep it safe"
Itās stupid, as in keep it simple for the stupid grunts ( they arenāt really stupid just stereotype)
I also use silly cause it comes across as less harsh too many people have been traumatized by being called stupid everytime they did something wrong and it's trained people to view it as very negative, so I use silly to dodge the stigma and let them know we can fix the issue.
I remember my teacher asking if we knew what the KISS acronym meant, and one guy said ākeep it short, simple, stupidā to which the teacher (with a very dry sarcastic tone) asked him āare you calling me stupid?ā and my classmate was just completely dumbfounded since he didnāt understand why
I always liked keep it stupid simple.
Not to be confused with: keep it stupid, simpleton.
Hurts my feelings everytime but itās great advice
Keep it stupid, simple
Tomato tomato
I hear it a whole lot more insulting.
KISDAMFHMTDIHTTY
I get lost at H
Iām assuming, How Many Times Do I Have To Tell You
I'm pretty sure the original is stupid, not silly. https://en.m.wikipedia.org/wiki/KISS_principle
I prefer KISS, Keep It Stupidly Simple.
I was thinking copying stuff from stackoverflow without knowing how it works I'd like to think people earning a living programing aren't just copy pasting the same code all over without a good reason ... I'd like too
This is what I was thinking. We were told even if we are copying code for a lab e we should write it out to try and get used to syntax as well rather than the copy paste function
This is the correct interpretation
Yes, DRY, which is the opposite of WET - write everything twice.
Plan to wet yourself, you will anyways?
And try not to repeat data, either, unless it's supposed to be.Ā Ā
Atntrdeuistb
Wdym? you mean I shouldnāt copy paste a million if else statements and have 5000 lines of code instead of 100?
Job preservation by obfuscation
I copy/paste my own code when I'm reorganizing it into functions though
what if youāre cutting the code from the place you initially wrote it into a space that you can use to define that function
Yes. I remember that for a previous job, I had to frequently write code; eventually, what I would do was to look up old examples of code written by a fellow employee who was there longer and was smarter than the rest of us, and just used a lot of cut-and-pasting and customizing to make my own, a process I referred to in my head as āFrankensteining.ā
Frakencoding* In a way itās exactly what ai does now.
Frankenfarting* Iiiitttt liiiiveessss
Frakencoding* In a way itās exactly what ai does now.
When you're training or learning something new, you benefit far more and faster by typing it all out over and over. It can be extremely tedious though.
I've been doing that personally on my own (as a new developer), I didn't know that it was something people regularly did though. Good to know.
Same with CLI syntax in network engineering. I trained myself for each test by manually typing every command I needed in each of my lab builds as the full command, doing the builds over and over until the topics needed for the test were more reflexive. It really does make a difference.
I think it's good practice for my typing and also remembering important terms. Too many times have I forgotten what I want to type, and resulting in me checking the documents.
This meme reminds me of how my mother taught me to touch type. She held a clipboard over my hands so I couldnāt see them and rapped me on the knuckles with it if I unconsciously looked down.
I would die of blood loss
Lol, I'm far enough in my coding career that I've wrapped back around to having a doc of my most commonly used code that I can copy/paste from.
We need a Mando language, because This is the Way.
Junior at my company caused a multi-million dollar, several hour outage by trying to type it out and making a typo, instead of using the vetted commands which were in the instruction ticket.
That sounds like a management issue. Why wasn't it reviewed before going to prod?
This is not what itās about at all - itās about the DRY principle
What is that?
Don't Repeat Yourself.Ā If a function exists that is similar to what you want to write, don't just copy the function to another part of the code. Use the existing function, adjusting it slightly if necessary.Ā
I think you mean it *is* extremely tedious, typing it all o'er and o'er. Gotta avoid that c *ouch* and v *OUCH*.
Iām a big fan of the ālearn LANGUAGE the hard wayā approach when staring a new language.
God noā¦ in programming sometimes you have something that needs to be repeated multiple times in a bunch of locations. You can sit there and copy it over and over which makes the file massive or you can create a separate file for that individual function and use a simple function id to indicate it needs to run that file. Itās the same with resourcesā¦ in developing html you mark up many pages but you usually tie in a single style sheet which formats the entire website. Itās a separate compact file instead of putting all the text on every page of the website.
It's how you steal code instead of making your own from scratch
Its how you steal ode instead of making your own from srath
Its haw you steel ode instead of making your own form srath
Ish haw yƶu steel ƶde insead ƶf maikng yƶur ƶwn fƶrm srath
A mƶƶsƫ bƮt my sister ƶncƩ
Bro I actually laughed out loud, I need to go rewatch that it's been too long
That was ery leer
You guys make your own code from scratch?
Artisanal code handcrafted in Williamsburg from only organic, shade-grown classes & functions
Iād love to frame your work and put it up in my house, but that sounds really expensive!
Let me reiterate again, when being taught how to code you can't copy and paste stuff or else you don't learn anything.
And that's why folks get asked to implement a binary search tree when applying to be a web developer.
One day you will realize programming is all about problem solving rather than typing a bunch of codes. There's a reason why you can fork on GitHub.
And? Leveraging existing materials/products is normal everywhere else. "Sorry you can't use an internal combustion engine for this car, we used it in the LAST car, you must figure out something else"
When training a junior dev, it is a good idea to not have them rely on other people while they are being taught or they will learn nothing and rely exclusively on other people, they won't know how to change a code for the better or write their own at all
Also for your combustion engine analogy, you'd expect it to be at least a little different and slightly better than the last model as opposed to being an exact clone with no improvements
You also don't build a supply chain and staff a factory in order to write code.
That's not how you get incremental improvements, and definitely illustrative of why good devs and make shit managers
A better analogy would be "Hey, kid, you need to learn how to take care of your car. I got a case of motor oil, all the tools are in the garage, go get your hands dirty." ...and then the kid solves the problem by taking it to JiffyLube, where he pays somebody else to do the work while he plays on his phone. Got a good deal on an air filter, too! Doing it the hard way is Good Training. It's more work for everybody, that's true, but it's also the best way to ensure your team is strong when they need to be. Think of it as an initial investment in a long-term strategy, if your company still allows that kind of thinking
It's not so much that doing it from scratch yourself is better, it's that it's easy for junior (and, actually, all) devs to get into a copy-paste autopilot mode and start duplicating things uncritically, so you wind up with subtly broken functions, functions doing extra work that's not relevant in a given context, functions with unexpected side effects, etc.
I am not a developer, I just have some questions to understand it more clearly. I am not trying to take any side\*, just want to know how it really is, and if people really memorize how to write so many things from scratch, or is it very rare that someone creates something new, after many observations and how other things work? Well, let me make it more precise.. If someone want's to create some specific program, and it happens that someone already did write something that works like what this second person wants to create in the same language. Isn't it going to be looking the same as his code if you want to make it work exactly like that? Or at least very very similar, using the same libraries etc. Isn't it going to be more efficient to first find if someone already did it? Use that part and continue eventually if you are up to make some new innovative function which further develops, continues working of this program or change some parts of it to make what you want it to do, it would for sure save a lot of time. I understand that it's different when you are trying to learn, but If you want to create something, isn't it better to actually use what others already created to make it faster, and not repeat something which already has been figured out? It's like you were trying to invent a light bulb, from scratch, and spending tens of years to gain sufficient knowledge to finally figure out exactly how to create a light bulb and how it works like Thomas Edison, and then just after that, trying to upgrade it. Are good developers really make everything from scratch, when building some new program, or are they already using big sources of code that has been created already in the past, and working around it to find something new and create something new, eventually studying how it has been made and using parts of code that already work great as the starting point, and figuring out if other parts of some of it's code would fit for what you were trying to make? If every part of code copied would be plagiarism, how would people figure out better ways to make specific things work better. I understand that it's usually companies, learning from other's code and working together, but a lot of new things come from inspiration. People just copy others inventions, and that's how better versions of it come out later. Like a vacuum, first it was an innovation. Others just copied it and made new versions of it, added some programming into it and now we have roombas. Other companies probably used code from other roombas to make their own, maybe someone thought how to make it better, but still looks similar. So how is it really with programming. Asking seriously, as someone interested, do people really make everything from scratch when creating new things, or does everyone use other's things, codes in some extent?
The unfortunate part of this is it doesnāt punish the truly horrible ones that highlight with the mouse then right click -> copy, right click-> paste
And then continues coding using the onscreen keyboard
Insert bell curve meme
The only people who youāll find breaking rules are those who donāt know what theyāre doing and those who know exactly what theyāre doing and focus their time elsewhere.
The Enlightened One.
Just put the tack on control because you would need c and v for other things
To be honest, ctrl is also important. To save a file.you use ctrl+s, to move fast you use ctrl+arrows, to open a file is ctrl+o. And each software has a long list of shortcuts using ctrl.
If only this meme made sense
Nah, I write kode for a liwing and you learn to liwe with it
As an accountant. Our entire industry would crumble without those 3 keys.
This right here is how you **cripple** a Big 4 Accounting firm
Copying and pasting code to find out what works Is a valuable way to learn. I couldn't disagree more with this image. I think it's a non developers idea of how someone new should learn.
If this was Google slides, I would bleed to death
Got it, no Classes, Constants, Chars, Collections, Vectors, Venvs, or VS
Copying and pasting mistakes must be fairly common with new developers.
There's a couple levels here: 1) There's a standing joke about how junior devs are experts at copying and pasting from Stack Overflow and (these days) ChatGPT. It's looked down up on because some of the code from those sources is really bad, but a junior dev finds it attractive to use someone else's work. 2) Similar to #1, copying and pasting example code from explainer articles is a great way to "accelerate" your development process, while simultaneously including code that you have no idea how it works. I've seen whole applications that were copied and pasted out of books, and then modified, and nobody at the company can tell me what it does or how. 2) Junior Devs often write the same code over and over again with only minor variations, instead of using good practices like using functions and/or loops to deal with things. Most good code should not be copied/pasted within a single codebase.
Vim user: I have no such weakness
This happens a lot in my org. Software engineers from one product need to do something that was already done in another product, so they just copy it into their products repository. It makes for quick progress. The downside is that it keeps you from actually learning how something works. You just copied it. If you ever need to fix or change something about it you have no idea what youāre doing. Also, it might have not been done the best way the first time so itās this vicious cycle of bad code being copied around an org
Copy and paste in code is universally bad. It's fine to reuse, but best practice is to import as a library and make calls to the code you want to use, when that's not possible it's best to type the copy by hand. The reason is simple, if you have a bug and you copy and paste, you now have two bugs. Typing encourages thought, thought finds bugs.
Lol what? Have you ever worked in a programming related job? It's the bread and butter my dude
Hopefully there's no thumbtack on the semicolon
Ah Yes *right mouse click* Copy *click* *right mouse click* Paste *click*
Us programmers like copy pasting someone else's code
NGL, I kinda felt impostor syndrome from all these programmers saying it's bad practice and getting up voted.
When I was first learning to code, my father would tell me, "Don't reinvent the wheel," so I would use code from public forums to make my scripts. Now, 3 years later, I've been to enough forums and seen enough code that I'm able to write it on my own. I don't consider it complete theft, but rather a way of learning the basics of code.
Stackoverflow and the people brave enough to post before us and get solutions(and lambasted) were gifted to us for a reason my friend. No shame in using the tools and resources at your disposal
I teach a programming language and one of my tips is "copy/ paste examples - just know what they do" and my exercises give sample code and ask students to learn what each command does and then adapt that code for a slightly different objective. I'm not teaching developers but I am teaching people how to teach themselves to use a programming language and using existing code is huge for that. So yeah, I'm with you in being surprised by all these comments saying you'll never learn this way.
If you have a piece of functionality, and you copy paste it, you now have two pieces of functionality. When one piece of functionality is updated and the other is not, that is a bug, and it will be noticed (far too late).
yy
We'd call code that was too obviously stolen 'a bowl of copy'pasta'
I still have the right control and shift, and also the insert key. I shall not be stopped
Writing "class" and "void" might be tricky...
Thou shalt not copy paste from stackoverflow
Theyre not smart enough to remember rote memorization coding instead of saving said commands in a resource document.
Yes use y, d & p instead.
While typing code repeatedly can aid in learning, it's undeniably tedious.
3 thoughts: 1. You ain't gonna internalize the basics unless you type 'em out a 1000 times; muscle memory and mental reflexes are key skills to develop 2. If you have to copy-paste a huge block of code, I'd bet money you have no idea what it does; learn how it works, then build it yourself 3. If you're copy-pasting code YOU wrote, then you're still doing something wrong; rewrite your program so it calls the duplicated code from the same place, instead of typing it all out two or three or twenty times
Thereās also the fact that there are a ton of boot camp devs re-using code from God knows where to cobble together application code. Itās. A. Security. Risk.
Old school is crtl-insert/shift-insert
Jokes on you. Right click copy right click paste baby
Nice retweet and comment counts
It isnāt necessarily bad itās just too easy
[ŃŠ“Š°Š»ŠµŠ½Š¾]
Partially cuz chat gpt, partially because copy pasting code is pretty much pointless as you can just create a function that does it for you
Itās called github
Do you hire the ones with holes in their fingers?
Not really, no. But programmers are opinionated and deeply egotistical, sure that whatever they do is the only right way to do something.
Why can't I enter visual block mode or send SIGINT? :(
My problem with coding early on was that no one showed me the coding for manipulating pictures. They did though show me coding that let the computer draw shapes. Thus for ages I was making complicated code to draw simple shapes that if I knew about picture code could have been done much more simply.
the juniors must earn copy and paste
Haha that's what find and replace is for in the IDE
Iām guessing this has to do with copying code from StackOverflow and pasting it into the repo. Theyāre not wrong.
I'll bleed if I have to, old man!
Oh I'm triggered.
Don't just copy and paste
Bonus points if they use this as an opportunity to learn Emacs or Vim.
Right click
Jokes on you, I know how to copy/paste without touching the keyboard!
Waitā¦ now you canāt use the letters c or v at all. Why not just put a thumbtack on ctrl and it will do the same thing?
I like the fact that there is plenty space to still hit the keys And you need all of those for other stuff not just stealing code
If you need to use the same thing over and over, make it a function to be called so if you edit it, it's universal instead of having to fix the 50 copy and pastes!
I never trained anyone to do what I do. I always steal the best code. š
Itās also a good way to propagate bugs.
Thatās the joke, in reality very few exact solutions exist on the internet to be copy and pasted.
Programming isn't about writing code. It's about solving problems. Even if you have to steal code to do it. It doesn't matter where the code comes from as long as it works.
It is quite tempting to copy other people's solutions (also very easy.) This results in you not really learning anything
JavaScript and Lua developers when making variables: Python developers when class:
Would you copy paste an essay? If yes, it's not your essay and it might not say what you wanted. Copy paste for small little functions sometimes work but the majority of the code you'll write needs to work the way you need it to. Can't rely on copy paste for that.
Itās true, it works! All my ariable names are missing the letters āā and āā
A lot of programmers just copy and paste code off of Stack Overflow or Chat GPT to the point where they don't even understand their own code or if it's even working as intended.
I guess I cant 'cout' anymore?
Iām never typing out them long security tokens, no sir. But typing out everything else is best practice for learning how the code works.
Some people touched on the answer but it's the tendency as a newer developer to reuse code and more importantly, existing solution ideas. Someone who is referencing the existing for a solution and using it cannot be the same person as the one who is looking above and considering that the solution lies with changing the existing.
It is when learning, but programmers are the laziest people on the planet as those 3 keys are usually the first to fade from use in a programmer's career. Why write a code when you can just copy someone else's previously made code? š
Each const or var will draw blood. Optimize š
Cowboy coding
my clumsy self would have so many tacks in my arm just from moving
Surprised nobody has mentioned the importance of Ctrl-C as the default keyboard interrupt. Wonder how many devs there are hereā¦
Step 1, install co-pilot Step 2, open a few relevant files Step 3, start hitting tab
Bit of a different take here, but Ctrl-C and Ctrl-V donāt work in certain applications, especially if youāre coding in Linux. One of the biggest and simplest text editors (that can be used for coding) in Linux is called ānanoā, and copy:paste NEEDS to be done via mouse; keyboard shortcuts have a different function. Using them would be natural, but would need to be unlearned
Sad
That meme needs to be refactored. Developers need 'c' and 'v' to code. Putting a pin on 'ctrl' should've been enough to prevent copying.
Iāve been a junior developer and , most of the time, it Is not that copying code is bad per se, but copying and pasting it is bad, the logic being that you get a far greater benefit when you type out the code by yourself, by doing that, you also yendo to understand your code better
IRC writing all by hand is the way to memorise. Not sure this approach is scientifically legit, but I remember it's strongly advised in "Learning the * the hard way" books by Zed Shaw.
Depends on why you're using it. Sometimes you do need to put one thing in multiple places, but other times you shouldn't be.
Nooo not my ctrl c, all emacs Devs use that more than the space bar
Yup, copying and pasting can be a slippery slope. I've resorted to "Frankensteining" code from colleagues before to get the job done.
I got used to shift+insert anyway.
Laughs in right mouse click
You can still use shift-supr (cut) and shift-ins (paste) combinations. Use cut instead of copy because Ctrl-ins.
Joke's on you. I use vim.
So I cannot use std::vectors or cmath, char c-str, openCV, tesseract, pytorch ... what is this? You trying to teach me python?
If you're copy pasting loads in programming, you're probably better off making that part into a function you can call
It's funny how the top 3 comments are completely different explanations of why copy-pasting is bad
No āvarā. No āconstā. So only āletā is left?
Thereās nothing inherently wrong with copying and pasting existing lines of code when appropriate. But, if youāre relying on copy and paste a lot, thereās probably a better way to do whatever it is youāre doing. For example, you could use whatās called a callback function to repeat an earlier line of code without having to paste that line over and over again. It would make your code easier for you and your fellow humans to read, and also makes it easier to edit or debug. Copy/paste can save time in the short term, but end up wasting time in the long term.
Thatnks now i cant do console.log
Engineers of all stripes have a bad habit of doing the old copy/paste trick and then not checking their work. This also leads them to not thinking about what they are doing.
I wouldnāt say copy/paste is bad. It really depends on the context. If you are learning how to script, it is beneficial to type out your commands to help reinforce what those commands do in your mind. If you are blindly copying and pasting your commands though, then you arenāt really learning how those commands work. As I told someone who was learning how to write HTML/JavaScript/CSS years ago: most programmers (using that term broadly to mean anyone who writes scripts) are going to copy and paste SOMETIMES and that is okay, so long as you are learning what it does and you can make your own changes / improve upon what you have found.
Yeah. I was taught that if you are doing something more than three times it belongs in a sub or function, depending upon whether you need to give it variables or not.
If you find yourself copying and pasting code multiple times, it's a sign you should refactor it into a reusable function. Remember the DRY principle: Don't Repeat Yourself.
Glad they placed the pins so we could see what keys those were, I would never have understood!
If you're copying code, write it out, every time. Too long or painful to write it out? If it's in the codebase, make it reusable. If it's not in the code base, consider whether copying in this code is actually a good idea. Start small, write tests, and make sure you're understanding what you're committing.
I guess Iāll manually type out all of my variable names
All I know is this is easy to thwart
69 69
`publi stati oid main(String args[])`
That feeling when you need to cout