Live data from Hacker News

What do you visualize while programming?

dillonshook.com

21–30 of 176 posts

Re: What do you visualize while programming?

#21
Pretty sure I have aphantasia. So, I don't visualize anything. But, I do often imagine data structures and algorithms as ambiguous "things" at places and in motion. Can't see them. But, I can move them around and remember where they are. Like, imagining Bubble Sort as a shell game with your eyes closed.

Re: What do you visualize while programming?

#22

When working on a hard problem, I often had to visualize how the algorithm works, data moving there, changing this, replacing that. When I debug a tricky problem and I still have not figured it out yet, I have two options: either systematically note down what the code is going through, or keep the problem in the back of my head and sleep over it. More often than not, the solution will present itself after a while if…

That really resonates with me! I’ve found that when I’m up against a tricky problem, the solution often pops into my head when I’m not actively thinking about it—whether I’m sleeping, going for a walk, or just doing something completely different. It’s like the answer appears out of nowhere after I’ve stepped away.

I’ve always wondered why this happens. Is it just how our brains work in problem-solving mode? Does anyone know of any articles or studies that dive into this? I imagine it’s not just a programming thing, but a general part of solving complex problems.

Re: What do you visualize while programming?

#27
When doing architecture work, I'm generally thinking in terms of data flows and state changes.

Programming seems more verbal to me than visual. It feels very akin to writing, I have an idea and I am talking through it. My editing of code tends to be nonlinear for this reason, drilling into areas as I would expound upon them verbally, rather than in the order the compiler will evaluate them.

Re: What do you visualize while programming?

#28
I "see" the code, but I'm not sure that I actually see anything. Maybe some kind of shapes, but they don't correspond to UML diagrams or anything. Maybe vaguely 3D blocks? But I'm not really thinking visually, so I'm not really looking at them as shapes. All I can say is that I think there is some spatial thing going on, but I can't tell you what it is.

Re: What do you visualize while programming?

#29
post #22

When working on a hard problem, I often had to visualize how the algorithm works, data moving there, changing this, replacing that. When I debug a tricky problem and I still have not figured it out yet, I have two options: either systematically note down what the code is going through, or keep the problem in the back of my head and sleep over it. More often than not, the solution will present itself after a while if…

That really resonates with me! I’ve found that when I’m up against a tricky problem, the solution often pops into my head when I’m not actively thinking about it—whether I’m sleeping, going for a walk, or just doing something completely different. It’s like the answer appears out of nowhere after I’ve stepped away. I’ve always wondered why this happens. Is it just how our brains work in problem-solving mode? Does any…

Yeah this is me too - which is why I enjoy turn based games while I’m coding, if I get stuck I distract my consciousness with 2-3 turns in Civilisation and the answer pops into my head while I’m playing.

Turn based is excellent because always I’m mid-turn when the answer comes so I alt-tab out and keep going.

My steam shows some ridiculous number of hours in game because it’s always on, nearly 24/7, in a window on my monitor

Re: What do you visualize while programming?

#30
post #9

Layers of directed graphs where: * Nodes can represent code units (lines, functions, AST) or some low level thing, even hardware parts. * Can expand a node which contains other graphs * Can group graphs into simpler graphs to describe a high level system design * edges generally mean communications between graphs/nodes

This for me, too.

Maybe more block-diagram-ish than directed graph. Depends on the software.

I am not sure how this has evolved since I am doing VHDL/FPGA design, but especially there I have the actual block diagram of what I want to build inside my head and just have to "look at it" and type it out with my hands. When it's software, then it's similar. The path the data flows

Post reply on HN