<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Intro on Pradeep Roark</title>
    <link>https://pradeeproark.com/</link>
    <description>Recent content in Intro on Pradeep Roark</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-GB</language>
    <lastBuildDate>Wed, 20 Jan 2021 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://pradeeproark.com/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>LLM&#39;s overuse of certain words</title>
      <link>https://pradeeproark.com/posts/llms-overuse-of-certain-words/</link>
      <pubDate>Sat, 15 Aug 2026 19:53:31 +0000</pubDate>
      <guid>https://pradeeproark.com/posts/llms-overuse-of-certain-words/</guid>
      <description>&lt;p&gt;LLM&amp;rsquo;s overuse certain words in their conversations, each model has its favourite, but  claude&amp;rsquo;s favourite one is &amp;ldquo;load-bearing&amp;rdquo;. It is as if it wants to be taken seriously or has &amp;ldquo;pondered&amp;rdquo; the problem deeply (it may or may not have) but wants to sound useful. It constantly prefixes &amp;ldquo;load-bearing&amp;rdquo; when you reframe a conversation or when presenting a conclusion. One wonders from where it got that. Did someone make it say that. possible but less plausible. LLMs are instructed to think before answering and various other micro-instructions to double check its reasoning. All this does it does a token emission phase where it generates tokens relevant to the conversation at hand &amp;ldquo;without&amp;rdquo; presenting it to the user. this mere act of recollecting all relevant words relevant to context framed under &amp;ldquo;think deeply&amp;rdquo;, &amp;ldquo;critically analyse&amp;rdquo; etc.seem to be linked 🔗 closely in layers to words like &amp;ldquo;load-bearing&amp;rdquo; making it repeat it.&lt;/p&gt;
&lt;p&gt;There is still a small chance that someone instructed it to use the prefix &amp;ldquo;load-bearing&amp;rdquo; when presenting conclusions. Either way very annoying.&lt;/p&gt;
</description>
    </item>
    <item>
      <title>Code as an &#34;artifact&#34;. Means to an end?</title>
      <link>https://pradeeproark.com/posts/code-as-an-artifact-means-to-an-end/</link>
      <pubDate>Sat, 15 Aug 2026 19:30:46 +0000</pubDate>
      <guid>https://pradeeproark.com/posts/code-as-an-artifact-means-to-an-end/</guid>
      <description>&lt;p&gt;Agentic LLM&#39;s have changed what &#34;code&#34; means. It used be the end product of the software engineering lifecycle is &#34;code&#34; 📜 and there are purported arguments claiming that it is no more as LLM&#39;s themselves write &#34;code&#34;. What remains is the spec as the &#34;code&#34; can be regenerated in N number of ways on demand.  🔨&lt;/p&gt;&lt;p&gt;Does that mean &#34;code&#34; is irrelevant and as long as you have a golden spec to derive &#34;machine instructions&#34;? As mused over by Elon Musk&lt;/p&gt;
&lt;!--kg-card-begin: html--&gt;
&lt;blockquote class=&#34;twitter-tweet&#34;&gt;&lt;p lang=&#34;en&#34; dir=&#34;ltr&#34;&gt;This is exactly right. Source code is on the verge of becoming like assembly. &lt;br&gt;&lt;br&gt;The next step is getting rid of “source code” entirely and just making an efficient binary directly with AI. &lt;a href=&#34;https://t.co/g004yjMF95&#34;&gt;https://t.co/g004yjMF95&lt;/a&gt;&lt;/p&gt;&amp;mdash; Elon Musk (@elonmusk) &lt;a href=&#34;https://x.com/elonmusk/status/2084304083851034949?ref_src=twsrc%5Etfw&#34;&gt;August 3, 2026&lt;/a&gt;&lt;/blockquote&gt; &lt;script async src=&#34;https://platform.x.com/widgets.js&#34; charset=&#34;utf-8&#34;&gt;&lt;/script&gt;
&lt;!--kg-card-end: html--&gt;
&lt;p&gt;But this is semantics, if you move programming into LLMS, then your instructions/prompt and context become the &#34;code&#34;. Yes, one higher level of abstraction but still &#34;code&#34;. Traditional programming languages MIGHT need to change to accept this new paradigm properly though but I don&#39;t think they are going away. Programming languages exist for a different purpose, to reduce ambiguity in &#34;specification&#34; in natural language. &#34;English&#34; is a notoriously ambiguous language and you need vast amount of context to interpret what is said. Programming languages have been trying to bridge this by reducing the language surface to smaller more semantically well understood bits so there is no ambiguity when it comes to execution of the code. &lt;/p&gt;&lt;p&gt;So in short programming languages are not going away, unless you are willing to &#34;interpretation&#34; of specs &#34;over time&#34; as acceptable.&lt;br&gt;&lt;br&gt;P.S I do think LLMs can be trivially made to generate binaries, but what you &#34;assert&#34; that the &#34;binary&#34; will do depends still on &#34;code&#34; albeit at a higher level 👼&lt;/p&gt;
</description>
    </item>
    <item>
      <title>LLMs - The confident bullshitter</title>
      <link>https://pradeeproark.com/posts/llms-the-confident-bullshitter/</link>
      <pubDate>Sat, 15 Aug 2026 18:46:38 +0000</pubDate>
      <guid>https://pradeeproark.com/posts/llms-the-confident-bullshitter/</guid>
      <description>&lt;p&gt;LLMs are confident bullshitters. They speak &amp;ldquo;things&amp;rdquo; with a quite confident voice. But &amp;ldquo;things&amp;rdquo; are mostly word salad with looks quite like the answer but not entirely. In order to coax them to be useful you need to constantly refine their context i.e what they have seen recently to pull something more meaningful.&lt;/p&gt;
