Live data from Hacker News

Want to learn to code? Don't copy and paste, type out other people's code

shockoe.com

61–70 of 184 posts

Re: Want to learn to code? Don't copy and paste, type out other people's code

#63
post #57

Earlier quoted context omitted.

Yeah, we're a little upset it doesn't even have a cached version. Ridiculous. http://tommy.authpad.com/don-t-copy-and-paste-other-people-s... If you want to read it elsewhere

Just reached out via email to the site owner with some info/tips. We want to help. CloudFlare doesn't cache HTML by default, though you can enable that with Page Rules. http://blog.cloudflare.com/introducing-pagerules-advanced-ca... And the origin needs to be responding long enough for us to keep a copy in cache, once the Page Rule is enabled.

Thanks, appreciate it. Are you with Cloudflare?

Re: Want to learn to code? Don't copy and paste, type out other people's code

#64
This is how I learned to code. I sat down with the Turbo C book and typed out the examples. Later on (early-mid 90s) I would download code from CompuServe. Instead of using it wholesale I would try to recreate it using my own style and naming convention.

It lead to a lot of frustrating moments though. I remember sitting there and fuming trying to figure out where a variable came from. (This was when C++ was starting to get popular and variables started popping up everywhere. I was trying to figure out where in the world a counter was being declared in a for loop. Turns out it was being declared in the for loop.)

A bonus of this process is that I made a TON of mistakes and was exposed to dozens of programming styles. Because of this I can just skim code and error messages and have a general idea of what to look for.

Re: Want to learn to code? Don't copy and paste, type out other people's code

#65

Earlier quoted context omitted.

I've seen that too, but also seen that it the effect isn't quite as dramatic when typing vs. writing.

it's odd but in my experience I have found it to be the opposite. Perhaps because I've grown up with keyboards I find typing something out to be quite stimulating. When writing things down I find there is a huge disconnect between the funny scribbilous motions of my wrist and the meaning of the words they produce. Although perhaps that's a left-handed thing.

I'm right handed and I approve this message.

Re: Want to learn to code? Don't copy and paste, type out other people's code

#67

When 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

#68
post #66

Can't reach the site, but I completely agree with the title. I'll even retype my own code when refactoring things a lot of the time, just to make sure I understand what I'm slinging around.

sorry dude, server wasn't ready for it :( http://tommy.authpad.com/don-t-copy-and-paste-other-people-s...

Re: Want to learn to code? Don't copy and paste, type out other people's code

#69

When 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…

I'm a high school computer science teacher, and this is a WONDERFUL idea. I'm totally going to steal it and create a few assignments based on the concept.

Re: Want to learn to code? Don't copy and paste, type out other people's code

#70

When 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…

One thing that has really sped up my my learning over the past few months on Code Academy -- complete a lesson, then in another tab open their scratch pad feature and try to retype the code not only from memory, but also while thinking through the logic.

Has really been effective for me as I feel like I now have a pretty good (beginner) grasp on JS and Python

Post reply on HN