Ā #ProgrammingTips #CodeLearning #CopyPasteVsTyping
Hey fellow learners! š If you’re diving into programming and following along with labs, here’s a tip that has really helped me out: type out the code yourself instead of copy and paste. Trust me, it makes a difference!
Why should you type out the code yourself? š¤
– It helps things click in your brain
– Mistakes lead to troubleshooting which enhances learning
– You’ll have a deeper understanding of the code
So next time you’re tempted to copy and paste, resist the urge and type it out instead. Your future self will thank you! Happy coding! š
What do you think? Have you tried typing out code yourself? What has been your experience? Let’s chat! š¬
Excellent advise. I think the same for using AI too. Donāt just copy paste what it gives you, write it out.
When you type it in yourself, you actually have to look at it and make sure you typed the semi-colons and “string” instead of “strnig”. You have to match braces and parenthesis. You also get to see the choice points that the coder made: some of these are minor, like the old holy war about “braces on the line, or on a newline.” My personal opinion about this is its a way of feeling in control of a process you don’t really have control over, the same way athletes are superstitious. But making your own choices that are essentially inconsequential is how you develop your own agency as a programmer.
I do this now when reading off of textbooks. It helps a lot to get it stuck in your brain. Also preparing for the CS AP tests in high school we would hand write code. It seemed really dumb at first but helps you think about things more logically since they’re graded and you can’t just fix it for a better grade later.
It also helps to be able to read code, like go through it step-by-step like a debugger does. Indeed, if you can, you should use a debugger in step mode and see what happens. Often, beginners think a program will behave one way, but it behaves differently because they made some assumptions that were wrong.
Sometimes, they don’t even realize they are making assumptions.
It helps to be able to read code. Indeed, I think it helps to look at buggy code and determine where the bug is.
Typing it out gives muscle memory. Iām reaching for keys I never reached for before when I would write a paper.