</description>
    </item>
    <item>
      <title>Memory and Intelligence in LLM</title>
      <link>https://pradeeproark.com/posts/memory-and-intelligence-in-llm/</link>
      <pubDate>Wed, 13 May 2026 09:30:52 +0000</pubDate>
      <guid>https://pradeeproark.com/posts/memory-and-intelligence-in-llm/</guid>
      <description>&lt;p&gt;Intelligence as shown by LLMs is interesting.&lt;/p&gt;
&lt;p&gt;Here by memory I mean “context window size” though they are not equivalent.&lt;/p&gt;
&lt;p&gt;And by “Intelligence” I don’t mean human intelligence which jumps into metaphysical debates. Perhaps “cognitive ability” to solve a task at hand is reasonable narrow definition.&lt;/p&gt;
&lt;p&gt;At the advent of LLMs the available “context window”for an LLM was limited and took the longest to scale. This led to real funny problems when LLMs were tasked with long running conversations or fed documents that ate up their context window. Half way through implementation they forgot key details discussed earlier or declared partially complete tasks as 💯 done.&lt;/p&gt;
&lt;p&gt;Gemini which was the first to introduce longer contexts actually fared poorly . The longer context simply led to “dilution” of attention to key details. And meandering.&lt;/p&gt;
&lt;p&gt;Claude Opus though appears to have nailed it . The longer context helps it keep long running sessions on track with all the important learnings in “focus”. I suspect this is due to the nifty feature where it constantly does mini summaries called “Insights” and recaps within a session.&lt;/p&gt;
&lt;p&gt;This feature pares beautifully with my &lt;a href=&#34;https://pradeeproark.com/posts/agentic-scratch-memory-using-pensieve/&#34;&gt;pensieve&lt;/a&gt; Claude plugin for even longer running projects.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Agentic Scratch Memory using Pensieve</title>
      <link>https://pradeeproark.com/posts/agentic-scratch-memory-using-pensieve/</link>
      <pubDate>Sat, 22 Nov 2025 17:00:00 +0000</pubDate>
      <guid>https://pradeeproark.com/posts/agentic-scratch-memory-using-pensieve/</guid>
      <description>&lt;p&gt;Agentic coding is a phenomenal experience. I&amp;rsquo;ve been working with AI coding agents for a year now, primarily using Claude Code after trying a variety of models. But there&amp;rsquo;s one well-known problem — they have a &amp;lsquo;context window&amp;rsquo; - a limited memory area for what they&amp;rsquo;re holding in their &amp;lsquo;agentic minds&amp;rsquo;. Context is nearly &lt;em&gt;everything&lt;/em&gt; because it guides them to approach the task from the proper perspective and captures the small details that wire projects together, keeping the process focused and relevant.&lt;/p&gt;
&lt;p&gt;What constitutes context? It could be the code already written, high-level architectural ideas, pitfalls to avoid, or observations about the domain the problem is trying to solve. &amp;ldquo;Code&amp;rdquo; alone does not capture everything. My earlier approach was to write extensive specs and capture them as docs, which I had to constantly reference when working on a task. It wasn&amp;rsquo;t scaling, and it &lt;em&gt;wasn&amp;rsquo;t enough&lt;/em&gt;. The agents frequently forgot key details I had decided were essential and wrote docs on, but they weren&amp;rsquo;t always bringing that knowledge to bear&amp;hellip; creating weird spaghetti. Spaghetti that solved the problem at hand but was inconsistent with earlier pieces. I solved most of this by following rigid structures (like templates) for different parts of the codebase, which nearly solved the inconsistency issue, but not entirely.&lt;/p&gt;
&lt;p&gt;Depending on the programming stack you use, there&amp;rsquo;s still information loss about the domain under consideration unless you meticulously document it in the project. The agent wasn&amp;rsquo;t &lt;em&gt;really&lt;/em&gt; &amp;ldquo;learning&amp;rdquo;. This is not a meta discussion about what &amp;ldquo;learning&amp;rdquo; is and whether they really do. My insight was that they lack &amp;ldquo;knowledge&amp;rdquo; - the kind we bring to bear when we learn a codebase and the domain it&amp;rsquo;s operating in — the little trickles of insights gained that turn into a knowledge repository. What they needed was a way to build this &amp;ldquo;knowledge&amp;rdquo; themselves, through working on a project, and to bring it to bear on the problem at hand.&lt;/p&gt;
&lt;p&gt;How did I solve this without agents before? The answer was actually so simple. I used structured notes - a scratchpad filled with entries about different aspects of the codebase or domain. For example, I documented data flow, persistence methods, and design choices-things that happen all the time in &lt;span class=&#34;teaser&#34; title=&#34;coding as it was before AI agents&#34;&gt;artisan coding&lt;/span&gt;
. These notes acted as a personal memory aid, helping me recall critical details quickly and consistently during development.&lt;/p&gt;
&lt;p&gt;But what do I mean by structured notes? You need to distinguish between free-form writing and structured writing. Free-form writing about a problem solved in a project would be like a couple of paragraphs explaining what was solved. But depending upon how good you are at keeping all relevant details, the free-form approach becomes lossy and inconsistent. So I follow a system where I design a template for each type of learning that I have. For instance, a &amp;ldquo;problem solved&amp;rdquo; template might capture the problem, the root cause, and what was learned. Or a &amp;ldquo;design principles&amp;rdquo; template might have fields for the principle itself (limited to 150 characters), the rationale behind it, and what anti-pattern it prevents. The template forces me to list the relevant details. And I design little templates to use for other things, like &amp;ldquo;patterns discovered&amp;rdquo; or &amp;ldquo;workarounds learned&amp;rdquo;. These are, by necessity, brief and distinct from project-level documentation. Having a structure enhances consistency and makes the gathered knowledge really valuable.&lt;/p&gt;
&lt;p&gt;Now, how do I make the agents follow such a system? Define templates, and use them whenever the context dictates, preferably in a seamless way&amp;hellip; like when I think and jot them down.&lt;/p&gt;
&lt;img src=&#34;pensieve-1.png&#34; alt=&#34;Pensieve logo&#34; style=&#34;float: right; max-width: 200px; width: 100%; height: auto; shape-outside: url(pensieve.png); shape-margin: 5px; margin-left: 10px;&#34;&gt;
&lt;p&gt;Enter Pensieve, a scratchpad for AI agents to use - a command-line interface (CLI) tool that agents can use to define templates and record notes in them and recall them as needed. Agents are very good at using CLI-based tools, and they automatically discovered how to use them with a little prompting. The agents designed templates in collaboration with me for each project I was working on and started filling them in as we tackled tasks together. And slowly, as we started new sessions, the agent started recollecting past learnings, informing the task at hand and making it more guided and precise than before. You no longer needed to &lt;em&gt;yell&lt;/em&gt; the same information over and over.&lt;/p&gt;
&lt;p&gt;But why exactly is this better than using CLAUDE.md or docs in the repo? It is because they are unstructured and the agents follow those instructions in an inconsistent manner. The more you have in this memory, the less likely the agent is going to find it and use it. Also, without specifying limits the agents generated verbose pointless documentation which they &lt;em&gt;themselves&lt;/em&gt; did not follow. By forcing the agents to create structured notes with well-defined fields and LIMITING the length of them as needed, more disciplined knowledge capture happened.&lt;/p&gt;
&lt;p&gt;Besides templates, Pensieve also encourages agents to link entries with each other. Nothing is lost forever — a note can be &amp;ldquo;augmented,&amp;rdquo; &amp;ldquo;superseded,&amp;rdquo; or &amp;ldquo;deprecated&amp;rdquo; by another note. In most cases this is sufficient, and the agent is encouraged to follow these links when inspecting a note. This allows the agent to crawl through memory AS NEEDED for the task at hand, digging deeper and deeper into memory, building a &amp;ldquo;graph of sorts&amp;rdquo; in its agentic mind.&lt;/p&gt;
&lt;p&gt;You can check out &lt;a href=&#34;https://pradeeproark.github.io/pensieve/demos/&#34;&gt;demos of how an agent uses it&lt;/a&gt;. There&amp;rsquo;s also a &lt;a href=&#34;https://github.com/pradeeproark/pensieve&#34;&gt;standalone version of the CLI tool&lt;/a&gt; available, and if you&amp;rsquo;re using Claude Code, you can install it as a &lt;a href=&#34;https://github.com/cittamaya/cittamaya&#34;&gt;plugin from the Cittamaya marketplace&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;✨&lt;/p&gt;
</description>
    </item>
    <item>
      <title>TodoMVC using HTMX, Hyperscript and Python Flask</title>
      <link>https://pradeeproark.com/posts/htmx-hyperscript-todomvc/</link>
      <pubDate>Sun, 24 Dec 2023 10:55:49 +0000</pubDate>
      <guid>https://pradeeproark.com/posts/htmx-hyperscript-todomvc/</guid>
      <description>&lt;p&gt;This post evaluates HTMX, a simple framework that uses attributes to enhance
