5 ms·
Maybe its me, but "Explained Visually" sounds more like it would have some 'visual' aspect to it besides a GIF of code (don't get me wrong, I think most code sh
by tsumnia 11y ago
Maybe its me, but "Explained Visually" sounds more like it would have some 'visual' aspect to it besides a GIF of code (don't get me wrong, I think most code should be made an image to limit copy/pasting).
A website like VisuAlgo (http://visualgo.net/ http://visualgo.net/) is a great example of exampling something visually should mean
- ttkeil 11y agoSetosa (http://setosa.io/ http://setosa.io/) hosts some impressive interactive visualizations as well.
- th 11y agoI agree. I was using "List Comprehensions: Now In Color" as a working title but I thought that was too nonsensical. It was actually the colorized code and not the gifs in particular that made me think "visual". Sorry for the misleading title!
- x0 11y agoWhat's the font you're using in that gif? It looks good.
- meric 11y agoIt's a good document. I know list comprehensions already but still I found it entertaining to read - I think it'll enlighten a lot of people on this topic.
- exDM69 11y agoThis article needs some more complex examples, e.g. comprehensions with multiple "for" clauses and more complex filtering. Perhaps an example using zip or enumerate. 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.
- x1798DE 11y agoWhy do you want to limit copy pasting?
- ciupicri 11y agoHe's probably referring to stuff like this: > 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-paste http://learnpythonthehardway.org/book/intro.html#do-not-copy... ))
- tsumnia 11y agociupicri has it right. I mention above, I think of it like practice shots in basketball, or going to the batting cage for baseball. While coding isn't as physically demanding, it definitely takes time and practice to get better at it. Forcing someone to write the code versus copy/paste gives them just a little more practice at the discipline.
- x1798DE 11y agoI don't know why you would want to force people to do this. There's nothing stopping someone from hand-copying code if you use text, but you're using the wrong format if you encode it as an image. So, as a result, in addition to losing copy+paste (which may be useful for someone who doesn't want to "Learn Python the Hard Way"), you also lose Ctrl + F, and if you're using an animated GIF, you also lose the ability to stop at a specific point or move around. Overall, I think the right answer is to use the appropriate format and let people sort themselves out.
- deleted 11y ago[deleted]
- birchb 11y agoI agree.
- scrollaway 11y ago> I think most code should be made an image to limit copy/pasting You think what now?
- elevensies 11y agoNot OP but I prefer to re-type rather than copy-paste because too often when I copy paste I discover that I forgot to change something.
- Majestic121 11y agoIt seems to me that the cost of retyping code each time is much higher than the cost of forgetting something. I get the underlying idea, that you "feel" and understand the code more if you type it, but holy hell would that be annoying !
- elevensies 11y agoTo qualify my statement: - 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.
- tsumnia 11y agoYup! Its suppose to be annoying (well, not 'really'). 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.
- tsumnia 11y agoAs others have discussed, making coding example images for the sole purpose of forcing them to type it out. Don't get me wrong, I copy/paste like the rest of us; however, from a learning perspective, I think forcing students to type out the code gives them practice, akin to how you'd practice your shots for basketball. 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.