In Clojure, define the app in a local state, not the global state, to avoid waiting on the JVM to restart
Faster than restarting the JVM: Make the app constructable from a function and use the function’s result. When you want to restart the app, use a stop function and a go function (or a new function that does both, reset) that destroys the old instance and creates a new instance of the app. The default approach is to have the default scope of be the initial scope. The way Stuart Sierra proposes has you use the highest scope as an app instance manager instead, with all your app’s work done one local scope down.
Stuart Sierra inspired the Integrant REPL library
A Clojure developer named Stuart Sierra developed and taught a Clojure workflow that inspired James Reeves to build a library that implements it using Integrant: the Integrant REPL library. In my limited understanding, I see the workflow uses a global state with starting and stopping functions to set the state and clear the state. With Integrant REPL, it does this but with Integrant.
`alter-var-root` changes what a variable points to (vs. Clojure's default of spawning a new variable/value binding)
(Yell at me on Twitter, @AttentionAaron, if this is wrong.) Understanding the Integrant REPL library source code required that I know alter-var-root, so here’s how I understand it. When programming, we decide meaning of symbols through “binding” or “assignment” or “pointing”. The first two feel bidirectional, which doesn’t seem the case; you can’t look up the variable through the value, so the term pointing feels the most precise. You can do three things regarding a pointer and the pointee:
Integrant is like Docker for Clojure
Integrant’s produces decoupled, well-contained parts within the app to prevent one piece of the app from tanking the whole thread–speeding up development time when you need to change one part. Integrant is like a mini Docker for your Clojure program–it containerizes things (database connection, http server) and isolates them to make their core functionality available to other parts of the program while protecting the program from any faults they may have.
I used java.time.LocalTime with Clojure to make a "sleep cycle wake time" calculator
The rule for a sleep session length in minutes is fifteen minutes plus the sleep cycle length (understood to be ninety minutes) x the desired number of sleep cycles, or T = 15 + 90*n. I often used a bloated, dissatisfying, too many steps site to get a simple list of when I’d wake up given a number of sleep cycles. I initially wanted another website for this, but the info’s so simple that a simple Clojure expression’d suffice.
Brewing requires cheap ingredients but has overhead at ~4x the ingredients.
For a brew I’m thinking of, before the equipment, there’s four different malts, three different hops, yeast, and dextrose (<$50). Malt must be milled before steeping it like tea for the wort that will eventually ferment into beer, and this requires I have a mill or access to someone who has a mill (hopefully $0). If I don’t buy it pre-milled, I need to hope that Bell’s Brewery or One Well can help me figure out how to mill it.
(Idea) From a big goal, recursively set sub goals until action is obvious, then apply the Fogg (Tiny Habits) model to that action.
I’ve found a potentially superior means of rapidly generating quality (tiny) habits. The original method I learned from B.J. Fogg suggests two methods called behavior swarming and focus mapping to identify candidate habits to install. You start with an aspiration and then behavior swarm. You state an initial guess for an action then recursively follow that with “Great! What’s another action” until you have about fifteen behaviors. You then “focus map” the habits (move it along two axes representing ease and motivation, one axis at a time) to identify the ease and motivation to do the habit.
Opher Brayer's a positive influence on my quality and rate of learning
I will use every tool at my disposal to learn better, more sustainably, and faster. My aim is to maximize the love in the world, and my eighty years of life is short, so I will need to use every tool at my disposal to increase my understanding as fast as possible so that I can manifest more results related to this aim. Many people’s ideas assist me here, with the self-development I’ve done since a kid swelling up like a tsunami, ready to wash the world in love.
Opher Brayer suggests pattern recognition, pattern design, analogy, and real-time composition for the maximum rate of learning
To achieve the maximum rate of progress, we need the maximum rate of variability in our practice (repeated action) to gain the maximum new information possible in a limited scope of time. Opher Brayer teaches a “four-step” process to do this, with most of the variability-maximizing done in step two. The steps: Pattern Recognition Pattern Design Analogy Real-time composition. Here’s how I interpret the steps: Id what you want to get good at Break it down into its parts Put the parts in every possible permutation Practice all these permutations, perhaps multiple times Say “This is like…” to connect it to things you know, accelerating the rate of learning Use it Perhaps use Tiny Habits to use this system consistently.
Design for every size from mobile to massive displays with Tailwind's breakpoints
Tailwind’s responsive nature works via breakpoints. Every single class in Tailwind works with the breakpoints: none, sm, md, lg, xl, and 2xl. Breakpoints specify when a style should start, meaning the styles persist through all larger screen sizes unless they’re “undone” with another style at a larger breakpoint. That is md:<your style> will go through the lg and xl breakpoints unless you say xl:<your overriding style>. Start with none to cover mobile and bigger, then imagine the screens get larger, see how they should look and add breakpointed styles at the bigger sizes, maybe increasing the text size with: lg:text-lg (you don’t set specific numbers in the style, you customize it in the Tailwind config).