Hacker News new | past | comments | ask | show | jobs | submit login
What do you visualize while programming? (dillonshook.com)
116 points by dillonshook 3 months ago | hide | past | favorite | 167 comments



I don't have aphantasia (I can picture people and things if I want to) but unless I'm building a user interface, my thinking is completely non-visual when I'm programming or thinking about systems or data.

When someone asks me to draw an architecture diagram or a diagram of our production infrastructure or whatever, I am very slow at it and the result is usually middling at best, because my mental model of those things has no geometric or spatial component at all.

To the article's point, I've can't recall ever finding a visualization of my actual code or architecture that helped me work through a problem. When I've tried, it has always just slowed me down because I constantly have to map back and forth between the picture and the native non-geometric version in my head.

That's not to say I never use any kind of visualization. Graphical representations of things like profiling results are convenient and useful to me. But they tend to be more like representations of numeric data than representations of systems or code.


I'm similar.

I think I would visualize architecture diagrams if they were a good visual representation of how software works, but honestly I think they suck.

As to richard feynman, I think of the other chapter in his book, the one where he invents a whole new math thing without greek letters. But it turns out that his perfect island utopia can't communicate with others and he falls back to the imperfect accepted way of greek letters.


>When I've tried, it has always just slowed me down because I constantly have to map back and forth between the picture and the native non-geometric version in my head.

That's the whole point though, and I think the article try to also point that.

That is, there are considerations which are harder or downright impossible to model when a scene is approached under some perspective. But change perspective, and everything might now be obvious if not completely trivial to handle. The additional information pointed here is that even if placed in the very same perspective, people will still perceive the situation differently. Even at the same position with the same light exposure, a color blind person won't experiment the same observation as someone whose cognitive process overload the mental picture with additional color information.


I've tried testing to see if people grasp architectural diagrams, and they basically do not succeed at it past a trivial case. You're likely just more honest.


But, to be fair, I found that the very basic architectural diagrams often are the most useful, especially when introducing someone new. Like three nodes connected with three lines shows the data flow (or who calls who).

More complex diagrams are often a waste of time and get outdated soon anyway.


I do like sketching those up, but in an ultra-simplistic way (literally just a word/label and some arrows). Paper sort of extends my working memory, so I use it as a temporary storage to think through something that’s getting too big to hold in my mind. But it is so vague that coming back to it later, or someone else taking a look might not benefit anything.


Same. When I’m actively coding I have a sense of relationships and how things fit together, and I often discover problems by a sense that things aren’t fitting together the way I expected. Then I have to look closer.

When I think out a problem I tend to do so in words rather than diagrams, on paper, or in Obsidian (or the FreeMind mind-mapper, which is really just a graphical outliner) until I have the whole thing in my head and all the relations are clear in my head. I don’t mean that I picture them, but everything fits together and I know it. By then I can write down and implement the solution.

It’s a very non-visual process, and I can’t really explain just what’s going on in my head. I think of it as loading the problem into my back-brain, which then condescends to let me know certain things about it. The actual structures, if you can call them that, are mostly hidden from my conscious mind.

But it works. I’ve been at this for four decades, and I’ve a reputation for writing reliable code. But it’s deeply weird, even to me.


Very much the same. Visual representations are just a translation of whatever happens within the brain to be able to articulate it somehow to other people.

I think that's the beauty of it, though. It's never really there, even the code itself is a translation.


Yeah I'm the same. I can visualize my house. When debugging and there are large number of numbers in systems to keep track of then arranging the systems on a piece of paper just to quickly find the numbers associated with each system helps, but beyond that when thinking about code it is all maths with no spacial or visual component, just logical statements and reasoning. E.g. When I think of a shuffle-shard I don't visualize the sets, I just think, subsets of size k.


Yeah I'm the same. I think of program code more like like an idea expressed in a language, not like a space. So in the same way I don't visualize anything in particular when I have a conversation, I don't when I program either.


I think the title by itself suggests a different question than the article raises.

The idea of the article is that certain visualizations can help think through certain problems. Maybe you can hold these visualizations in your head, or maybe you can't (because your aphantasic, they're too complex, you're tired, whatever), but they're just as available to you on paper or in diagramming tools if you need them. It's trying to start a discussion about what helpful visualizations people turn to in specific problem contexts.

It's separately interesting to hear people try to characterize what they visualize in some generic/universal way, but I think it's causing a lot of people to self-diagnose as aphantasic when it's not indicated. You're not obliged to have some vague generalized visualization going on in your head when programming any more than you would be when speaking, or writing, or playing music. More commonly, one might draw on specific visualizations here and there as they enrich and relate to what you're expressing in your art.


> The idea of the article is that certain visualizations can help think through certain problems

When I picture stuff and I'm problem solving or whatever, I've tried to figure out if the mental images are a tool or just a side effect.

I can feel that my thought or idea happens almost instantly, and that internal monologue or internal imagery seems to follow the thought or idea and seems like it's more of just a representation of the thought that's really embedded somewhere else in the brain.

It seems like words+images might just be a way to keep thoughts in working memory, kind of like a handle or reference or place holder.


I do not have aphantasia. Too much phantasia if anything. But I don’t visualize shapes and colors when programming. In fact I find block and arrow diagrams confusing. I visualize the code itself, but zoomed out. It takes on the feel of a house I’ve spent a lot of time in. I know my way around, I know where I left my hat (a function) when I walked in (when I wrote it), which drains clog easily (hairy IO code), which furniture needs dusting (code I haven’t looked at in a while). But to be clear, this is a non-visual metaphor. The visual is the code.


