in programming refactoring your code means improving it without changing what it's actually doing so this might mean simplifying updating stylistically improving or structurally revamping your code developers do it as part of their work what would it mean to refactor your notes in this video I'm going to talk about just that and I'm going to take you with me as I refactor my notes coding and writing are often treated as if they're on two ends of the spectrum coding is seen as rational and logical and very limited in its use and writing is seen as something
that's more unbounded and unfettered and verbose and creative but when you think about it there's no reason for this disparity actually they both seek to communicate Concepts they are abstractions of thought they are a way to distill pure thought into a form that's more freely sharable so I actually think that a lot of the things that apply to coding can apply to writing as well just like refactoring what are we actually trying to get to when we refactor our notes ultimately they should be meaningful easy to find and usable and part of the continuous not
taking process is constantly updating your notes so that it always reflects your current understanding of a topic I actually have a note in mind that badly needs refactoring so I thought I'd take you with me through the process while I'm actually refactoring this is my monitoring note I've worked on it a few times and I have some things in it but I know already that there are some things about it that aren't quite right that I'd really like to flesh out and the thing is that it's not that anything that I said is wrong it's
more about the entire approach to the note that I think needs a little rejigging so I'm going to go through some steps that I use when I want to refactor a note but don't think of it as like hard and fast rules rules it it's more of a guide and sometimes I'll skip steps according to what makes sense in the moment the first part is identifying what you've got and taking an inventory of what notes you have on this topic so the first thing I would use for this is quick switcher which is for me
command o i type monitoring to find this in the first place but I might also open things like this monitoring tools which I have that maybe I'm going to want to work into it I have a kubernetes one um data monitoring and logging that's something I definitely want to tie everything that says monitoring into it um all of these different types I really need to find a way to work that in because otherwise if it's a different type of monitoring then I need to talk about that as well there's also server monitoring so that one
is actually just going to the same place so I'll use something else this p push-based monitoring see this is kind of challenging my conception of the term monitoring because I don't just have infrastructure stuff here when I look at it I also have things like um synthetic monitoring and real user monitoring so whatever I end up with is going to have to take all of these different forms of monitoring in mind at least that's the ideal another way to inventory what I've got is also to use the strange new worlds plugin and you can see
that by the number here that is in the Square strange new worlds is a plugin that just makes it a little bit easier to see what's being linked to from where so I could click into the Telemetry page for example and then be able to see all of the linked mentions in it but it is kind of nice just to scroll down this page and see what things I'm mentioning along with a number of pages that are linking to it so I I can see that there's a lot that's already looking at metrics so I
can scroll down here or there's also a tab here for strange new worlds where I can click on something let's say instrumentation and it comes up in here as well if I prefer this to be in the side panel instead the other way that I inventory is by using search I like to use search when I only want to look for a specific incense of a word within a path for example in this case I think monitoring is monitoring and I don't really need to look for it only within a certain folder so I'm not
as interested in that but it can be useful to say something like path and then be able to select where it is here so for example if I only wanted to look at monitoring within certain articles then I might choose that and then everything that comes up in here are the things that I didn't write there're the the articles that I've imported to reader highlighted and then imported into obsidian which actually might also be useful so I'm already seeing things about shift right testing and test Ops usually I find when I'm refactoring notes or wanting
to anyway that it's more of a structural issue this is something that occurs For Me Maybe for you it's more semantic or whatever but for me I really like to constantly revamp the way that I'm thinking of things in my head the way that I'm kind of putting it into a hierarchy and that means that I spend quite a bit of time on the structure part of it one thing that I really like to use for structural thinking and rethinking is excain so I always have excalibar open on this side panel here but it can
be depending on the Note like this one obviously I have quite a few notes on this it can be kind of difficult to just be Zoom zooming in here and it gets a little messy so what I do instead is I move this when I'm ready to really look at it in detail over to this side and then I can close that right side panel and bring myself up over here and now I can really look at what I've got there is a lot here in monitoring and I am just wanting to look at what
is out there so I have it linked to planning for load testing interesting I really like that I can also see if I zoom in here I can see that I've identified monitoring as a parent now this is something that I've set within the metadata itself more on that later but there are also numbers here and that's also telling me how many things are linking to and from that particular node or that particular note so I can see here that monitoring is going to have to have some sort of parent I haven't actually defined it
I think I said monitoring as a child of performance test heuristics which is interesting so this is really helpful for me as just a way to explore what I've got out there I think it's a little bit messy right now like I think it there should be a stronger link between monitoring and observability and maybe I need to take a stance on that too so if I click on observability this changes a little bit more I think that there needs to be a stronger link between observability and monitoring for sure but also between monitoring and
instrumentation I think I need to determine what the link is there and also something about agents and instrumentation so this is just kind of helping me visualize the structure that I really want and also the structure that already exists this is kind of daunting honestly I'm already seeing like going into this video is like I'm going to sort all this out I'm no longer sure that I can but it is giving me the lay of the land at the very least so I'm going to go here and start to put in some metadata now this
metadata is going to be specific to Excalibur I've made a video on excalibar so check out that link if you want to know more on this right now I just want to set some relationships so that I can start to imagine in my mind what it might look like where monitoring is going to fit within the rest of my notes so I definitely want to have a parents field and I'm going to say that monitoring is a child of observability I think that that is probably the most obvious I'm also actually going to say that
it should be part of performance I'm going to say that this is a list because I want more than just observability um I think it should be performance as well and then maybe it should also have some children I think instrumentation is going to be part of that and I'll make this a list as well now let's look at Excalibur again I probably need to put monitoring tools as a child of monitoring all right I'm going to leave it at that for now although that might still change so we've done inventory and structure the third
step for me is categorize so I'm going to look at the structure of the note itself so not the note within the structure of My Vault but the actual headings and categories that exist for that note for that my typical tool is outline which is a core plug-in and here the things that I have in this note what should you monitor how should you monitor approaches to monitor Ing and then push versus pull I think the first thing is already why why should you monitor which I kind of already am talking about in this paragraph
um what you should monitor I think that that is fine the how you should monitor an approaches to monitoring I don't think are great actually these three I don't think that they're right I think I have to say something about observability so I think this should actually be I'm trying to only look at the structure right now not the content so I'm going to say types of monitoring and that's also going to give me the types of things that I am monitoring and then I think I'm going to remove this and I'm just going to
put it within approach as to monitoring right now this is kind of how approach approaches to monitoring and then I think monitoring how to expose information to Monitor and then this will be how to aggregate information I think this is here okay so this is what I've got now why should you monitor types of monitoring I think I'm going to need to do to differentiate between backend monitoring and also frontend monitoring and then approaches to monitor how to expose information to monitor how to aggregate it and then tools okay so this is already looking good
you'll see that I haven't really filled in any of the content right now I'm looking at the structure and trying to see if this works and I think this is already better than what I had so I'm going to go ahead and fill all this in and try to link notes that I already have step four is to explain now that I've kind of rejig the structure of the note and rearranged some of the categories I want to be able to explain why I categorize things the way that I did and then also add links
to other notes that already exist to kind of build a bigger picture of why these things are related and how so here's what I actually did so I'm skipping forward to the part where I just show you what I changed I explained a little bit more why you should monitor so I'm also separating out the types of monitoring into back end and front end so I'm linking to different types of backend Telemetry signals and the backend monitoring side I also added in the bit about CPU and memory utilization and tying that directly to continuous profiling
and then under front-end monitoring I explained it a little bit and then also cited real user monitoring and synthetic monitoring and then for the approaches to to monitoring I'm explaining how to get the information to Monitor and how to aggregate the information so one part is collecting the information and then the other part is sending it to some Central repository and previously these two were combined and it didn't really make sense because for example something can be instrumented and use push based monitoring so it wasn't a direct comparison it wasn't like either or so I
feel better about separating that into two different categories and I am looking at this and thinking that it is a little bit too wordy so this is a page that is very likely to get more and more detailed so I'd really rather streamline this and not have really long paragraphs here I kind of want this to be a bit more like my application performance page which has links to other pages rather than explaining too much in here and that brings us to the next step of refactoring notes step number five is to modularize which means
to break up a larger or longer note into smaller chunks there are a few advantages to this and you've probably heard this referred to as the practice of taking Atomic notes I don't really like to say I take Atomic notes because the truth is that my notes are as atomic or not Atomic as I feel they need to be and as I have time for so really I don't think that there should be a cut off for how long a note should be but it is useful to have smaller notes that you can address separately
so you don't have to go and refactor a huge note with lots of moving pieces sometimes it's easier mentally to just say I'm just going to touch this one little thing and I don't have to change the rest of it having modular notes also makes it easier to restructure later on and especially in my case right now this is something that I probably am going to be changing as I update my understanding of it and for topics like that I prefer to make them more modular so restructuring them is just a matter of adjusting the
position of a link in a bullet point list for example rather than rearranging whole sections of it and modular notes also give you more opport unities for abstracting out a specific concept so that it doesn't apply just in that context and so that maybe you can apply it to other contexts later so here's what I'm going to do for this monitoring note I am looking at it now and I really think there are some things here that should be separated out for example this monitoring reasons one I think right now there's not that much to
it and probably that's also because this is already pretty long one so I would like to leave space for this to be its own note I think that there are a lot of reasons why you should monitor and while I don't really want to go in and explain all of this now I think it would be nice to kind of have that placeholder so one tool that I use for this a lot is note refactor which is a community plugin so this is what that looks like when you use the command pet for note refactor
and the one that I usually use is this one that I already have a hotkey for and it is to extract the selection to a new note and it's going to use this first line of whatever I I highlighted as the first name so I'm going to select that and what that did was it created a new note called why should you monitor now I don't really want that as a name so I'm going to change it to reasons for monitoring and then I'm just going to put my standard boiler plate template there for new
notes and I'm going to just leave it at that Bel are some reasons why you should and I'm going to add a link as well to the monitoring page now this is obviously going to need some work but at least I'm kind of reminding myself that this is something that I want to get back to later because I'm sure that at some point point I'm going to look at this and just be annoyed enough to flesh this out now going back to the monitoring note I'm just going to add this as a heading but I'm
not going to elucidate further I think the types of monitoring is something that maybe might need to be pulled out at some point but right now I think this is pretty tur so I'm going to leave it at that the approaches to monitoring I do need to do something about I'm actually thinking that maybe this is all that I should have and all of this needs to go somewhere else in this case I think this part needs to go in the instrumentation page so I'm going to go to the instrumentation note which I already had
and I'm just talking about instrumentation agents here so I'm going to add that here I'm going to call it types of instrument and I'm going to leave those there actually I think this one should probably be fine but this is definitely way too long so I'm going to select that again and then this time I'm going to use the hot key for the refactoring and that basically did the same thing I'm going to put my boilerplate template there and I'm going to link this for sure to monitoring I'm going to call it aggregating monitoring data
as well then going back to the monitoring page I'm going to leave this in here under approaches to monitoring as well so that's how I personally refactor my notes I first start with taking an inventory of whatever I got and for that I use the core plugins search and quick switcher as well as the community plugins strange new worlds and then I start to look strategically about how I want to structure that note in terms of the notes in My Vault for that I really find obsidian Excalibur useful as a community plug-in for that you
are also going to need the excal draw plug-in because the two are related and in this step it's more about trying to see how notes relate to other notes the third step is categorizing and I look at the headings and categories that are inherent in the note and I Tred to see if I would restructure the content of the note itself in a different way step number four is explaining and this is probably the step that takes a lot of time because this is where I go in and flesh out the new structure that I've
created and then also the categories within the note and then number five is modularizing that involves looking at the different headings that I've identified and already fleshed out and then using the community plug-in note refactor or really also just copying and pasting into other notes so that I can start to tease apart separate ideas that probably should be their own separate note just to give you an idea of what I changed in the course of making this video here is my change log which automatically updates according to the notes that I've changed and everything that
I'm highlighting here are things that I significantly changed actually just in the process of changing this one note called monitoring on one hand it seems pretty obvious that refactoring your notes takes a lot of time it requires sitting down reviewing your notes and thinking critically about what notes need to be changed how and why on the other hand it is precisely this type of work that differentiates just taking notes from having an actually usable personal Knowledge Management System that is an accurate reflection of what you're thinking at any point in time having a continuous note
taking system means so much more than taking the notes in the first place it means continually updating your vault as what you think changes as well if you'd like to learn more about continuous note taking and some best practices for it that I've stumbled across in my years of doing it then check out this video where I talk specifically about how I use obsidian for work but it's still going to be valuable in other contexts thanks for watching f