Ways to use obsidian for competitive programming

Revision en7, by Ron0Studios, 2021-09-01 18:51:29

Hello everyone!


Alright, so I've been using obsidian to document my competitive programming journey for around 2 months and wanted to share the insights and techniques that I have acquired from some trial and error. To summarize, I believe that using obsidian can be very useful for long term memory of difficult questions or algorithmic techniques. Another disclaimer I would like to point out is that (as you may be able to tell :D) I am not a very experienced competitive programmer, and the idea of algorithms and data-structures is very new to me, so for many this may seem quite naive, but perhaps I can speak for a few newer programmers on this site! :)

What is Obsidian?


Well, Obsidian is a note taking software available on all platforms, recently on android as well! It allows for the effective zettelkasten note taking method, alongside a very modular note-taking workflow, vim support and thousands of plugins to choose from. A highlight of Obsidian for many is probably it's graph view, which helps organize your notes, and find links between your different notes (which we will discuss on in depth later).

The image above is an extreme case of graph usage with Obsidian, and more like an eye-candy visualization of what you could do with a large amount of notes. In typical day to day usage, Obsidian graphs are much more useful in the local view, or when changing the force parameters, which we will also discuss later.

Setting up


In terms of setting up the Obsidian vault, the only plugins I would recommend is the Admonition plugin and perhaps Juggl, if you want to dive head-first into graph customization. If you like vim, then you will be glad to hear that Obsidian has its own built in vim extension! If you go to the community plugins section, you can also find a .vimrc customization plugin which can be very useful.

A typical folder structure that I like to go (as of now) with is just a folder for any new algorithms/data-structures I learn, basically any competitive programming technique I stumble across, and another folder for some past problems I found difficult or interesting, especially those that used an algorithm I haven't used before or have recently learnt.

 Here's an image of what the file structure could look like. Ignore the "Excalidraw" folder,its for drawing pictures in obsidian!

Writing notes


Note writing, quite obviously, should be the most important part of taking notes with Obsidian. What I have done, so far, is document any new algorithms I learn and write an obsidian note about it. I try to make as many links as possible that are relevant, and create the file if it doesn't exist. You can add a tag to the file, e.g. #tofinish, to remind yourself to create a write-up of that note in the future.

Alongside this, I can also recommend using the mermaid.js plugin to create your own diagram visualizations, and to create footnotes, since they make your notes more presentable and less cluttered. Crediting resources is also extremely useful when looking back on notes. For example, I like to link back a youtube video in my notes that helped me understand a certain algorithm, so that I can relearn it when the time comes.

Graph view


Lastly, I wanted to spend some time on discussing the graph view, because I see that many people tend to use it for the wrong reasons. Like the graph image from earlier, having such a tremendously massive graph make your ideas seem cluttered and hard to navigate. Here are a few tips on using the graph plugin:

Firstly, once your notes begin to take shape, try and use the local graph view! You can do this by clicking the 3 dots on the top right of a note and selecting "Open local graph", although I heavily recommend that you create a shortcut for it! This is very useful for finding direct links between your notes, and seeing how far away ideas are connected. Try changing the depth setting of your local graph, and you'll see what I mean!

 Here you can see the local graph view for a note about "heaps" in action. Unlike the global graph view, this view has a much more contrasting node size (I mean look at the size of them!), which can help better your understanding of how things link together. This view has a depth filter of 3.


I would also highly recommend using the "group" feature to color code your nodes, it is extremely helpful and can shine light on the types of things your nodes are related to. You can use tags to color code, words in sentences or file names or even the directory of the note!

On top of the color coding, mess around with the forces menu as well! It may seem a bit pointless but I can assure you that the forces can help find new perspectives in relating your notes. For example, crank up the "Link force" option and you will find that your graph will find itself in clusters of its own, helping you see which 'cluster' your notes are part of and find your own little surprises! :D

Here is my current graph as it stands. Certainly not as impressive as other graphs, but you can see the color coding and the clustering effect from changing the link force! It really puts things into its own dimension!


That's it for this post, I might create a new one in the foreseeable future when I actually know what I'm doing XD. If you have any questions please leave them in the comments below, thanks!

Tags #learning, #obsidian, #notetaking, #long-term, #study

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en8 English Ron0Studios 2021-09-01 18:53:15 60 changed the labels again
en7 English Ron0Studios 2021-09-01 18:51:29 88 Reverted to en5
en6 English Ron0Studios 2021-09-01 18:50:51 88 Changed the last graph image so that there's labels on the nodes.
en5 English Ron0Studios 2021-09-01 18:33:44 58 Tiny change: 'ryone!\n\nAlright,' -> 'ryone!\n\n---\nAlright,' (published)
en4 English Ron0Studios 2021-09-01 18:30:42 1
en3 English Ron0Studios 2021-09-01 18:29:16 5164
en2 English Ron0Studios 2021-09-01 17:49:08 667 Tiny change: 'ryone!\n\n> hi\nAlright, s' -> 'ryone!\n\n\n> Alright, s'
en1 English Ron0Studios 2021-08-27 19:44:29 67 Initial revision (saved to drafts)