[HN Gopher] What do you visualize while programming?
___________________________________________________________________
What do you visualize while programming?
Author : dillonshook
Score : 77 points
Date : 2024-10-17 12:56 UTC (1 days ago)
(HTM) web link (dillonshook.com)
(TXT) w3m dump (dillonshook.com)
| JohnFen wrote:
| 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.
| Izkata wrote:
| 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.
| illwrks wrote:
| 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.
| jareklupinski wrote:
| 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
| hackeraccount wrote:
| A boulder at the bottom of a hill that I'm pushing up but the
| G.D. thing keeps falling down.
| 082349872349872 wrote:
| 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.
| ilrwbwrkhv wrote:
| I don't see any charts or 2d stuff. I see 3d globs and cities.
| butlike wrote:
| Whoa that's really cool
| audidude wrote:
| Nothing, I have aphantasia.
| webstrand wrote:
| I don't visualize anything either, when programming, but I
| definitely don't have aphantasia.
| jumping_frog wrote:
| 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
| audidude wrote:
| These are two common things I ask new friends so that I can
| communicate better with them (aphantasia and inner
| monologue).
| butlike wrote:
| 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?
| bfung wrote:
| 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
| dailykoder wrote:
| 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
| chatmasta wrote:
| 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.
| cherryteastain wrote:
| Tensors
| etc-hosts wrote:
| I visualize the tent my family will live in if I get layed off.
| sitkack wrote:
| You should buy a really nice tent now while you have cash flow.
| o_m wrote:
| That might contribute to a self-fulfilling prophecy
| idontwantthis wrote:
| Always have a rainy day fund, in this case for buying a good
| fly.
| butlike wrote:
| Why spend the capital on a tent. A survival manual is
| magnitudes cheaper and accomplishes the same thing,
| ultimately.
|
| /s
| seanw444 wrote:
| 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.
| boogieknite wrote:
| 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
| ahartmetz wrote:
| Nothing except when I'm working with graph-like data, which isn't
| that rare.
| culi wrote:
| 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
| retrac wrote:
| 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.
| leptons wrote:
| 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.
| dekhn wrote:
| 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.
| smallerfish wrote:
| > 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.
| empath75 wrote:
| 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.
| weard_beard wrote:
| 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.
| sinuhe69 wrote:
| 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.
| ljdtt wrote:
| 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.
| malux85 wrote:
| 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
| OnionBlender wrote:
| I don't think I can only play 2-3 turns of Civilization at
| a time.
| malux85 wrote:
| Not gonna lie developing that discipline was really
| difficult ...
| ljdtt wrote:
| 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.
| sibit wrote:
| 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
| n4bz0r wrote:
| 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.
| wormlord wrote:
| 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...
| nuancebydefault wrote:
| 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.
| deadlypointer wrote:
| 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/
| 4ad wrote:
| 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.
| corysama wrote:
| 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.
| hackinthebochs wrote:
| 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.
| jampekka wrote:
| 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.
| jampekka wrote:
| 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.
| andoando wrote:
| 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
| butlike wrote:
| Only cause of the higgs field/higgs mechanism!
| analog31 wrote:
| Maybe because programming _per se_ isn 't my occupation... I
| think about the problem that I'm trying to solve.
| arnonejoe wrote:
| Where I am at in the call stack. Esp for back end api dev.
| copperroof wrote:
| Nothing.
| mmcdermott wrote:
| 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.
| efortis wrote:
| 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.
| AnimalMuppet wrote:
| 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.
| RaftPeople wrote:
| 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.)
| meta-meta wrote:
| 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...
| gms7777 wrote:
| 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.
| RaftPeople wrote:
| > _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.
| samatman wrote:
| Clockwise with the Vernal Equinox at 9 o'clock. I suspect
| that's the most common case.
| wturner wrote:
| Reading about ML, I can't help but visualize dynamic pin art as
| being analogous.
| groone wrote:
| 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.
| kevin_thibedeau wrote:
| Arranging deck chairs on the Titanic.
| bbkane wrote:
| This one is hilarious
| dmead wrote:
| 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.
| swatcoder wrote:
| 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.
| nuancebydefault wrote:
| 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.
| seanw444 wrote:
| 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.
| pilgrim0 wrote:
| 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.
| ericmcer wrote:
| 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.
| JohnDeHope wrote:
| 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.
| cyberax wrote:
| 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.
| neilv wrote:
| 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.
| dboreham wrote:
| Money
| not_wyoming wrote:
| Retirement
| patterns wrote:
| 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.
| Tostino wrote:
| 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
| n0n0n4t0r wrote:
| 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??
| swatcoder wrote:
| 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.
| n0n0n4t0r wrote:
| Yes, I think you've totally coined it with the fluency
| concept.
| jsight wrote:
| 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.
| dingnuts wrote:
| 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.
| Lerc wrote:
| 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.
| xyproto wrote:
| Which programming languages do you prefer when creating
| games?
| hobs wrote:
| It's more like feelings that are not visual but much more
| tactile, itching, irritation, smoothness, grittiness, bad code
| like tasting dirty sand.
| n0n0n4t0r wrote:
| This seems like synesthesia, I've read that it may help
| excelling as you have several senses to use at the same time.
| hobs wrote:
| 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!
| JTyQZSnP3cQGa8B wrote:
| 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.
| JoeyBananas wrote:
| Trees
| f7b5 wrote:
| 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/
| alfonsodev wrote:
| 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.
| f7b5 wrote:
| 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.
| iman453 wrote:
| I haven't spent enough time on it but a good Youtube video
| I'd found was https://www.youtube.com/watch?v=p4xFVJTyJZg
| bbor wrote:
| 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...
| Tostino wrote:
| 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.
| omani wrote:
| 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.
| plorkyeran wrote:
| 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.
| butlike wrote:
| 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.
| OnionBlender wrote:
| 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.
| romanhn wrote:
| 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.
| omani wrote:
| > 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.
| psychoslave wrote:
| All I see now is blonde, brunette, redhead.
| itohihiyt wrote:
| 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.
| bbor wrote:
| 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...
| samatman wrote:
| 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.
| assimpleaspossi wrote:
| 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.
| bee_rider wrote:
| 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.
| entaloneralie wrote:
| I program with stack machines directly, so I visualize plates
| with numbers, names or things on them.
| illwrks wrote:
| 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.
| butlike wrote:
| 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.
| dokyun wrote:
| 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.
| doublerabbit wrote:
| 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.
| samatman wrote:
| 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.
| stolenmerch wrote:
| 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.
| mcfunley wrote:
| 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/
| LiamPrevelige wrote:
| 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.
| KentBeck wrote:
| 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.
| koreth1 wrote:
| 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.
| nitwit005 wrote:
| 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.
| ocular-rockular wrote:
| 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.
| supportengineer wrote:
| 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_.
| syngrog66 wrote:
| 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!
| aDyslecticCrow wrote:
| 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.
___________________________________________________________________
(page generated 2024-10-18 23:01 UTC)