Want to learn to code? Don't copy and paste, type out other people's code
91–100 of 184 posts
Re: Want to learn to code? Don't copy and paste, type out other people's code
#92So I regrouped and started writing my own code. Lots of code. Very bad C++ code. Excruciatingly bad code. Over and over again. I desperately wanted to understand, and I studied the books time and time and time again, taking those concepts into my very bad code, and after time, my code became less very bad and just... bad. After about two years of this, I was barely marginally competent, but I did pretty much understand how to write code. Then I went off to college and learned computer science.
Re: Want to learn to code? Don't copy and paste, type out other people's code
#93When learning code out of a book for a new language, one trick I found that worked really well was to read the code, then close the book and try to type as much of it from memory as I could. I would futz with it for several minutes exploring various ways of making it break, seeing if I could 1) predict how I was breaking it, and 2) use the error messages to fix my mistakes. Then I would open up the book again and com…
This is how I learned/am learning Erlang.
Re: Want to learn to code? Don't copy and paste, type out other people's code
#94It's this memorization trick teachers usually told us to do, basically rewrite the notes you've taken or things you need to remember. It's somehow boring to apply and while doing it you don't necessarily realize you are learning but it does work great.
Then it's extended with programming where what you typed is used interpreted by your computer and turns results from what was typed.
Re: Want to learn to code? Don't copy and paste, type out other people's code
#95I learned to code essentially from books. I tried the type it out method. It was... um... a dismal failure. I would type it in, and I would have no idea what happened. It was all in code . There was magic in them thar characters, and the magic wasn't working. So I regrouped and started writing my own code. Lots of code. Very bad C++ code. Excruciatingly bad code. Over and over again. I desperately wanted to understan…
Re: Want to learn to code? Don't copy and paste, type out other people's code
#96In the old days of tape drives (at best) hooked up to our TRS80s, Commodores, and the like. The only way to run programs in popular magazines at the time was to type them in. If you didn't have storage and wanted to try the program again, you typed it in again. It was a pain, but certainly learned things (like how poor / slow a typist you might be). This slow process allowed you time to see and think about what was g…
These programs would get run only a handful of times, since I had no way (or it never occured to me) to save them for later use.
Re: Want to learn to code? Don't copy and paste, type out other people's code
#97When learning code out of a book for a new language, one trick I found that worked really well was to read the code, then close the book and try to type as much of it from memory as I could. I would futz with it for several minutes exploring various ways of making it break, seeing if I could 1) predict how I was breaking it, and 2) use the error messages to fix my mistakes. Then I would open up the book again and com…
Re: Want to learn to code? Don't copy and paste, type out other people's code
#98I was in college at this point, so it made spotting syntax errors easy for multiple choice questions or debugging on tests.
I also approached coding problems on paper before typing a line of code. This helped to grow how I approached problem solving, rather than whether the page would run properly or not.
If I were to start fresh I'd still take the same approach. I'm a huge believer in repetition for remembering, and writing out code rather than copy/pasting or have it be autocompleted, eventually pays off.