Live data from Hacker News

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

shockoe.com

31–40 of 184 posts

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

#31

I also agree strongly with this statement. When I was in school, I found that the most important part of the notetaking process was manually writing the notes during lectures. Reading them afterwards rarely helped me remember or learn more. Reading notes written by someone else was next to useless.

Taken one step further, the most important part for me was re-writing my notes before the next lecture.

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

#32
OK, so:

> This website uses CloudFlare in order to help keep it online when the server is down by serving cached copies of pages when they are unavailable. Unfortunately, a cached copy of the page you requested is not available, but you may be able to reach other cached pages on the site.

I'm probably being significantly thick-headed, but what exactly is Cloudflare even doing if it's not properly caching pages before traffic hits? And why would they want to advertise that fact on the error page?

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

#33
That may be an effective way to learn (ie. it works), but I have my doubts that it's a very efficient one (ie. you could learn more in the time you spend retyping that code) or a very entertaining one (ie. other ways of learning to code are more interesting).

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

#34

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…

Interesting concept. Especially if you consider that better memory for plausible situations is one of the differentiators between experts and beginners. Be it in programming or chess. Because experts have developed mental shorthands for common situations.

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

#36
I did this with some of Zed Shaw's work, at his request in the foreword, and I found it helped a ton with at least learning the syntax.

Understanding the data structures, not so much, but when you're trying to learn a new language the greatest initial friction is the syntax.

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

#37

OK, so: > This website uses CloudFlare in order to help keep it online when the server is down by serving cached copies of pages when they are unavailable. Unfortunately, a cached copy of the page you requested is not available, but you may be able to reach other cached pages on the site. I'm probably being significantly thick-headed, but what exactly is Cloudflare even doing if it's not properly caching pages before…

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

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

#38
post #23

Even with a computer science degree I still do this. If I read a tutorial or a book about a new library or language, I type all the examples. By the time I'm done, I know what I'm doing.

That's also how I learn. As I never met anyone who learns that way I always considered this behaviour weird. Nice to know that I am not the only one :).

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

#39

I totally agree with the central thesis of this article, typing out the code for open source projects I like has been my secret weapon for learning technologies faster than most people think possible.

A note on that process might make for a good blog post.

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

#40

OK, so: > This website uses CloudFlare in order to help keep it online when the server is down by serving cached copies of pages when they are unavailable. Unfortunately, a cached copy of the page you requested is not available, but you may be able to reach other cached pages on the site. I'm probably being significantly thick-headed, but what exactly is Cloudflare even doing if it's not properly caching pages before…

If the site goes down before anyone even hits it, I imagine that CloudFlare can't exactly get a copy. Given that CloudFlare is a free service, I suspect that it doesn't automatically cache every page, either- it might wait until a page gets to a certain level of traffic before doing so. I have no idea, though.
Post reply on HN