• Will-to-Life

    Arthur Schopenhauer describes the will-to-life as the inherent driving force behind all human beings to stay alive and reproduce. This gives rise to suffering. Examples include marriage where picking a partner based on compatibility is overridden by having the ideal offspring. In this, Schopenhauer was ahead of his timeβ€”describing evolution as ‘the composition of the next generation’.


  • High-Control Group

    Characteristics of a cult that include opposition of critical thought, self-doubt is encouraged, leaders have supreme knowledge who are not accountable to anyone, information is tightly controlled, members are isolated from former lives, zealous commitment, ostracizing members who leave, controlling what you eat or drink, exploitation (financial, sexual), and deception as a means of control.


  • Arthur Schopenhauer

    German philosopher and pessimist, best known for ‘The World as Will and Representation’ where he describes the will-to-life as the overriding force that compels humans and leads to suffering. His work and philosophies have parallels with Buddhist teachings such as the rejection of the concept of self (ego) and the essence of suffering.


  • Values and Principles for Developing Noteland

    Below is a list of values and principles I keep in mind when developing Noteland:

    • Last forever: notes you write should be able to live beyond Noteland. Similarly, the service should continue to exist even if I’m the only user because it is so valuable.

    • Refreshingly fast: apps seem slower and less responsive then they did before, the experience should be a breath of fresh air to those that forgot how fast things should be.

    • Easy to maintain: adding new features and maintaining a high bar for reliability should be easy for one engineer to run.

    • Single player first: primary value should be to the note taker, any other values are secondary. For example, publishing is in service of the single-player–helping clarify thoughts and encourage growing one’s knowledge–not to encourage others to make backlinks (although that would be a positive second order effect).


  • Static Types Make It Easier Work on Projects Sporadically

    It’s easier to work on projects intermittently when a strongly typed programming language is used like Rust. That’s because becoming proficient in a codebase often entails holding the whole program in you head. Types provide mental shortcuts around the flow of data–you can skim the program by reading the static types to trace the flow of data and transformations (read the input arg types and return type) without needing to fully read or understand the contents of a method or function. In dynamic programming languages like Clojure you need to pay closer attention to what each step of the program does to anticipate what values are being used where.


  • Initial Stack for the Noteland Web App

    My initial values and principles for developing Noteland helps to narrow down some guidelines for choosing a stack for the web app:

    • It should be easy to maintain because I’m not working on it full time. I need to be able to jump in quickly, iterate, and fix bugs. Resolving bugs and adding new features should happen ‘refreshingly fast’.
    • Visual feedback should be fast and support a quick iterative loop since it’s still experimental and will need frequent, small changes along the way. ‘Refreshingly fast’ extends to my own environment because speed is undervalued.
    • The app should be very fast for users (e.g. initial download size, time to render, snappy interface), page reloads should feel nearly as fast as a single page application loading in-place, and Google Lighthouse measurements of website performance should be 100 for desktop and mobile.
    • Rely on the web stack and have good support for a langua franca like markdown.

    To try out different stacks, I’m building a prototype note editor that displays a full screen text editor with minimal syntax highlighting for GitHub flavored markdown and dev server that can do live reload.

    Frontend

    Stack 1: TypeScript and Webpack

    My experience thus far has not been good. In a tweet, I mentioned the difficulty getting a simple hello world web app with typescript and css set up with webpack. In the end it worked, I can compile and live reload the page, but it takes over 8 seconds for a program with 10 lines of code (excluding imports). Webpack suffers from aiming to be so powerful and generic it is a platform which does just about nothing. From my beginner eyes, Webpack merely organizes a myriad plugins and extensions to execute in an unknown sequence–which feels like a hulking mess with bad performance on page load and development feedback loop.

    This commit implements the prototype in Typescript and Webpack.

    Update: I was able to get the reload speed down to 3 seconds and the production bundle down to ~300 kb by setting the development and production flags in Webpack config. There’s seems to be more options for tree shaking, so it’s an acceptable page weight for now.

    Stack 2: Vanilla js

    What if we could ditch all the machinery used by modern js? I could drastically reduce the amount of js code that would need to be shipped to the client by using contenteditable (introduced in HTML5) which forms a psuedo text editor that is supported directly by most browsers. There’s some notable quirks between browser implementations, but it would support syntax highlighting too (or even wysiwyg rendering). Live reloading is fast and easy because there is nothing to compile.

    Stack 3: Vanilla js + wasm

    Markdown rendering in webassembly is faster than JavaScript and nearly the same weight as a comparable js dependency. Using the pre tag with contenteditable creates a live rendering while typing similar to Dropbox Paper. It might even be good enough to skip a build step server side when publishing a new note.

    Backend

    S3

    In some ways S3 is idealβ€”the frontend can make requests directly securely using AWS Cognito, no setup to start storing documents, and plays nicely with AWS Lambda for doing things like generating the published version of notes.

    On the other hand, reading data out is too constrained. Implementing a list of notes, for example, would require making a call to list keys and then fetching each object. Because keys are stored in chronological order that could require multiple calls to list keys to get a recent time range. All together, this would introduce a large amount of latency without additional caching or storing data on the client. It might be possible to keep an index file with the keys and titles up-to-date manually.

    S3 with client-side offline storage

    localstorage has a limit of 5MB per domain, which won’t be enough for large note sets. IndexedDB can store considerably more, ~500MB per domain. There is a new Storage API that attempts to abstract over the various local storage backends, but it’s not fully supported by all browsers (notably Microsoft Edge).

    Storing more locally has the added advantage of being fast and the ability to work offline (or install as a PWA).

    S3 + RDS as an index

    You can set up a Lambda hook to update an index stored in a database. Then you could query the DB when you need an index. Based on the pricing model (writes, reads, storage), it should be cheap to run just an indexing service. However, if we’re going to have a database, you could simplify everything by just storing all the notes in a database too and cut out the middle man (S3).

    S3 + Algolia

    Eventually full text search will be needed of both note titles and contents. An event would be triggered whenever an S3 object is created/updated/deleted so we could index the document in Algolia and make it available for search. There is a free tier that should be good enough for an MVP.

    AWS Aurora

    It seems likely that a full database will be needed eventually, so what if we jumped right to it? We could still keep it serverless (low cost) by using something like AWS Aurora which can auto-scale and turn on only when needed. However, there is a 5-30 second cold start time depending on what blog post you read. The recommendations around it are to… keep a single instance running at all times which is expensive and defeats the purpose.

    There’s a lot of other neat tools which might be useful in the future like AWS App Sync (graphql, offline sync). For now though, it adds too much complexity for such a simple app.

    Postgres

    Similar to the argument above, if we can’t actually get away without having a DB, and Aurora isn’t acceptable serverless due to cold starts, we could go back to ol' reliable Postgres running a full time instance on AWS RDS.

    The downside is that this ends up looking like a more typical centralized CRUD app which goes against the ‘last forever’ part of the principles of Noteland since data is no longer files that have a 1:1 relationship with what shows up when publishing and the user wouldn’t have any other options for how they store the data.

    Git

    This is an intriguing option because the user would more or less own the storage layer and Noteland would operate as a client and publisher. Git can inter-operate on many platforms and open up many different workflows (such as my current note taking workflow). If a user doesn’t want to add their own git repo, one could be created for them and operate transparently.


  • Trump Paradox

    The media tends to focus on the amount of lying that President Trump does–you can often find headlines that quantify it to some large number. The Trump paradox is not that he lies frequently (to some extent all politicians will lie), but that he says the truth about things that are obviously bad or embarrassing for him. This ‘saying the quiet part out loud’ and immunity to repercussions is the real horror.

    See also:


  • Methods of Product Ideation

    There are four kinds of product ideation that can be thought of along two axis, organic vs inorganic and bottom-up vs top-down.

    bottom-up top-down
    inorganic idea extraction idea safaris
    organic scratch your own itch live in the future, build what’s missing

    Idea extraction: observing and talking to other people to find problems.

    Scratch your own itch: finding problems you personally have.

    Idea safaris: starting with an industry, observe what happens at popular watering holes and look for patterns.

    Live in the future: become the kind of person that has more interesting product ideas, get to the edge of a field that is going to be a big wave. Look for smart people and hard problems (they tend to be clustered) and join in.

    Read the essay The Grand Unified Theory of Product Ideation.


  • Determinate Negation

    From Hegel’s Dialectics, an object that is what it is not. Slavoj Ε½iΕΎek describes the concept in a joke, a person goes to a coffee stand and asks for coffee without milk. The barista says, “Sorry, we only have coffee without cream”. In reality, both are the same coffee, but they are also different because of what they are lacking (coffee, cream).


  • Zipf's Law

    Given a corpus of language, the frequency of a word (how many times it shows up in the corpus) is inversely proportional to its rank in the frequency table of words. For example, ‘the’ appears 2x as much as ‘of’ (7% of words, 3.5% of words respectively). This is another example of the Pareto principle.


  • The Internet Has American Values Encoded

    The internet as a system contains values such as freedom and privacy that are deeply embedded in the implementation and it’s evolution. For example, by default the system is open, anyone can share their work by publishing (hosting a website) and anyone can access everything.

    This is most obvious when observing an opposing ideology try to exert control over the internet–Chinese censorship and firewall, ‘shutting down’ the internet during protests in Iran. It’s counter to how it works and how people expect to use it.

    See also:


  • Walter Jackson Freeman

    Physician that lost his surgical license (due to someone dying during an operation) who went on to perform over 4,000 lobotomies. He created a technique known as the icepick method which allowed for a lobotomy of the prefrontal lobe to be performed through the eye socket with minimal anesthesia. This allowed the operation to be performed at psychiatric hospitals rather than requiring facilities for surgery.

    He also performed a lobotomy on Rosemary Kennedy, John F. Kennedy’s sister. At the insistence of her father to protect the political lives of John and Ted, she was given the surgery at the age of 23. Afterwards, she had the mental capacity of a two year old and lost the ability to walk. The Kennedy family covered it up and separated her from the family claiming she was “reclusive.”