Learning to code (Part 8): Color-coding- the dyslexic’s guide to writing and coding
One issue that is going to feature in many places in these posts, is the fact that I do things a bit differently coz I am dyslexic and make some mistakes a lot more than others. Most people make these errors but the frequency with which I do can be a huge hindrance.
These are usually spelling-related, not seeing things like punctuation, brackets, not interpreting instruction the same as other people- especially when they are written. I am putting this post here because I hope you find this tool before anything else, this has been one of my biggest challenges with coding, and finding this tool has exponentially increased my ability to learn. I wish I knew this a year ago honestly. Also if you are the same type of dyslexic as me then maybe this helps you in school/ learning stuff.
I see color better, in the sense that I associate colors with specific types of things. So, if I am reading my notes, I will search through specific color elements first and I know not to mess with that. I discovered that while coding you can color-code your brackets, this seemed to logically be the same thing that I did for notes.
This is my color-coding formula for note-taking and now coding. I developed this in my 3rd year of Engineering when I learned that I was dyslexic and I have never changed it. I use it for everything, I read books and take notes this way, I did all my non-technical education the same way.
Here is the logic for brackets in my code, and how I write technical and non-technical learning notes:
Green- First level of anything
Technical notes and non-Technical notes: Used to signify the title of a document. Visually if I were searching through my notes and looking for something, I would know to look for a heading in green. This comes from green=go. Sometimes you have multiple headings, like sub-headings for example. A new chapter heading would always be on a new page in all caps. A subheading would be in the notes but maybe underlined.
Coding: first level bracket. I would know that if I hit a new green bracket I am in a new section of code.
Blue- Second level- let’s get learning!
Technical notes and non-technical notes: this is the main text of a document, the explanations if you will. In class, this would be what the prof was saying and what is in the book that I copied out. When I am learning on my own this is my explanation of how I am understanding the topic based on how resources online or in books are explaining them.
Coding: Blue always followed green because all headings need explanations. Therefore, the second bracket color was blue.
Purple- Third level: What does this boil down to?
Technical notes: All formulas were in purple. This was effectively the subset of the main explanation, but now we were in the “how to do this” phase so it had to be isolated. Sometimes you remember the explanation but just forgot the formula or how to derive it, so I put that in purple. Formulas are incomplete without explaining variables, those are also in purple. Final formulas (eg after they have been derived) would be re-copied at the end of the section in purple and have a box around them. This was incase I needed a quick reference rather than the whole derivation.
Non-technical notes: this would be boiling down the topic to a very short statement or formula if I could. So if I was learning strategy or policy I would try to come up with some kind of “equation” that could easily summarize the section. Something like: Government + Business + NGO + (anything?) = where ppl work.
Coding: The third level bracket was in purple.
Grey- Fourth Level- something particular:
Technical notes: grey is effectively pencil if your taking hand notes. All examples of work were always in pencil because they were functional in demonstrating how to do something. Also, I made soooo many errors at this part, writing the wrong thing that I needed to erase stuff a lot.
Non-technical notes: This was often the last layer so this would be my comments on the subject.
Coding: The fourth level bracket is in grey, deeply embedded in some specific thing the code is doing.
Technical notes and non-technical notes: this was me connecting things to other topics, my personal insights on how this specific subject applies to something else. For example, if I learn about how nerves communicate then I am connecting anything I know about chemistry and physics here. Same principal when you learn about something like accounting but it actually connects to business strategy.
There is no linearity to where I put this, I need to know that these are some thoughts of mine that are important enough to write while learning but not part of the material at hand.
Coding: The fifth level bracket is pink. You need to kind of get through all the material until now to get to this part.
Yellow- Holy shit Aman pay attention we have never been to this level before!!
Coding: This is only in code, I don’t know how much code gets embedded so I needed a new category for “omg Aman we are not in normal territory anymore- this is the effing wild wild west”.
I also have two other colors that I don’t mess with in terms of what they do:
Red- red means stop- all words being defined are in red in all my learning notes. Academic or personal study. This is the equivalent of seeing a hyperlink on a web page. I would not take another note until the word was defined. In a class or otherwise. I am a super annoying student in any class.
Black- this is the definition of the word. This was always a mix of a formal definition and how I understood the term, effectively, me paraphrasing or explaining in my own words. The objective of a definition is to understand the concept for my comprehension.
The coding equivalent for red and black for me are the comment-out section.
I am using Bracket pair colorizer for to get the bracket colors, because… it’s the first thing I saw on a tutorial that did this and the dude teaching sounds brilliant. You can use whatever you want, but it takes a bit of macgyvering to change the colors from the default.
It took me 3 days so please watch the youtube stuff on this to figure it out. I already know I need something to be able to see my mistakes so I could not move forward in coding until this was done. If you are super new to coding and this is something you really need then drop me a comment and I’ll write a post on how to actually do this. Also DAMN!!! your reading this??
I code on a black background in VS Studio because staring at white screen looking for things is just hurting my eyes. These color shades are different from my written notes (which appear in another pic below).
Here are the actual colors I picked for the brackets:
These were the easiest to tell apart from each other.
And yes- I did carry this much stationery to school. I still do.
I have been getting super confused between types of languages, and loops. So I am going to try to do a double whammy and do a deep dive on this for my next post. I don’t know if this is of interest to anyone, but since I suspect I am the only one reading these I suppose that is the advantage of writing a blog for yourself.