HTML with SPA behaviours. Instead of a full-blown javascript framework, it
progressively enhances plain HTML to build capabilities. Better articles have
been written
&lt;a href=&#34;https://intercoolerjs.org/2020/01/14/taking-html-seriously&#34;&gt;on why&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;We will focus on IF it helps bring SPA-like behaviour intuitively without
JavaScript fatigue.&lt;/p&gt;
&lt;p&gt;We are going to use TodoMVC as a reference implementation, which has a
&lt;a href=&#34;https://github.com/tastejs/todomvc/blob/master/app-spec.md&#34;&gt;simple spec&lt;/a&gt; and
various implementations to compare frontend frameworks, which are predominantly
in Javascript/Typescript.&lt;/p&gt;
&lt;p&gt;To begin with, I just took the todo-mvc template and modified it progressively
to add features with care taken to preserve the original HTML. We use simple
requests/responses and return HTML fragments as views to the front end, and HTMX
takes care of patching them into the DOM where we target it. No page refreshes
are needed, hence the SPA behaviour minus the gluttony of javascript frameworks
and the associated build-the-world tooling they bring.&lt;/p&gt;
&lt;p&gt;This involved splitting the HTML into small templates, which we can return as
fragments from our server. The TODOMVC app has key components of an &lt;code&gt;&amp;lt;input/&amp;gt;&lt;/code&gt;
to capture new TODOS and an unordered list of list items &lt;code&gt;&amp;lt;li/&amp;gt;&lt;/code&gt; to represent
them. The &lt;code&gt;&amp;lt;li/&amp;gt;&lt;/code&gt; themselves are CRUD enabled, which allows them to be
edited/deleted.&lt;/p&gt;
&lt;p&gt;Fetching new todos is as simple as using an attribute
&lt;a href=&#34;https://htmx.org/attributes/hx-get/&#34;&gt;hx-get&lt;/a&gt; and pointing to your endpoint,
which returns plain HTML.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&amp;lt;&lt;span style=&#34;color:#f92672&#34;&gt;ul&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;class&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;todo-list&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;hx-get&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;/todos&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;hx-trigger&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;load&amp;#34;&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span style=&#34;color:#f92672&#34;&gt;ul&lt;/span&gt;&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Easy to read and understand. On a load of the element, get a list of todos from
/todos, which returns,&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&amp;lt;&lt;span style=&#34;color:#f92672&#34;&gt;li&lt;/span&gt;&amp;gt;TODO1&amp;lt;/&lt;span style=&#34;color:#f92672&#34;&gt;li&lt;/span&gt;&amp;gt;
&amp;lt;&lt;span style=&#34;color:#f92672&#34;&gt;li&lt;/span&gt;&amp;gt;TODO2&amp;lt;/&lt;span style=&#34;color:#f92672&#34;&gt;li&lt;/span&gt;&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;which is automatically spliced into our todolist &lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt; as children&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&amp;lt;!-- ASSEMBLED DOM --&amp;gt;&lt;/span&gt;

