Live data from Hacker News

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

shockoe.com

41–50 of 184 posts

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

#41

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…

The website in question might not have proper Cache-Control headers, so the page may have never gone into the cache.

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

#42
post #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.

Yep, I did the same thing with his python introduction.

I have to admit, it greatly aided my ability to recall things and get "fluent" with the language.

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

#43

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…

The website in question might not have proper Cache-Control headers, so the page may have never gone into the cache.

But the question still remains why would Cloud Flare advertise this?

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

#45
I too have been doing this with Zed Shaw's work. My biggest piece of advice is this: make sure you read the code and try to understand it before you type it in. When you are given

  char *names[] = {"Bob", "Dole", "Bananas"};
don't just write out the text as you see it (which is what I did too often). Think through and say "ok, I am creating a variable called names. There are brackets, so it must be an array, and there is an asterisk after char, so it must be an array of pointers to char. Then I construct it with string literals..."

I caught myself writing whole source files from a book without understanding a single line. I agree with danielweber when he says to try and reproduce the code before typing it out verbatim.

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

#46
Tommy, I saw the domain name of this post and went to the main site. My suspicion was correct, you're from Richmond. I am too and went to Virginia. Awesome to see a Richmonder on the front-page of HN!

I agree with this a lot. Just the act of typing it out is better (even if just marginally) than straight up copying and pasting especially early on in your career. There are some pretty complex tutorials for Java EE that rely on copy/paste and even with the context it's hard to absorb a lot of it.

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

#47
post #46

Tommy, I saw the domain name of this post and went to the main site. My suspicion was correct, you're from Richmond. I am too and went to Virginia. Awesome to see a Richmonder on the front-page of HN! I agree with this a lot. Just the act of typing it out is better (even if just marginally) than straight up copying and pasting especially early on in your career. There are some pretty complex tutorials for Java EE tha…

Were you able to read the blog? Is it not down for everyone?

It's down for me.

But thanks for the kind words!

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

#48
post #46

Tommy, I saw the domain name of this post and went to the main site. My suspicion was correct, you're from Richmond. I am too and went to Virginia. Awesome to see a Richmonder on the front-page of HN! I agree with this a lot. Just the act of typing it out is better (even if just marginally) than straight up copying and pasting especially early on in your career. There are some pretty complex tutorials for Java EE tha…

Were you able to read the blog? Is it not down for everyone? It's down for me. But thanks for the kind words!

It is down for me.

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

#49
I totally agree with the title of this post and often times I have pledged to myself to never copy and paste even though I always get the idea first what is this piece of code is doing but still most of time I end up making mistakes with copy + paste.

At the end, the time spent to rectify the errors resulting from copy + paste is much more than I thought I would save.

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

#50

Earlier quoted context omitted.

The website in question might not have proper Cache-Control headers, so the page may have never gone into the cache.

But the question still remains why would Cloud Flare advertise this?

Right. It's like: "CloudFlare caches things for you! Except for this thing here. But you can probably picture how great it is!"
Post reply on HN