Live data from Hacker News

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

shockoe.com

101–110 of 184 posts

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

#101
This is a great article and I absolutely agree with the message. I'm learning Java and I use Eclipse as my IDE of choice. The main advantage of using it is how easy it is to access JavaDocs for class, methods, and what not, but I've made a conscious effort not to rely on 'auto-complete' features if I'm implementing something I've never used before. But it is tempting to just use that for everything.

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

#104
So a long time ago there were two C compilers on the Amiga, one (Lattice C) was the "official" C compiler and it was very slow, the other "Redhat C" was really quite fast. The nice thing about the fast C compiler was you could compile and know right away where the syntax errors were, the slow compiler ground along forever.

A side effect of this was that before kicking off the slow compiler I would do a careful read of my code to be sure I hadn't done anything stupid. Often finding other bugs along the way before I finally kicked off a compile. Whereas programming on the fast compiler was more iterative and it made me a rather lazy since I could just compile/edit my way to a clean build without thinking too hard about the code.

Writing code slowly let me write better code.

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

#107

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

Glad to see Page Rule helped. Some revision on cache-control headers would help further.

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

#108
I went through the entire http://ruby.railstutorial.org/ by Michael Hartl and decided to type every code sample in vim (and in certain cases predict how to create the code before looking). It was a lengthy process, but I definitely got more out of it. Even still I find myself copy pasting code snippets, but after this little reminder I will be typing everything out by hand. It's a great way to really learn a language!

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

#109
post #72

I agree with this especially when you are doing tutorials for this reason: when you type out code, you inevitably make typos that cause bugs. This forces you to learn what some of the common possible error conditions are and forces you to learn to find and resolve them. Learning these things when you have the safety net of a tutorial is ideal, because if you can't figure it out you can always compare with the tutoria…

I was surprised at how effective it was when I started learning c# by forcing myself to type all of the exercises. What I was also pleased with was that it really helped me quickly recognize and remember patterns(code shapes), even before I understood how they worked. Plus I could leave comments for myself to come back and learn more in the difficult spots. Highly recommended.
Post reply on HN