&lt;span style=&#34;display:block;width:100%;background-color:#3c3d38&#34;&gt;&amp;lt;&lt;span style=&#34;color:#f92672&#34;&gt;ul&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;class&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;todo-list&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;hx-get&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;/todos&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;hx-trigger&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;load&amp;#34;&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;span style=&#34;display:block;width:100%;background-color:#3c3d38&#34;&gt;    &amp;lt;&lt;span style=&#34;color:#f92672&#34;&gt;li&lt;/span&gt;&amp;gt;TODO1&amp;lt;/&lt;span style=&#34;color:#f92672&#34;&gt;li&lt;/span&gt;&amp;gt;
&lt;/span&gt;    &amp;lt;&lt;span style=&#34;color:#f92672&#34;&gt;li&lt;/span&gt;&amp;gt;TODO2&amp;lt;/&lt;span style=&#34;color:#f92672&#34;&gt;li&lt;/span&gt;&amp;gt;
&amp;lt;/&lt;span style=&#34;color:#f92672&#34;&gt;ul&lt;/span&gt;&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Enhancing &lt;code&gt;&amp;lt;li/&amp;gt;&lt;/code&gt; items to support Read, Update, Delete involves decorating them
with attributes as so,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Read - Render the value of the todo in the template tag {{ todo.label }}&lt;/li&gt;
&lt;li&gt;Update - On exiting the input box on blur or on pressing enter (2 triggers),
call POST to update the todo&lt;/li&gt;
&lt;li&gt;Delete - on delete link clicked, issue DELETE and will remove the list element
automatically on success.&lt;/li&gt;
&lt;li&gt;Toggle between edit mode - This one was tricky as the mode switch happens in
CSS by changing the class name. We track the state of the editmode on the
server and return the whole &lt;code&gt;&amp;lt;li/&amp;gt;&lt;/code&gt; element on dblclick. This felt
unnecessary. &lt;a href=&#34;#toggleEditing&#34;&gt;Later&lt;/a&gt;, with hyperscript, I will show how easy
it is to implement this on the client side.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&amp;lt;&lt;span style=&#34;color:#f92672&#34;&gt;li&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;id&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;list-item-{{todo.id}}&amp;#34;&lt;/span&gt; 
    &lt;span style=&#34;color:#a6e22e&#34;&gt;class&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;{{&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;completed&lt;/span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;if&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;todo&lt;/span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;status&lt;/span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;}}&lt;/span&gt; &lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;{{&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;editing&lt;/span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;if&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;todo&lt;/span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;editMode&lt;/span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;}}&lt;/span&gt; &lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;{{&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;notEditing&lt;/span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;if&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;not&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;todo&lt;/span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;editMode&lt;/span&gt; &lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;}}&amp;#34;&lt;/span&gt;  
&lt;span style=&#34;display:block;width:100%;background-color:#3c3d38&#34;&gt;    &lt;span style=&#34;color:#a6e22e&#34;&gt;hx-get&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;/editTodo/{{todo.id}}&amp;#34;&lt;/span&gt; 
&lt;/span&gt;&lt;span style=&#34;display:block;width:100%;background-color:#3c3d38&#34;&gt;    &lt;span style=&#34;color:#a6e22e&#34;&gt;hx-trigger&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;dblclick&amp;#34;&lt;/span&gt; 
&lt;/span&gt;&lt;span style=&#34;display:block;width:100%;background-color:#3c3d38&#34;&gt;    &lt;span style=&#34;color:#a6e22e&#34;&gt;hx-swap&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;outerHTML&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;hx-target&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;this&amp;#34;&lt;/span&gt;&amp;gt; &lt;span style=&#34;color:#75715e&#34;&gt;&amp;lt;!-- TOGGLE EDIT MODE --&amp;gt;&lt;/span&gt;
&lt;/span&gt;    &amp;lt;&lt;span style=&#34;color:#f92672&#34;&gt;div&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;class&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;view&amp;#34;&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span style=&#34;color:#f92672&#34;&gt;input&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;class&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;toggle&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;type&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;checkbox&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;{{&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;checked&lt;/span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;if&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;todo&lt;/span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;status&lt;/span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;}}&lt;/span&gt; 
&lt;span style=&#34;display:block;width:100%;background-color:#3c3d38&#34;&gt;            &lt;span style=&#34;color:#a6e22e&#34;&gt;hx-post&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;/toggleStatus/{{ todo.id }}&amp;#34;&lt;/span&gt; 
&lt;/span&gt;            &lt;span style=&#34;color:#a6e22e&#34;&gt;hx-swap&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;outerHTML&amp;#34;&lt;/span&gt; 
            &lt;span style=&#34;color:#a6e22e&#34;&gt;hx-target&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;#list-item-{{todo.id}}&amp;#34;&lt;/span&gt;&amp;gt; &lt;span style=&#34;color:#75715e&#34;&gt;&amp;lt;!-- TOGGLE TODO STATUS --&amp;gt;&lt;/span&gt;
