{
    "version": "https://jsonfeed.org/version/1",
    "title": "Tom Oliver's Blog - Notes only",
    "home_page_url": "https://www.tomoliver.net/",
    "feed_url": "https://www.tomoliver.net/feeds/notes/feed.json",
    "description": "Notes from my blog",
    "icon": "https://www.tomoliver.net/logo.svg",
    "author": {
        "name": "Tom Oliver"
    },
    "items": [
        {
            "id": "https://www.tomoliver.net/notes/2025-06-12-1726",
            "content_html": "<p>How often is your mind worrying about problems, reliving unpleasant experiences that continue to haunt you, or imagining a potential future that may never happen?</p>",
            "url": "https://www.tomoliver.net/notes/2025-06-12-1726",
            "title": "How often is your mind worrying about problems, reliving unp...",
            "summary": "How often is your mind worrying about problems, reliving unpleasant experiences that continue to haunt you, or imagining a potential future that may never happen?",
            "date_modified": "2025-07-22T15:16:03.755Z",
            "author": {
                "name": "Tom Oliver"
            }
        },
        {
            "id": "https://www.tomoliver.net/notes/2025-05-27-1157",
            "content_html": "<p>Anything that <em>can</em> happen can <em>only</em> happen <em>now</em>.<br/>\n<!-- -->So if you want some change, now is the place to be.</p>",
            "url": "https://www.tomoliver.net/notes/2025-05-27-1157",
            "title": "Anything that can happen can only happen now.\nSo if...",
            "summary": "Anything that can happen can only happen now.\nSo if you want some change, now is the place to be.",
            "date_modified": "2025-06-06T15:18:15.187Z",
            "author": {
                "name": "Tom Oliver"
            }
        },
        {
            "id": "https://www.tomoliver.net/notes/2025-05-13-1052",
            "content_html": "<p>Maybe the ego is like the one ring in <em>Lord Of The Rings</em>.<br/>\n<!-- -->Some of the characters believe that they can harness its power for good.<br/>\n<!-- -->But the wise characters know it will consume whoever tries.<br/>\n<em>&quot;Do Not Tempt Me, Frodo!&quot; - Gandalf The Grey</em></p>",
            "url": "https://www.tomoliver.net/notes/2025-05-13-1052",
            "title": "Maybe the ego is like the one ring in Lord Of The Rings.\nS...",
            "summary": "Maybe the ego is like the one ring in Lord Of The Rings.\nSome of the characters believe that they can harness its power for good.\nBut the wise characters know it will consume whoever tries.\n\"Do Not Tempt Me, Frodo!\" - Gandalf The Grey",
            "date_modified": "2025-06-07T12:08:26.483Z",
            "author": {
                "name": "Tom Oliver"
            }
        },
        {
            "id": "https://www.tomoliver.net/notes/2025-05-04-1751",
            "content_html": "<p><strong>This is why I unconsciously compare myself with others.</strong></p>\n<p>There is a part of me that is afraid that I don&#x27;t deserve to exist.</p>\n<p>So it wants to find evidence to justify it&#x27;s existence.</p>\n<p>If it can find someone it perceives as inferior to me, then that can temporarily placate its fear.</p>\n<p>&quot;At least I am better than that guy! Phew...&quot;</p>\n<p>But eventually it always finds someone who it perceives as superior.</p>\n<p>That really gets it going.</p>\n<p>Now it needs to think of ways that I am <em>actually</em> somehow superior.</p>\n<p>Maybe that person is secretly unhappy? Haha, I bet I am way happier than them!</p>\n<p>But what if they are actually genuinely happy?</p>\n<p>Well then, the only reason is that there is some unfair advantage that they possess over me. Its not fair. I have been poorly treated and so was not given a fair chance to compete...</p>\n<p>I am a victim.</p>\n<p>...</p>\n<p>And on and on it goes...\nIt is very interesting. Why can&#x27;t it accept inferiority?\n<br/>\n<br/>\n<!-- -->I think its because, according to it, to accept inferiority is to accept annihilation.</p>",
            "url": "https://www.tomoliver.net/notes/2025-05-04-1751",
            "title": "This is why I unconsciously compare myself with others.\n...",
            "summary": "This is why I unconsciously compare myself with others.\nThere is a part of me that is afraid that I don't deserve to exist.\nSo it wants to find evidence to justify it's existence. \nIf it can find someone it perceives as inferior to me, ...",
            "date_modified": "2025-06-07T12:08:26.483Z",
            "author": {
                "name": "Tom Oliver"
            }
        },
        {
            "id": "https://www.tomoliver.net/notes/2025-04-18-0845",
            "content_html": "<p>Books I&#x27;ve read so far in 2025. WIP</p>\n<p><br/>\n<!-- -->Books I&#x27;d read again:</p>\n<ul>\n<li><a href=\"https://www.goodreads.com/book/show/206311440-another-self?from_search=true&amp;from_srp=true&amp;qid=iWOAp3owzT&amp;rank=5\">Another Self</a></li>\n<li><a href=\"https://www.goodreads.com/book/show/13059271-the-top-five-regrets-of-the-dying?ref=nav_sb_ss_1_12\">The Top Five Regrets of the Dying</a></li>\n<li><a href=\"https://www.goodreads.com/book/show/19480382?ref=nav_sb_ss_1_6\">嫌われる勇気</a></li>\n<li><a href=\"https://www.goodreads.com/book/show/130610.The_Divided_Mind?ac=1\">The divided mind</a></li>\n<li><a href=\"https://www.goodreads.com/book/show/50021854-the-way-out\">The way out</a></li>\n<li><a href=\"https://www.goodreads.com/book/show/76334.A_New_Earth?from_search=true&amp;from_srp=true&amp;qid=6UWx5x2x5U&amp;rank=1\">A new earth</a></li>\n<li><a href=\"https://www.goodreads.com/book/show/6708.The_Power_of_Now?from_search=true&amp;from_srp=true&amp;qid=KKggj4xcVs&amp;rank=1\">The power of now</a></li>\n<li><a href=\"https://www.goodreads.com/book/show/67864.Stillness_Speaks?from_search=true&amp;from_srp=true&amp;qid=Q0JT0Vtcf4&amp;rank=1\">Stillness speaks</a></li>\n<li><a href=\"https://www.goodreads.com/book/show/450534.When_the_Body_Says_No?from_search=true&amp;from_srp=true&amp;qid=PAB53lR0oW&amp;rank=1\">When the body says no</a></li>\n<li><a href=\"https://www.goodreads.com/book/show/58537332-the-myth-of-normal?ref=nav_sb_ss_1_14\">The myth of normal</a></li>\n<li><a href=\"https://www.goodreads.com/book/show/3601593-non-violent-communication-a-language-of-life?from_search=true&amp;from_srp=true&amp;qid=rDpaxx0p0p&amp;rank=1\">Non violent communication</a></li>\n<li><a href=\"https://www.goodreads.com/book/show/33534477-enlightenment-is-your-nature?ac=1&amp;from_search=true&amp;qid=v8JViONHt7&amp;rank=1\">Enlightenment is you nature</a></li>\n</ul>\n<p><br/>\n<!-- -->Books I probably wouldn&#x27;t:</p>\n<ul>\n<li><a href=\"https://www.goodreads.com/book/show/58665892-why-woo-woo-works?from_search=true&amp;from_srp=true&amp;qid=AzZ317srvD&amp;rank=1\">Why woo-woo works</a></li>\n<li><a href=\"https://www.goodreads.com/book/show/32191672-trauma-sensitive-mindfulness?ref=nav_sb_ss_2_17\">Trauma-Sensitive Mindfulness</a></li>\n<li><a href=\"https://www.goodreads.com/book/show/60726415-don-t-believe-everything-you-think\">Don&#x27;t believe everything you think</a></li>\n<li><a href=\"https://www.goodreads.com/book/show/34849164-sacred-rest?from_search=true&amp;from_srp=true&amp;qid=G5a7Ce3jKA&amp;rank=1\">Sacred Rest</a></li>\n</ul>",
            "url": "https://www.tomoliver.net/notes/2025-04-18-0845",
            "title": "Books I've read so far in 2025. WIP\nBooks I'd read again:\n\n...",
            "summary": "Books I've read so far in 2025. WIP\nBooks I'd read again:\n\nAnother Self\nThe Top Five Regrets of the Dying\n嫌われる勇気\nThe divided mind\nThe way out\nA new earth\nThe power of now\nStillness speaks\nWhen the body says no\nThe myth of...",
            "date_modified": "2025-06-07T12:08:26.482Z",
            "author": {
                "name": "Tom Oliver"
            }
        },
        {
            "id": "https://www.tomoliver.net/notes/2024-07-08-0953",
            "content_html": "<p><img src=\"/img/books/flowers-for-algernon.jpg\" alt=\"アルジャーノンに花束を - Daniel Keyes \" normalWidth=\"263\" normalHeight=\"379\" blur=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAKCAIAAAD3rtNaAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA50lEQVR4nAHcACP/AImFdrnCtLu9tcLGuL/JxbnDwcHFuwC7r5X19dzj4cvg4cnk49Ps7trw6tAAuaqO/vXV7ubL8urQ8enO9OvT9OnLALWojP752P/33fnz2v744Pbw1O7oxwDHuJfu5cafm4vu5tCnpJHW0LT/+tMAin5lR0c/AAEGLSslBQgOKCgmr6GJAIN6ZU5MRxQoIwAeFBQyK0BCOrSrkwC8spTm4MI8PTlTWVFBQTvOyLD//NgAt6iI7OPEqqaU9+/Vsaub2NK8+vPSAJuTePfpyvHoyufexPHp0e3l0t/Yvsq/jf/6C8zmAAAAAElFTkSuQmCC\"/></p>\n<p><strong>アルジャーノンに花束を - Daniel Keyes</strong></p>\n<p>この本はなぜか日本で知られてるけどイギリスではそれほど有名じゃないようだ。<br/>\n<!-- -->僕の大好きなNUJABESの「FEATHER」という曲に出てくるから知ってる：</p>\n<blockquote>\n<p>...<br/>\n<!-- -->The best laid plans of Mice and Men are never right<br/>\n<!-- -->I&#x27;m just a Vagabond with Flowers for Algernon<br/>\n<!-- -->An Average Joe who knows what the fuck is going on<br/>\n<!-- -->...<br/>\n<!-- -->読むしかない、、、\n<br/>\n<strong>＊＊ネタバレ注意＊＊</strong></p>\n</blockquote>\n<p>知的障害者でIQ８０の主人公が子供のように無邪気な生活を送ってる。<br/>\n<!-- -->名前はチャーリーである。<br/>\n<!-- -->チャーリーはベーカリーで働くこともでき、ある程度自立をしており、友達も少なくない。\nある日、チャーリーは科学者に選ばれ、「知能を向上させる手術ができるかもしれない」と告げられる。\nチャーリーには、子供の頃から他の子供と同じように「利口になりたい」という夢があり、喜んで手術を受けることにした。\n<br/>\n<br/>\n<!-- -->手術が成功し、チャーリーの知能は日々少しずつ向上していく。\n知能が上がることで、これまで理解できなかった過去の記憶や経験を新たな視点で見直すようになる。彼が友達だと思っていた人々が実は彼を見下し、いじめていたことや、子供の頃に親から虐待を受けていたことに気づく。\nチャーリーは知能を得ることで幸せになれると信じていたが、高い知能を持つことで人間の闇がはっきり見えるようになり、時には元の白痴状態がよかったのではないかと感じることもあった。\nしかし、手術の影響で正常のIQに止まらず、時間が経てば経つほどチャーリーの知能が伸びる一方であった。\n<br/>\n<br/>\n<!-- -->天才的なIQにまで達したチャーリーは、心理学者になり、手術を行った科学者たちが実験用に使用していたネズミ「アルジャーノン」を観察することで、恐ろしいことを予測する。\n手術の効果は一時的なものであり、いずれ知能が元に戻る、むしろ、さらに低下してしまうという結論であった。\n天才的なIQを持つ人間しか予測できなかったことを予測してしまい、能力があるうちにチャーリーは得た知能を保つ方法を必死に探しはじめた。\n<br/>\n<br/>\n<!-- -->さて、どうなるでしょう？</p>",
            "url": "https://www.tomoliver.net/notes/2024-07-08-0953",
            "title": "アルジャーノンに花束を - Daniel Keyes \nアルジャーノンに花束を - Daniel Keyes\nこ...",
            "summary": "アルジャーノンに花束を - Daniel Keyes \nアルジャーノンに花束を - Daniel Keyes\nこの本はなぜか日本で知られてるけどイギリスではそれほど有名じゃないようだ。\n僕の大好きなNUJABESの「FEATHER」という曲に出てくるから知ってる： \n\n...\nThe best laid plans of Mice and Men are never right\nI'm just a Vagabond with Flowers f...",
            "date_modified": "2024-08-15T11:05:21.771Z",
            "author": {
                "name": "Tom Oliver"
            }
        },
        {
            "id": "https://www.tomoliver.net/notes/2024-05-21-1533",
            "content_html": "<p><img src=\"/img/books/debt.jpg\" alt=\"Debt, the first 5,000 years - David Graeber\" normalWidth=\"300\" normalHeight=\"400\" blur=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAKCAIAAAD3rtNaAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA30lEQVR4nGPYxGD+hFnyCIPJHgb7PQw2hxj0GRJnM/wUUf4vw/1fVv+/rPp/Wa3/Mtzewg4MXwTN/svZv/j04t2rRz9/vvkvIxqtF8nwQ9T9v23kxy9vf399/e//m/+ykpnqIQx/xF3+RyV/+PDi97sn378//S8rU8BgzfBfyvV/fOqb/x/evHly7+2D/5LyuQxyDP+lTf/Luf4+deDd3m23t6x9wSaQxMDA8F9SE+QGMHrLxXyRgSEYJCojDBd9w8l0hIHBn4GBYS2D5j4Gi60M5vMZpFoZGEoYGIwZGAAJqmEZV15u/wAAAABJRU5ErkJggg==\"/></p>\n<p><strong>Debt, the first 5,000 years - David Graeber</strong></p>\n<p>Its long! Exactly 400 pages, but what a book.\nIf there is just one book that I could read on economics/history/anthropology this would be it.\nThe title sounds a lot more impenetrable than the content, when I tell people about this book I often get &quot;that sounds very academic&quot; but as a layman I found it perfectly readable.\n<br/>\n<br/>\n<!-- -->This book takes a stab at the following questions:</p>\n<br/>\n<ul>\n<li>What is the origin of money?</li>\n<li>How is money created?</li>\n<li>What is debt?</li>\n<li>What is capitalism?</li>\n<li>Where do markets come from?</li>\n</ul>\n<p><br/>\n<!-- -->So it is by no means just about what many people think of when they hear the word &quot;debt&quot;.\n<br/>\n<br/>\n<!-- -->The parts of this book that I enjoyed most were when the author got to show off his anthropological prowess. It really opened my eyes to the diversity (in the treatment of debt) of societies spanning millennia and continents. This includes the Tiv people of Africa, the Indus valley civilizations, the Irish kingdoms, ancient India and the usual suspects like the ancient Egyptians, Greeks, Romans, Chinese and so on.\nAcross world history there are trends that regardless of culture or geography make themselves apparent when considering what mediums of exchange were widely used at the time. You would think that knowledge of a particular society&#x27;s culture, economic system and geography would first need to be analysed before sufficient anthropological predictions could be made. However, the author makes the case that simply by determining whether a transaction was settled in cash, bartering or through credit, much can be gleaned about the sort of goods that could be acquired (e.g. slaves etc.).\n<br/>\n<br/>\n<!-- -->One major point of the book is that we exist in the very early stages of an economic era that may yet span many hundreds of years, beginning in 1971 when the Dollar was taken of the gold standard. Across history, societies that use precious metals as the medium of exchange tended to have a propensity for war, expansion and enslavement. Societies that did not, tended to be more peaceful, however we don&#x27;t yet know if that trend will continue to be relevant in our modern era.\n<br/>\n<br/>\n<!-- -->I must also mention that there is something that the author absolutely flogs a dead horse on. It is the total and thorough debunking of the idea that the inconvenience of barter provides the impetus for the advent of money. Every 15 pages or so we get a reminder of why the myth of barter is absurd and could not have been the primary means of exchange prior to money being established. Thank you David Graeber, I will personally guarantee that if I ever hear anyone repeat this myth I will forcefully point them in the direction of this book.\n<br/>\n<br/>\n<!-- -->May you rest in peace.</p>",
            "url": "https://www.tomoliver.net/notes/2024-05-21-1533",
            "title": "Debt, the first 5,000 years - David Graeber\n**Debt, the firs...",
            "summary": "Debt, the first 5,000 years - David Graeber\nDebt, the first 5,000 years - David Graeber\nIts long! Exactly 400 pages, but what a book.\nIf there is just one book that I could read on economics/history/anthropology this would be it.\nThe ti...",
            "date_modified": "2024-05-21T16:26:05.832Z",
            "author": {
                "name": "Tom Oliver"
            }
        },
        {
            "id": "https://www.tomoliver.net/notes/2024-05-08-0953",
            "content_html": "<p>I&#x27;ve only been using Kagi for a couple of days now, but the search results on programming topics are leagues better than Duckduckgo. I may be a little late to the party, but just realised that you can have shared state between pages without polluting <code>_app.tsx</code> in NextJS. I credit Kagi for taking me to this page where I learned about <code>getLayout</code>.\n<a href=\"https://nextjs.org/docs/pages/building-your-application/routing/pages-and-layouts#per-page-layouts\">https://nextjs.org/docs/pages/building-your-application/routing/pages-and-layouts#per-page-layouts</a>\n<br/>\n<br/>\n<!-- -->Here is how to add Kagi as your default search engine to Firefox on NixOS (home-manager)</p>\n<pre lang=\"nix\"><code class=\"language-nix\">home-manager.users.&lt;my-user&gt;.programs.firefox = {\n  enable = true;\n  profiles = {\n    myProfile = {\n      ...\n      search = {\n        force = true;\n        default = &quot;Kagi&quot;;\n        engines = {\n          &quot;Kagi&quot; = {\n            urls = [\n              { \n                template = &quot;https://kagi.com/search?q={searchTerms}&quot;; \n              }\n            ];\n            iconUpdateURL = &quot;https://assets.kagi.com/v2/favicon-32x32.png&quot;;\n            updateInterval = 24 * 60 * 60 * 1000; # every day\n            definedAliases = [ &quot;@kg&quot; ];\n        ...\n\n</code></pre>",
            "url": "https://www.tomoliver.net/notes/2024-05-08-0953",
            "title": "I've only been using Kagi for a couple of days now, but the ...",
            "summary": "I've only been using Kagi for a couple of days now, but the search results on programming topics are leagues better than Duckduckgo. I may be a little late to the party, but just realised that you can have shared state between pages without...",
            "date_modified": "2024-05-08T10:10:04.000Z",
            "author": {
                "name": "Tom Oliver"
            }
        },
        {
            "id": "https://www.tomoliver.net/notes/2024-04-07-1133",
            "content_html": "<p><img src=\"/img/books/the-trial.jpg\" alt=\"The Trial - Franz Kafka\" normalWidth=\"260\" normalHeight=\"346\" blur=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAKCAIAAAD3rtNaAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA50lEQVR4nAHcACP/AFFRUaOjo76+vsXFxb29vbu7u1VVVQBYWFhzc3NhZ2d6enppaGiCgoJ1dXUAZWVlpaWlm25trqeksLu7r6+vdXV1AGppabq6uqpGS6MVL69JU83O0YuLiQBzc3PBwcHFtrbNp6rHoaLLy8upqakAjo6O0tLSzdHRy9PT7/f36enp1tbWAKGhoefn593b25COjmdlZdra2szMzACqqqr5+fn39/enp6cCAgLOzs7GxsYAsLCw/Pz8/Pz8sbGxLi4u4eHhzs7OALW0tP7+/vHx8cjIyB4eHqqqqtra2qfNiJ5k3jevAAAAAElFTkSuQmCC\"/></p>\n<p><strong>The Trial - Franz Kafka</strong></p>\n<p>This is one one of those books that people tell you to read when they actually haven&#x27;t finished it themselves (you know who you are). I don&#x27;t think anyone would mind me saying that its a painful read, because surely that was the author&#x27;s intention. It&#x27;s about a guy who lives in a world that is governed by an impenetrable court system, the workings of which nobody understands. He gets arrested randomly and put on trial without explanation. Nobody knows what the charges are (except maybe the high judges?) so its very difficult to defend himself. There is what they call an &quot;advocate&quot; who offers to help the protagonist with the trial. However the help he provides consists of various sycophantic offerings to court judges who happened to have been acquaintances from the past. The protagonist also finds himself entangled with various female characters with tenuous connections to the courts, who for some reason show great romantic interest in him. They offer to help in one way or another by providing the protagonist with some sort of 3rd-hand information about the courts, which nevertheless fails to translate to much advantage in the proceedings. The setting of the book is no doubt dystopian, and reminds me of the Maoist witch hunts described in the book <a href=\"https://en.wikipedia.org/wiki/Wild_Swans\">Wild Swans</a>. For me it served as an unsettling reminder that there are people in this world who would quite happily construct such an opaque bureaucracy as described in the book. If the consequences of the court&#x27;s ruling were not so dire, it could even be interpreted as comedic, but the sinister aspect of it all seems a little too real and a little too plausible for it to make me laugh.</p>\n<p><br/>\n<!-- -->I may have been a bit harsh. Overall I am glad to have read this book.</p>",
            "url": "https://www.tomoliver.net/notes/2024-04-07-1133",
            "title": "The Trial - Franz Kafka\nThe Trial - Franz Kafka\nThis is ...",
            "summary": "The Trial - Franz Kafka\nThe Trial - Franz Kafka\nThis is one one of those books that people tell you to read when they actually haven't finished it themselves (you know who you are). I don't think anyone would mind me saying that its a p...",
            "date_modified": "2024-04-08T11:10:17.000Z",
            "author": {
                "name": "Tom Oliver"
            }
        },
        {
            "id": "https://www.tomoliver.net/notes/2024-03-09-1150",
            "content_html": "<p><img src=\"/img/books/ningen-shikkaku.jpg\" alt=\"人間失格　太宰治\" normalWidth=\"205\" normalHeight=\"293\" blur=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAKCAIAAAD3rtNaAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA50lEQVR4nAHcACP/APD9/7jM5/Gpi4+QcZqhhJCFZ7y6pACvzPBDfLxRIBkDAwARHBcqEQCDb1AA8smmpGgnLColPT1BLS0wOyUAsoViAP/CbbhbEiAZDiUuNBsdGy8fALeFYAD9x3etbBaUZlZVMx8WLycsMheReVwAya+GYVYw3GgcspObOG1xEkBCZW5SAPa/eEhGGs1uG6dZPxU/OwJVgUB/dwD/y29iQBHfYBrYNQ9ONxNkUFG/gmoA/6dw3iAO4CIO3CAN4iIP1TsZ/3VHAP/Fo+lkM/V6R/F2QfF0Qu1lPf+ifBp7WVrnIEyNAAAAAElFTkSuQmCC\"/></p>\n<p><strong>人間失格　太宰治</strong></p>\n<p>日本人なら誰でも知ってる小説だと聞いて読もうと思った一冊。（読んだ後に友達に確認したらそれは大げさだったらしい。笑）<br/>\n<!-- -->内容はとても暗く、絶望感がすごく伝わってくる。<br/>\n<!-- -->落ち込んでる時に読ない方がいいと注意されていたけど、自分は落ち込んでいる時に読んでも大丈夫だったかもしれない。<br/>\n<!-- -->描写が抽象的で「何が起きた？具体的に言ってくれ！」みたいなところが多かったけど、文学って言うのはそんなもんだろう。<br/>\n<!-- -->主人公の葉蔵は変わりたくてもアル中から脱することができなくて、最後の方にお酒をやめたけど結局薬物依存症に移っただけだった。<br/>\n<!-- -->現在はインターネット依存症、スマホ依存等が広がる一方、少なくとも誰もが一人ぐらい依存症を持ってる知り合いがいるんじゃないかなって思う。<br/>\n<!-- -->自分だってインターネット依存症だもん。笑。<br/>\n<!-- -->主人公の葉蔵はいつも周りに人がいても素でいられなかったから孤独だったと思う。<br/>\n<!-- -->私達がLINEで友達とやり取りしていても感じる孤独と似てると思う。<br/>\n<br/>\n<!-- -->心に響いた箇所</p>\n<ul>\n<li>女は死んだように深く眠る、女は眠るために生きてるのではないかしら。</li>\n<li>自分は道化を演じ、男はさすがにいつまでもゲラゲラ笑ってもいませんし、それに自分も男の人に対し、調子に乗ってあまりお道化を演じすぎると失敗すると言う事を知っていましたので、必ず適当のところで切り上げるように心掛けていましたが、女は適度という事を知らず、いつまでもいつまでも、自分にお道化を要求し、自分はその限りないアンコールに応じて、へとへとになるのでした。</li>\n<li>自分は、女があんなに急に泣き出したりした場合、何か甘い物を手渡してやると、それを食べて機嫌を直すという事だけは、幼い時から、自分の経験によって知っていました。</li>\n<li>俗にいうチャッカリ性でした。田舎者の自分が、愕然と眼を見張ったくらいの、冷たく、ずるいエゴイズムでした。自分のように、ただ、とめどなく流れるたちの男では\n無かったのです。</li>\n<li>「モチよ」</li>\n</ul>",
            "url": "https://www.tomoliver.net/notes/2024-03-09-1150",
            "title": "人間失格　太宰治\n人間失格　太宰治\n日本人なら誰でも知ってる小説だと聞いて読もうと思った一冊。（読んだ後に友達に...",
            "summary": "人間失格　太宰治\n人間失格　太宰治\n日本人なら誰でも知ってる小説だと聞いて読もうと思った一冊。（読んだ後に友達に確認したらそれは大げさだったらしい。笑）\n内容はとても暗く、絶望感がすごく伝わってくる。\n落ち込んでる時に読ない方がいいと注意されていたけど、自分は落ち込んでいる時に読んでも大丈夫だったかもしれない。\n描写が抽象的で「何が起きた？具体的に言ってくれ！」みたいなところが多かったけど、文学って言うのはそんなもんだろう。\n主人公の葉蔵は変わりたくて...",
            "date_modified": "2024-03-09T13:08:45.000Z",
            "author": {
                "name": "Tom Oliver"
            }
        },
        {
            "id": "https://www.tomoliver.net/notes/2024-02-21-1344",
            "content_html": "<p>I just happened to stumble across <a href=\"https://www.youtube.com/watch?v=H3H2AVm1uD8\">The Dandy Warhols&#x27; new song - “I’d Like To Help You With Your Problem (feat. Slash)”</a> and its pretty good.\n<br/>\n<br/>\n<!-- -->The music video is mostly AI generated, with all the weird/creepy artifacts and distortions you may expect.\nA genius move since this is exactly the dreamy, hazy, vague, feeling their music has always conveyed to me.\n<br/>\n<br/>\n<!-- -->Its amazing how over all the years of cinema, humanities attempts to convey the sensation of dreaming have never even came close to what AI can do. As the underlying models improve, we are likely to see fewer of these hallucinations in generated content, which I find a little bit sad.\nI love the mental image of a giant machine, lying motionless in deep slumber, engineers prodding at the wires in its brain, hoping to influence the direction it takes as it drifts through a dream.\n<br/>\n<br/>\n<!-- -->I like this analogy because explains why AI halucinates.\n<br/>\n<!-- -->What do we call it when we halucinate in our sleep? ...A dream.\n<br/>\n<br/>\n<!-- -->It reminds me of the anime <a href=\"https://www.imdb.com/title/tt26737616/\">pluto</a> which I saw on netflix.\nThe plot is based on our desire to create a robot with a more human mind, with scientists going to ever greater lengths to balance human-like emotions with the cold hard logic expected of machines. One scientist takes it a step too far by creating the &quot;ultimate&quot; robot by simulating the lives of billions of humans in its brain. But there was one problem, the robot would not wake up. It was in an endless dream. Eventually the scientist found a way to wake up the robot by forcing an overwhelming emotion into its brain, rage.\n<br/>\n<br/>\n<!-- -->Oof, lets not do that.</p>",
            "url": "https://www.tomoliver.net/notes/2024-02-21-1344",
            "title": "I just happened to stumble across The Dandy Warhols' new son...",
            "summary": "I just happened to stumble across The Dandy Warhols' new song - “I’d Like To Help You With Your Problem (feat. Slash)” and its pretty good. \nThe music video is mostly AI generated, with all the weird/creepy artifacts and distortions you may...",
            "date_modified": "2024-02-21T14:29:10.000Z",
            "author": {
                "name": "Tom Oliver"
            }
        },
        {
            "id": "https://www.tomoliver.net/notes/2024-02-21-1243",
            "content_html": "<p><img src=\"/img/books/sekai-onchi.jpg\" alt=\"世界音痴 穂村弘\" normalWidth=\"346\" normalHeight=\"500\" blur=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAKCAIAAAD3rtNaAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA50lEQVR4nAHcACP/AMWnm72ObbmOgo5yYpt4YpJtWIJnVgDUxMvcytLl1umff36MeW+tpqOjkYMAyMDNzs3W6KK0vAA81E10r7LStLHMAL6Nm9O+r6WEk79iKe+0ANTNI8PFBgC4m5SsmYoxQG2DqgDu/x/m/x3R8gQAbWhvpZWVuYCfoZwA7/8f5v8c0u4AAFtfbvnS1sAARvnHp5OXWyouFXV+bQAgK0ODdXLjrZ/v0tLGrLJgXHZCaqgAChgwVE1N58vH/+nd2r54wq+G6t3iAAAAIiw4Tr+tsum/yKOLUubEOv/lof6YeTlcWQTMAAAAAElFTkSuQmCC\"/></p>\n<p><strong>世界音痴 穂村弘</strong></p>\n<p>明らかにペルソナじゃないけど頑張って読んでみた。\n短歌について何もわからないし、調べても読めるものは一つも見つからなかった。それでもこの本はすごく面白かった。短歌と難しい日本語は通じなかったけど昔から「世界音痴」を体験してる人だから、なんとなく作者の気分がわかる。\nある部分は僕とあんまりにも似すぎて、それなりの恐怖感を感じた。このままじゃ自分も３９歳になっても実家に住んでるだろうって。\n<br/>\n<br/>\n<!-- -->読んで共感したポイントが山ほどあったけれど、特に心に響いた文のみに絞る。\n<br/>\n<br/>\n<!-- -->(降順)</p>\n<ol>\n<li>金額に合わせて小銭を揃えるという、その時間に耐えられないのである。面倒なのではない。店員を待たせている時間そのものが熱湯のような痛みを伴って感じられるのだ。そしてお釣りを受け取ると、ばっとコートのポケットに投げ込んでしまう。今度は受け取ったお釣りを財布に収納する時間に耐えられないのである。別に私の背後に客が並んでいるわけではない。せめてレシートだけでもその場で捨てたいのだが、それができない。私のポケットには財布の外側に常に大量の小銭とレシートが溢れていて気持ちが悪い。</li>\n<li>表面が白っぽくなった大トロのパック（半額）を手にとって買おうか買うまいか、得か損か、まだまだうまいかもう腐りかけか、迷っているとき、不意に「ああっ」と叫びたくなる。「人生って、これで全部なのか」</li>\n<li>＜親密さ＞をそっくり残したままの、恋の終わりは苦しい。「たからもののシャツ、うちにあるよ」「うん」「送ろうか」「うん」「たからものなの？」。それは、いつもの二人の、変わりなく親密なやり取りでありながら、同時に恋の終わりの会話なのだ。</li>\n<li>「今日こそ蜂蜜を買うぞ」「おー」と勇んで蜂蜜屋に直行する。「いらっしゃいませ」と迎えてくれた店員は人間の女性だった。棚に並んだ何種類もの蜂蜜の色は微妙に違う。中の一つに私が手を伸ばすと、「それは小心者向きでございません」と店員さんの声。驚いて瓶から手を放す。</li>\n</ol>",
            "url": "https://www.tomoliver.net/notes/2024-02-21-1243",
            "title": "世界音痴 穂村弘\n世界音痴 穂村弘\n明らかにペルソナじゃないけど頑張って読んでみた。\n短歌について何もわからない...",
            "summary": "世界音痴 穂村弘\n世界音痴 穂村弘\n明らかにペルソナじゃないけど頑張って読んでみた。\n短歌について何もわからないし、調べても読めるものは一つも見つからなかった。それでもこの本はすごく面白かった。短歌と難しい日本語は通じなかったけど昔から「世界音痴」を体験してる人だから、なんとなく作者の気分がわかる。\nある部分は僕とあんまりにも似すぎて、それなりの恐怖感を感じた。このままじゃ自分も３９歳になっても実家に住んでるだろうって。\n読んで共感したポイントが山ほどあったけれど、特...",
            "date_modified": "2024-02-22T11:55:02.000Z",
            "author": {
                "name": "Tom Oliver"
            }
        },
        {
            "id": "https://www.tomoliver.net/notes/2024-01-27-1028",
            "content_html": "<p>So this year I thought I&#x27;d start recording the books I read.\nMainly so I don&#x27;t get to the end of the year and think &quot;What did I read?&quot;.</p>\n<p><br/>\n<!-- -->The first book that I have read this year is called:</p>\n<p><strong>陽気なギャングが地球を回す</strong>\n<br/>\n<br/>\n<!-- -->面白かった。伏線回収がすごい本だった。\n普通は強盗系の話とかはあんまり好きじゃないけどこの本は面白かった。\n信じ難い部分も多かったけどあらすじは複雑で予想できなかったから最後まで読んで楽しかった。\nいつかはまた読みたいと思った。</p>",
            "url": "https://www.tomoliver.net/notes/2024-01-27-1028",
            "title": "So this year I thought I'd start recording the books I read....",
            "summary": "So this year I thought I'd start recording the books I read.\nMainly so I don't get to the end of the year and think \"What did I read?\".\nThe first book that I have read this year is called:\n陽気なギャングが地球を回す\n面白かった。伏線回収がすごい本だった。\n普通は強盗系の話とかはあん...",
            "date_modified": "2024-01-27T10:49:20.000Z",
            "author": {
                "name": "Tom Oliver"
            }
        },
        {
            "id": "https://www.tomoliver.net/notes/2024-01-26-0938",
            "content_html": "<p><strong>First impressions of Remix vs. Nextjs (pages router)</strong></p>\n<ul>\n<li>Obviously Remix is the new<em>er</em> kid on the block, so expect library support etc. to be less comprehensive.</li>\n<li>It seems that Remix has changed its routing system recently. Unfortunately many of the tutorials out there use the old one (directory based), which is confusing.</li>\n<li>Remix is less of a black box than Next. You are allowed to configure the <code>entry.client.tsx</code> and <code>entry.server.tsx</code> in any way you want to. This lets you take control of exactly how you do SSR and hydration.</li>\n<li>At the time of writing, Remix heavily leans into using the latest React features like <code>renderToPipeableStream</code> which you will see in your <code>entry.server.tsx</code>. Unfortunately a lot of libraries are not up to date and still use <code>renderToString</code> in examples, like <a href=\"https://github.com/mui/material-ui/blob/master/examples/material-ui-remix-ts/app/entry.server.tsx\">mui</a>. So it can take a while to figure out how to integrate all of your libraries so that they are happy doing SSR.</li>\n<li>Remix is a framework who&#x27;s main abstraction is the data fetching on the server side. Nextjs (page router) has a similar concepts with <code>getServerSideProps</code>, <code>getInitialProps</code> etc, but it seems that Remix&#x27;s solution is more all encompassing and unifying.</li>\n<li>Nextjs is in weird limbo state at the moment where you have to choose between the <code>pages</code> router and the <code>app</code> router when you create your project. This is fine if you are sure exactly what feature you need, but in the case where you don&#x27;t really know, Remix might be a safer bet.</li>\n</ul>",
            "url": "https://www.tomoliver.net/notes/2024-01-26-0938",
            "title": "First impressions of Remix vs. Nextjs (pages router)\n\nO...",
            "summary": "First impressions of Remix vs. Nextjs (pages router)\n\nObviously Remix is the newer kid on the block, so expect library support etc. to be less comprehensive.\nIt seems that Remix has changed its routing system recently. Unfortunatel...",
            "date_modified": "2024-01-26T10:23:29.000Z",
            "author": {
                "name": "Tom Oliver"
            }
        },
        {
            "id": "https://www.tomoliver.net/notes/2024-01-16-0948",
            "content_html": "<p><strong>Nx hanging</strong></p>\n<p>Ok I&#x27;m using <a href=\"https://nx.dev/\">Nx</a> as a monorepo manager for a project and got into to some very strange behavior. There are several node apps in the repo and to run them, you use <code>npx nx serve &lt;my-app-name&gt;</code>. Sometimes tho, after updating an npm package I would get an error like:</p>\n<pre><code>LOCK-FILES-CHANGED\n\nplease restart nx daemon using `nx reset`\n</code></pre>\n<p>Unfortunately I couldn&#x27;t reproduce the error message exactly at the time of writing, so this is the best I could remember.<br/>\n<br/>\n<!-- -->Anyway, no matter how many times I run <code>nx reset</code>, my <code>npx nx serve</code> commands would just hang. Zero output at all. As I suspected the daemon, I tried to view its logs.\nTo find out where the log file was I did:</p>\n<pre><code>$ npx nx daemon\nNx Daemon is currently running:\n  - Logs: /home/tom/Documents/project/node_modules/.cache/nx/d/daemon.log\n  - Process ID: 33785\n</code></pre>\n<p>But when I tried to <code>cat</code> the log file it apparently did not exist!</p>\n<p>So presumably the daemon was in some kind of infinite death loop...\nI never got to the bottom of the cause, but did manage to find a solution.<br/>\n<br/>\n<!-- -->There is an environment variable that disables the daemon because its more of a performance optimisation than a critical feature.\nSo now I just <code>export NX_DAEMON=false</code> and everything seems to work ok.<br/>\n<br/>\n<!-- -->If you use a <code>nix</code> <code>devShell</code> like me you can just add it to the <code>shellHook</code> like so:</p>\n<pre lang=\"nix\"><code class=\"language-nix\">...\ndevShells.default = pkgs.mkShell {\n  shellHook = &#x27;&#x27;\n    export NX_DAEMON=false\n  &#x27;&#x27;;\n};\n...\n</code></pre>",
            "url": "https://www.tomoliver.net/notes/2024-01-16-0948",
            "title": "Nx hanging\nOk I'm using Nx as a monorepo manager for a p...",
            "summary": "Nx hanging\nOk I'm using Nx as a monorepo manager for a project and got into to some very strange behavior. There are several node apps in the repo and to run them, you use npx nx serve <my-app-name>. Sometimes tho, after updating an n...",
            "date_modified": "2024-01-16T10:49:13.000Z",
            "author": {
                "name": "Tom Oliver"
            }
        },
        {
            "id": "https://www.tomoliver.net/notes/2023-12-12-1510",
            "content_html": "<p>Have you heard of <em>semantic</em> Javascript ?</p>\n<p>You probably answered &quot;No&quot; because I just thought of it 😇</p>\n<p>Everyone knows they should be writing semantic HTML but why not apply the same standards to a &quot;real&quot; programming language.</p>\n<p>Semantic programming is all about using the constructs a language provides in such a way as to convey intent to the target audience, whether that be human or machine. In HTML we have the classic example of using the <code>&lt;footer&gt;</code> tag instead of just spamming <code>&lt;div&gt;</code> everywhere. Lets apply that logic to Javascript.</p>\n<p>Here&#x27;s some non-semantic JS.</p>\n<pre lang=\"js\" messages=\"[object Object],[object Object]\"><code class=\"language-js\">let arr = [1, 2, 3]\nfor (let i = 0; i &lt; arr.length; i++) {\n  arr[i] = arr[i] * 2\n}\n</code></pre>\n<p>now for something semantic</p>\n<pre lang=\"js\" style=\"--message-margin:0.2rem\" messages=\"[object Object]\"><code class=\"language-js\">// we are doing the exact same thing as before, just better.\nlet arr = [1, 2, 3]\narr = arr.map((x) =&gt; x * 2)\n</code></pre>\n<p>I think you get the idea...</p>\n<p>But just in case, here is another scenario...</p>\n<pre lang=\"js\" messages=\"[object Object]\"><code class=\"language-js\">while (i &lt; arr.length) {\n  ...\n  // do some operation\n  res = ...\n}\n</code></pre>\n<p>Compare the above to this:</p>\n<pre lang=\"js\" style=\"--message-margin:0.2rem\" messages=\"[object Object]\"><code class=\"language-js\">let res = arr.reduce((acc, cur) =&gt; {\n  ...\n  // do some operation\n},{})\n</code></pre>\n<p>So.. what do you think?</p>\n<p>Ok, maybe this is just an excuse to get you to do some functional programming.</p>\n<p>You got me! 😘</p>",
            "url": "https://www.tomoliver.net/notes/2023-12-12-1510",
            "title": "Have you heard of semantic Javascript ?\nYou probably answe...",
            "summary": "Have you heard of semantic Javascript ?\nYou probably answered \"No\" because I just thought of it 😇\nEveryone knows they should be writing semantic HTML but why not apply the same standards to a \"real\" programming language.\nSemantic program...",
            "date_modified": "2023-12-12T16:43:15.000Z",
            "author": {
                "name": "Tom Oliver"
            }
        },
        {
            "id": "https://www.tomoliver.net/notes/2023-11-25-2149",
            "content_html": "<p>Here&#x27;s how to burn audio to a CD from the command line.</p>\n<pre lang=\"shell\"><code class=\"language-shell\"># Remove spaces from filenames\nfor f in *; do mv &quot;$f&quot; `echo $f | tr &#x27; &#x27; &#x27;_&#x27;`; done\n# Convert all tracks to wav\nfor i in $( ls ); do ffmpeg -i $i $i.wav; done\n# Normalize the volume across all tracks\nnormalize -m *.wav\n# Burn to disk\nsudo wodim -v -dev=&#x27;/dev/cdrom&#x27; -audio -pad *.wav\n</code></pre>",
            "url": "https://www.tomoliver.net/notes/2023-11-25-2149",
            "title": "Here's how to burn audio to a CD from the command line.\n```s...",
            "summary": "Here's how to burn audio to a CD from the command line.\n\n# Remove spaces from filenames\nfor f in *; do mv \"$f\" `echo $f | tr ' ' '_'`; done\n# Convert all tracks to wav\nfor i in $( ls ); do ffmpeg -i $i $i.wav; done\n# No...",
            "date_modified": "2023-11-25T22:03:08.000Z",
            "author": {
                "name": "Tom Oliver"
            }
        },
        {
            "id": "https://www.tomoliver.net/notes/2023-11-25-1626",
            "content_html": "<p>So this is one of the first times I have actually come across a hurdle when it comes to developing software on old computers.\nA couple days ago I started experimenting with <a href=\"https://github.com/oven-sh/bun\">bun</a>, which is amazing by the way. One of the big selling points is that it is <em>really</em> fast, but this speed seems to come at a cost...</p>\n<p>As I use NixOS, I installed it the usual way by adding it to my <code>configuration.nix</code>. But alas, life isn&#x27;t always simple.\nIt seems to install ok, but when I tried to run <code>bun</code> I got an error immediately:</p>\n<pre lang=\"sh\"><code class=\"language-sh\">illegal hardware instruction (core dumped)\n</code></pre>\n<p>Wow an actually hardware error! I haven&#x27;t seen one of those since I was trying some overclocking! So the problem comes down to the fact that <code>bun</code> uses some cutting edge CPU instructions that weren&#x27;t around in 2012. Now, on other Linux distributions you can simply use a bash script to install bun à la:</p>\n<pre lang=\"sh\"><code class=\"language-sh\">curl -fsSL https://bun.sh/install | bash\n</code></pre>\n<p>Apparently it checks your CPU and in the event it finds something of a certain vintage it installs a <code>baseline</code> version of <code>bun</code> which I guess doesn&#x27;t use any of the funky CPU instructions it would usually. Unfortunately the nix package does not at the time of writing do this. <a href=\"https://github.com/NixOS/nixpkgs/pull/203379\">There is actually a PR open to fix this</a> but it has not been merged yet. So for the time being you can basically just take the code from the PR, save it to a file locally and build the <code>baseline</code> version yourself.</p>\n<ol>\n<li><a href=\"https://raw.githubusercontent.com/NixOS/nixpkgs/3975fb8a5d80e486aad7f030b9937eb56531a698/pkgs/development/web/bun-baseline/default.nix\">Download and save this file.</a></li>\n<li>Now to build is, run:</li>\n</ol>\n<pre lang=\"sh\"><code class=\"language-sh\">nix-build -E &#x27;with import &lt;nixpkgs&gt; {}; callPackage ./default.nix {}&#x27;\n</code></pre>\n<ol start=\"3\">\n<li>You should now be able to run <code>bun</code> by doing:</li>\n</ol>\n<pre lang=\"sh\"><code class=\"language-sh\">./result/bin/bun\n</code></pre>",
            "url": "https://www.tomoliver.net/notes/2023-11-25-1626",
            "title": "So this is one of the first times I have actually come acros...",
            "summary": "So this is one of the first times I have actually come across a hurdle when it comes to developing software on old computers. \nA couple days ago I started experimenting with bun, which is amazing by the way. One of the big selling points is...",
            "date_modified": "2023-11-25T23:13:13.000Z",
            "author": {
                "name": "Tom Oliver"
            }
        },
        {
            "id": "https://www.tomoliver.net/notes/2023-11-22-2203",
            "content_html": "<p>I witnessed this absolute corker of a bug in the office today.</p>\n<p>After a force reboot (its a long story), we noticed that the cursor was flickering on my colleague&#x27;s Ubuntu laptop. After some googling, we realised that this flickering only happens at 200% fractional scaling. Setting to any other value like 175%, 150% etc. works perfectly fine.</p>\n<p><a href=\"https://askubuntu.com/questions/1234189/cursor-flickers-on-primary-display-when-fractional-scaling-is-enable-for-dual-mo\">https://askubuntu.com/questions/1234189/cursor-flickers-on-primary-display-when-fractional-scaling-is-enable-for-dual-mo</a></p>\n<p>Despite the link above being more than <strong>three and a half years old,</strong> it appears that <em>even today</em>, this bug can still be observed in the wild, in its natural habitat, on Ubuntu.</p>",
            "url": "https://www.tomoliver.net/notes/2023-11-22-2203",
            "title": "I witnessed this absolute corker of a bug in the office toda...",
            "summary": "I witnessed this absolute corker of a bug in the office today.\nAfter a force reboot (its a long story), we noticed that the cursor was flickering on my colleague's Ubuntu laptop. After some googling, we realised that this flickering only ha...",
            "date_modified": "2023-11-22T22:23:52.000Z",
            "author": {
                "name": "Tom Oliver"
            }
        },
        {
            "id": "https://www.tomoliver.net/notes/2023-11-21-1657",
            "content_html": "<p>It&#x27;s taken me far too long to discover this foot-gun in express.</p>\n<p>I started a new express project the other day and realised that my request bodies were all empty! Spent a good hour thinking  it was a problem in the client or the proxy etc... but was actually just because I forgot to apply these two middlewares.</p>\n<p>So the question is, why are these middlewares not enabled by default????</p>\n<pre lang=\"js\"><code class=\"language-js\">  const app = express()\n  // this populates req.body when the payload is json\n  app.use(express.json({ type: &quot;application/json&quot; }))\n  // this populates req.body when the payload is urlencoded \n  // (e.g when a form gets submitted)\n  app.use(express.urlencoded({ extended: true }))\n  ...\n\n</code></pre>\n<p>Sensible defaults are just something we don&#x27;t deserve I guess...</p>",
            "url": "https://www.tomoliver.net/notes/2023-11-21-1657",
            "title": "It's taken me far too long to discover this foot-gun in expr...",
            "summary": "It's taken me far too long to discover this foot-gun in express. \nI started a new express project the other day and realised that my request bodies were all empty! Spent a good hour thinking  it was a problem in the client or the proxy etc....",
            "date_modified": "2023-11-21T17:12:41.000Z",
            "author": {
                "name": "Tom Oliver"
            }
        },
        {
            "id": "https://www.tomoliver.net/notes/2023-11-17-1753",
            "content_html": "<p><strong>Optimistic VS Pessimistic Locking</strong></p>\n<p>Imagine you are on a plane and you need to pee.\nYou&#x27;re a stubborn guy. When you leave your seat, you are determined to pee one way or another.\nYou must assume your fellow passengers are as least as stubborn.</p>\n<p><strong>Optimistic Locking</strong></p>\n<p>There is a single toilet located in the middle of the plane that can be accessed from multiple directions.\nYou are sitting at the back and can only see the entrance to the toilet that is in your direct line of sight.\nYou want to know if its ok to go to the toilet so you check the overhead light which says &quot;vacant&quot;.\nAssuming that it will remain vacant for the entirety of the time it will take you to reach your destination, you get out of your seat and commit to peeing.\nNow one of two things are going to happen:</p>\n<ol>\n<li>The toilet is vacant by the time you get to it - Success</li>\n<li>Someone else has slipped into the toilet via an entrance you couldn&#x27;t see during the time it took you to walk there. Since you have committed to peeing, you have no choice but to do so in a cup - Failure.</li>\n</ol>\n<p><strong>Pessimistic Locking</strong></p>\n<p>Due to your toilet paranoia you reserve a seat on a specially designed plane. It is designed such that each seat is directly adjacent to a toilet and has excellent visibility of all its entrances. Because of this, you are able to in a single instant, both check that a toilet is free <em>and</em> enter it. It is therefore guaranteed that you nor any other passenger will be forced to pee in a cup.</p>\n<p>So obviously there is a dilemma here.</p>\n<p>The specially designed plane will carry less passengers due to its emphasis on providing the stubborn peeing passenger peace of mind.\nThe normal plane will be more efficient but has to account for the occasional cup of pee getting knocked over.</p>\n<p><strong>What have we learned?</strong></p>\n<p>There is no &quot;correct&quot; way to design a plane, only trade-offs.</p>",
            "url": "https://www.tomoliver.net/notes/2023-11-17-1753",
            "title": "Optimistic VS Pessimistic Locking\nImagine you are on a p...",
            "summary": "Optimistic VS Pessimistic Locking\nImagine you are on a plane and you need to pee.\nYou're a stubborn guy. When you leave your seat, you are determined to pee one way or another.\nYou must assume your fellow passengers are as least as stub...",
            "date_modified": "2023-11-18T14:37:46.000Z",
            "author": {
                "name": "Tom Oliver"
            }
        },
        {
            "id": "https://www.tomoliver.net/notes/2023-08-11-0447",
            "content_html": "<p>Some lesser known nice things about Japan 🗾</p>\n<ul>\n<li>Ambulances are loud, but not <em>too</em> loud.</li>\n<li>When Police cars do unexpected things like making a U-turn suddenly, they politely inform everyone nearby with a megaphone.</li>\n<li>When large vehicles make a turn near a pedestrian they play a vocal warning &quot;Watch out! I&#x27;m about to turn left!&quot;</li>\n<li>Dog owners carry a bottle of water to wash away any pee the dog might do on a walk.</li>\n<li>There are lots of outside gyms.</li>\n<li>There are lots of summer festivals which aren&#x27;t exclusively an excuse to get drunk.</li>\n<li>Its not okay to be ugly.<!-- -->\n<ul>\n<li>You better look your best if you&#x27;re thinking about leaving your home.</li>\n<li>Foreigners usually get the benefit of the doubt.</li>\n</ul>\n</li>\n<li>Lots of stuff made in Japan for Japanese people only. (Films, cars, appliances...)</li>\n<li>There is one and only one right way to do everything.<!-- -->\n<ul>\n<li>If you order something in a cafe or a restaurant, chances are they&#x27;ll tell you the right way to consume it.</li>\n<li>e.g. You order an iced coffee creamy thing from a local cafe.<!-- -->\n<ol>\n<li>First taste the top and bottom layers independently before mixing them both together with the straw...</li>\n</ol>\n</li>\n</ul>\n</li>\n<li>There is a lot of wildlife everywhere.<!-- -->\n<ul>\n<li>Probably more wildlife in Tokyo than in any National park in the UK.</li>\n</ul>\n</li>\n<li>There are dry ice machines in some supermarkets.</li>\n<li>Some cars have a horn? that says in a polite voice &quot;Please watch out, a car is passing by!&quot; to unsuspecting pedestrians that haven&#x27;t noticed.</li>\n<li>Relaxing background music automatically starts playing the instant your skin comes into contact with the toilet seat.</li>\n<li>Safety first<!-- -->\n<ul>\n<li>At petrol stations there is an &quot;anti static electricity pad&quot; for you to touch before filling up your car.</li>\n</ul>\n</li>\n<li>The sky is big.\n<img src=\"/img/japan-cables-sky.png\" alt=\"Power cables on a hot sunny day\" normalWidth=\"209\" normalHeight=\"281\" blur=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAKCAYAAAB4zEQNAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA+ElEQVR4nCXHTSsDAACA4ffg5ODCQSsctnxmSmKrxYFok+akcBlJJszdWikXu0gttSyJw0pLK7WUWjmstOLihHLwMxy8isNzeCCQk9Cp9BelZU66kxLKSE9WCBaktyiD59KZkfC+xA7/T/BM+i5ksCTDlxI+sjWyJuGy0HslA2XpKkj3qXRs2j62LJFbYehGQteSrjuRe5bAjpHEuizVhdGajFTNV778/lHGC7ZNpSVVFWJPEm3I9L0s3knwRGJZF/ZKQvxV5l9lpinRmkw+yFTJvYNjYfXdP6kPSdZl5U3iDZdS20L6U/a/ZPdFtpqy8ehOvmI8Mesv1pWH5NW7RpsAAAAASUVORK5CYII=\"/></li>\n</ul>",
            "url": "https://www.tomoliver.net/notes/2023-08-11-0447",
            "title": "Some lesser known nice things about Japan 🗾\n\nAmbulances ar...",
            "summary": "Some lesser known nice things about Japan 🗾\n\nAmbulances are loud, but not too loud.\nWhen Police cars do unexpected things like making a U-turn suddenly, they politely inform everyone nearby with a megaphone.\nWhen large vehicles make...",
            "date_modified": "2023-08-11T04:47:19.000Z",
            "author": {
                "name": "Tom Oliver"
            }
        },
        {
            "id": "https://www.tomoliver.net/notes/2023-03-06-1718",
            "content_html": "<a class=\"u-in-reply-to\" href=https://www.tomoliver.net/notes/2023-03-03-2144>\n      In reply to: https://www.tomoliver.net/notes/2023-03-03-2144\n      </a><p>Its been a while since I did any data modelling in typescript.</p>\n<pre lang=\"ts\"><code class=\"language-ts\">// An example of a user management system\n// Define user status type, just an enum\ntype UserAccountStatus = &quot;ACTIVE&quot; | &quot;DORMANT&quot; | &quot;DELETED&quot;\n// Define a base type\ntype BaseUser = { name: string; status: UserAccountStatus }\n// Create concrete types using the base type\ntype ActiveUser = BaseUser &amp; { status: &quot;ACTIVE&quot; }\ntype DormantUser = BaseUser &amp; { status: &quot;DORMANT&quot; }\ntype DeletedUser = BaseUser &amp; { status: &quot;DELETED&quot; }\ntype User = ActiveUser | DormantUser | DeletedUser\n// Create the type of function we want to implement\n// Make return type a promise because we talk to the DB\ntype DeleteUser = (user: ActiveUser | DormantUser) =&gt; Promise&lt;DeletedUser&gt;\n// do a temporary implementation of the function\nconst deleteUser: DeleteUser = (user) =&gt; {\n  const deletedUser: DeletedUser = { ...user, status: &quot;DELETED&quot; }\n  // define a helper that we haven&#x27;t got yet\n  return writeUserToDB(deletedUser)\n}\n// declare the type of the helper like so:\ndeclare function writeUserToDB&lt;A extends User&gt;(user: A): Promise&lt;A&gt;\n\n</code></pre>",
            "url": "https://www.tomoliver.net/notes/2023-03-06-1718",
            "title": "Its been a while since I did any data modelling in typescrip...",
            "summary": "Its been a while since I did any data modelling in typescript.\n\n// An example of a user management system\n// Define user status type, just an enum\ntype UserAccountStatus = \"ACTIVE\" | \"DORMANT\" | \"DELETED\"\n// Define a base typ...",
            "date_modified": "2023-03-06T19:18:19.000Z",
            "author": {
                "name": "Tom Oliver"
            }
        },
        {
            "id": "https://www.tomoliver.net/notes/2023-03-05-2234",
            "content_html": "<p>Bought some books with the intention of learning Chinese but yeah its pretty hard.<br/>\n<!-- -->As long as I don&#x27;t give up completely I might be ok at it in the region of say... a decade?<br/>\n<!-- -->Which is really not too long when you think about it.<br/>\n<!-- -->So I guess nothing to complain.</p>",
            "url": "https://www.tomoliver.net/notes/2023-03-05-2234",
            "title": "Bought some books with the intention of learning Chinese but...",
            "summary": "Bought some books with the intention of learning Chinese but yeah its pretty hard.\nAs long as I don't give up completely I might be ok at it in the region of say... a decade?\nWhich is really not too long when you think about it.\nSo I ...",
            "date_modified": "2023-03-05T22:39:43.000Z",
            "author": {
                "name": "Tom Oliver"
            }
        },
        {
            "id": "https://www.tomoliver.net/notes/2023-03-03-2144",
            "content_html": "<a class=\"u-in-reply-to\" href=https://www.tomoliver.net/notes/2023-02-12-1940>\n      In reply to: https://www.tomoliver.net/notes/2023-02-12-1940\n      </a><p><a href=\"https://www.youtube.com/watch?v=I9gLrRwLFCs\">https://www.youtube.com/watch?v=I9gLrRwLFCs</a></p>\n<p>Tonight is city pop vibes 🗾</p>",
            "url": "https://www.tomoliver.net/notes/2023-03-03-2144",
            "title": "https://www.youtube.com/watch?v=I9gLrRwLFCs\nTonight is city ...",
            "summary": "https://www.youtube.com/watch?v=I9gLrRwLFCs\nTonight is city pop vibes 🗾",
            "date_modified": "2023-03-05T19:14:26.000Z",
            "author": {
                "name": "Tom Oliver"
            }
        },
        {
            "id": "https://www.tomoliver.net/notes/2023-03-03-2042",
            "content_html": "<a class=\"u-in-reply-to\" href=https://blog.rubenwardy.com/2022/11/16/thinkpad-x1-fingerprint-auth/>\n      In reply to: https://blog.rubenwardy.com/2022/11/16/thinkpad-x1-fingerprint-auth/\n      </a><p>nice</p>",
            "url": "https://www.tomoliver.net/notes/2023-03-03-2042",
            "title": "nice",
            "summary": "nice",
            "date_modified": "2023-03-03T20:43:33.000Z",
            "author": {
                "name": "Tom Oliver"
            }
        },
        {
            "id": "https://www.tomoliver.net/notes/2023-03-03-2023",
            "content_html": "<a class=\"u-in-reply-to\" href=https://blog.rubenwardy.com/2023/02/17/interesting-reads/>\n      In reply to: https://blog.rubenwardy.com/2023/02/17/interesting-reads/\n      </a><p>Who would have thought YAML was so bad</p>",
            "url": "https://www.tomoliver.net/notes/2023-03-03-2023",
            "title": "Who would have thought YAML was so bad",
            "summary": "Who would have thought YAML was so bad",
            "date_modified": "2023-03-03T20:24:46.000Z",
            "author": {
                "name": "Tom Oliver"
            }
        },
        {
            "id": "https://www.tomoliver.net/notes/2023-03-03-1547",
            "content_html": "<a class=\"u-in-reply-to\" href=https://bionicjulia.com/blog/integrating-webmentions-nextjs-blog>\n      In reply to: https://bionicjulia.com/blog/integrating-webmentions-nextjs-blog\n      </a><p>This was super helpful for implementing webmentions on my site! Thanks!</p>",
            "url": "https://www.tomoliver.net/notes/2023-03-03-1547",
            "title": "This was super helpful for implementing webmentions on my si...",
            "summary": "This was super helpful for implementing webmentions on my site! Thanks!",
            "date_modified": "2023-03-03T17:54:48.000Z",
            "author": {
                "name": "Tom Oliver"
            }
        },
        {
            "id": "https://www.tomoliver.net/notes/2023-03-03-1443",
            "content_html": "<a class=\"u-in-reply-to\" href=https://bionicjulia.com/blog/upgrading-from-nextjs-v12-to-v13>\n      In reply to: https://bionicjulia.com/blog/upgrading-from-nextjs-v12-to-v13\n      </a><p>Am also thinking about upgrading...</p>",
            "url": "https://www.tomoliver.net/notes/2023-03-03-1443",
            "title": "Am also thinking about upgrading...",
            "summary": "Am also thinking about upgrading...",
            "date_modified": "2023-03-03T18:11:34.000Z",
            "author": {
                "name": "Tom Oliver"
            }
        },
        {
            "id": "https://www.tomoliver.net/notes/2023-02-12-2052",
            "content_html": "<a class=\"u-in-reply-to\" href=https://blog.rubenwardy.com/webmention_test/>\n      In reply to: https://blog.rubenwardy.com/webmention_test/\n      </a><p>Oh, looks like I have to paste the link explicitly for it to work.</p>\n<p>Anyways, here it is:</p>\n<p><a href=\"https://blog.rubenwardy.com/2022/03/17/plant-monitor/\">https://blog.rubenwardy.com/2022/03/17/plant-monitor/</a></p>",
            "url": "https://www.tomoliver.net/notes/2023-02-12-2052",
            "title": "Oh, looks like I have to paste the link explicitly for it to...",
            "summary": "Oh, looks like I have to paste the link explicitly for it to work.\nAnyways, here it is:\nhttps://blog.rubenwardy.com/2022/03/17/plant-monitor/",
            "date_modified": "2023-03-03T15:07:54.000Z",
            "author": {
                "name": "Tom Oliver"
            }
        },
        {
            "id": "https://www.tomoliver.net/notes/2023-02-12-2038",
            "content_html": "<a class=\"u-in-reply-to\" href=https://blog.rubenwardy.com/webmention_test/>\n      In reply to: https://blog.rubenwardy.com/webmention_test/\n      </a><p>Not as cool as <a href=\"https://blog.rubenwardy.com/2022/03/17/plant-monitor/\">this post</a> right here am I rite m8s??? 🌳💻🎉</p>",
            "url": "https://www.tomoliver.net/notes/2023-02-12-2038",
            "title": "Not as cool as this post right here am I rite m8s??? 🌳💻🎉",
            "summary": "Not as cool as this post right here am I rite m8s??? 🌳💻🎉",
            "date_modified": "2023-03-03T15:07:54.000Z",
            "author": {
                "name": "Tom Oliver"
            }
        },
        {
            "id": "https://www.tomoliver.net/notes/2023-02-12-1940",
            "content_html": "<a class=\"u-in-reply-to\" href=https://www.tomoliver.net/notes/2023-02-10-1740>\n      In reply to: https://www.tomoliver.net/notes/2023-02-10-1740\n      </a><p>Nested reply perhaps?</p>",
            "url": "https://www.tomoliver.net/notes/2023-02-12-1940",
            "title": "Nested reply perhaps?",
            "summary": "Nested reply perhaps?",
            "date_modified": "2023-03-03T15:07:54.000Z",
            "author": {
                "name": "Tom Oliver"
            }
        },
        {
            "id": "https://www.tomoliver.net/notes/2023-02-10-1740",
            "content_html": "<a class=\"u-in-reply-to\" href=https://www.tomoliver.net/notes/2023-02-06-1951>\n      In reply to: https://www.tomoliver.net/notes/2023-02-06-1951\n      </a><p>This should be a reply???</p>",
            "url": "https://www.tomoliver.net/notes/2023-02-10-1740",
            "title": "This should be a reply???",
            "summary": "This should be a reply???",
            "date_modified": "2023-03-03T15:07:54.000Z",
            "author": {
                "name": "Tom Oliver"
            }
        },
        {
            "id": "https://www.tomoliver.net/notes/2023-02-06-1951",
            "content_html": "<p>So this is what shouting into the void feels like...</p>\n<p>Hello, this is my first &quot;note&quot;.</p>\n<p>Probably not going to write too many until I&#x27;m sure I have web mentions all working.</p>",
            "url": "https://www.tomoliver.net/notes/2023-02-06-1951",
            "title": "So this is what shouting into the void feels like...\nHello, ...",
            "summary": "So this is what shouting into the void feels like...\nHello, this is my first \"note\".\nProbably not going to write too many until I'm sure I have web mentions all working.",
            "date_modified": "2023-11-20T15:40:50.000Z",
            "author": {
                "name": "Tom Oliver"
            }
        }
    ]
}