Home > Reflections | ⏮️ ⏭️
2024-11-23
➕ Improving My Reflection Template
🖼️ Context
- ✍️ I Blog From Obsidian
- 🤖 I automate the creation of reflections with Templater.
- 😿 But my process isn’t fully automated.
- 🔗🔨🥵 I manually update the ⏮️ link.
- 🔗🕹️🥵 And I semi-manually add the ⏭️ link to the previous reflection.
- 📢📢 I want to blog more.
- 🥧✅ Theory: (all else equal) the easier it is, the more often I’ll do it. See the Tiny Habits Behavior Model.
🎯 Goal
✍️🤖 Streamline blogging.
📐 Specification
🔧 Update my reflection template to
- ⏮️ Insert the link to the previous reflection
- ⏭️ Insert the link to this reflection in the previous reflection
🪜 Steps
1) 🤖 ChatGPT
🗣️❓🤖 Initial Prompt
I have an obsidian templater template to create a file in a folder.
Each file in this folder is named after the current date: YYYY-MM-DD.
I want to update the template to include a link to the most recent file.
Can you write me a snippet of templater code to do this?
🤖💬🤔 Initial Response (Sans Explanation)
⚠️ Warning: this code is slightly broken
2) 🔧Modify → ▶️👀Test → ♻️Repeat
The first snippet didn’t work.
ChatGPT and I fixed errors and iterated.
flowchart
subgraph Loop [ ];
R("▶️ Run Template") --> F("🐛👀 Failure") --> C("🔧 Change Code") --> R
end
R --> S("💰👀 Success")
style Loop fill:none, stroke:none
📜 Result
My reflection template now automatically creates a previous link pointing to the most recent reflection and modifies that reflection to link to the new one! 🎉🤖🥂🥳
🪞 Reflections
- 🤖 Chat bots help.
- 🧐 They’re not perfect.
- 🚄 But with good prompts, some patience, and iteration, they can dramatically speed up writing (code or otherwise) by quickly generating pretty good drafts.
- :) I ❤️ emojis.
- 🤖 I ❤️ automation.
- 🥧 Easier → ✅ More
- 📣 I ❤️ Blogging.
- 🥳 I’m having fun.
🧑🚀 Exploring Quartz Features
- Free RSS feed and sitemap
- 💬 Giscus Comments?!
- 🤯 Did Quartz do this before or after I did?
- 🤯 Obsidian and Quartz support YouTube video embeds via markdown image syntax!
- I’ve been planning to eventually go through my video pages and figure out how to embed the YouTube video in the page.
- Now it’s super easy.
- Check it out: Parables on the Power of Planning in AI: From Poker to Diplomacy: Noam Brown (OpenAI)
🧜 Troubleshooting Mermaid
- 🤔 the graph on this page renders in Obsidian but not on my website.
- 🐛 on my site: syntax error, version 10.7.0
- 🤞 let’s try upgrading mermaidjs to the latest version: 11.4.0
- 🤔 nope… Same error, different version
- 💰 There we go…
- 🚛 adding a semicolon after the end bracket fixed it
- ⬜ I think some compilation step added whitespace after the square bracket and broke the parser
- ❗ I guess punctuation can be important
⚡ Tuning the Build
- Is 1 - 2 minutes too long to wait for my blog posts to publish? Yes. Let’s
- only checkout the latest commit,
- cache npm dependencies,
- combine jobs,
- update GitHub actions,
- reduce polling frequency,
- use smaller containers with node pre-installed.
- Here’s the GitHub workflow file before and after.
- We went from typically 1 - 2 minutes to typically 30 - 40 seconds.
- Most of the time spent over 30 seconds is waiting for a runner.
- Previously, most of the time spent over 1 minute was spent waiting for runners.
- So we basically cut our build time in half.
- Not bad!
- Of course, 30 seconds per build will never pay back the time I spent optimizing.
- But speed is a virtue.
- Lightning fast builds make it easy and rewarding to change often.
- The ability to make very frequent changes allows for rapid iteration cycles that wouldn’t be practical otherwise.
- And perhaps I’m good at rationalizing my own behavior to avoid regret.
- Potential for future improvement:
- reduce dependencies to minimize cache download time
- cache generated html and quartz build incrementally to avoid unnecessary rework.
📥 Invitation
I recently added comments to this site.
- 👂 What do you think?
- ⚖️ Have you found practical or entertainment value in anything I’ve written?
- 🪙🪙 Do you have any advice?
- 💬 If you have a GitHub account, let me know what you think by leaving a comment below (or how you feel by leaving an emoji reaction for this page).