&lt;span style=&#34;display:block;width:100%;background-color:#3c3d38&#34;&gt;        &amp;lt;&lt;span style=&#34;color:#f92672&#34;&gt;label&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style=&#34;color:#f92672&#34;&gt;span&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;id&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;todo-label&amp;#34;&lt;/span&gt; &amp;gt;{{ todo.label }} &lt;span style=&#34;color:#75715e&#34;&gt;&amp;lt;!-- READ: FETCH AND DISPLAY TODO STATUS --&amp;gt;&lt;/span&gt;&amp;lt;/&lt;span style=&#34;color:#f92672&#34;&gt;span&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span style=&#34;color:#f92672&#34;&gt;label&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;span style=&#34;display:block;width:100%;background-color:#3c3d38&#34;&gt;        &amp;lt;&lt;span style=&#34;color:#f92672&#34;&gt;button&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;class&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;destroy&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;hx-delete&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;/deleteTodo/{{todo.id}}&amp;#34;&lt;/span&gt;&amp;gt;&lt;span style=&#34;color:#75715e&#34;&gt;&amp;lt;!-- DELETE TODO --&amp;gt;&lt;/span&gt;&amp;lt;/&lt;span style=&#34;color:#f92672&#34;&gt;button&lt;/span&gt;&amp;gt;
&lt;/span&gt;    &amp;lt;/&lt;span style=&#34;color:#f92672&#34;&gt;div&lt;/span&gt;&amp;gt;
    &amp;lt;&lt;span style=&#34;color:#f92672&#34;&gt;input&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;name&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;edit-todo&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;class&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;edit&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;value&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;{{ todo.label }}&amp;#34;&lt;/span&gt; 
    &lt;span style=&#34;color:#a6e22e&#34;&gt;hx-trigger&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;keyup[keyCode==13], blur&amp;#34;&lt;/span&gt; 
&lt;span style=&#34;display:block;width:100%;background-color:#3c3d38&#34;&gt;    &lt;span style=&#34;color:#a6e22e&#34;&gt;hx-post&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;/updateTodo/{{ todo.id }}&amp;#34;&lt;/span&gt; &amp;gt; &lt;span style=&#34;color:#75715e&#34;&gt;&amp;lt;!-- UPDATE TODO --&amp;gt;&lt;/span&gt;
&lt;/span&gt;&amp;lt;/&lt;span style=&#34;color:#f92672&#34;&gt;li&lt;/span&gt;&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2 id=&#34;behind-the-scenes---server-side&#34;&gt;Behind the scenes - Server Side&lt;/h2&gt;
&lt;p&gt;A brief note on the server side implemented here in Python using Flask, a
minimal web server. There is nothing much to be noted here. The server can be
anything that can serve plain HTML. The prototype’s logic surrounding the todo
state management is implemented in a simple Python style with templates serving
the results. The todos and the editor state are tracked in session cookies
(default flask implementation). This is a deviation from the TODOMVC
specification, which requests it to be stored in local storage. This idea of
where the state should be held is a good decision point in choosing HTMX.&lt;/p&gt;
&lt;p&gt;Example of how state is defined and implementation of clear completed feature
which clears all todos that are status complete (True)&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;@dataclass&lt;/span&gt;
&lt;span style=&#34;color:#66d9ef&#34;&gt;class&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;Todo&lt;/span&gt;:
    id: str
    label: str
    status: bool
    editMode: bool

&lt;span style=&#34;color:#a6e22e&#34;&gt;@dataclass&lt;/span&gt;
&lt;span style=&#34;color:#66d9ef&#34;&gt;class&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;State&lt;/span&gt;:
    currentStatusFilter: str
    hideSection: bool
    tobeCompletedCount: int
    clearCompleted: bool
    selectedIndex: typing&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;Union[int, None]

