4 ms·
According to the article, a key skill to acquire are proper metal representations of problems in your field: "You want to be able to clearly and specifically vi
by eric_bullington 11y ago
According to the article, a key skill to acquire are proper metal representations of problems in your field: "You want to be able to clearly and specifically visualize the right way to do something in your head. This is what separates the experts from the chumps."
Would anyone like to discuss any particularly effective ways of visualizing programs or data? Approaches you have found effective?
- teach 11y agoIn college I got a LOT of mileage from printing out my code (this was in the 90s) and sitting down with a pencil and tracing through statement by statement. Draw little boxes for each variable, for pointers, for the stack, whatever. Change each value only when the execution gets there. Resist the urge to just skip over -- "this section does such-and-such." I'm fairly certain it's the only reason I made an A in my assembly language courses.
- eric_bullington 11y agoGreat point. On a similar note, I've gotten a lot of use out of stepping through Python algorithmic code using PythonTutor [1], which maintains a visual dashboard of stack frames/variables and heap objects. Very useful, was just using it earlier today. Doing this manually with a pencil and paper is arguably even better for learning purposes, although significantly more arduous. I should try it. 1. http://pythontutor.com/ http://pythontutor.com/
- Retric 11y agoI find it's useful to think in terms of colors or shapes for data. User input shows up RED and gets massaged to be safe. Sometimes a UI gets some data added, or chunks broken off as things flow though the program. The shape can be either how it's shown to the user, how an objects variables are defined, or just some random thing if I have yet to start coding. You can think of bits as coins HTHTT vs 10100, and enumerated types as gears.