Taking Notes on Taking Notes

July 25, 2024 (5mo ago)

Introduction

Taking notes and being organized is crucial for boosting your productivity as a developer. There are many tools available for taking notes, such as Notion, Craft, and Obsidian. These tools can help you organize your ideas, projects, and daily tasks.

We all know, it's not just about the tools you use—it's also about how you use them.

BTW I am quite tired of those viral Notion hacks that promote nonsensical productivity tips. Therefore, I want to share my methods and how I actually work in real life.

My Note-Taking Apps and Experiences

So far, I have used many applications for my personal and work notes. Among these, Notion was the least used because its application was not native for a long time, making it very slow. Besides that, I had been using Craft for the last 3-4 years, and I really loved Craft.

However, one thing that bothered me the most during these processes was that my notes were always in someone else’s hands. Don’t get me wrong, I’m not saying someone was reading my notes; what I mean is that my notes were in the database of the company I was using, and one day that database might accidentally be deleted, or there could be errors for a few days, and I might not be able to access my notes.

Unfortunately, I experienced this with Craft 3-4 months ago; for a few days, I had trouble accessing my notes from both the web and the application.

The second major issue is not being able to customize the application to my usage. For example, my notes are organized as follows:

Workspace
- Clients
  - X Company
   - Projects
        - Project 1
        - etc.
    - Meeting Notes
      - 07-25-2024 // It's European date format pls don't get confused

This is my usual routine. When I have a meeting with a client, the first thing I do is create a meeting note dated that day for the client and take note of everything important.

Automating this would be very beneficial for me. After the incident I mentioned with Craft, I started looking for an application where I could keep my notes locally but also access them from my phone.

I decided to use Obsidian, an application I had heard of before but never used. Since I already use the Apple ecosystem, the ability to create a workspace in iCloud with Obsidian was a significant advantage for me.

Now, let’s talk about the exciting parts. After diving into Obsidian, I discovered the feature I had been looking for: the ability to create our templates and automations.

This feature thrilled me. I immediately wrote two templates, one for new clients and one for new meeting notes, and I am still actively using them. Doing things like this, automating my daily tasks, makes me feel like a true developer.

Conclusion

I believe I have thoroughly explained how I take notes and what I use in this article, sharing my personal experiences. I will update this article when there are updates. You can find the code for the two templates I wrote for Obsidian below.

New Client Template

With this template, first I select the workspace, then I type the customer name and the template creates the customer folder for me, creates projects and meeting notes in it and opens them for me.

const mainFolders = ['Freelance', 'Miova']
 
const selectedFolder = await tp.system.suggester((item) => item, mainFolders)
 
if (!mainFolders.includes(selectedFolder)) {
    throw new Error("Invalid folder selected")
}
 
const customerName = await tp.system.prompt("Customer Name")
 
const customerFolderPath = `${selectedFolder}/${customerName}`
if(!this.app.vault.getFolderByPath(customerFolderPath) && customerName != null){
 
 
await this.app.vault.createFolder(customerFolderPath)
 
 
const meetingNotesFolder = `${customerFolderPath}/Meeting Notes`
if(!this.app.vault.getFolderByPath(meetingNotesFolder)){
await this.app.vault.createFolder(meetingNotesFolder)
}
 
const projectsFolder = `${customerFolderPath}/Projects`
if(!this.app.vault.getFolderByPath(projectsFolder)){
await this.app.vault.createFolder(projectsFolder)
}
 
await tp.file.move(`${customerFolderPath}/` + customerName)
 
const customerFile = tp.file.path(true)
const todayDate = await tp.date.now("MM-DD-YYYY")
const todayMeetingNote = await tp.file.create_new("", todayDate, false, meetingNotesFolder)
 
app.workspace.getLeaf(true).openFile(customerFile)
app.workspace.getLeaf(true).openFile(todayMeetingNote)
}

New Meeting Note Template

This template first makes me select a workspace again, then lists the customers in that workspace, creates a note dated today in the Meeting Notes folder for the customer I selected and opens it.

const mainFolders = ['Freelance', 'Miova']
 
const selectedFolder = await tp.system.suggester((item) => item, mainFolders)
 
if (!mainFolders.includes(selectedFolder)) {
    throw new Error("Invalid folder selected")
}
 
const folderContents = await this.app.vault.adapter.list(selectedFolder)
const subfolders = folderContents.folders.map(folder => folder.split('/').pop())
 
const selectedCustomerFolder = await tp.system.suggester((item) => item, subfolders)
 
if (!subfolders.includes(selectedCustomerFolder)) {
    throw new Error("Invalid customer folder selected")
}
 
const customerFolderPath = `${selectedFolder}/${selectedCustomerFolder}`
const meetingNotesFolder = `${customerFolderPath}/Meeting Notes`
 
const todayDate = await tp.date.now("MM-DD-YYYY")
const todayMeetingNote = `${meetingNotesFolder}/${todayDate}`
 
if (!await this.app.vault.exists(todayMeetingNote)) {
    await tp.file.move(`${todayMeetingNote}`)
}
 
await app.workspace.getLeaf(true).openFile(tp.file.path(true))