Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import { email } from "https://esm.town/v/std/email?v=9";
export async function ankiNudge() {
const today = new Date();
const todayDate = new Intl.DateTimeFormat("en-US", { dateStyle: "long" })
.format(today);
const july29 = new Date("7/29/2023");
const firstCardDate = new Intl.DateTimeFormat("en-US", { dateStyle: "long" })
.format(july29);
const weeksOfAnki = Math.floor(
(Number(today) - Number(july29)) / (1000 * 60 * 60 * 24 * 7),
);
const subject = `Anki nudge | ${todayDate}`;
const html = `
<main>
<h1>Pete's Anki</h1>
<h2>Goal</h2>
<p><em>Aim to spend at least 1 hour this week Ankifying things I learn and studying existing cards.</em></p>
<h2>Stats</h2>
<ul style="list-style: none; padding-left: 0;">
<li style="margin: 0;"><strong>First Anki card:</strong> ${firstCardDate}</li>
<li style="margin: 0;"><strong>Weeks of Anki study:</strong> ${weeksOfAnki}</li>
</ul>
<h2>History</h2>
<p>
My initial exposure to Anki was from Sloane during med school.
I thought it was neat, but I didn't see the appeal beyond high-volume memorization domains like medicine and law.
Then in July '23 Danny mentioned that he had started using Anki a few years prior after reading <a href="http://augmentingcognition.com/ltm.html">Augmenting Long-Term Memory</a>.
I read that essay on the weekend of July 15-16, and it immediately clicked.
The essay mentioned many of the early computing and cognitive psychology pioneers like Vannevar Bush and George Miller who I was reading about at the time in <a href="https://press.stripe.com/the-dream-machine"><em>The Dream Machine</em></a>.
I also remembered that one of my personal heroes, Josh Comeau, uses <a href="https://twitter.com/joshwcomeau/status/1261310209944887297">spaced repetition with physical flashcards</a>.
</p>
<p>
I intend to build and refine a lifetime Anki habit. I'd like to Ankify what I learn from coding, books, podcasts, conversations, etc.
My primary interest is remembering software engineering concepts/syntax/commands, e.g. SQL queries, git sequences, keyboard shortcuts, browser APIs, system design mental models, Rust patterns, etc.
I also plan to Ankify tangential and completely unrelated topics like the history of computing, computer hardware, brain science, ophthalmology, cooking science and ingredients, and what friends do for work.
If there's anything I think is worth remembering for the rest of my life, I should Ankify it.
</p>
</main>
`;
await email({ html, subject });
}
October 23, 2023