Workflow for learning how to Program

Workflow for Studying Code and storing snippets.

I have watched numerous YouTube videos on different workflows, tried different note taking applications LogSeq, Notion, RemNote, OneNote, etc…

My problem is, I want to use a note taking app to organize my code and study notes. I know Obsidian frowns upon top down structure, but when I read a book on a programming language, it starts at the beginning. I can’t just jump around or I will not learn it properly.

Are there any coders out there that use Obsidian for studying programming languages? If so, what type of workflow do you use? For instance, I am studying JavaScript:

I need some sort of hierarchy with some nested topics. I downloaded the sample workflow fault and thought maybe I could start with a TOC? What about sections like “Objects” that contain things like, “Object Literals”, “Classes” and examples of these.

I have spent two weeks trying to find a structure while searching for a solid note taking app. The funny thing is, I haven’t written one note yet.

Is Obsidian made for this or is it just for researching? If someone can give me a sample workflow or direct me to a note taking app that might suit me better, I would really appreciate it.

Regards,
Matt

Hi @Muzikman777 , fellow user here.

I know what you mean – it’s hard to get started on building your notes, especially when you’re trying out new tools and trying to figure out what will work best for you.

I would disagree with you that Obsidian frowns on top-down structure. One of the things I like about Obsidian is that it is primarily a Markdown text editor that provides a lot of tools for linking and organizing your notes. It doesn’t have an opinion about whether your notes are top-down, bottom-up, tagged, linked, in folders, or not. It’s happy to support whatever structure you want to impose on your notes.

But that’s also one of the challenges of using Obsidian – because the tool doesn’t impose a structure, you’re left with guessing and experimentation to find something that works for you. Add in Obsidian’s plethora of plugins, and it becomes easy to get lost in the woods.

So I suggest you start small. Don’t worry about plugins or organization strategies or folder hierarchies yet. You’re learning JavaScript – awesome! There are two ways I’d suggest you start with, and see if either one works well with the way you think:

I suggest you start with a single file called “JavaScript”. As you work through the concepts in the book, take notes. Don’t worry too much about organizing the file at first, just start getting your notes in there. After a while the file will get large, and a natural organization will suggest itself to you. Break the sections into new files linked from “JavaScript”, perhaps “JavaScript Syntax”, “JavaScript Objects”, “JavaScript Arrays”, or however your notes naturally cluster. When you’re done, you have a collection of linked files that contain a bunch of knowledge you’ve accumulated. A good start!

Or, you could start with a single file named after the book. In that file you could create headings for each chapter, along with the notes you take in each one. As some chapters’ notes get larger you can break them into separate files, linked from the main file. When you’re done, you’ll have a bunch of pages linked together that follow the structure of the book.

Either way you’ll have some useful content that is organized in a way that follows the content, instead of hard-to-use content stuffed into an awkward structure – or worse, no content at all because you spent all your time organizing!

My point here is suggest you avoid pre-organizing your notes. You don’t know exactly what you’ll create yet, so any organization you choose now will probably not fit what you end up creating. Time spent now trying to guess at what will become the best organization for your notes is, frankly, mostly wasted.

Instead, just start – and let the content you create suggest the best organization later. After a while you’ll begin to see where links, tags, folders, and so forth might be useful – or not!

I hope this helps. If you have specific questions, please feel free to post them here!

Best of luck, and I hope you enjoy the journey,

Craig

5 Likes

It’s a bit overwhelming, but really the answer is whatever works for you.

I can share my experience as an example, but it may or may not work for you. I also don’t know what’s considered “best practice” in the Obsidian community.

I’m using Obsidian to study leetcode and take some notes from textbooks. My folder structure looks like this.

  • attachments - drawings, images, diagrams
  • templates
  • leetcode - leetcode problems
  • notes - random notes

For a given leetcode problem, I may need to know a couple of different things. I create notes for the dependencies and link to them from the leetcode problem.

For example, if the problem requires doing a DFS, then I would create a note on DFS and link to it from the problem. Any future DFS problem would also link to the DFS note.

Eventually, I may add a BFS note.

Once I have a few different notes that I can tie together with a theme, I might create a “graph traversals” note and link to DFS and BFS.

I’ve found that I prefer writing small, focused notes because that let’s me compose bigger notes easier. (Kinda like writing good functions.)

