Want to learn to code? Don't copy and paste, type out other people's code
111–120 of 184 posts
Re: Want to learn to code? Don't copy and paste, type out other people's code
#112I 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…
For some reason, probably because I was a tiny kid learning a new thing, this tedious task was so much fun. And that's how I learned my first programming language. Never opened a single tut or instructional book.
Re: Want to learn to code? Don't copy and paste, type out other people's code
#113Re: Want to learn to code? Don't copy and paste, type out other people's code
#114So 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 o…
Back in the day when you had to submit your code to the computers overnight and wait until the next day to find out if you got your output or just a one-line compiler error, you were much more careful to avoid errors, big or small.
Having a longer iterative cycle can be good training.
Re: Want to learn to code? Don't copy and paste, type out other people's code
#115How is stuff like this news to people? This is fundamentals, people. Fundamentals.
Re: Want to learn to code? Don't copy and paste, type out other people's code
#116That 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).
So in my case, it's more work to type out code than to copy and paste, but it saves work in the long run.
Re: Want to learn to code? Don't copy and paste, type out other people's code
#117I 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…
Can anyone else relate to this? Back in the day (early 90s), I would go down to the public library, pick out a thick book full of computer games written qBASIC, and of course I had to type them in all by hand. We didn't have internet yet, the idea of copy-and-paste from somewhere did not even exist in my mind. So I would copy these 10,000-line BASIC programs in by hand into our 386 computer, one line at a time. For s…
Re: Want to learn to code? Don't copy and paste, type out other people's code
#118How is stuff like this news to people? This is fundamentals, people. Fundamentals.
Re: Want to learn to code? Don't copy and paste, type out other people's code
#119Re: Want to learn to code? Don't copy and paste, type out other people's code
#120Earlier quoted context omitted.
This is how I learned/am learning Erlang.
Reimplementing standard library functions is great for Haskell too. The biggest of the "big breakthrough" experiences I had was from trying to reimplement the standard monadic State datatype.