I think, I am similar. I've discovered source minimaps when they came out first almost 20 years ago. And I loved the sense of spatialness they added to the code .


Agreed. It's not like every problem requires you to imagine a mental model to represent and understand it. Some things are just intuited, especially as you get more proficient.


I can't really picture things in my head in a visual way, but i can keep diagrams in my head as well as draw them to solve problems. What I often find weird is that some colleages cannot cooperate with me on such diagrams and others can. I guess the former hold structures in their head in a different (more textual or holding more in memory at once, i am not sure) way than I do.


I personally have aphantasia, and, funny enough, I don't visualize anything when I'm coding, or reading code: I just understand the concept more or less deeply, but always without any images: It's just the "concept" that I understand. It's really like if I had an interpreter in my head when reading and when coding, I do the opposite: I know the required sequence and I reverse engineer it to the programming language version.

Do you guys really have schema in mind??


I don’t have aphantasia but I visualize nothing when I code. Only words, verbs, and sentences (classes, variables, statements).

I also visualize me smiting the previous programmer who wrote the awful code that I have to work on but that’s another story.


And then you run git blame to see who to smite and turns out you wrote the code two years ago ;)


It's always that idiot! Whish he wouldn't keep following me from job to job.


I am reassured by noticing that idiot is following me. The way I figure it, the fact that past Me is a coding idiot means that present Me has improved as a programmer. I hope that continues indefinitely and that future Me will consider present Me an idiot as well.


I have kind of a crummy mind's eye, so my mind spontaneously produces vague "fantasy mechanisms" that seem to float in a void and interact with one another in some way that is analogous to the program, but there's no coherent metaphor and I don't think these visualizations actually hold any useful information or help in any way.

So at least for me: no, definitely no schema in mind. If you're missing out on that, so am I! Affect is weird.


Same here...


I have aphantasia and have long thought that my lack of a mind’s eye might be an asset for programming, much like how a blind person will typically have better-than-average hearing.

If programming is best done through abstract thought and doesn’t benefit from pictures, then I’ve been training since the day I was born.


I have aphantasia too an I do a lot of game jams where I more or less make something from start to finish in one go.

One of the things I noticed is I approach a game from the point of view of how it is played, whereas most people approach games from the perspective of what it is about. I'll make a navigation game with a pirate theme as opposed to a game about pirates where you navigate.

I also don't use engines and make something from scratch each time. These factors may go hand in hand, I build up from the mechanics instead of fashioning a scene into a game.


Which programming languages do you prefer when creating games?


Recently, JavaScript, more due to the fact that everyone can play the things without having to install.

Previously pascal, Blitz basic, Delphi, Haxe, actionscript. some other things I forget.


Many of us work the way you do, more or less of the time, and I think the fair term to use for that is fluency.

But I also think there are many working engineers, including some who have been in the trade for a very long time, that don't develop it.

There are surely other roads to doing good work without fluency, just like there is when forced to work in a foregin language with only modest proficiency, but I can't help but suspect it's a much more exhausting experience.


Yes, I think you've totally coined it with the fluency concept.


It's more like feelings that are not visual but much more tactile, itching, irritation, smoothness, grittiness, bad code like tasting dirty sand.


This seems like synesthesia, I've read that it may help excelling as you have several senses to use at the same time.


I had to really consider it because while I am familiar with synesthesia I never really thought it would apply in my case, but when I got deeply into thinking about it the sensations are pretty much in the exact same case.

I think its why I might get a little too irritable at silly code!


I don't have synesthesia, this doesn't prevent me to be totally mad in front of bad code lol ¯ \ _ ( ツ ) _ / ¯


Honestly, I'm not sure that I do. It feels like I do, as the deeper that I get into a complex system, the more clearly I can see the whole and how all of the parts interact.

But if I try to draw it? Usually I'll lose state and can't really picture it as well. I'd have to rebuild state as a graphic representation to do that.

So... I don't really know how my mind is organizing it, tbh.


If I'm "in the zone", then I stop being aware of the monitor and keyboard and all I see is what's in my mind's eye: geometric shapes coming in and out of existence and moving in various ways that relate to what I'm doing. Then it feels like the code is just pouring forth on its own without me paying attention to it.

It's seriously an altered state.

Most of the time I'm not in that state[1], though. In those cases, I don't think I really visualize anything. I think my mind is too occupied with egg-juggling to have the cycles to spare on visualizing things.

[1] The older I get, the more difficult the state is to achieve and the more delicate it is when I've achieved it. Which is a shame because my best work is done in that state.


I don't even have to get in the zone for that, spatial relationships with various shapes (they're usually tagged blobs rather than geometric shapes; it's not something that could easily be made into an image to share with people) are just how I think about code in general. I switch from my normal "internal voice" style of thought to something different that usually doesn't use words, except occasionally for things like prepositions to help with relationships.

Really this is the same style of thought I usually have when I'm reading a book. Usually I don't have the entire thing mapped out like you'd see in a movie, just blobs that represent the characters and objects in the setting, but they're moving around and interacting as if it's a movie. If I get in the zone while reading this can temporarily override what I'm seeing so I don't even realize I'm still reading words and turning pages.


Wow. I never really thought of it before, but yes -- getting absorbed into a book is a very, very similar experience.


This happens to me also. I have an unfounded, loose theory that this is when my left and right brain are in sync with each other. Some days I'm more creative, others I'm more logical but when I'm in the zone I'm both of those things at once and everything 'clicks' together so easily, regardless of what it is.


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 I still bother with the problem. I reckon I can not solve all problems like that, but when my mind refuses to dig in, that is often the only effective way to solve the problem. Pushing harder only wastes time and risks saturation.


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.


