Writing code with a visual brain?
Hi! I'm wondering if anyone else around here has big trouble learning how to write code, or if it's just me? I have a very visual brain (think mostly in pictures, have spatial sequence synesthesia) and need to see the structure of things for them to make sense, so I really struggle with the abstraction that comes with programming. I find it really frustrating because of course I'd rather write some lines of code to automate something than do it by hand. Do any of you have similar issues? and have you found any way to compensate for this and get better at writing code? Thanks in advance for the input!
_________________
Really enjoyed being a yellow-throated woodpecker while it lasted.
-
Your neurodiverse (Aspie) score: 139 of 200
Your neurotypical (non-autistic) score: 67 of 200
You are very likely neurodiverse (Aspie)
Do you have an example of what part of coding you have difficulty with? Is it with output statements, creating objects, implementing equations, or something along those lines, or is it just the coding itself that you have trouble with? Do you add any text or graphical output when you run your programs? I've done some visual thinking before, but it isn't my primary mindset, so it's a little difficult for me to understand the issues you're having. But that can be resolved with more specific details, since programming covers a broad range of structures to work with which makes it difficult to pinpoint the main issue.
flownawy
Yellow-bellied Woodpecker
Joined: 15 Sep 2016
Age: 39
Gender: Male
Posts: 68
Location: I am your conscience in your consciousness
The Head First books seem to teach programming with a more visual approach, but I'd don't know whether there is a book about the language you want to learn. Search online for something like "Head First JavaScript" or whatever the language is called.
Even if there is no book for your programming language, you can probably learn programming basics with a Head First book for another language (assuming you haven't already learned the basics).
I have been coding since the 1970s.
Flowcharts can be very useful. I usually either draw freehand or use the old-style plastic shape templates. It may seem like an unnecessary step in design, but I can see the program logic with it, then move from flowchart to structured code and functions very quickly.
Visualizations of data structure types are also a good thing for me when I am considering what will be most performant in a situation. At this point, those visualizations are mental, requiring no external reference.
Flowcharts can be very useful. I usually either draw freehand or use the old-style plastic shape templates. It may seem like an unnecessary step in design, but I can see the program logic with it, then move from flowchart to structured code and functions very quickly.
Visualizations of data structure types are also a good thing for me when I am considering what will be most performant in a situation. At this point, those visualizations are mental, requiring no external reference.
Flowcharts and coloured pens work for me. Once I make colour associations my brain is much more on board, I just need a visual aid to think properly.
I can mostly do it in my head now, but the pens come back out if I get stuck
I somehow forgot to reply to this, sorry
and thanks to everyone who gave me some input. I'd benefit from coding when it comes to data analysis. I sometimes have to deal with a lot of data (bio-signals such as MRI, EEG, and other neurophysiology datasets) and it'd be great to be able to write scripts where I can automatise such things (in Matlab, Python, and also using R).
I'm just quite lost as to how to get started because my brain really tends to suffer when things are too "abstract" and I cannot see the structure and the patterns of the things visually, so the aforementioned brain gets then overwhelmed and nopes out of it. I have heard that there is some software for generating scripts that architects use where things work more like flowcharts, so perhaps I could try that one out. Writing down the structure visually first and then moving on to write the scripts sounds also like a great idea. I just wish this can happen for me at some point because it'd make my job far easier (but I'm unsure at what cognitive cost...
)
_________________
Really enjoyed being a yellow-throated woodpecker while it lasted.
-
Your neurodiverse (Aspie) score: 139 of 200
Your neurotypical (non-autistic) score: 67 of 200
You are very likely neurodiverse (Aspie)
Do you have any formal coding experience (i.e., a class in programming) or are you picking it up on your own?
If you don't, I suggest that a good place to start would be flowcharting a very simple program, like the logic/structure of a simple function. How about:
Given 5 integers as input ...
(1) Output them with odd numbers marked with an asterisk.
(2) When you get that working, make the output sorted high->low too.
If that's too easy, I apologize for misunderstanding.
From the airport gate, homebound, looking forward to seeing my mountains ...
MountainTrails
I think visually and logically. I'm the exact opposite from what you describe when writing code as I am able to convert code to images. When I read code, I a flow chart forms in my head. I hated writing flow charts in school because I thought that they were a waste of time. I can see bits shifting. I can see bytes merging with an 'and' or an 'or' command. I can see data flowing. I can see all sorts of things when reading code.
_________________
I finally found an avatar.
If you're having trouble learning programming concepts, one good way to get a feel for programming is via Scratch 2.0, which is used to teach intro programming to children in middle school. Scratch is not a professional programming language, but uses highly visual programming-like features to enable you to create video animations.
I would suggest that you first go through all the video tutorials that come with Scratch, then use your imagination to come up with more complex animations using various blocks, especially those in the "Control", "Data", and "More Blocks" categories. Experiment with all the other blocks in all the other categories as well.
THEN you might begin to have a more intuitive feel for programming languages.
Hopefully, one of these days, someone will design an IDE with similar blocks for an actual professional programming language. That would enable many programmers to be more productive, I would imagine.
_________________
- Autistic in NYC - Resources and new ideas for the autistic adult community in the New York City metro area.
- Autistic peer-led groups (via text-based chat, currently) led or facilitated by members of the Autistic Peer Leadership Group.

