OOPKM - Taking inspiration from programming

I recently came across a very interesting connection (thanks to Obsidian) between computer science and knowledge management, which I’m sure anyone here can appreciate. I’ll start with a quote:

“Managing complexity is the most important technical topic in software development”. – Code Complete: Design in Construction

Developers deal with managing a huge amount of information, across a huge number of files, with a huge number of interconnections between them. The point is whatever systems they use have to be maintainable and efficient, so there has been a lot of work in that direction. PKM may not have a one-to-one connection with managing complex software, but there is enough overlap that it is worth drawing connections.


As you may know, Object-Oriented Programming (OOP) is one of the most popular tools for managing this complexity. It is a way of framing information to make it easier to write, read, manage, reuse, etc. (which are all valuable qualities in note taking as well). It is definitely worth knowing about.

Note: The goal here is not to turn notes into code, it’s to contrast the two to see what ideas can be transfered.

Note: All of this is much easier to apply to notes on topics that are more formal and exact (anything close to science). It will take some imagination but maybe personal notes can benefit too.

Note: Assume there is no object state and any computation is described in words

Here are some connections that are not complete yet to start a discussion:

Classes and Instances

  • Let’s call every note a class and when it used in another note an instance
  • Classes have properties, constructors, and functions


  • A note can be a subclass of another if it has a “is-a” relationship
  • A cat is an animal. A function is a set. An electron is a particle
  • If it’s particularly important then expand it: A cat is a feline is an animal
  • Using an Interface for different relationships


  • I would say the lesson from encapsulation is to define a good public interface for your note. In other words: have a note outline at the top of things you expect to use elsewhere, and not internal “private” functions.


I’ve tried to connect these with the IMF system by @nickmilo . I agree that categories and heirarchies are not bad, they just need to be flexible.

  • Package: A collection of namespaces (similar to an Index)
  • Namespace: A collection of related classes (redifined as a MOC)
  • Class: An abstract data type (a note that is abstract)
  • Instance: A specific instance (a concrete instance of a class)

A quick example of a note:
(It was at this point I realised why this isn’t talked about more)


Package: [[Algebra]]
Namespace: [[Algebra-LinearAlgebra-MatrixTheory]]
Base: [[Matrix]]



Whether the matrix is invertible


Whether the matrix is Symmetric



N: size of matrix
Returns a square matrix


Returns the eigen decomposition


Returns of list of eigen values

(Separate outline from implementation for encapsulation / header references)

3.Function implementations:

Specific details

Specific details

Specific details


brilliant idea. I am a computer programmer of Python which is a language born with OOP. I will think about your theory and do some tests. wait my article.


this is very awesome idea if i see myself as a programmer taking notes, but it will make a steep learning curve for newbies using this note. But, i guess, this can be like switched off as default and can be turned on for people who has expertise in doing it

After all, note taking is an art which is very personal to everyone

I could say this because I’m in a theoretical physicist with knowledge in C, C++, Python, FORTRAN, CUDA, Matlab and many more!!

Yes, normal users do not think in OOP terms. There are issue with OOP such as the classic diamond multiple inheritance issue. Most users think more in term of labels and groups.

Even if we think about formal topics, the problem of defining appropriate interfaces and classes is very difficult. In my experience, the relationships between classes must be very well crafted in order to facilitate desirable behaviors in a maintainable way.

It’s not clear to me what the equivalent of these two goals in Knowledge Management, so we would have a basis of applying the principles designed to solve them into another domain.

Interesting idea though !

It sounds like Knowledge modeling and knowledge graph.

Maybe this would be the standard PKM pattern in the future, in which case people and computers could understand each other.

Sounds like the semantic web and its protocol – which is hard for us humans to understand…

That’s great to hear, looking forward to it. It’s my hope that it develops and turns into a formalized note taking system.

Definitely agree, I wouldn’t expect anyone who doesn’t program to use this as it is. I just hope it opens discussions on how to formalize notes, which I’m sure you could imagine the benefit

That’s really interesting, I had no idea. Thanks a lot for pointing to it

The reason I say it’s easier for more formal topics is that the appropriate classes and interfaces are actually already pretty well defined if you spend enough time searching and sorting them out. But if they’re not then I agree, the hardest part is defining them.

This is pretty much where my head is at too. I am an engineer by trade and have done a fair amount of programming, although never became an expert in it.

Do you have ideas on how to create class template that is unique and does not cross contaminate. This is where I am currently stuck.

I want to start with myself/mind at center starting point, but use a common class template to inherit from.

But I’m having the issue that the only way to make file structure unique that I am aware of to is to create new vaults. I want everything to stay in the same vault.

I imaging each file being essentially an object

My simple example

me → .friends → Mike, Ben, Alex, Sam

Mike -->.friends → Eric, me, Tom, Mitch

when you invoke the file “Friends”, which returns the note containing the list of friends for the instance of “me” class

Can we make .friends unique to different people within the note structure? Or do I have to create a unique file every time, and then the reusability, OOP kind of goes away? .friends-Mike to get Mike’s friends. Then I can no longer easily inherit the class template across friends