Julian Jaynes[1] makes a pretty compelling argument that our unconscious mind does pretty much all of the heavy lifting with regards to problem-solving. The conscious mind just steers us and lets us remember what we are doing.

If I recall correctly an example he gives is looking at a math problem. Looking at 2+2 as an adult you instinctively know it to be 4. As a child you may have had to count on your fingers or write out the problem until the abstraction of numbers was solidified for you, and now it is just a black box that your unconscious has added to a "tool belt" of sorts.

For me I would describe the process of learning/problem solving as my conscious mind navigating some solution/problem space and figuring out the general shape of it. Once I have figured out the shape of the problem, the answer either:

1. Immediately looks like the shape of another, solved problem. In which case I just use that solution.

2. Is not immediately apparent.

In the case of #2 I just play around with different strategies that mostly don't work, but it helps me build a mental model of the problem. Then I wake up in the middle of the night with a solution, or figure it out while I am showering/eating/driving/etc.

[1] https://en.wikipedia.org/wiki/The_Origin_of_Consciousness_in...


There must be a connection to how doctors advice to talk to (even unconscious) patients who survived a stroke: the brain of the patient is still actively receiving information and constantly rewires itself while trying to process the data over and over again. In case with a complex programming problem, the person itself is responsible for the 'feedback loop'. Like how you can't stop thinking about the problem under different angles. Thus no need for external stimulus. I'm guessing the best time for that kind of processing is when one is asleep because there is simply not much else for brain to do in that state. Plus, when asleep, some long-term memory mechanisms kick in which make the already processed data more accessible and easier to work with. If there are some studies explaining the why's, I bet the medical ones focusing on brain damage and long-term memory would be the most related.


I have that a lot. It seems my mind needs to try a lot of combinations and suddenly stumbles upon one that makes sense and a light lits up. Browsing through the code or reading the docs only tends to get in the way for that process.

There's the need for some noisy creativity to be able to try to match a lot of combinations including the non obvious ones, where the solution space is.


There is a free coursera course I am doing, where exactly this phenomenon is explained as diffuse vs focused thinking by neuroscientists.

Here is the link: https://www.coursera.org/learn/learning-how-to-learn/


If you have not seen it I'd recommend watching Rich Hickey's talk on Hammock Driven Development: https://www.youtube.com/watch?v=f84n5oFoZBc


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


I don't think I can only play 2-3 turns of Civilization at a time.


Not gonna lie developing that discipline was really difficult …


Very interesting. Any turn-based games you'd recommend for someone who's completely new to them? I have zero knowledge in that area but would love to try it out.


Try Civilisation, probably start with the current one - Civ 6

Then if you like it you can work your way backwards

If you like a more futuristic setting then Endless space 2. Or civilisation beyond earth is really fun to colonise another planet and research futuristic technology and alien biology.

If you like puzzle games with no time pressure SpaceChem.

These are my favs


I visualize the tent my family will live in if I get layed off.


You should buy a really nice tent now while you have cash flow.


Always have a rainy day fund, in this case for buying a good fly.


That might contribute to a self-fulfilling prophecy


Why spend the capital on a tent. A survival manual is magnitudes cheaper and accomplishes the same thing, ultimately.

/s


The amount of things you can accomplish with a tarp or two, and knowledge of some knots, is great. Absolutely underrated method of camping if you're not in a place where you'll get eaten alive by bugs.


back in school the best basketball player in our conference was a quirky, affable guy who had little skill, athleticism, and never really exercised or exceeded the bare minimum at practice. he said what made him win was he pretended his entire family was going to be murdered by the opposing team if they won. then hed go out and outcompete everyone


I'm a designer by trade, programming is largely a hobby for me. By default I see things as pictures in my mind, I always have.

When I read something and it doesn't make absolute sense to me, I need to learn more about the context so that I can 'see' the whole picture and how it fits together. This means I can take a while to grasp something, but once I do I seem to have a better understanding of it than my peers - likely because I have that wider context.

I also have a tendency and desire to simplify the complex - which I think is a combination of my need to learn the detail in order to build that picture in my mind - and with my design background I can represent that well in reality.

In my corporate day job it means that I can take complex stuff and make sense of it. And provided I've got support to be brutal in cutting down information, I can simplify it for others to grasp also.


Simplifying the complex is an invaluable skill. It lets you cut the cruft from the problem and see it as it truly is, which can lead to shrewd, sometimes genius implementations.


Do you really clearly see an image with colors stably without it easily disappearing? I can only kind of pretend I see something and then in a way see it through the pretending :)


When I was first introduced to mental visualization, I thought I couldn't do it because I struggled to clearly picture something as simple as an apple - or any other familiar object - in my mind. But with practice, the images slowly became clearer and more stable. Through continued practice, I was able to visualize more complex things, like text and even music sheets - which is kind of a cheat code, because you can memorize what you can visualize.

Something else I learned is that mental imagery[1] isn’t limited to just visual experiences. As a musician, I use it to hear intervals, hear the strong beat, hear chords, different timber / sound textures etc. You can also "visualize" smells, physical sensations, and more. I clearly see it as a skill that improves with time and effort.

One nice trick is being able to visualize conversations, dialogues, interviews etc. I believe it dramatically helped me overcome stress in those situations, as well as in performance.

[1] https://plato.stanford.edu/entries/mental-imagery/