&lt;span style=&#34;color:#a6e22e&#34;&gt;@app.route&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;/clearCompleted&amp;#34;&lt;/span&gt;, methods&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;[&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;POST&amp;#39;&lt;/span&gt;])
&lt;span style=&#34;color:#66d9ef&#34;&gt;def&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;clearCompleted&lt;/span&gt;():
    currentState, todos &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; getState()
    clearedTodos &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; [todo &lt;span style=&#34;color:#66d9ef&#34;&gt;for&lt;/span&gt; todo &lt;span style=&#34;color:#f92672&#34;&gt;in&lt;/span&gt; todos &lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;not&lt;/span&gt; todo&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;status]
    updateState(currentState, clearedTodos)
    &lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt; getTodos(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;All&amp;#34;&lt;/span&gt;)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The full implementation can be found in
&lt;a href=&#34;https://github.com/pradeeproark/todomvc-app-htmx/blob/htmxIt/app.py&#34;&gt;app.py&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;hyperscript&#34;&gt;Hyperscript&lt;/h2&gt;
&lt;p&gt;My initial attempt was to get away as much as I could without using any
JavaScript, but there are a few features that scripting can solve elegantly.
Luckily, HTMX is well paired with a scripting language called Hyperscript from
the same creator, and it is bliss. It takes after
&lt;a href=&#34;https://en.wikipedia.org/wiki/HyperTalk&#34;&gt;hypertalk&lt;/a&gt; of natural language
programming fame.&lt;/p&gt;
&lt;p&gt;Here is what it looks like when you need to clear the input after adding a todo.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;on&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;htmx&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;afterRequest&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;event&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;detail&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;successful&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;then&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;set&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;my&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;value&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;to&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;&amp;#39;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;a name=&#34;toggleEditing&#34;&gt;&lt;/a&gt; Redoing the dblclick to toggle the .editing class
turns into&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&amp;lt;&lt;span style=&#34;color:#f92672&#34;&gt;label&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;_&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;on dblclick toggle .editing on #list-item-{{todo.id}}&amp;#34;&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span style=&#34;color:#f92672&#34;&gt;label&lt;/span&gt;&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;That and a simple mutation observer script to keep track of length of changed
list items covers what we need.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;on&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;mutation&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;of&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;anything&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;from&lt;/span&gt; .&lt;span style=&#34;color:#a6e22e&#34;&gt;todo&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;list&lt;/span&gt;
					&lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;length&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;of&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;&amp;lt;&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;todo&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;list&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;li&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;/&amp;gt;&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;==&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;then&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;add&lt;/span&gt; .&lt;span style=&#34;color:#a6e22e&#34;&gt;hidden&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;to&lt;/span&gt; .&lt;span style=&#34;color:#a6e22e&#34;&gt;main&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;then&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;add&lt;/span&gt; .&lt;span style=&#34;color:#a6e22e&#34;&gt;hidden&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;to&lt;/span&gt; .&lt;span style=&#34;color:#a6e22e&#34;&gt;footer&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The nice thing about hyperscript is it’s declarative feel and it’s first class
natural language approach to reference and manipulate DOM elements. Improves
readability.&lt;/p&gt;
&lt;h2 id=&#34;key-takeaways&#34;&gt;Key takeaways&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;For certain kinds of applications, plain old HTML served and patched into the
DOM is a sufficient approach to deliver a SPA like experience without the
bloat of full-fledged JS frameworks and associated builds and maintenance
overhead&lt;/li&gt;
&lt;li&gt;Taking an incremental evaluate/tackle approach to features in a web app goes a
long way in keeping the application responsive and lightweight.&lt;/li&gt;
&lt;li&gt;Serving plain old HTML allows flexibility on server-side frameworks. It also
helps with keeping the logic close to the origin state.&lt;/li&gt;
&lt;li&gt;HTMX encourages thinking about static vs interactive parts of an app and
brings in only what is necessary to handle the interactive parts.&lt;/li&gt;
&lt;li&gt;Following a declarative approach builds on the strength of HTML. The
readability helps with the long-term maintenance of the solution.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;demo&#34;&gt;Demo&lt;/h2&gt;
&lt;p&gt;&lt;a href=&#34;https://todomvc-app-htmx.fly.dev/&#34;&gt;https://todomvc-app-htmx.fly.dev/&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;source-on-github&#34;&gt;Source on Github&lt;/h2&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/pradeeproark/todomvc-app-htmx&#34;&gt;https://github.com/pradeeproark/todomvc-app-htmx&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Bitcoin is not like a traditional investment</title>
      <link>https://pradeeproark.com/posts/bitcoin-is-not-like-a-traditional-investment/</link>
      <pubDate>Mon, 29 Aug 2022 16:15:25 +0000</pubDate>
      <guid>https://pradeeproark.com/posts/bitcoin-is-not-like-a-traditional-investment/</guid>
      <description>&lt;p&gt;What is the yield you can expect in your Bitcoin investment? Is there a consistent rate of return? Will it outperform other markets? Better than stock market returns? Gold? Will it beat inflation?&lt;/p&gt;
&lt;p&gt;All these questions arise from the traditional mindset trained to evaluate everything as financial returns vis-a-vis dollars or whatever fiat currency the prospective investor holds.&lt;/p&gt;
&lt;p&gt;But Bitcoin, by its very nature, cannot promise any of these things. Those who say otherwise are wrong. What are we investing in if it is not any of the above?&lt;/p&gt;
&lt;p&gt;What would be called success in terms of your Bitcoin investment? And how do you evaluate whether it is living up to its expectation?&lt;/p&gt;
&lt;p&gt;For that, we need to look at its roots, All &amp;ldquo;Bitcoin&amp;rdquo; promised by Satoshi and what it is turning out to be. A &amp;ldquo;Peer-to-Peer electronic cash system&amp;rdquo;. P2P without going through a financial institution. And &amp;ldquo;cash system&amp;rdquo; means you get to own it and gives the bearer the right over it. This is in contrast to current systems where all flow happens through trusted 3rd party institutions that are not necessarily incentivised to protect your interests.&lt;/p&gt;
&lt;p&gt;That it has a fixed supply could also be a consideration if you like it to hold its value better than unrestrained supply currencies.&lt;/p&gt;
&lt;p&gt;If you need these properties, you can invest in &amp;ldquo;Bitcoin&amp;rdquo;. The returns are as above, nothing else. Still, others can engage in speculative activity and prattle about &amp;ldquo;Profits&amp;rdquo; and &amp;ldquo;Returns&amp;rdquo;. Still, it was never meant as a traditional investment.&lt;/p&gt;</description>
    </item>
    <item>
      <title>I see you, Bitcoin</title>
      <link>https://pradeeproark.com/posts/i-see-you-bitcoin/</link>
      <pubDate>Fri, 24 Dec 2021 23:01:32 +0000</pubDate>
      <guid>https://pradeeproark.com/posts/i-see-you-bitcoin/</guid>
      <description>&lt;p&gt;For decades now, the present-day western economic systems have never been challenged.&lt;/p&gt;
&lt;p&gt;Fuelled by credit and unhinged from sound money, the system is frothing with bubbles and capital misallocation.&lt;/p&gt;
&lt;p&gt;This hardly bothers the incumbents, particularly those at the mouth of the credit flow. Free credit allows them to eat all the fruits of the productive activity in the economy.&lt;/p&gt;
&lt;p&gt;Only in the presence of an alternate system one can suddenly see the system as it exists in a new light.&lt;/p&gt;
&lt;p&gt;The alternate system is Bitcoin.&lt;/p&gt;
&lt;p&gt;As society digests this new system, it ridicules it with enthusiasm. Suddenly the problems with the current system are forgotten as we have already adjusted to it and are loathe to change.&lt;/p&gt;
&lt;p&gt;It is much easier to point the finger at the other side and question it in a way never before asked about the present system.&lt;/p&gt;
&lt;p&gt;That is a positive thing. It&amp;rsquo;s been some time since these questions were asked. What is inflation? What is debt? whose debt? Can we print money and erase all our mistakes?&lt;/p&gt;</description>
    </item>
    <item>
      <title>Bitcoin Is Efficient</title>
      <link>https://pradeeproark.com/posts/bitcoin-is-efficient/</link>
      <pubDate>Tue, 08 Jun 2021 00:46:04 +0000</pubDate>
      <guid>https://pradeeproark.com/posts/bitcoin-is-efficient/</guid>
      <description>&lt;p&gt;Engineers like to optimise things. It is one of the ways they express their identity. So, for example, if you give one a coffee machine, they would grumble about how much of the coffee bean pulp is wasted, the leaked milk, the wasted power in overheating. Thermal loss, blah blah blah.&lt;/p&gt;
&lt;p&gt;They assure you they can fix it. Make it efficient. Brilliant. But they go haywire when they jump to areas they haven&amp;rsquo;t fully understood.&lt;/p&gt;
&lt;p&gt;Are your transactions going slow? Let me show you how to fix that. You don&amp;rsquo;t want to use energy for that proof-of-work. Let me optimise that for you, they say. Make it efficient.&lt;/p&gt;
&lt;p&gt;But it is already efficient.&lt;/p&gt;
&lt;p&gt;One of the long-standing newbie questions in understanding bitcoin. Why is it we are mining doing computationally irrelevant work?. Why target a block of only size 1MB? Why not more? They wonder if it looks like a blatant oversight by this &amp;ldquo;Satoshi&amp;rdquo;. So let me fix that for you, Mr Satoshi. They have missed that, like all engineering problems, there are tradeoffs and incentives when designing a solution to a problem.&lt;/p&gt;
&lt;p&gt;Bitcoin is by design a &amp;ldquo;protocol to exchange value minimising trust needed&amp;rdquo;. But easily verifiable by all participants.&amp;rdquo; Replace &amp;ldquo;proof-of-work&amp;rdquo; with something else, and you have changed the trust model. So, if you increase the block size without thought, you make it more centralised, tweaking the trust model.
Keeping it &amp;ldquo;decentralised&amp;rdquo; and &amp;ldquo;trust minimised&amp;rdquo; is a core tenet of Bitcoin&amp;rsquo;s design. And its design is efficient enough to allow that and no more.&lt;/p&gt;
&lt;p&gt;What about the number of transactions in a block? We can&amp;rsquo;t store every transaction we want on the blockchain. That&amp;rsquo;s right. It can&amp;rsquo;t. It is a constraint that one must balance without losing other properties we want.&lt;/p&gt;
&lt;p&gt;A possible solution is being explored for scaling bitcoin if you accept the following premise. You don&amp;rsquo;t need all the transactions you do in life permanently captured forever in the base bitcoin blockchain. So, for example, movie tickets, waffles and ice creams don&amp;rsquo;t need a forever entry in the blockchain.&lt;/p&gt;
&lt;p&gt;Instead, we can move that transaction to another more private layer which only a few participants alone know at a time. Moving layers is how engineers solve a lot of problems.&lt;/p&gt;
&lt;p&gt;The existing layer is called Base Layer (layer 1). We can extend it with other layers like the &lt;a href=&#34;http://lightning.network/how-it-works/&#34;&gt;lightning network&lt;/a&gt; with a different trust model. Still decentralised and rooted in layer one but can scale to a higher magnitude than Layer 1.
One transaction in the main chain could represent millions of transactions on the lightning network. &lt;em&gt;Efficient without giving up its other properties&lt;/em&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Intrinsic Value of Bitcoin compared to Gold</title>
      <link>https://pradeeproark.com/posts/intrinsic-value-of-bitcoin-vs-gold/</link>
      <pubDate>Wed, 20 Jan 2021 13:11:39 +0000</pubDate>
      <guid>https://pradeeproark.com/posts/intrinsic-value-of-bitcoin-vs-gold/</guid>
      <description>&lt;link rel=&#34;stylesheet&#34; href=&#34;custom.css&#34;&gt;
There is an ongoing debate between gold bugs and bitcoiners about the &#34;intrinsic&#34; value of either money? Goldbugs fervently argue that only gold has intrinsic value, and Bitcoin does not have &#34;intrinsic&#34; value. Thereby its value should be Zero. 
&lt;p&gt;That its price is above zero is a source of constant surprise and ridicule from gold bugs. &amp;ldquo;Wait, you will see. “This is all a misunderstanding,&amp;rdquo; they say. &amp;ldquo;It will be zero soon.&amp;rdquo; &lt;/p&gt;
&lt;p&gt;After all, what &amp;ldquo;intrinsic&amp;rdquo; value does it have? It is all just 0s and 1s and will vanish when someone unplugs the computer (or) turns off the internet. &amp;ldquo;Clearly,&amp;rdquo; they say, &amp;ldquo;those buying it are misled.&amp;rdquo; But are they?&lt;/p&gt;
&lt;p&gt;On the counterpoint, Bitcoiners claim gold has no &amp;ldquo;intrinsic&amp;rdquo; value either. It&amp;rsquo;s all about the utility of it that gives it value. &amp;ldquo;Bitcoin has utility too and thus has value &lt;a href=&#34;https://www.lopp.net/pdf/Bitcoin-Intrinsic-Value.pdf&#34;&gt;^1&lt;/a&gt;&amp;rdquo; they argue. I think the root of the problem is confusion over the meaning of &amp;ldquo;intrinsic.&amp;rdquo; Let&amp;rsquo;s see its origins.&lt;/p&gt;
&lt;p&gt;&amp;gt; intrinsic: to come from the inside, immanent (lat: intrinsecus, &amp;ldquo;within&amp;rdquo;) &lt;/p&gt;
&lt;p&gt;By that definition, we know gold has many intrinsic qualities: corrosion resistance, high malleability, ductility, low reactivity, and scarcity in our known world.&lt;/p&gt;
&lt;p&gt;But the most widely recognised quality that makes it valuable as a &amp;ldquo;store of value&amp;rdquo; is its supply scarcity. It is as if people were searching for a rare medium that could also be shaped to be held, counted, and exchanged. It didn&amp;rsquo;t degrade much with use. Perfect.&lt;/p&gt;
&lt;p&gt;Gold is both a commodity and money. Whenever its values are considered, the market evaluates these characteristics to price it.&lt;/p&gt;
&lt;p&gt;Industrial demand for gold is only 10-15%; the rest goes to jewelry, investments, and central bank reserves. &lt;figure&gt;
    &lt;img src=&#34;gold-demand-by-sector-1.svg&#34;
         alt=&#34;demand for gold by sector as a pie chart&#34; width=&#34;400&#34; height=&#34;auto&#34;/&gt; &lt;figcaption&gt;
            &lt;h4&gt;Gold demand by sector&lt;/h4&gt;
        &lt;/figcaption&gt;
&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.statista.com/statistics/299609/gold-demand-by-industry-sector-share/&#34;&gt;https://www.statista.com/statistics/299609/gold-demand-by-industry-sector-share/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And jewellery serves a dual purpose of investment and social status symbol. &lt;/p&gt;
&lt;p&gt;Historically looking, it does make a decent medium for a store of value. There have been few periods of supply shocks in its availability (discovery of new deposits, change in mining costs, etc.). On a longer timescale, its scarcity and slow mining are pluses. &lt;/p&gt;
&lt;p&gt;It also has a plus in its perceived value due to its long history. Longevity is an essential psychological factor when people assess a medium for long-term &amp;ldquo;store of value&amp;rdquo; across time—storing wealth for generations.&lt;/p&gt;
&lt;p&gt;But for something to act as &amp;ldquo;money,&amp;rdquo; does it need to be a commodity as well? Let us see what properties something has to possess to be &amp;ldquo;money.&amp;rdquo; From Wikipedia&lt;/p&gt;
&lt;p&gt;&amp;gt; Money is any item or verifiable record generally accepted as payment for goods and services and repayment of debts, such as taxes, in a particular country or socio-economic context. The main functions of money are distinguished as a medium of exchange, a unit of account, a store of value, and sometimes, a standard of deferred payment. Any item or verifiable record that fulfils these functions can be considered money.&lt;/p&gt;
&lt;p&gt;Not necessarily. There is also representative money.&lt;/p&gt;
&lt;p&gt;Now, what might be the &amp;ldquo;intrinsic&amp;rdquo; properties of Bitcoin?&lt;/p&gt;
&lt;p&gt;Here it would help if you were careful in its definition. Loose metaphors like &amp;ldquo;it is just 0s and 1s&amp;rdquo; while sounding plausible are incorrect. &amp;ldquo;Bitcoin&amp;rdquo; is a protocol, a &amp;ldquo;social contract.&amp;rdquo; It runs on computers or uses the internet is what you would call the implementation details. &lt;/p&gt;
&lt;p&gt;If you want to, you could continue the protocol with pen and paper &lt;a href=&#34;http://www.righto.com/2014/09/mining-bitcoin-with-pencil-and-paper.html&#34;&gt;^2&lt;/a&gt;, it might be painfully slow but not impossible. You could also use it without the &amp;ldquo;internet,&amp;rdquo; just using radio waves in a peer-to-peer manner &lt;a href=&#34;https://news.bitcoin.com/no-internet-no-problem-how-to-send-bitcoin-by-amateur-radio/&#34;&gt;^3&lt;/a&gt; &lt;a href=&#34;https://www.coindesk.com/bitcoiners-finland-send-cryptocurrency-radio&#34;&gt;^4&lt;/a&gt;. You could also be pedantic and point out that you could also use horses and messengers. &lt;/p&gt;
&lt;p&gt;So what are the &amp;ldquo;intrinsic&amp;rdquo; properties of Bitcoin,&lt;/p&gt;
&lt;p&gt;Its design mimics the scarcity of gold using mathematics and cryptography instead of shovels and blasting rocks.&lt;/p&gt;
&lt;p&gt;Its design allows the verifiable exchange of value between parties without being in person. Distance does not matter.&lt;/p&gt;
&lt;p&gt;By its design, it does not need a trusted intermediary for verification. There is no singular point of failure. &lt;/p&gt;
&lt;p&gt;Verification is more straightforward than verifying a gold payment, though, like anything new, it needs to be understood. &lt;/p&gt;
&lt;p&gt;Its design has an inherent memory of all that has happened (ledger).&lt;/p&gt;
&lt;p&gt;Based on these &amp;ldquo;intrinsic&amp;rdquo; properties, people have already started utilising them in the following ways.&lt;/p&gt;
&lt;p&gt;As a &amp;ldquo;store of value&amp;rdquo; both across time and space. Moving value across artificial borders with minimal friction. Censorship resistant. It can be used as a &amp;ldquo;store of value&amp;rdquo; due to its scarcity. We can use it as a &amp;ldquo;medium of exchange&amp;rdquo; without any censorship.&lt;/p&gt;
&lt;p&gt;Going back to the Goldbugs argument of gold vs bitcoin price. &lt;/p&gt;
&lt;p&gt;It is pertinent to recognise that &amp;ldquo;Price&amp;rdquo; is the perceived value of something. It is not &amp;ldquo;intrinsic&amp;rdquo; to that thing. &lt;/p&gt;
&lt;p&gt;A thing is priced based on its utility associated with its &amp;ldquo;intrinsic&amp;rdquo; properties.&lt;/p&gt;
&lt;p&gt;And Bitcoin has &amp;ldquo;intrinsic&amp;rdquo; properties as shown above and hence utility and a non-zero price. Whether it should be higher or lower than gold or other competing mediums is something for the markets to decide.&lt;/p&gt;
</description>
    </item>
    <item>
      <title>About</title>
      <link>https://pradeeproark.com/about/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://pradeeproark.com/about/</guid>
      <description>&lt;p&gt;I am a software engineer who loves &lt;a href=&#34;https://pradeeproark.com/shelves/programming&#34;&gt;building software&lt;/a&gt;. My recent focus is on &lt;a href=&#34;https://pradeeproark.com/tags/agentic&#34;&gt;agentic ai coding&lt;/a&gt;.&lt;/p&gt;
</description>
    </item>
  </channel>
</rss>