1. Use @ProjectJupyter's rich display features to supercharge your users
Pictured below:
• @RDKit_org molecule
• @fastdotai learning rate finder
• Mermaid @Graphviz diagram via @quarto_pub
• `Color` - a full example to get you started!
2. Use lots of code examples
...and convert some of them to tests using assertions
These are only 3 of many more best practices detailed in the doc. We also include a full example that converts a @numpy_team docstring to a notebook-friendly format following these practices
Last time, we took our first step in building a simple text editor: gathering references to understand how the problem might be decomposed. Let's dig into them!
Finseth's The Craft of Text Editing is an excellent source for this! They suggest to decompose an editor into three sub-systems:
1. The sub-editor 2. User-oriented commands 3. Redisplay
1. You can think of the sub-editor as a bare minimum text editor. Its most important component is the buffer, which stores text in a way that enables efficient reading and editing. This isn't as straightforward a problem as it seems, but we'll get to that later
Ookay, let's make a simple terminal-based Roam clone that _is_ an outliner. I could fork and extend an existing outliner, but it's way more interesting to start from scratch
Step 1 is to do some reading... What's so special about outliners? I think they're strict supersets of text editors – if you used an outliner but only wrote in a single node, it'd effectively be a text editor
So let's take a step back. How do text editors work?
Let's start with the user. What does the user want to do?
1. Of course, to view text within a window. The distinction between text and window is important because the text may be longer than the window.
I think the Gang of Four Design Patterns book is respectable. I wouldn't expect anyone to study it end-to-end though... I see it more as proof of work about the concept of design patterns
I do think it's lacking concrete real-world examples and it's a bit too abstract for me, which means it doesn't age well. There isn't much guidance, lots left to the reader. If I were in a room with the GoF, the book would only cover 1% of what I'd try to learn from them
These days I'd recommend the following instead (I primarily work in python so these are mostly Python related, for now):
What are other terms for "metagames"? terms that might be more useful to search for relevant literature
can anyone recommend material on metagames? or related
“One might call what I was looking for ‘a metacookbook’—a book not about a certain cuisine or style of cooking, but about cooking itself—and I found good ones to be surprisingly rare”
I _love_ the use of "residue" here! dude's really good at naming
"[...] a house is the residue of the interactions between the
members of a family, their emotions and their belongings; and a freeway is the residue of movement and commercial exchange."
"receptacle" is another brilliant name. It was used earlier, and tbh I found it odd then, but it really is a great fit
"[...] the real systems, whose existence actually
makes the city live, have been provided with no physical receptacle."