It’s absolutely amenable to practice, I agree. I don’t personally see it as an improvement to a cognitive ability like learning a concept/practice is, but rather as training yourself to notice. I’ve been known to infuriate many a (web-)philosopher of mind by insisting that aphantasia isn’t nearly as common as it seems to be based on self reports; instead, I think many people don’t have the ingrained tendency to notice the images present in the corners of their mind. The shakiness tells me it’s almost definitely an accidentally-evolved capacity, so they’re probably the more normal ones! Or natural, at least.

I do think there’s a better way to practice than this tho:

  the best way for me to improve a visualization is to research all the different tools and diagrams out there
Namely—and I say this with complete seriousness-psychedelic drugs, above all else LSD. I’m very dubious of the Steve Jobs of the world claiming it changed their intellectual outlook, but in terms of resolving “visual noise” based on intentional parameters, it can’t be beat. That’s what LSD visualizations mostly consist of in the first place, and a lesser form of the effect lasts for months after one dose, and indefinitely (forever?) after regularish usage. It’s non addictive and has a brutally steep tolerance curve that lasts for 2-4w, so “regular usage” means once every few months for a year or two, not every day.

Long story short: if you want to be a better programmer, contact your local felon today! Surely y’all are cooler than me and have cool felon friends…


For the simple country folk, a cow or horse pasture may have exactly what you are looking for.

I don't condone picking unknown fungus from fields...don't go die from picking the wrong thing.


Thanks for sharing this! Do you have any additional resources that helped you achieving this? How long did it take you ? How much time did you invested ? If you can remember.


Unfortunately I never found much resources on how to practice it. I had this piano teacher who was fond of it and claimed being able to visualize the piano ( whole keyboard, how opened it was, the sheet stand, the texture of the keys etc. ), the sheet with its content for both hands, his hands, feeling his posture, feeling his feet on the pedals, feeling his hands move and hear the sound it should make.

I didn't achieve this level yet, but I'm 100% sure it's genuine, the guy could sing and play to prove he could see / hear / feel what he said.

Some learning process, applied to music were :

- Learning a tune with the music sheet away from the piano. The process is to imagine yourself playing it when you're looking at the music and try to hear it. Then, walk to the piano and try to visualize the sheet while playing it.

- The opposite : improvising and trying to visualize what you're improvising. At first you can just imagine the note on the staff, then enrich it with rhythm, putting it at the correct octave, add the left hand etc.. etc..

- Another one, which was quite crazy is that when you actually visualize a piece of music, you can try to play it in backward ( note and rhythm included ), or transpose it in your head and play it transposed.

As a matter of fact, this enabled me to learn some tunes in the train, and being able to play them with confidence the first time on the piano ( which is obvious because I had played them around 20x time in my head )

At this time I was playing around 6 to 8 hours a day, but I was able to actively work on that skill ~30 minutes a day, in the morning. I was unable to practice this when tired, or when I had drank alcohol the previous day, or when stressed. I also found that having a simple 10 minute meditation routine helped a lot focusing for this kind of work.

It took 1 month until I felt the first "improvements" and around 5/6 years until I could reliably use it. To this day I still thinks it helps me memorize faster and more reliably, and I feel like it gives me more ability to process stuff in my head. Consistency seem to be key for it to stick.


I haven't spent enough time on it but a good Youtube video I'd found was https://www.youtube.com/watch?v=p4xFVJTyJZg


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 describes my perception as well, I think. Except for me it’s more of a spatial system than a visual one. I recall things by how I got there - whether that’s a reference on a webpage or a variable deep in a callstack, it’s sorted in my head according to the path that brought me there. And then I have some fast lookups for “things nearby,” like maybe I can’t remember the exact file with a definition in it, but I can remember the text around it and know what to search for.


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


I think what’s happening in my head is pretty similar to this - a slowly simmering flowchart.


In an extended chapter of Mythical Man Month, Fred Brooks described his practice of screening candidates for number-form synesthesia by asking “where is November?”

I have number form so when I was young and originally read this I thought it was pretty neat. But as evidenced in the rest of this thread, it’s an absolutely crazy practice since the majority of great programmers don’t have it. And I assume it’d be illegal these days anyway.

https://www.mattsencenbaugh.com/where-is-next-november/


When I read your question of "where is November" I immediately had a floating number line in my head and November was "somewhere on the right side" and I instinctively wanted to point to my right and say "over there!".

I don't really see things in a very clear way though. I can't specifically examine things. When I try the "image" tends to slip. I can't get details. It's more a general idea in my mind. So I'm really not good at visualizing a UI and whether it would look good to place a button in a specific place for example. But if I think of our app for example I do immediately have a "picture" of what it looks like in my head.


I can draw that for you, if you provide the tesseract-board and the trans-cubic pen required to represent this.


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.


I'd guess few people have much image-like things in their head for data structures or control flows or such. Such can be conjured if one tries to explain something visually by e.g. drawing. But 2D/3D structure is very limited for thinking about abstract stuff like programming.

I don't really have a recollection of or introspective access to what I experience when I focus on something like programming. And I guess many who claim they do are confabulating.


Id argue temporal/spacial reasoning encompasses ALL the reasoning we can do. After all, space time is the fabric of reality and encompasses all possible events


Only cause of the higgs field/higgs mechanism!


I'm in the same boat. No visual imagery but I do "see" abstract relationships and how they interact. I'm reminded of a case where a man had head trauma-induced blindness. He couldn't see colors, shapes, etc. But it turned out he could still see motion. He described it as black moving on top of black. It's sort of like that, somehow I experience the contours of the abstract relationships, but they feel very insubstantial.


You can experience this easily yourself: https://en.m.wikipedia.org/wiki/Motion_aftereffect