For example, if I had DFS and BFS sections in 1 big note, then I could be linking to partially irrelevant information if I’m working on a DFS only problem.

For your case, I may take notes on specific things. What’s a class? What’s an object? What’s an object literal? You’ll probably be able to see a higher level structure emerge after you have enough smaller notes.

2 Likes

@Craig

You make some great points. I just have to start taking notes. I will make a folder called Javascript. Then just notes underneath that for each of the concepts. Maybe a page called Objects, with headers for Object Literals, Classes, Inheritance then link to those pages with examples. Or after I get the content in, I can maybe try structuring it other ways, with a main index file with headers with links to all of the sub-topics. The point you made is, just start writing. Forget about structure at this point. I need to dive in. Forget about plugins as well. It is overwhelming.

Thank you very much for your advice. I think that is what I’ll do.

@nein3m I think I will probably start out with a folder called Javascript. The vault name will be called Programming. I want this so I can link to other concepts that are mentioned in different languages. I will create another folder for Python. Another for SQL, etc…

I will structure it where I have a entry note for each topic. It will start off with the name of the of the file “Objects”. A little description at the top “frontmatter”, meta. That will have headers for each section. “Object Literals”, which will link to a note. The sub notes will also include things like references, See Also and most importantly, code snippets.

Something like this. But you are correct. I don’t think there is a “best practices” for Obsidian. If there were, it would probably put us back in the little box of thinking.

I want to be able to come back to my notes to go over the essentials; just in case I haven’t used the language in a while. I will also have a folder called “How To’s”. With notes for accomplishing certain things in the language.

Basically, I need to just start writing my notes and code down. As it grows, I will start organizing it. I was trying to put the cart before the horse and that’s why I hadn’t written a note yet.

Thank you for your time and knowledge.
Matt

@Craig @nein3m

Do you think it would be ok to have a folder/page hierarchy in the left pane? For instance:
I would create a folder called Javascript.

As I am reading through the book, I might create a sub-page called “Objects” which will be a summary of objects. With links to other sub-pages under “Objects” such as “Object Literals”, “Classes”, "Inheritance.

The “Objects” page would be an outline for sub pages. Each sub-page that I link to, for instance . I could have an area on the Objects page with an outline that includes headers such as Classes, Object Literals. On the Classes page I could have an area called “Concepts” which would have things like “Polymorphism”, “Inheritance”. Because these things concepts that a coder needs to understand.

Or should I minimized the nesting into just a list of pages underneath Javascript and rely on linking as my connection to these notes, instead of a deep nested structure?

Also, If linking is the way to keep things related, I think tags could be used for a different purpose such as, making a tag where I have all of my Anki notes for each topic. Call it “Review”.

I am going to take a look at Google Directory and see how they organize and link topics. I don’t like the way Wikipedia does their cross linking because they link any word that is not necessary related to the topic you’re reading about.

Is there any way to add colors to Tags. I mean, not make all tags blue but have different colors for individual tags? If not, good idea for a plugin.

Thanks for your note. Good ideas!

However, I recommend keeping all your JavaScript notes in a single folder for now (or even just in the vault root) and organize them via links, with the JavaScript note as your “home base”. You can always add folders later if you find they help you keep things organized.

You make a good point about tags – they’re entirely separate from your folder and linking structure, so they’re great for concepts that don’t easily fit into a hierarchy, like #todo, or #followup or #urgent.

1 Like

@Craig Sounds good. I will do that.

Thanks for the input
Matt

You can refer to my Note. I highly recommend you to use the MOC concept and tried not to categories your notes very detailed. Before I use obsidian, I always want to organize my code snippets, however, most snippets could not simply put into one category, it is relates to different topics, like data structure, algorithms even hardware concepts. Thinking how to organize my notes take me a lot of efforts.

My personal workflow to make notes, e,g. LeetCode , programming…

  1. Create a note and write down only one concept. e.g. how to iterate through an array, how to find out all substrings, etc…
  2. Try to draw something, that makes you remember.
  3. Link any relevant notes as much as you can.

My favorite plugins in obsidian are

  1. dataview → To visualize group of certain topics on MOC page.
  2. excalidraw → Draw a picture helps you to remember. here’s the example

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.