A website like VisuAlgo (http://visualgo.net/) is a great example of exampling something visually should mean
A website like VisuAlgo (http://visualgo.net/) is a great example of exampling something visually should mean
Sorry for the misleading title!
E.g.
cartesian_product = [(a,b) for a in [1,2,3] for b in ['a','b','c']]
Could really be nice when explained in color.You think what now?
I've actually implemented typing exercises that are straight "copy this image" as one of the assignments I give students each week. Now, students have my lecture, the demo done in class, AND a typing exercise before trying to implement something like, say, a collision detection algorithm.
I get the underlying idea, that you "feel" and understand the code more if you type it, but holy hell would that be annoying !
- If found a boilerplate HTML layout and wanted to insert some stuff into it, I would use copy-paste.
- If I were editing a function to enqueue data, and I wanted to send it to two queues, I would re-type the 2nd enqueue command to avoid blindly copying over an inappropriate parameter, which is the kind of thing a tired mind might gloss over.
It's primarily a method to ensure the reader 'learns' by mimicking versus blindly copying. Annoying to a seasoned programmer, but its a great way for students to get extra practice.
> Do Not Copy-Paste
> You must type each of these exercises in, manually. If you copy and paste, you might as well not even do them. The point of these exercises is to train your hands, your brain, and your mind in how to read, write, and see code. If you copy-paste, you are cheating yourself out of the effectiveness of the lessons.
(from the intro of "Learn Python The Hard Way" ( http://learnpythonthehardway.org/book/intro.html#do-not-copy... ))
Overall, I think the right answer is to use the appropriate format and let people sort themselves out.