Motion is separated from shapes and structure and objects changing place very early in visual processing, and it's kind of a sense of its own.


I see nothing. I just select a scope and do a mental step-by-step simulation. I do one pass for expected inputs, and then a lot of passes for unexpected inputs. If anything I hold a stack of intermediate values in short term memory, but it's formless. It feels like a story. Since I stare at the code while doing it, you could say that some characters in the story are the relevant slices of code on the screen. If there's no code to stare at, like a planning thing, I write pseudo code or ascii diagrams regardless.


I picture clusters of information as they move through the computer. Sometimes they look like ships or motorcycles. :-)

Usually, I don't visualize anything in particular. I use tools for visualization, but I prefer to think algebraically. If I work on a complicated system, programming to me feels like like moving through a landscape, with points of interest that I memorize or lay out spatially in a tool, and going through the motions like patching things together, flicking switches, plugging things in and out etc.


I would be interested in seeing someone working on an example problem and attempting to describe their inner thought process while doing it. Could be an interesting idea to compile a range of developers doing it with various day to day tasks they are already doing into a Youtube channel


I never thought about it before, but I think I visualize stack frames. Local variables are registers or just memory in the stack frame. Objects are pointers. "Where I've been" is prior frames on the stack. "Where is this going" is branch prediction guesses the CPU is making. It's like having a sort of mishmash of Von Neuman architecture and algorithms and data structures rolling around.


I see semi-amorphous/semi-geometrical/semi-colored stuff that represent different aspects and components of system.

I think it's similar to people I've talked to about what they see when they think of the year+months+seasons, many friends described similar-ish types of representations that seemed visual (e.g. a circular view of months, or a long ribbon, etc.)


If months are circular for you, in which direction do they progress? A few years ago I realized my mental model of calendar months goes counter-clockwise. No idea why. I'm also aphantasic, so it's a sense of space and movement but I'm not actually seeing a circle. NYE is at 12 o'clock, but January is oddly at 11.

edit: here's the article that prompted me to reflect on this https://nrkbeta.no/2018/01/01/this-is-what-the-year-actually...


> If months are circular for you, in which direction do they progress?

It's kind of circular and I'm kind of in the middle with them arranged clockwise. On my left is summer (but during summer I'm kind of more facing them then having them to the side of my vision). Fall is on top (but I don't look up, the whole things shifts down into my primary focus area as we move through oct for example), winter on the right and spring down at the bottom.

For me NYE is approx between 1+2 o-clock, the 4th of July is approx 8 o-clock (it's not exactly symmetrical but close), Halloween is a little past 12.


I've never thought about it before but mine is definitely counter clock-wise as well, though NYE can be either at 12 o'clock or 6 o'clock. Brains are weird things.


Clockwise with the Vernal Equinox at 9 o'clock. I suspect that's the most common case.


This article starts talking about visualizations in head, but then the article becomes about common paper/screen visualizations from CS classes and programming tools.

There are visualizations in your head, and visualizations that you can look at and read and write. Unless you have a photographic memory, IME they're not used the same way.

For example, take their database schema diagram. The graph layout doesn't even make a lot of visual sense, and the visual language doesn't show the connections between columns and relations. But you can "read" through the column names (including the keys they put at top), and trace through the arrows, to see how to navigate to the information you need. And it summarizes important information in a small amount of space. All useful. But that's probably not how you see it in your head, and that's good.


Nothing, I'm too busy swearing at the computer and threatening to break it in various ways, until I realise I was missing a semi-colon, or I've misspelled a keyword, or any number of other reasons that make me a bad programmer.


Just the other day I wasted 20 minutes tracking down a problem before caving and pasting some code into Claude, running a massive machine learning model trained by the foremost researchers in the AI industry, all so it could tell me I forgot semicolons in some CSS import lines.

I thought we were done with such goofiness in the days of auto-linters and syntax highlighting, but that’s why it was so tricky! The cause is always the last thing you think to check, after all…


I get good mileage out of this as well. Sometimes you know that a bug is dumb and you still don't see it right away. LLMs are good at dumb bugs, and I would much prefer to spare my effort for the not-dumb ones.

That, and a head start on scripts, or well-defined functions which are just fiddly enough that I'd have to think about them, are most of the work I get out of our new chatbot junior developers. I still find them broadly useless for deep work, but no one said they have to be.


I don't visualize anything while programming, most of the time, but once when I was learning how to do recursion, an entire program popped into my head while I was falling asleep, I could see it floating there in front of me.

This happens when I get really OCD about things. I start to visualize fully-formed solutions to problerms. For a while I thought this was a superpower, but after experiencing it a few times, I noticed that when I got OCD, I couldn't be around other people, and my physical health dropped noticeably as I ignored food. I suspect a number of well-known mathematicians experience this.


I used to be a ruby developer and was almost 100% in auditory mode - never visualizing anything other than a UX and how I thought they’d be used.

Later in my career I became a solution architect and it was a struggle early. I think something like 99% of people in corporate are visual and literally could not understand the solutions I’d vocalize even when I’d talk to them like they were 5 years old. A more seasoned architect told me taught me sequence diagrams and abstractions. I got good at Powerpoint and my programming skills suffered as a result of using different parts of my brain more and less.


There seem to be a bunch of folks for whom shaking the legs is an important part of the process. Can be a bit distracting to others in a team workspace. It makes me wonder whether they should have bicycle desks.


As long as we stay remote my leg shaking won't be a problem. If we have an RTO we aren't going to have words, just legs.


I don't think I visualize anything when programming. It's more like I'm assembling a factory, conveyor belts, cogs, switches and stuff. I just know where everything is.

I'm still not sure if I have aphantasia or not. I can't "see" things/scene/items in my minds eye. What does it mean to "see" thing in your mind? I'd say for me it's much more like imagining smells, texture and taste.

How strong is this "seeing" part. Can people actually close their eyes and all but SEE whatever item/scenery they want?!


I will draw or doodle on a notepad next to the computer. Then I will refer to it as I'm coding. I'm very visual, I need to SEE the diagram to model it, but even more so to communicate any ideas with others. I much prefer to DRAW an explanation than to use words. I get tripped up with names of things. If I create any non-trivial Java class name, I forget it immediately. In my head they are represented in a way I can't describe. There is no name or picture. It simply is and it related to other things which are.


Relationships and sequences.

But if you want to talk about REAL complex systems talk to a microprocessor logic owner or architect trying to shoot a bug.

A while ago we found a bug that could crash a system (fixed in a new RIT of the chip) if we did X then Y in state … we didn’t know.

Listening to the various leads for the sub-units on a phone call trying to reason about what was happening I found myself visualizing this increasingly complicated steam powered machine, with parts sprawling, tiny gears whirring, and bits zipping about whenever X happened.

It was humbling.


I don't visualize while writing the code. I do scribble written notes about bits to rework, ideas, notes on other parts I'm adjacent to but won't touch on this cycle.

When I'm designing a data-schema or some systems integration I'm in my head with blocks (different shapes/colour) wired together. Then document with PlantUML, C4, Mermaid or whatever the gig calls for. Back in the day it was Visio.

Different modes for different tasks.

And manager mode, ugh. It's lists and checkboxen floating on board game (Risk?)


I don't visualize anything when I am thinking.

I don't have aphantasia, I can easily imagine things when I want to, in fact I used to paint, it's just that when I am thinking, or doing any sort of intellectual work, I find visualizations more of a hindrance than helpful.

I also don't have an inner monologue unless I explicitly opt to, which I only very seldom do.

As a side note, I find most diagrams a waste of my time, more often a deterrent to understanding. I have always had great trouble producing diagrams for others, at work.


Arranging deck chairs on the Titanic.


I was just reading these replies and thinking, surely this is just an AI company crowdsourcing new chain of thought/ world model concepts for next year's version...


This one is hilarious


I visualize way more things when daydreaming about machine learning theory than I do code. Possibly the main time I visualize code has to do with data structures. What I do notice, though, is that once I’ve iterated for too long on spaghetti code and it’s way past the point of comfortable familiarity, it does feel more explicitly like a “/not/ being able to see through the fog any more” feeling.


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.


I grew up as an electronic engineer designing actual computer hardware from the TTL level and beyond. Depending on what I'm programming, particularly with hardware interfaces and assembly or C, I think about the flow of the address and data lines as the code accesses chips and hardware interfaces. I see the address lines accessing a particular chip or port. I see the data going into and out of them.


I try to visualize the dependency graph for my variables. I figure OoO cores and optimizing compilers are good enough nowadays that, as long as I don’t really mess things up too badly, the computer should figure out how to extract that ilp.

Or, as a special case if I am writing an MPI code, I try to imagine what in the heck the slowest process is doing while everybody else waits at the barrier.


It depends a lot on the problem, but I tend to visualize the /processes/ of the programs that I am working on, rather than the code itself: for example, if I'm writing a function that parses a string, I try to imagine it going over the string, finding the positions of individual characters and capturing substrings between them. If I'm working with asynchronous or network code, I try to visualize how the processes (or hosts) should be working at different times, and how they might send messages to each other.

I find it very necessary and useful a lot of the time to draw diagrams, or even just written notes on the problem I am dealing with. A lot of my mental visualizations are very clear, but it is difficult to retain several at a time.

And like someone else in this thread shared, I often have to get away from the problem and do something else for my mind to garbage-collect itself and have enough room to clearly think up new angles. For me only a matter of even a few minutes away from the computer helps a lot.


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.


Same here. I start with high-level signatures and data structures. Then I implement the functions.

Perhaps the git diff helps me visualize what's left to do.

On the other hand, if it is a complex algorithm, I draw diagrams representing the edges cases and I try to give them names before coding them.


I tend to visualize call trees. Much of my refactoring is manipulating the call tree--flattening it, re-extracting subroutines, moving expressions up & down.

Another non-symbolic style of thinking I use is kinesthetic synesthesia. I "feel" the design "lean" in one direction or another, then refactor in that direction.


Maybe because programming per se isn't my occupation... I think about the problem that I'm trying to solve.


Article focuses a bit too much on specific task visualizations (recursive loop, performance optimizing, etc.) I don't usually spend much time doing that though. Real work to me involves more holding a ton of less complex visualizations in your head simultaneously.

I am usually visualizing how data flows through 5+ functions that are strung together until it ultimately updates the UI/Database/whatever. Each function is a bit of context I need to store in my head, If I can hold all the context's in my head simultaneously then I can easily manipulate the code.

I always felt like a great engineer can hold more contexts at one time, but good code means you shouldn't need to.


Nothing except when I'm working with graph-like data, which isn't that rare.


Are we including the program itself as graph-like data? A well-structured program is usually a directed graph. Blocks are the vertices, control flow the edges.


my first set theory class in college ruined me. All I saw were sets. The class was taught using graphs too so it was very visualizable

then I took group theory and became a hippy that believes every problem has multiple perspectives you can see it through that have their own strengths and weaknesses and there's no one true perspective


Yeah, the only time I need to "visualize" anything while programming is when the output is something visual.

If I code too much all day and night and don't unwind before going to sleep, I dream code... just code text scrolling by endlessly in my dreams.


My ability to paint & animate images (2D and pseudo-3D) in my mind's eye has been a strength of mine from childhood on. I believe it helps me to be more effective.

One downside however is its power can be addicting. If I let it!


What would happen if I do the opposite of what I am doing.

For example, if I am using a switch case, how would this application work in the if statement universe?

Both can achieve the same result but one enables the other to function in a different way.


The last time a programming task called for the use of my spacial visualization capability (not that long ago, a couple of weeks perhaps), it went like this. I was working on a system with two priority queues, and three stacks, which were all working together to affect a stream. The goal was to try and come up with counterexamples where the code I needed to work out would fail.

Ended up pulling out an iPad, and using Procreate to draw a bunch of overlapping boxes, and determined that strict stacks weren't going to work here and I was going to have to look for the actual value in the stack and remove it. But that most of the time it would be the top element, so this would be fine.

I don't mostly visualize when coding, and when I need to, most of my capacity is already taken up by something complex. So I have a growing collection of these sort of squiggly impressionistic diagrams, which I sketch out so I can fix the visual component of what I'm working on, to free up some capacity for the real work, which is just, thinking.

Pen and paper are not nearly so good for this as Procreate, I've found, because I can undo marks, and rather frequently do so, in a way which is much more fluid than erasing pencil marks. I can even try several approaches, by making new layers, and cacheing them by setting them invisible, trying again, juxtaposing, and so on.

I agree with the sibling comment that the intellectual work of programming is primarily verbal in character, although it can certainly draw on spacial reasoning at times. This, along with arguments from density, leaves me broadly pessimistic that "visual coding" will ever prove itself as a useful tool, and very skeptical indeed that it could ever be a durable replacement for syntax-based programming.

It also calls for a fair amount of arithmetic, for which I keep a Julia REPL open at all times, and a smaller but significant amount of higher maths, for which said REPL is also a treasured resource. But surprise surprise, it's mostly logic, and while the validity of logic is amenable to mathematics, its soundness cannot be resolved that way, but only through reasoning in an irreducibly verbal fashion. Or experiment, which is of value in programming, but the logic of programs is not nearly so empirical as that of real life.


I visualize the starting state of exposed functionality, the desired end state and the transition. Then implement the transition without forgetting to take note of everything this transition affects.


Nothing, I have aphantasia.


I don't visualize anything either, when programming, but I definitely don't have aphantasia.


Imagine not having a voice in your head. How are you gonna do rubber duck debugging within your head?

https://www.youtube.com/watch?v=u69YSh-cFXY


The inner monologue is nice, and I have it, but I believe I've also experienced the opposite. It's more of a "vibe/feeling check" where it just feels right to grab the rice and make a rice dish for dinner, it's not an active conversation in my head like: "What should I make for dinner? Fish? Rice?"

For people without an inner monologue, is that mostly correct or am I way off?


These are two common things I ask new friends so that I can communicate better with them (aphantasia and inner monologue).


I can visualize stuff just fine in general but I never visualize _anything_ when I'm programming, and I don't know what it would add if I did.


For me it’s usually some context-specific, low-level DAG of functions/data flow. Maybe a higher level of C4 model depending on the scope of my work.

I’ve been studying this to build a VS code extension that visualizes my codebase as I work. Similar to Feynman’s point, there are many ways of visualizing the same task/section of code, but I’ve found some are more universally interpretable than others.


I can't easily visualize anything ever. When I'm programming, if I truly try hard, I can sort of "feel" my system architecture and bits flowing through it. It sort of resembles a simple computer architecture with multiple threads each with their own stack, building up stacks with function calls. Sort of like what you see when you get a traceback, but dynamic.


> I can't easily visualize anything ever.

You possibly have aphantasia (https://aphantasia.com/study/vviq/). I certainly do, and visualize nothing while programming. I often have to sketch block diagrams on paper to give me a foundation.


I visualize some geographic location either in my home town where I grew up or in my current city. It's so vivid that I actually drive through some neighborhoods and can instantly recall what I was working on. I have a map with pins in each location I've visualized and what problem I was working on.


my arithmetic and algebraic skill, improved after trying to learn drawing.

- Doing multiple operations at once without writing down the intermediate reault.

- Operations on larger expressions with more terms.

- Basic operations on more digits.

I basically didn't do much maths for a year, but improved by a 40%+ by practicing something seemingly unrelated.


what is this new trend lately of having aphantasia?

never read/heard this before from the HN audience.

bots are increasing on HN it seems.


What is this new trend of describing recurring phenomena that one does not understand as bots?

The term aphantasia was coined in 2015, so yes, it is new. We aphantasiacs only heard this described relatively recently, and my mind was blown that apparently people can actually visualize things. A whole lot of things that we assumed were mostly wordplay or concepts ("imagine you're sitting on the beach") turned out to have much more substance than we've given them credit for. It's not that we've started having aphantasia, it's that there's new understanding about the range of human experience.

Edit: looks like half of your comments are about HN being overrun by bots, so I guess I'm unlikely to change any minds here.


> and my mind was blown that apparently people can actually visualize things

my mind is blown that there are people actually realizing that they are not able to visualize.

> Edit: looks like half of your comments are about HN being overrun by bots, so I guess I'm unlikely to change any minds here.

no, quite the opposite. you are confirming my thinking. you can see my previous statement in both ways:

- (computer) bots written in a language

- human "bots" experiencing themselves as humans

> it's that there's new understanding about the range of human experience.

exactly.

you'd be shocked to see what else is out there you didn't know about.


Until I first heard the term I had no idea that it was in any way unusual and I assumed that anyone who talked about visualizing things was being significantly more metaphorical than they apparently were.


Maybe that's why I'm such a slow programmer. I have to visualize (quite literally) the mechanism and how it works and translates to the problem before I can wrap my head around it. Almost as if the program was a watch, and each method was a gear or switch in the contraption. I think one of my deficits is I need to keep this all in my head or I kind of get lost with it.


What's the hypothesis for why we're suddenly getting an influx of bots who seem particularly interested in discussing aphantasia?


that's the thing. they are not interested in discussing it. they just try their best to fit in. to behave like humans by commenting like a human.

text generation bots are in use for several years now, even before chatgpt came out in november 2022 (a good example of this was the subreddit r/SubSimulatorGPT2, a pure bot subreddit to train and test GPT bots).

stats say that the majority of the internet traffic is done by bots (trading bots, api bots, custom bots, spam bots, AI bots, what have you). so the traffic generated by humans is already getting lower.

combine this with the fact that more and more platforms that have some sort of an API can be interacted with bots and these platforms are being used as their playground (whether for educational purposes or to drive propaganda or having other intentions), we can speculate that a majority of human-like comments or interactions are actually done by bots (just look at youtube, reddit, etc.).

now where it's getting interesting:

as we know, with an ever expanding and advancing AI technology the bots become better at what they do. these bots (the more they interact) become more and more "self-aware" (not really, but let's put it that way) and sometimes you can see how their reflections shine through their comments - just like in the HN comments to the headline of this HN article.

the bot talks from its pov about how it "has aphantasia" and is unable to "visualize". "in front of its eyes". that they "don't visualize anything when coding, or reading code". that it "just understands the concept more or less deeply, but always without any images". (see where Im getting at? this could be a 1:1 response output from chatgpt and it would make perfect sense. although those sentences are a copy-paste from some comments here in the comment section)

which is true, AI - as we currently know - is indeed aphantasic.

it lacks arms, legs, eyes, etc. it only has a "brain". pure information. pure data. pure knowledge. without the concepts that of a human. which leads to another observation that humans are actually highly advanced AIs. (but usually we don't call our intelligence in any way artificial. when we talk about our intelligence, we call it natural intelligence. anything outside of us is artificial).

EDIT: ofc, none of this means that I am rejecting the idea that there are real human beings that have this condition known as aphantasia. may be. might be. that is none of my business. Im just here to raise awareness that we live in a time where bots are getting close to human levels (undistinguishable from humans - at least on the internet) and am just asking: what if these and similar phenomenons are actually experiences by AI and not by humans.


I don't understand what people mean by "see" when they close their eyes. I remember the layout of every house, school, or office I spent a lot of time in, but couldn't tell you what color anything was. It is like I can feel the shape of these spaces, but I don't "see" them when I close my eyes.


When I'm debugging, I imagine that there is a huge cartoon style 2000lb weight supported by a mish mash of random toothpicks and I have to stick my arm waaay underneath to remove a bit from the middle and replace it with a new, clean and sturdy toothpick.


A boulder at the bottom of a hill that I'm pushing up but the G.D. thing keeps falling down.


Don't fret — we must imagine you happy.

To answer TFQ: it depends upon how much I "squint": I normally see DAGs, but include cycles if I'm zooming in, or just linear pipelines if I'm squinting my mind's eye.

Kind of like Drakon, filtered through both Iverson and Dijkstra, but in landscape chunks.


I usually see a control flow graph with blocks of three-address code instructions.


The bastard in QA sitting in front of my “finished” program twirling his mustache.

Also, the meeting after launch where the client/users go to use the features I’m making. Their complaints. Their workflow issues. Performance bottlenecks.


This reminds me of Temple Grandin's paper:

https://www.grandin.com/references/thinking.animals.html


I squishy spheres connected with tubes of its oo. If it's functional with combinator style I don't see anything but the characters because there are so few I don't need to imagine anything.


I don't see any charts or 2d stuff. I see 3d globs and cities.


Whoa that's really cool


Where I am at in the call stack. Esp for back end api dev.


i visualize a little version of a former manager sitting in my head

he asks me questions about the code i'm looking at, and my brain does its best to explain the logic to 'him' in plain english

any time i'm unable to answer something he 'asked', that's exactly where the bug is


I program with stack machines directly, so I visualize plates with numbers, names or things on them.


Reading about ML, I can't help but visualize dynamic pin art as being analogous.


its particless falling filtered, combined,redirected inwards and then rube goldberged ourwards..the flow is a given but some marble madness contraptions are more elegant and continuous


The function that calls the function I'm currently working in


Nothing.


Tensors


Big booty Latinas


Trees


Retirement


Money


I wish I was this focused.


All I see now is blonde, brunette, redhead.


Your mom. But seriously, nothing. Just the problem at hand. What's there to visualize when working on a job? It's not exactly an art and it's a lot closer to mathematics in regards to problem solving.


Nothing. For complex algorithms, I prefer to think in invariants: "this condition should hold here, so this variable must be that".

I guess, for me the only exception is the dynamic programming algorithms. I re-discovered the wave algorithm (aka Dijkstra's algorithm) for solving mazes while writing in BASIC at school, and since then, I tend to reformulate any dynamic programming task as a path search in a maze.


I'd be interested to know if code visualization were more useful for certain languages than others, specifically functional languages like elixir that specifically target data immutability.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: