<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Pavan B Govindaraju on Medium]]></title>
        <description><![CDATA[Stories by Pavan B Govindaraju on Medium]]></description>
        <link>https://medium.com/@gpavanb?source=rss-98a3a42ba0d8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*6wEmT9HrIPIVbOCfzUW6ig.jpeg</url>
            <title>Stories by Pavan B Govindaraju on Medium</title>
            <link>https://medium.com/@gpavanb?source=rss-98a3a42ba0d8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 20:46:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gpavanb/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Op-Ed: Are You a Rent-Seeker?]]></title>
            <link>https://gpavanb.medium.com/op-ed-are-you-a-rent-seeker-9e5ca5589468?source=rss-98a3a42ba0d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/9e5ca5589468</guid>
            <category><![CDATA[economics]]></category>
            <category><![CDATA[entrepreneurship]]></category>
            <category><![CDATA[absurdism]]></category>
            <category><![CDATA[india]]></category>
            <category><![CDATA[inefficiency]]></category>
            <dc:creator><![CDATA[Pavan B Govindaraju]]></dc:creator>
            <pubDate>Sun, 18 Oct 2026 14:07:29 GMT</pubDate>
            <atom:updated>2026-10-18T14:12:26.206Z</atom:updated>
            <content:encoded><![CDATA[<h4>Why India’s market pays the contractor more than the road builder</h4><p>This is a continuation of the “Absurdity” series. Read the previous parts here — <a href="https://gpavanb.medium.com/op-ed-notes-on-an-absurd-market-41aa44fec0b0">Part 1</a>, <a href="https://gpavanb.medium.com/op-ed-the-recruiter-toll-booth-600b7e69a765">Part 2</a></p><p>The last two parts were centered on the fact that people respond fairly rationally to the market they find themselves in. In India, the engineer in the emigration queue and the drive to create recruitment agencies over employment are both doing the sensible thing. This part asks the obvious follow-up: <em>what is that market actually paying for?</em></p><p>For that, we need to dive deeper into the wealth creation story. Every successful ecosystem hides the obvious follow-up question: <em>where did the margin come from?</em></p><h4>The Source of the Margin</h4><p>Look at the three great waves of Indian wealth creation. The IT-services firms like <a href="https://en.wikipedia.org/wiki/Infosys">Infosys</a> and <a href="https://en.wikipedia.org/wiki/Wipro">Wipro</a> of the 90s. The big lenders and financial intermediaries that followed, such as <a href="https://en.wikipedia.org/wiki/Bajaj_Finance">Bajaj Finance</a> and <a href="https://en.wikipedia.org/wiki/HDFC_Bank">HDFC</a>. Post that, the consumer-internet companies such as <a href="https://en.wikipedia.org/wiki/Flipkart">Flipkart</a> of the last decade.</p><p>Each has a different source of margin. It was either a cross-border wage gap, the spread between the capital holders and seekers, or a layer sitting between the customer and someone else’s supply.</p><p>The common theme is that the extraordinary share of returns has come from position than from innovation-driven productivity.</p><p>The pattern continues to this day, where brands like Mamaearth outsource their manufacturing and focus on the marketing aspects.</p><p>Economists have a word for this —<strong> Rent-seeking</strong>, which is defined as the usage of resources to capture wealth that already exists rather than to create new wealth. Krueger (1974) gave the idea its name, and Bhagwati (1982) stretched it into a whole family of “directly unproductive, profit-seeking” activities.</p><h4>Why It’s Costly?</h4><p>A margin earned by position isn’t wrong in itself. The trouble is what it does to everyone <em>not</em> collecting one.</p><p>When talented people found firms, they innovate, and the economy grows, but when they become rent-seekers, they only redistribute (Murphy, Shleifer, and Vishny, 1991). In most countries, rent-seeking rewards talent more than entrepreneurship does, and the result is stagnation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7NWNIssixCatwScISh7Ohg.png" /></figure><p>Baumol (1990) puts it more bluntly. Societies don’t differ much in how much entrepreneurial talent they have. They differ in where it <em>goes</em>, and that depends on the “rules of the game”.</p><h4>Who Gets to Play?</h4><p>There’s a second filter, and it sits before talent even gets to choose.</p><p>Banerjee and Newman (1993) show that when capital markets are imperfect, occupations follow wealth. Poorer agents work for wages. Wealthier agents become entrepreneurs. And if the best rent-extracting positions need capital up front (a license), the same logic hands them to the already wealthy. Without accessible credit markets, you don’t just reward the rent-seeker. You <em>select</em> for them.</p><h4>The State Likes It Too</h4><p>Handing out a license, a protected margin or creating a monopoly is a cheap way for a government to buy political support. It costs little to grant, and it creates a loyal constituency.</p><p>Johnson and Koyama (2014) study tax farming as a response of pre-industrial states with limited fiscal capacity, which handed revenue collection to private intermediaries. Revenue farming, known as <em>ijara</em>, was also part of Mughal administration and of the East India Company’s early settlements in Bengal. And Banerjee and Iyer (2005) found that districts where the British vested proprietary rights in landlords had lower agricultural investment and productivity after independence than districts where those rights went to cultivators.</p><p>These dynamics even affect modern access to capital, as landlords belonged to certain communities, particularly in states with partially implemented land reforms. Adding to this, rent-seeking from governmental agencies also serves as revenue aggregations, which becomes an easy target for corruption.</p><h4>In the Office</h4><p>Rent-seeking need not be at an operator level, and can percolate down to the employee level also. And this is indeed seen in many work cultures in the country. Job search creates friction for change due to inefficient allocation, as covered in the previous post, leading to even more rent-seeking in the job, such as doing the bare minimum which is not commensurate with the salary received. This also leads to gradual deterioration of internal work culture as more employees gravitate towards those tendencies, and it surprisingly starts with the external market inefficiencies.</p><h4>The Golden Handcuffs</h4><p>But does this change once people move to newer markets? It depends on the imposed constraints, and unfortunately, there’s a more polished version of the same story in the diaspora.</p><p>If leaving a job while on an employment visa is costly, then the opportunity cost of giving up a secure role to build something uncertain is highest for exactly the people best suited to build. The purchasing power difference makes it even more difficult for someone to forgo a job in a developed economy. Adding to this are a lack of straightforward immigration paths to entrepreneurship and easy access to capital, particularly for those on employment visas. And for these reasons, a rent-seeking work culture surfaces, where individual value creation decouples from compensation, even in seemingly conducive environments for specific sub-groups.</p><h4>Lessons from South Korea</h4><p><a href="https://en.wikipedia.org/wiki/Chaebol">Chaebols</a> in South Korea are the case that complicates the story. They are large, family-owned, and they received cheap credit and significant state backing, which is rent by any definition. But Amsden (1989) argues that these subsidies were conditional, and in exchange, the state imposed performance standards with tight export targets that encouraged international competition, and let some badly run firms fail. Over time, firms that began by imitating foreign technology moved towards their own innovation (Kim, 1997) in order to remain relevant. Thus, rent seeking can be a transient phase, but requires self-regulation or externalities to move to scalable value generation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/674/0*q8JIYn07x6uaVHWz" /><figcaption>Top 5 “Chaebol” firms — Large, South Korean, family-owned companies that benefited from government backing</figcaption></figure><h4>So What Now?</h4><p>If payoffs steer talent, then lecturing rent-seekers is aiming at the wrong target. Baumol’s lesson is that you change the rules, not the people.</p><p>What India may need is a more patient form of capitalism, with long-horizon planning, institutional checks and balances, and an economy where efficiency, not demand, is the binding constraint.</p><p>What should someone driven by innovation do in an environment like this: leave, wait, or build in the gaps? If the builders leave, the ones who remain increasingly become rent-seekers, as it becomes the most reliable way to earn.</p><p>Rewarding a rent-seeker more than a value-creator diminishes the motivation of such individuals by prioritising compliance. In fact, this has propagated all the way back to the education system, which focuses on rote learning over creativity as well. Thus, there is a competition between the two approaches, where rent-seeking is unfortunately the path of least resistance.</p><p>To overcome the barrier, the best step forward is to create a bubble, which has zero tolerance for rent-seeking, relies on capital and supervision from innovation-driven firms, for sustained periods till value-generation becomes a viable and de facto business approach.</p><h4>Declaration of Generative AI in Writing</h4><p>During the preparation of this work, the author utilized AI-based language models to refine grammar, streamline syntax, and format figures. The author reviewed and edited the final text and takes full responsibility for the content of the post.</p><h4>References</h4><p>Acemoglu, D. (1995). Reward structures and the allocation of talent. <em>European Economic Review</em>, 39(1), 17–33.</p><p>Amsden, A.H. (1989) <em>Asia’s Next Giant: South Korea and Late Industrialization</em>. Oxford University Press.</p><p>Banerjee, A. V., &amp; Iyer, L. (2005). History, institutions, and economic performance: The legacy of colonial land tenure systems in India. <em>American Economic Review</em>, 95(4), 1190–1213.</p><p>Banerjee, A. V., &amp; Newman, A. F. (1993). Occupational choice and the process of development. <em>Journal of Political Economy</em>, 101(2), 274–298.</p><p>Baumol, W. J. (1990). Entrepreneurship: Productive, unproductive, and destructive. <em>Journal of Political Economy</em>, 98(5), 893–921.</p><p>Bhagwati, J. N. (1982). Directly unproductive, profit-seeking (DUP) activities. <em>Journal of Political Economy</em>, 90(5), 988–1002.</p><p>Johnson, N. D., &amp; Koyama, M. (2014). Tax farming and the origins of state capacity in England and France. <em>Explorations in Economic History</em>, 51, 1–20.</p><p>Kim, L. (1997). <em>Imitation to Innovation: The Dynamics of Korea’s Technological Learning</em>. Harvard Business School Press.</p><p>Krueger, A. O. (1974). The political economy of the rent-seeking society. <em>American Economic Review</em>, 64(3), 291–303.</p><p>Murphy, K. M., Shleifer, A., &amp; Vishny, R. W. (1991). The allocation of talent: Implications for growth. <em>Quarterly Journal of Economics</em>, 106(2), 503–530.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9e5ca5589468" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Money, It’s a Gas!]]></title>
            <link>https://gpavanb.medium.com/money-its-a-gas-555af740a3fa?source=rss-98a3a42ba0d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/555af740a3fa</guid>
            <category><![CDATA[academia]]></category>
            <category><![CDATA[economics]]></category>
            <category><![CDATA[funding]]></category>
            <category><![CDATA[venture-capital]]></category>
            <category><![CDATA[research]]></category>
            <dc:creator><![CDATA[Pavan B Govindaraju]]></dc:creator>
            <pubDate>Wed, 16 Sep 2026 12:08:11 GMT</pubDate>
            <atom:updated>2026-09-16T12:08:11.735Z</atom:updated>
            <content:encoded><![CDATA[<h4>Thoughts on Funding Allocation in Speculative Ventures</h4><p>The title refers to one of the lines in a famous <a href="https://www.youtube.com/watch?v=-0kcet4aPpQ">Pink Floyd</a> classic, and was a subject which piqued my curiosity. Although the dictionary meaning suggests it is something that triggers excitement, an appropriate analogy to the literal meaning perhaps refers to money diffusing or trickling down based on the specified funding mechanism, thus taking whatever shape this containment gives it. This post will particularly focus on these aspects in the case of what I’d like to define as “speculative ventures”.</p><p>The phrase “speculative ventures” can mean anything with a time horizon between the check and the payoff. That can be startups, research programs, or anything where the person writing the check cannot, by construction, know today whether the money worked. The funding distribution is guided by the following questions:</p><ul><li><strong>Who decides, and whom do they decide to fund?</strong></li><li><strong>How do they decide?</strong></li><li><strong>What gets funded, and what doesn’t, and why the gap?</strong></li></ul><p>This post is an attempt to pull those questions apart, using venture capital and research-grant funding as two instances of the same underlying mechanisms in action.</p><h4>I. Who Decides, and How They Decide</h4><p>In both venture capital and research funding, allocation is not a single decision but a chain of <a href="https://en.wikipedia.org/wiki/Principal%E2%80%93agent_problem">principal–agent relationships</a>, which gives rise to the typical issues associated with them. In the simplified picture of these two cases, venture partners select founders while peer-review committees select principal investigators. There are usually additional levels such as limited/general partners or program officers during the disbursal process. So, <em>who</em> decides is rarely the party whose capital is at stake, and <em>whom</em> they fund is filtered through at least one intermediary layer with its own incentives, career concerns, and information constraints.</p><p>There is, however, quite a bit of difference in how deals are sourced in both endeavors. In venture capital, sourcing runs largely through warm introductions and existing networks, which itself has its own selection bias. Research funding also is mostly restricted to a particular set of faculty, who themselves are recruited through referrals, although applications are solicited in some cases to ensure good candidates can emerge from outside those circles.</p><p>Then, after a partner develops conviction (often before formal diligence begins), the case is presented to an investment committee, and capital is released in tranches gated to milestones, with the explicit expectation of failure across most of the portfolio. In research funding, a proposal is scored by a panel of peer reviewers against defined criteria, such as significance, innovation, approach, the investigator’s track record, and the institutional environment. A program officer allocates within a band set by aggregate reviewer scores, with comparatively little discretion to override the panel’s ranking.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lWuf1omLYPcMX5wq-n0ttw.png" /><figcaption>Figure 1 — The Principal-Agent allocation chain contrasted between venture capital and scientific grants</figcaption></figure><p>The chain for both processes is summarized in Figure 1. Critically, in neither process does any link in the chain hold the object being funded directly. Each layer holds a <em>belief</em> about it. This can be decoupled from reality due to asymmetric information or personal biases. For this to work efficiently, it is thus important that organizations are transparent, so that the funding decision is based on objective reality.</p><p>In the extreme scenario, where investors are presented with a picture that misrepresents reality, it counts as investment fraud. The intermediary layer also needs to be objective and should not show favoritism for this chain to work well, and for the capital to reach deserving candidates. These are some of the situations in which the chain of allocation fails, and this article talks about further modes documented in literature.</p><h4>II. The Gap: What Gets Funded, and What Doesn’t</h4><p>With the principal-agent relationship, there would definitely be a gap in terms of what gets funded and what turns out to have merited it. These can be divided into two broad categories:</p><ul><li><strong><em>Ex ante</em> misallocation</strong> — where the allocator did not perform the right duty to ensure merited candidates are funded</li><li><strong><em>Ex post</em> misallocation</strong> — where the allocator does indeed provide to those who merited, but eventual actions by the agent cause regret</li></ul><p>Each of these misallocations can be <strong>Type I </strong>or<strong> Type II </strong>errors that are made, or in other words, funding those that do not merit or missing out on someone that deserved it (the latter is commonly known as the anti-portfolio in venture capital circles).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*7k-j6Q8BLq7QcscnRnsszg.png" /><figcaption>Figure 2— Misallocation taxonomy based on the error type and temporal occurrence of cause relative to the funding event</figcaption></figure><p>These two error types and whether the cause of misallocation occurs before or after the funding event give rise to a 2x2 matrix, shown in Figure 2. The text in each quadrant summarizes in colloquial terms the type of misallocation that has occurred.</p><p>The rest of this section goes in detail for each of these quadrants and the various counter-intuitive phenomena that have already been documented in literature related to the same.</p><h4>Quadrant 1 (Ex Ante x Type 1) — Funding the Unmerited</h4><p><strong>The Bandwagon Valuation Spiral — </strong>Gatekeepers rationally ignore their negative signals to imitate prestigious peers, minimizing individual career/reputational risk at the cost of inflating category-wide valuation bubbles that lack fundamental cash-flow support (Scharfstein and Stein, 1990; Banerjee, 1992).</p><p><strong>Homophily Over Competence </strong>— Under acute early-stage uncertainty, allocators substitute business diligence with affinity matching (shared university pedigree, ethnicity, or prior elite employer), resulting in syndicates that systematically underperform ability-based syndicates. (Bengtsson and Hsu, 2015; Gompers, Mukharlyamov, and Xuan, 2016)</p><p><strong>Safe Incrementalism </strong>— In scientific grant panels, study section reviewers preferentially award large envelopes to low-risk, predictable extensions of mainstream trends where results are virtually guaranteed, starving radical discovery (Stephan, 2012; Boudreau, Guinan, Lakhani, and Riedl, 2016).</p><h4>Quadrant 2 (Ex Ante x Type 2) — Rejecting Genuine Merit</h4><p><strong>Consensus Homogenization</strong> — Collective scoring rules regress to the mean because radical, paradigm-shifting proposals inherently elicit polarized evaluations (Wang, Veugelers, and Stephan, 2017), systematically truncating the right tail. Katalin Karikó’s work on mRNA vaccines (Karikó and Weissman, 2005) is a great example of a breakthrough scientific achievement that had initial struggles for funding.</p><p><strong>Scale Bias Against Capital-Efficient Profitability </strong>— Venture fund economics require single assets capable of returning entire multi-hundred-million-dollar fund sizes, causing allocators to actively reject sustainably profitable, capital-efficient businesses that lack multi-billion-dollar TAMs (Nanda and Rhodes-Kropf, 2017). <a href="https://en.wikipedia.org/wiki/Physics_Wallah">Physics Wallah</a> is a good example that prioritized profitability over hyper-growth throughout the boom, was comparatively overlooked by investors and eventually became the sector leader once valuations collapsed (Jeyya, 2025).</p><p><strong>Anti-Portfolio Invisibility Bias — </strong>Gatekeepers are evaluated by principals exclusively on realized portfolio performance, while the colossal deadweight loss of rejected decacorns is ignored. In academia, there isn’t much of a misallocation penalty in grants either, and unfunded Nobel-worthy ideas carry zero balance-sheet effects. The amount of loss that was caused due to missing out on good deals is not publicly disclosed, except in rare instances such as Bessemer Venture Partners (2026), thus making it hard to evaluate how poorly a fund is truly performing.</p><h4>Quadrant 3 (Ex Post x Type 1) — Merited but Post-Award Rot</h4><p><strong>Hyper-Capitalization Governance Rot </strong>— Injecting excessive tranches of capital ahead of product-market discipline destroys operational frugality, uncoupling executive incentives from unit economics and enabling predatory growth or personal liquidity extraction (Biais and Casamatta, 1999; Biais, Mariotti, and Rochet, 2013). <a href="https://en.wikipedia.org/wiki/WeWork">WeWork</a> is a prime example of a company that started on the right footing, but eventually descended into chaos due to early liquidity from the founders (PitchBook, 2019).</p><p><strong>Milestone Myopia</strong> — Under staged financing horizons, agents divert resources away from fundamental long-term value creation into superficial, short-term vanity metrics (e.g., subsidized customer acquisition or salami-sliced papers) designed solely to clear the next funding tranche (Holmström, 1999; Cornelli and Yosha, 2003).</p><p><strong>Monitoring Deadweight Explosion </strong>— In low-trust ecosystems, when good-faith alignment between founders/PIs and allocators breaks down, non-productive monitoring costs (forensic auditing, legal escrow, progress-compliance bureaucracy) explode, consuming core innovation capital (Holmström and Tirole, 1997; Prendergast, 2002).</p><h4>Quadrant 4 (Ex Post x Type 2) — Impatient Investor</h4><p><strong>Premature Staged-Financing Termination</strong> — Dynamic exploration contracts inherently require early failure tolerance. Risk-averse allocators prematurely pull the plug on fundamentally viable, high-variance research after early noisy negative signals (Bergemann and Hege, 1998).</p><p><strong>Macro-Liquidity Winter Starvation — </strong>Well-performing, long-gestation ventures with high social/economic payoff are abruptly liquidated or down-rounded during exogenous macroeconomic contractions when short-term refinancing windows freeze (Nanda and Rhodes-Kropf, 2013).</p><p><strong>Fund Horizon Mismatch </strong>— The rigid 10-year closed-end lifecycle of institutional venture funds forces GPs to seek premature secondary sales or IPO exits of deep-tech and hardware assets whose biological/engineering payoff horizon exceeds fund maturity (Sahlman, 2022).</p><h4>III. Quantifying the Gap</h4><p>Having catalogued the mechanisms, the natural next question is how large the gap actually is. Quantifying it directly is difficult, since doing so requires a counterfactual, that is, what a rational allocator would have produced, but it does not exist outside hindsight. Several partial approaches are nonetheless available:</p><p><strong>Sector concentration relative to realized returns, by year — </strong>One can study the capital deployed for a given sector against the eventual distribution of exit outcomes rated against the index for that time period to approximately quantify the “herding premium”</p><p><strong>Inter-reviewer score variance in grant panels — </strong>Existing studies document more variance between individual reviewers scoring an identical proposal than between distinct proposals evaluated in aggregate (Lane et al., 2022), a directly measurable indicator of process noise that requires no AUM denominator at all.</p><p><strong>Anti-Portfolio Size — </strong>In venture capital, the cost of missing out on a promising firm is much larger than investing in the wrong firms, due to the ticket sizes involved. While anti-portfolios are not disclosed, estimating their aggregated market capitalization offers useful insight, even if a single missed outlier can heavily skew the metric.</p><p>Ecosystems should ideally be evaluated on the cost of decisions relative to the assets under management, rather than looking at absolute amounts, although this becomes more complicated with cross-border investments. These metrics are important to address and offer a clearer picture of speculative investments, particularly when institutions best positioned to study them have little incentive to publicize the results.</p><h4>IV. Why This Remains the Best Available Mechanism</h4><p>The defensible version of the pro-case is not that the present system is efficient, but that every alternative to it fails in a specific way:</p><p><strong>Centralized allocation</strong> — removes herding but replaces it with political risk-aversion operating at even greater force, relocating the reviewer-bias problem into a bureaucracy with weaker feedback loops and no mechanism for pruning poor allocators.</p><p><strong>Randomized (lottery) allocation</strong> — seriously proposed by some NIH reform advocates to eliminate reviewer bias entirely, but it also removes the one function peer review performs adequately, that is, filtering out proposals which are clearly founded on an incorrect premise or an unworkable method, a more common occurrence than is comfortable to acknowledge.</p><h4>Summary</h4><p>Markets and peer-review systems are not truth-finding engines, but are decentralized, error-correcting networks whose primary virtue is that no single gatekeeper’s misjudgment can compromise the entire ecosystem.</p><p>Yet the costs of misallocation remain severe. When capital repeatedly backs the wrong bets or passes over transformative ideas, the fallout extends beyond financial loss, as it accelerates brain drain, disillusions top-tier talent, and starves high-variance breakthroughs. Ultimately, the health of a speculative venture ecosystem depends not on eliminating risk, but on systematically mitigating these structural blind spots so that capital reliably finds its way to genuine merit. In line with the title, money diffuses and its container must be shaped appropriately so that it reaches the corners that matter.</p><h4>Declaration of Generative AI in Writing</h4><p>During the preparation of this work, the author utilized AI-based language models to refine grammar, streamline syntax, and format figures. The author reviewed and edited the final text and takes full responsibility for the content of the post.</p><h4>References</h4><p>Banerjee, A. V. (1992). A simple model of herd behavior. <em>The Quarterly Journal of Economics</em>, <em>107</em>(3), 797–817.</p><p>Bengtsson, O., &amp; Hsu, D. H. (2015). Ethnic matching in the US venture capital market. <em>Journal of Business Venturing</em>, <em>30</em>(2), 338–354.</p><p>Bergemann, D., &amp; Hege, U. (1998). Venture capital financing, moral hazard, and learning. <em>Journal of Banking &amp; Finance</em>, <em>22</em>(6–8), 703–735.</p><p>Bessemer Venture Partners. (2026). <em>The Anti-Portfolio</em>. <a href="https://www.bvp.com/about#anti-portfolio">https://www.bvp.com/about#anti-portfolio</a></p><p>Biais, B., &amp; Casamatta, C. (1999). Optimal leverage and aggregate investment. <em>The Journal of Finance</em>, <em>54</em>(4), 1291–1323.</p><p>Biais, B., Mariotti, T., &amp; Rochet, J. C. (2013). Dynamic financial contracting. <em>Advances in Economics and Econometrics</em>, <em>1</em>, 125–71.</p><p>Boudreau, K. J., Guinan, E. C., Lakhani, K. R., &amp; Riedl, C. (2016). Looking across and looking beyond the knowledge frontier: Intellectual distance, novelty, and resource allocation in science. <em>Management Science</em>, <em>62</em>(10), 2765–2783.</p><p>Cornelli, F., &amp; Yosha, O. (2003). Stage financing and the role of convertible securities. <em>The Review of Economic Studies</em>, <em>70</em>(1), 1–32.</p><p>Holmström, B. (1999). Managerial incentive problems: A dynamic perspective. <em>The Review of Economic Studies</em>, <em>66</em>(1), 169–182.</p><p>Holmström, B., &amp; Tirole, J. (1997). Financial intermediation, loanable funds, and the real sector. <em>The Quarterly Journal of Economics</em>, 663–691.</p><p>Jeyya, S. (2025, November 25). BYJU’S burned billions, Unacademy is bleeding — Only PW did the math right. <em>India Herald</em>. <a href="https://www.indiaherald.com/Breaking/Read/994863571/BYJUS-Burned-Billions-Unacademy-Is-Bleeding-Only-PW-Did-the-Math-Right">https://www.indiaherald.com/Breaking/Read/994863571/BYJUS-Burned-Billions-Unacademy-Is-Bleeding-Only-PW-Did-the-Math-Right</a></p><p>Karikó, K., Buckstein, M., Ni, H., &amp; Weissman, D. (2005). Suppression of RNA recognition by Toll-like receptors: the impact of nucleoside modification and the evolutionary origin of RNA. <em>Immunity</em>, <em>23</em>(2), 165–175.</p><p>Lane, J. N., Teplitskiy, M., Gray, G., Ranu, H., Menietti, M., Guinan, E. C., &amp; Lakhani, K. R. (2022). Conservatism gets funded? A field experiment on the role of negative information in novel project evaluation. <em>Management Science</em>, <em>68</em>(6), 4478–4495.</p><p>Nanda, R., &amp; Rhodes-Kropf, M. (2013). Investment cycles and startup innovation. <em>Journal of Financial Economics</em>, <em>110</em>(2), 403–418.</p><p>Nanda, R., &amp; Rhodes-Kropf, M. (2017). Financing risk and innovation. <em>Management Science</em>, <em>63</em>(4), 901–918.</p><p>PitchBook. (2019). <em>9 big things: WeWork’s CEO is cashing out as IPO looms</em>. <a href="https://pitchbook.com/news/articles/9-big-things-weworks-ceo-is-cashing-out-as-ipo-looms">https://pitchbook.com/news/articles/9-big-things-weworks-ceo-is-cashing-out-as-ipo-looms</a></p><p>Prendergast, C. (2002). Uncertainty and incentives. <em>Journal of Labor Economics</em>, <em>20</em>(S2), S115-S137.</p><p>Sahlman, W. A. (2022). The structure and governance of venture-capital organizations. In <em>Venture Capital</em> (pp. 3–51). Routledge.</p><p>Scharfstein, D. S., &amp; Stein, J. C. (1990). Herd behavior and investment. <em>The American Economic Review</em>, 465–479.</p><p>Stephan, P. E. (2012). <em>How Economics Shapes Science</em> (Vol. 1). Cambridge, MA: Harvard University Press.</p><p>Wang, J., Veugelers, R., &amp; Stephan, P. (2017). Bias against novelty in science: A cautionary tale for users of bibliometric indicators. <em>Research Policy</em>, <em>46</em>(8), 1416–1436.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=555af740a3fa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Jacobian Conjecture and The Devil’s Finite Element]]></title>
            <link>https://gpavanb.medium.com/jacobian-conjecture-and-the-devils-finite-element-d55db0f646f4?source=rss-98a3a42ba0d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/d55db0f646f4</guid>
            <category><![CDATA[finite-element-analysis]]></category>
            <category><![CDATA[jacobian]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[numerical-methods]]></category>
            <category><![CDATA[mathematics]]></category>
            <dc:creator><![CDATA[Pavan B Govindaraju]]></dc:creator>
            <pubDate>Fri, 24 Jul 2026 13:01:42 GMT</pubDate>
            <atom:updated>2026-07-24T13:01:42.462Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cQTU7HooBFzyJOkJI2BKhQ.png" /></figure><p>Short Python notebook that talks about the recently produced counter-example for the Jacobian conjecture using AI</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/43becba729385b8f37a8c0e47205c3fd/href">https://medium.com/media/43becba729385b8f37a8c0e47205c3fd/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d55db0f646f4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Generating Highly Random Numbers from Fluid Instability Simulations]]></title>
            <link>https://gpavanb.medium.com/generating-highly-random-numbers-from-fluid-instability-simulations-e37c38749fa9?source=rss-98a3a42ba0d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/e37c38749fa9</guid>
            <category><![CDATA[cryptography]]></category>
            <category><![CDATA[fluid-mechanics]]></category>
            <category><![CDATA[quantum-mechanics]]></category>
            <category><![CDATA[randomness]]></category>
            <category><![CDATA[instability]]></category>
            <dc:creator><![CDATA[Pavan B Govindaraju]]></dc:creator>
            <pubDate>Fri, 10 Jul 2026 09:15:42 GMT</pubDate>
            <atom:updated>2026-07-10T10:14:17.886Z</atom:updated>
            <content:encoded><![CDATA[<h4>Comparison of random number generators (RNGs) based on classical and quantum physical sources</h4><p>Cloudflare has a <a href="http://www.cloudflare.com/learning/ssl/lava-lamp-encryption/">wall of lava lamps</a> in its San Francisco office, and is a crucial piece of its infrastructure. The chaotic, unpredictable motion of wax blobs rising and falling is continuously photographed, hashed, and fed into their pool for cryptographic keys. It is a relatively inexpensive way of generating random numbers of good quality. There are other ways, such as <a href="https://partofthething.com/thoughts/making-true-random-numbers-with-radioactive-decay/">Geiger counters</a> and <a href="https://qrng.anu.edu.au/">Quantum Vacuum Fluctuations</a>, that leverage quantum mechanical phenomena. Classical physics and particularly chaotic systems offer a relatively inexpensive generation technique for this purpose.</p><p>The idea of using a purely computational approach to simulate this physical phenomenon and generate random numbers seems appealing, but would not be very resource-efficient. However, it seemed worthwhile to at least quantify the randomness generated through this method.</p><h3>The physical source: Rayleigh-Taylor instability</h3><p>This test was performed as part of the benchmarking for <a href="https://splitfxm.com/">SplitFXM</a>, the core solver built around a hierarchical Split-Newton methodology for multi-physics partial differential equations (PDEs). One of the canonical stress tests for any computational fluid dynamics (CFD) suite is the Rayleigh-Taylor (RT) instability.</p><p>It is a pattern that forms when a heavy fluid sits on top of a lighter one, and gravity amplifies tiny perturbations at the interface that grow into turbulent mixing. It’s deterministic in principle, as it is obtained by solving the discretised version of the incompressible Navier-Stokes equations, but in practice, the sensitivity to initial conditions is large enough and comes under the category of <em>Chaotic Pseudo Random Number Generators </em>(PRNGs).</p><p>Formally, the flow is governed by the two-phase, incompressible Navier-Stokes equations:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dLYxLqonPl6MbyelOKuJvg.png" /><figcaption>Figure 1: Two-Phase, Incompressible Navier-Stokes Equations for simulating the Rayleigh-Taylor Instability</figcaption></figure><p>where ρ is density, u and v represent the velocity field, p pressure, μ is the dynamic viscosity, g is the acceleration due to gravity, σ is surface tension, κ is the interface curvature, ε is the relaxation coefficient for the pressure equation.</p><p>The instability itself is characterised by its linear growth rate, which for an interface perturbation of wavenumber k is γ = √(A·g·k), where A is the Atwood number, A = (ρ_heavy − ρ_light)/(ρ_heavy + ρ_light).</p><p>This is the textbook result for the <em>linear</em> regime. Small perturbations grow exponentially in time with growth factor γ. Small differences at t=0 get amplified into qualitatively different mushroom-cap and finger structures by the time you extract the field for hashing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*CJDwoKeBfagN1B6WAnXbIg.gif" /><figcaption>Figure 2: Rayleigh–Taylor instability in a 0.5 × 1.0 domain with density ratio ρ₁/ρ₂ = 5, equal viscosities μ₁ = μ₂ = 0.005, zero surface tension (σ = 0), and downward gravity (gᵧ = −1). The heavy fluid is initially above the light fluid with a sinusoidally perturbed interface of amplitude 0.05Lᵧ. Simulations employ a VOF formulation with WENO5 spatial discretisation, CICSAM interface advection, implicit time integration, and adaptive mesh refinement.</figcaption></figure><p>That sensitivity is exactly what you want in a randomness source. So the pipeline is simple:</p><ol><li>Simulate RT instability in SplitFXM under a given set of initial perturbations.</li><li>Extract the resulting density/velocity field as an image.</li><li>Hash the image — the same way Cloudflare hashes lava lamp photos — to produce a bit sequence.</li></ol><h3>How do you know it’s actually random?</h3><p>This is the part that’s easy to hand-wave and hard to actually justify. “Looks chaotic” is not the same as “produces a statistically sound bit sequence,” so the output needs to survive a battery of randomness tests, not just a visual gut-check.</p><p><strong>Runs test.</strong> Count the number of runs V_obs (maximal subsequences of identical bits) in a sequence of length n with proportion of ones π. Under the null hypothesis of randomness,</p><pre>z = (V_obs − 2nπ(1−π)) / (2√(2n)·π(1−π))</pre><p>is approximately standard normal, and the p-value follows from erfc(|z|/√2). Too few runs means the bits clump; too many means they alternate suspiciously.</p><p><strong>Block frequency test.</strong> Split the n-bit sequence into N blocks of length M (here M=128). For each block i, compute the proportion of ones π_i, then form the chi-squared statistic</p><pre>χ² = 4M·Σᵢ(πᵢ − 1/2)²</pre><p>which should follow a χ² distribution with N degrees of freedom if the sequence is locally balanced, not just globally balanced.</p><p><strong>Shannon entropy.</strong> For a symbol alphabet with probabilities p₁,...,pₖ,</p><pre>H = −Σᵢ pᵢ·log₂(pᵢ)</pre><p>It is measured in bits per symbol and reported here as H / H_max × 100% against the theoretical ceiling H_max = log₂(k).</p><p><strong>KS uniformity test.</strong> For an empirical CDF Fₙ(x) built from n samples, compared against the uniform CDF F(x),</p><pre>D = supₓ |Fₙ(x) − F(x)|</pre><p>with the p-value derived from the Kolmogorov distribution of √n·D. Large D means the values cluster or gap in ways a uniform distribution wouldn&#39;t.</p><p><strong>Lag-1 autocorrelation.</strong> For a sequence x₁,...,xₙ with mean <strong>x</strong>,</p><pre>r₁ = Σᵢ₌₁ⁿ⁻¹(xᵢ − <strong>x</strong>)(xᵢ₊₁ − <strong>x</strong>) / Σᵢ₌₁ⁿ(xᵢ − <strong>x</strong>)²</pre><p>which should sit close to zero — a bit shouldn’t tell you anything about the <em>next</em> bit.</p><p>Figure 3 shows the results of the statistical tests applied to various physical random number generators, including ours. Across all five tests, the Rayleigh-Taylor simulation passed comfortably. The Shannon entropy is the lowest when compared with the other sources, but the difference is marginal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FmPiNkxVs6RlgQ--Hj4A5g.png" /><figcaption>Figure 3: Statistical Tests run on hashed Rayleigh-Taylor instability frames and compared with other public physical random number generators — Cloudflare drand, ANU Quantum RNG and <a href="http://partofthething.com/thoughts/making-true-random-numbers-with-radioactive-decay/">Geiger RNG</a></figcaption></figure><h3>Why there’s no such thing as a perfect entropy measure</h3><p>Here’s the part I think is more interesting than the benchmark table. None of these tests, individually or together, <em>prove</em> randomness. They can only fail to detect non-randomness along the particular axis each one probes.</p><ul><li>Shannon entropy measures unpredictability under an assumed symbol distribution, not true algorithmic unpredictability<strong>.</strong> A sequence can have nearly maximal Shannon entropy while remaining easy to predict because the structure exists in higher-order relationships that a first-order distribution ignores. For example, the sequence may appear to contain equal numbers of 0s and 1s (1 bit/symbol of Shannon entropy), yet every bit could simply be the XOR of the previous two bits. The single-bit statistics look perfectly random, but once the rule is known,</li><li>Runs tests, Kolmogorov–Smirnov tests, and similar statistical tests look for specific signatures of non-randomness rather than proving randomness. A deterministic pseudorandom number generator such as a linear congruential generator or xorshift can easily pass many statistical tests while remaining completely predictable to anyone who knows its internal state or seed.</li></ul><p>This is essentially Kolmogorov complexity’s uncomfortable lesson. A string x is Kolmogorov-random if</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/149/1*VgikHgBd5DBjdpEM2TZaQw.png" /></figure><p>i.e. its shortest generating program K(x) (on some fixed universal machine) is no shorter than the string itself — there&#39;s no compressible description. The catch: K(x) is uncomputable in general. You can&#39;t run an algorithm that certifies a given sequence is incompressible; you can only fail to find a compressor for it. Every statistical test in a NIST-style battery is exactly that. It is a specific, bounded attempt to find structure, and passing all of them only means none of those particular compressors work, not that none exist.</p><p>This is why firms such as Cloudflare lean on practical entropy sources such as lava lamps, radioactive decay, atmospheric noise, and RT instability fields, and lean on <em>physical unpredictability</em> as the actual source of security, using the statistical tests only as a sanity check.</p><p><em>The code for post-processing is available </em><a href="https://github.com/gpavanb1/PhysicalRNGValidator"><em>here</em></a><em>. If you want to poke at the RT solver yourself, it’s built on top of </em><a href="https://splitfxm.com/"><em>SplitFXM</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e37c38749fa9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Event Handling in “Repeat After Me”]]></title>
            <link>https://gpavanb.medium.com/event-handling-in-repeat-after-me-9dcb598a8962?source=rss-98a3a42ba0d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/9dcb598a8962</guid>
            <category><![CDATA[edtech]]></category>
            <category><![CDATA[frontend-system-design]]></category>
            <category><![CDATA[speech-recognition]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[language-learning]]></category>
            <dc:creator><![CDATA[Pavan B Govindaraju]]></dc:creator>
            <pubDate>Thu, 07 May 2026 10:42:01 GMT</pubDate>
            <atom:updated>2026-05-08T04:57:26.303Z</atom:updated>
            <content:encoded><![CDATA[<h4>Designing and handling complex interaction cycles in React</h4><p>Recently, I found some time to work on a pending project — <a href="https://repeat-after-me.net/welcome">Repeat After Me</a>. Having worked in <a href="https://en.wikipedia.org/wiki/Educational_technology">ed-tech</a> for a while, I was always on the lookout for the next coolest thing in that space, and with tailwinds in Voice AI, I couldn’t find a better time to work on this. But little did I know that I would be diving head-first into a technical rabbit-hole that is definitely up there in terms of difficult problems I’ve worked on.</p><p>The fundamental premise was that language learning happens best during “immersion” and there is lot of research backing it [1]. It is further enhanced with the presence of guided inputs [2]. This requires</p><ul><li>Friction-free interaction with a native speaker</li><li>Accompanying text in the learner’s preferred language</li><li>Abundant inputs from varying scenarios in the learned language</li></ul><p>The first two points are enabled in a fairly language-agnostic fashion with the advent of LLM-based Text-to-Speech (TTS) and Speech-to-Text (STT), with many products such as <a href="https://deepgram.com/">Deepgram</a>, <a href="https://elevenlabs.io/">ElevenLabs</a>, <a href="https://cartesia.ai/">Cartesia</a>, <a href="https://wisprflow.ai/">WisprFlow</a>, and even giants such as <a href="https://openai.com/index/whisper/">OpenAI</a> and <a href="https://blog.google/innovation-and-ai/models-and-research/gemini-models/gemini-3-1-flash-tts/">Google Gemini</a> actively competing in this space. The latter is done by utilizing various publicly available sources of knowledge in particular languages. This confluence ensured that the right experience could be created to learn languages easily and onboard new ones if required with ease.</p><h4>How the app works?</h4><p>Repeat After Me, as the name suggests, involves speaking to the app and repeating sentences that were recited by it. The user takes turns till a segment of a book is completed, and this is supported in a fairly language-agnostic fashion.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7VaMYq3rvZOXO7ah3zJ3Tg.png" /><figcaption>Figure 1: Main view of Repeat After Me application during the recitation of an English book</figcaption></figure><p>Classics from multiple languages such as English, Italian, German, Japanese and an ever-growing list, are available for reading along with. The current spelling and feedback regarding which words and syllables the user can improve on is provided at the end.</p><h4>How the app interacts?</h4><p>The interaction loop sounds simple: the app speaks a sentence, the learner repeats it, the app scores the attempt, and moves on. But underneath that loop is a precise choreography of async operations — a TTS engine, a live WebSocket to a speech-to-text service, a microphone stream, and a React state machine that must stay consistent across all of them. This article is about how that choreography works, and why every line earns its place.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oz4oGWM2eMsTKzKwEr9uww.png" /><figcaption>Figure 2: Interaction lifecycle of user with the Repeat After Me application</figcaption></figure><h3>Some terminology before we begin</h3><p><strong>Refs (</strong><strong>useRef)</strong>: In React, a ref is a mutable box that lives outside the render cycle. Changing a ref never triggers a re-render. This matters when you need a value to be readable <em>right now</em> inside an async callback, not the value React had when it last rendered. Think of refs as sticky notes attached to the component instance, readable from anywhere at any time.</p><p><strong>State (</strong><strong>useState)</strong>: State is what drives the UI. Changing it schedules a re-render. The tradeoff is that inside an async function, state.foo can be stale and it captures the value from when the function was created, not when it runs.</p><p><strong>Callbacks (</strong><strong>useCallback)</strong>: A memoized function that React only recreates when its listed dependencies change. Avoids recreating the same function on every render, which would break effects that depend on it.</p><p><strong>Effects (</strong><strong>useEffect)</strong>: Side-effect hooks that run after render. You specify dependencies; the effect re-runs when any of them changes. The returned function runs on cleanup.</p><p><strong>The flow token pattern</strong>: A monotonically-increasing integer stored in a ref. Before any async operation begins, it captures the current value. When the operation completes, it checks whether the global value still matches. If something else incremented the counter in the meantime — a skip, a stop, a new session — the completion handler silently discards its result. This is the core concurrency primitive in this codebase.</p><p><strong>Push-to-talk (PTT)</strong>: The user presses and holds a button (or the spacebar) to record speech, releases to submit. No automatic Voice Activity Detection (VAD — and I’ll vent about this later), no open microphone.</p><h3>The interaction cycle</h3><p>Each segment of a session follows the same five-step cycle:</p><ol><li><strong>TTS plays</strong> — speakText() is awaited; isPlaying is true</li><li><strong>Speaking phase begins</strong> — TTS finishes; isSpeakingPhase becomes true; UI prompts the user</li><li><strong>User presses PTT</strong> — handlePTTStart() fires; a fresh Deepgram WebSocket and mic stream open</li><li><strong>User releases PTT</strong> — handlePTTEnd() fires; recording stops; moveToNext() scores and advances</li><li><strong>Repeat</strong> — currentIndex increments; the effect fires playSegment for the next segment</li></ol><p>The session ends when moveToNext() finds no next segment and sets isFinished: true.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1ZdocnThr_B4H_m29KgEww.png" /><figcaption>Figure 3: Basic event life cycle in the Repeat After Me application</figcaption></figure><h3>The flow token: one ref to rule them all</h3><p>The most important single variable in the system is flowTokenRef. It&#39;s incremented at every point where something could go stale. Every async operation captures it on entry:</p><pre>const myFlowToken = flowTokenRef.current;<br>await speakText(segment.text, language, gender);<br>if (flowTokenRef.current === myFlowToken) {<br>  setIsPlaying(false);<br>  setIsSpeakingPhase(true);<br>}</pre><p>If the user skips mid-sentence, flowTokenRef.current increments. When speakText resolves, the check fails, and the speaking phase never opens. Without this, a slow TTS resolve on a skipped segment would silently flip isSpeakingPhase true on a segment the user has already moved past.</p><p>The same pattern governs the Deepgram hook via connectGenerationRef — a parallel counter that bumps on every connect() call. If a WebSocket opens late (slow network, retry), onOpen checks connectGeneration !== connectGenerationRef.current before assigning anything to connectionRef. A stale open is immediately finished and its promise rejected with a sentinel value (DEEPGRAM_CONNECT_SUPERSEDED) that callers catch and ensure there are no ghost sockets.</p><h3>Session start: Tackling the VAD restrictions</h3><p>Mobile browsers enforce a strict rule: microphone access and audio playback can only be initiated only from within a user gesture handler (whereas proprietary apps like Google Assistant and Siri can keep listening to support Voice Activity Detection — well played!).</p><p>The moment you await anything, be it a credit check or a network call, you&#39;ve left that window. Any mic or TTS call afterward will be silently blocked or throw a permission error.</p><p>handleStart solves this by front-loading both unlocks before any async work:</p><pre>// Still inside the synchronous gesture handler<br>if (window.speechSynthesis) {<br>  const dummy = new SpeechSynthesisUtterance(&#39;&#39;);<br>  window.speechSynthesis.speak(dummy);  // unlocks TTS<br>}<br>await requestPermission();              // acquires mic stream<br>// NOW it&#39;s safe to go async<br>await useCredit(cost);</pre><p>The empty SpeechSynthesisUtterance fires the TTS engine into an active state without producing any sound. requestPermission() calls getUserMedia and stores the resulting stream in streamRef.current. Both happen while the browser still trusts the gesture. Everything else — credit deduction, state reset — happens after.</p><h3>The Deepgram session lifecycle</h3><p>Now that we’ve come to accept that Push-To-Talk is the only way to implement this,useDeepgram is designed around one invariant: <strong>one isolated session per PTT press</strong>. Each press opens a fresh WebSocket and a fresh mic stream; each release tears both down completely. There is no socket reuse, no persistent connection sitting idle between presses. This eliminates an entire class of stale-state bugs on Android WebViews, where MediaRecorder instances frequently fail to recover after being paused.</p><p>startListening() is the entry point for each PTT segment:</p><ol><li>Bumps startListeningSeqRef and captures a sequence number</li><li>Stops any existing MediaRecorder and mic tracks</li><li>Calls finishLiveSocket() to close any lingering WebSocket</li><li>Calls connect() — fetches a Deepgram token, opens a new WebSocket, waits for onOpen</li><li>Calls getUserMedia() to open the mic</li><li>Creates a new MediaRecorder at 100ms chunk intervals</li><li>Each ondataavailable chunk is sent directly to the Deepgram socket</li></ol><p>At steps 4 and 5, the sequence number is checked against startListeningSeqRef.current. If anything incremented the counter — another PTT press, a skip, a stop — the in-flight work is aborted and cleaned up without surfacing an error.</p><p>stopListening() mirrors this: bumps the seq counter, stops the recorder, calls finishLiveSocket(), releases mic tracks. The order matters. Stopping the recorder before closing the socket ensures the last 100ms audio chunk is dispatched before the connection closes and you get scored for it.</p><h3>Scoring and advancing: moveToNext</h3><p>When PTT is released, handlePTTEnd runs:</p><pre>pttEngagedRef.current = false;<br>stopListening();<br>setTimeout(() =&gt; { moveToNext(); }, 500);</pre><p>moveToNext()is the skip/next (depending on the argument passed) path, where the boolean suppresses scoring and advances immediately. The 500ms delay exists to allow Deepgram’s final transcript packet to arrive and flush through React’s state updates.</p><p>After this, resetTranscript() clears the Deepgram transcript state. The index change triggers the useEffect that fires playSegment, and the cycle begins again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*GL-CHe7KAzV3oFN2UaqYpw.png" /><figcaption>Figure 4: Flow cycle with refs and state annotated inline along with proof table in bottom half showing variable, type and the effect of its removal</figcaption></figure><h3>The sanity test walkthrough</h3><p><strong>Skip</strong> — moveToNext(true) is called directly. It bumps flowTokenRef, calls stopListening() (which bumps startListeningSeqRef and finishes the socket) and stops TTS. Then it advances currentIndex. The new index triggers playSegment. Any in-flight TTS from the previous segment checks flowTokenRef.current === myFlowToken — it fails, nothing fires. Any in-flight Deepgram onOpen checks connectGeneration !== connectGenerationRef.current — it fails, the socket is immediately finished.</p><p><strong>Read → wait for input</strong> — playSegment awaits speakText. On completion, if flowTokenRef still matches, it sets isPlaying: false and isSpeakingPhase: true. The UI renders the PTT prompt. The keyboard/touch handlers become active because isSpeakingPhase &amp;&amp; !isPlaying. Nothing listens, nothing records until the user initiates. The app waits.</p><p><strong>PTT on desktop and mobile</strong> — handlePTTStart and handlePTTEnd call the same startListening / stopListening path. The keyboard handler (Space keydown/up) calls the same handlePTTStart / handlePTTEnd as the touch handler. No separate code path.</p><p><strong>Consecutive segments</strong> — each PTT press increments startListeningSeqRef and bumps connectGenerationRef. The previous segment&#39;s onOpen, ondataavailable, and onstop handlers all carry their respective seq/generation captures and self-abort if the numbers don&#39;t match.</p><p><strong>Last segment</strong> — handlePTTEnd fires exactly as for any other segment: stopListening(), 500ms delay, moveToNext(). Nothing special required.</p><h3>Why every line is load-bearing</h3><p>This codebase has minimal dead weight, as shown in Figure 4, where the effect of removal of any of the refs is shown alongside in the latter half. It might seem some patterns look redundant until you understand the failure mode they prevent. For example,</p><ul><li>DEEPGRAM_CONNECT_SUPERSEDED is a sentinel string rather than a custom Errorsubclass so it survives serialization across async boundaries and is trivially checkable with === .</li></ul><p>The final design is the result of eliminating every shortcut that introduced a race condition — the warmup socket, the reliance on async state for synchronous decisions, the single shared connection. What remains is a system where each PTT press is a fully isolated, self-cleaning unit, and every async operation carries enough context to know when it’s been superseded.</p><h3><em>References</em></h3><p>[1] Schmidt, R. W. (1990). The role of consciousness in second language learning. <em>Applied Linguistics</em>, 11(2), 129–158.</p><p>[2] Genesee, F., &amp; Jared, D. (2008). Literacy development in early French immersion programs. <em>Canadian Psychology/Psychologie canadienne</em>, 49(2), 140.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9dcb598a8962" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Token Thermodynamics]]></title>
            <link>https://gpavanb.medium.com/token-thermodynamics-483ea1bd4877?source=rss-98a3a42ba0d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/483ea1bd4877</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[sustainability]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[generative-ai]]></category>
            <category><![CDATA[environment]]></category>
            <dc:creator><![CDATA[Pavan B Govindaraju]]></dc:creator>
            <pubDate>Sun, 26 Apr 2026 09:22:25 GMT</pubDate>
            <atom:updated>2026-04-26T10:46:18.699Z</atom:updated>
            <content:encoded><![CDATA[<h4>Step-by-Step Analysis of Energy and Water Consumption in Modern LLM Inference</h4><p>This interactive tutorial goes over the derivation and comparison of various environmental metrics that are involved when you infer a token using an LLM.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qdrity8tpi35NcsIKIib2A.png" /></figure><p>Run this notebook interactively — [<a href="https://mybinder.org/v2/gist/gpavanb1/30a27c0592dbb23311f165dae4549309/HEAD?urlpath=voila%2Frender%2Ftoken_thermodynamics.ipynb">Link</a>]</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=483ea1bd4877" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Op-Ed: The Recruiter Toll Booth]]></title>
            <link>https://gpavanb.medium.com/op-ed-the-recruiter-toll-booth-600b7e69a765?source=rss-98a3a42ba0d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/600b7e69a765</guid>
            <category><![CDATA[absurdism]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[diversity]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[hiring]]></category>
            <dc:creator><![CDATA[Pavan B Govindaraju]]></dc:creator>
            <pubDate>Wed, 01 Apr 2026 04:31:16 GMT</pubDate>
            <atom:updated>2026-04-01T14:03:45.996Z</atom:updated>
            <content:encoded><![CDATA[<h4>Some absurdities about the hiring process in India</h4><p>This is a continuation of the “Absurdity” series. For the first part, read <a href="https://gpavanb.medium.com/op-ed-notes-on-an-absurd-market-41aa44fec0b0">here</a></p><p>Most toll booths in India work automatically now. Cameras, RFID tags, FASTag. The infrastructure exists to let vehicles through without stopping. Yet somehow, recruitment has built its own version of the toll booth, and unlike the highway version, this one stops every vehicle regardless. The resume is right there. The automated processing happened. But someone still needs to make the call at 2pm on a Tuesday.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pfL_5eipoZtlPzZ-gXQ28Q.png" /><figcaption>Manual Recruitment — Is it even a value-add in today’s world?</figcaption></figure><p>I had recruiter screens on the same day from two firms abroad and an Indian firm. The difference was stark enough to write about.</p><h4><strong>How many years of XGBoost?</strong></h4><p>Time spent equals competence, apparently. It doesn’t. Someone who scaled a product to a global user base in six months has learned more than someone who ran the same notebook for three years. The recruiter doesn’t ask about the product. They ask about the tool. Bucket assigned.</p><h4><strong>What is your current CTC?</strong></h4><p>Who decided your previous employer’s compensation decision is a valid anchor for the next one? Maybe you took a lower salary for equity. Maybe you worked for a non-profit and were underpaid. Surprisingly, having too high a previous CTC works the other way and it no longer serves as an anchor. Most of all, it has nothing to do with whether you can do the job.</p><p>This is middleman logic at full strength. Firms that do not rely on innovation treat engineers as cost centers, salaries are budgeted in rigid bands, and the recruiter’s job is to fit candidates into slots rather than find the right person. The question isn’t about your value. It’s about their spreadsheet.</p><h4><strong>Are you an immediate joiner?</strong></h4><p>The same industry enforcing 90-day notice periods wants candidates on the floor next week. Both sides of that sentence involve the same companies. Nobody notices the contradiction because nobody is accountable for the delay on either end.</p><h4><strong>Call at 2pm. Interview by 3?</strong></h4><p>We are in the middle of a working day. The assumption is that the candidate has infinite schedule flexibility and a manager who’ll keep looking the other way. There’s only so many dentist appointments you can fabricate before people start asking questions about your teeth.</p><h4><strong>The form that can’t parse a resume</strong></h4><p>In 2026, uploading a PDF and watching an application form mangle your job titles, flatten your dates, and hallucinate your skills into the wrong fields is a statement about how much the company respects your time. <a href="https://www.greenhouse.com/">Greenhouse</a> exists. <a href="https://www.lever.co/">Lever</a> exists. This is a solved problem. Choosing not to solve it is a choice.</p><h4><strong>Ghost jobs</strong></h4><p>The role was never real. Headcount was frozen, or internally earmarked, or someone wanted to build a pipeline. You tailored your CV, cleared your afternoon, did the screen. The posting stays live for three more months. Nobody tracks this cost because the cost lands entirely on the candidate whereas companies walk away with tax breaks or approved immigration paperwork.</p><h4><strong>Everyone wants to be a middleman</strong></h4><p>The third-party recruiter ecosystem in India is enormous because placement fees are lucrative and accountability is nonexistent. You sit between company and candidate, collect the fee, move on. Missing a great resume has absolutely no consequences for the recruiter. The cost is invisible because the person paying it never got in the room.</p><h4><strong>Copy-paste JDs</strong></h4><p>The job description is a recycled template with three years of experience required for tools released two years ago. Responsibilities section lists everything the previous three people in the role ever touched. The actual work is unspecified. Two rounds in, you find out the role is something else entirely.</p><h4><strong>Referrals only</strong></h4><p>Closed loops produce monocultures. That’s not just a diversity problem. It’s a quality problem. Some industries have a name for ecosystems where access is gated entirely by who you know and who owes you a favour. The film industry comes to mind and it’s got a nice name for it!</p><h4><strong>No publications? No problem</strong></h4><p>Almost no R&amp;D culture exists at most Indian tech firms, which means there’s no framework for valuing research output. A candidate with published work, open source contributions at scale and conference presentations goes through the same keyword filter as everyone else. The recruiter isn’t equipped to tell the difference, and in most cases the hiring company isn’t either.</p><h4><strong>Just send the hiring manager</strong></h4><p>For senior roles especially, the recruiter screen is a toll booth in front of a toll booth. The hiring manager is the only person who can evaluate the candidate at that level. Skipping the intermediate step isn’t radical. It’s just more honest about what the conversation actually requires. Also, isn’t hiring the most important thing, especially in the context of early-stage firms? Do you really want to delegate something that makes or breaks your company?</p><p>Here’s the thing though. Is any of this really the recruiter’s fault?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qOj-rxvXLt__eEcAx55ALQ.png" /><figcaption>Recruiters are just “doing their job” to the “best of their abilities”</figcaption></figure><p>The behavior looks irrational from the outside but is completely rational given the incentives they’re operating under.</p><p>India has an absurd candidate-to-opening ratio. When a post draws ten thousand applications within hours, the recruiter’s job becomes triage, not evaluation. At that volume, any heuristic however crude becomes defensible. Missing a great candidate has no consequences because nobody ever finds out. Hiring a bad one does. The asymmetry pushes everyone toward defensive, conservative filtering. All of it is loss-minimization, not optimization.</p><p>Most of them were never trained on the domain either. A recruiter handling ML roles at a services firm was probably doing the same job for BFSI roles six months ago. They’re pattern-matching on words they’ve been told to look for. It isn’t stupidity. It’s the predictable output of being handed a JD and a placement target without any context for what the work actually involves.</p><p>The third-party structure makes it worse. When a placement agency fills a role, they collect the fee and disappear. Quality of hire over six months is someone else’s problem. The incentive is throughput, not fit.</p><p>And then there’s something more structural. The education system, the services firm culture, the rote interview prep industry, all of it selects for people who are good at following a defined process. A recruiter who goes off-script to actually evaluate an unconventional candidate is taking a personal risk with no upside. The system never rewarded that move, so nobody makes it.</p><p>So the recruiter checking years of XGBoost, anchoring on CTC, calling at 2pm expecting an immediate slot, is not acting irrationally. They’re acting exactly as the system designed them to.</p><blockquote>The booth operator didn’t build the toll booth. They just showed up for their shift.</blockquote><p>The real question is who keeps building toll booths on automated highways and calls it hiring!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=600b7e69a765" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Op-Ed: Notes on an Absurd Market]]></title>
            <link>https://gpavanb.medium.com/op-ed-notes-on-an-absurd-market-41aa44fec0b0?source=rss-98a3a42ba0d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/41aa44fec0b0</guid>
            <category><![CDATA[institutions]]></category>
            <category><![CDATA[free-market-capitalism]]></category>
            <category><![CDATA[capitalism]]></category>
            <category><![CDATA[planning]]></category>
            <category><![CDATA[absurdism]]></category>
            <dc:creator><![CDATA[Pavan B Govindaraju]]></dc:creator>
            <pubDate>Sun, 29 Mar 2026 11:22:02 GMT</pubDate>
            <atom:updated>2026-03-29T11:22:02.054Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>How a nation of institution-builders learned to stand in line</em></h4><p>Camus said the absurd is born from the confrontation between human need for clarity and the world’s unreasonable silence. He was talking about existence. In my case, he was talking about some of the mind-boggling outcomes that I observe everyday in India.</p><p>The absurdity isn’t noise. It isn’t poverty or corruption or the traffic. Those are problems. Absurdity is something quieter and it’s when a system runs perfectly, rewards people correctly, but still produces outcomes that make no sense. When the metrics are working and the market is broken.</p><p>India has built one of those.</p><h4><strong>The Implicit Choice</strong></h4><p>There’s a particular decision that a few million Indian families make every year without quite making it.</p><p>A child is born. Bright. The parents want the best for them. Without much discussion, the path reveals itself: study hard, write JEE, do CS, get placed, target an MNC, maybe a visa. Each step follows naturally from the last. No one sat down and said <em>this is the plan</em>. The plan assembled itself, passed from neighbors to relatives to coaching centers like folklore.</p><p>This is the implicit choice. It isn’t made, it’s inherited.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CK_XDZ-QYzS3wWkjPQzzsw.png" /></figure><p>Follow the chain to its end and you find that the default life trajectory for a bright Indian teenager is a life whose coordinates were set in Cupertino. The destination is someone else’s economy. The choice was made before they were born. They’re just executing it.</p><p>It arises from a locally optimal heuristic, with many families having little to no financial runway and forced to choose a risk-averse career path that has immediate rewards from a handful of doors that are open to them.</p><h4><strong>Hired for Compliance, Not Competence</strong></h4><p>This led to a situation where India became reliant on a services economy that swallowed a generation of Indian engineers, which doesn’t hire for competence. It hires for <em>compliance</em> — the ability to receive a spec, execute it cleanly, communicate across timezones, not push back too hard.</p><p>These are genuinely valuable skills. They are also the skills of an operator, not a builder.</p><p>There’s no moral failure in being an operator. Operators make the world run. The problem is structural: when an entire country’s talent pipeline is routed toward operating someone else’s infrastructure, you have to ask who is learning to set the vision rather than receive it. Who is developing the instinct for institutional design or the thing that trains the next generation, accumulates knowledge, outlasts the founder?</p><p>The answer is: not many. And the ones who could are, increasingly, being paid not to.</p><h4><strong>Paid to Be Clipped</strong></h4><p>Here is the strange economics of it. A person capable of building an original institution, that is, of asking what should exist rather than how to build what’s been asked for, is placed inside a delivery chain optimizing someone else’s roadmap. Their capability is real. The system simply doesn’t need it, so it caps it.</p><p>And it pays well. That’s the mechanism. The golden handcuffs are the point. The difference in purchasing power makes this even more lucrative.</p><p>The bright engineer in Bengaluru working on infra for a US fintech is not failing. By every visible metric they’re succeeding, relative to their parents, their peers, their college batch. The reward signal is unambiguous. The cost is invisible, because the cost is <em>what they never became</em>, and you cannot put that on a resume.</p><p>A country that routes its sharpest minds into execution isn’t building compounding intellectual capital. It’s liquidating it, quarterly, at a good rate.</p><h4><strong>The Institution Problem</strong></h4><p>Markets are set by whoever defines the metrics. In a healthy domestic market, those metrics emerge from local needs, for example, what problems exist here, what institutions are trusted, what gets built and why. In India’s case, for the most part, the metrics were imported.</p><p>This matters because</p><blockquote>Trust in institutions is the substrate everything else runs on.</blockquote><p>In functioning economies, institutions are imperfect but <em>load-bearing</em>, that is, they hold accumulated knowledge, protect reputations across generations, create incentives that outlast individual actors.</p><p>India’s institutions are largely navigated around. Not used but circumvented. The smart move is usually the informal channel, the right contact, the exception. This is not cynicism. It is rational behavior in a system where formal processes are frequently theater.</p><p>But the feedback loop is vicious: smart people route around the institution, so the institution never improves, so smart people never trust it, so they keep routing around it. The people who could fix this are busy optimizing their visa applications. And so the institution atrophies, and the workarounds calcify into culture.</p><p>What remains of institution-builders locally? They exist, in scattered research labs, in a few startups genuinely solving Indian problems rather than localizing a foreign playbook. But they are not the default. And they are not globally competing either. They are operating in a kind of comfortable delusion, insulated enough from the global market to not feel the pressure, not insulated enough to build something that lasts.</p><h4><strong>The Queue as Market Equilibrium</strong></h4><p>And so we arrive at “the queue”, which is not a failure of manners but a market equilibrium.</p><p>Opportunities, when they exist, are rationed. Not maliciously but structurally. A billion-plus people competing for a pipeline whose width was determined overseas. The number of Google offers, visa slots, seats at the table. Fixed supply. Massive demand. A market where the price-setter is not domestic.</p><p>In that environment, pushing to the front is not rudeness. It is the <em>correct local strategy</em>. Strictly rational. If you don’t push, someone else does. The consequences of falling behind are severe and compounding.</p><p>So people push. And the pushers get ahead. And then we reward the pushers — the hustlers, the ones who knew someone, the ones who moved fastest. When opportunities are scarce and it’s hook or crook, we know which way the balance tilts. And then the culture learns that pushing is the skill. Not building, not thinking, not creating. Pushing.</p><p>The culture internalizes what the incentive structure rewards. Always!</p><p>This is what makes it a market problem and not a character problem. People are not short-sighted or selfish in any special Indian way. They are responding correctly to the signals. The signals are just pointed at someone else’s destination.</p><h4><strong>The Comfortable Delusion</strong></h4><p>There is a particular self-satisfaction in the Indian professional class, in the sense that the diaspora proves the thesis. Indians run tech companies. Indians are in every elite institution. Clearly, we’re competitive.</p><p>However, the diaspora CEO is not evidence that India has latent ability for institution-building. He or she is evidence that India exports excellent raw material that other systems know how to keep compliant and refine. The value-add happened elsewhere. The compounding happens elsewhere.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/272/0*YzRDbSb-0zkNDZH2" /><figcaption>Albert Camus (and the reader hopefully) coming to terms with absurdity</figcaption></figure><p>Conflating the two is comfortable. It allows the implicit choices to remain unexamined, the queue to remain the sensible place to stand, the compliance to remain well-compensated. And to quote Camus again:</p><blockquote>The truly absurd man is not the one who kills himself to escape the absurd, but the one who <em>acknowledges</em> it and keeps living anyway, with full lucidity.</blockquote><p>The tragedy of the queue is not that people stand in it. The tragedy is the ones who know exactly what it is, see where it leads, and stand in it anyway, because the “math checks out”.</p><h4><strong>The Other Version</strong></h4><p>There is a version of this country that builds its own things. That has enough institutional density to absorb its talent rather than export it. That rewards the builder more than the pusher. It has the foresight from the planning level to ensure financial, infrastructural and even moral support is readily available for the builders rather than gathering those on their own like in the present day.</p><p>That version exists. In pockets. But it is not the default.</p><p>The default is the queue. And as long as the queue is the most rational place to stand, that’s where everyone will stand — heads down, moving forward, optimizing perfectly for a destination that was never theirs to choose.</p><p>The absurdity isn’t that people are irrational.</p><p>The absurdity is that they’re perfectly rational, inside a market pointed the wrong way!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=41aa44fec0b0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Software Engineering Lessons — 2026]]></title>
            <link>https://gpavanb.medium.com/software-engineering-lessons-2026-1005f70819f8?source=rss-98a3a42ba0d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/1005f70819f8</guid>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[software-architecture]]></category>
            <dc:creator><![CDATA[Pavan B Govindaraju]]></dc:creator>
            <pubDate>Thu, 26 Feb 2026 13:39:48 GMT</pubDate>
            <atom:updated>2026-02-26T14:12:45.608Z</atom:updated>
            <content:encoded><![CDATA[<h4>Being a good architect is all about not exhausting your tokens</h4><p>If you’ve been following my blog, I wrote a similar <a href="https://gpavanb.medium.com/backend-engineering-lessons-2021-a5eadb96726d">article</a> around 5 years ago and thought of doing a retrospective on those lines, especially given how much building systems have changed over the years.</p><p>This is akin to updating your B-school case studies to match the current market, and I have summarised below my key takeaways, hoping they will play a role in eventual architectural decisions, either for me or anyone else.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Z6kWg9rJpwtCqvuA" /><figcaption>Notes to Self — Fresh Page (Photo by <a href="https://unsplash.com/@pilipeichenko?utm_source=medium&amp;utm_medium=referral">Iuliia Pilipeichenko</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a>)</figcaption></figure><p>The last article was centred mostly on backend engineering, as that is what I was used to. The current version covers end-to-end, now that I have become comfortable with owning the entire stack over the years.</p><p>Also, more importantly, I want to highlight the subtitle, which moved on from making life suck less later, as architectural mistakes are now more forgiving. Code rewrites, which were once thought to be a death knell to organisations (see Joel Spolsky’s <a href="https://www.joelonsoftware.com/2000/04/06/things-you-should-never-do-part-i/">article on Mozilla</a>), are now being done to a good extent, although not fully (<a href="https://www.wsj.com/articles/how-morgan-stanley-tackled-one-of-codings-toughest-problems-4f465959">Morgan Stanley’s modernisation efforts</a> are a good example), using LLMs.</p><p>But what now becomes an important constraint is cost. Amazon’s CTO was prescient in centring his design principles around cost (see <a href="https://thefrugalarchitect.com/laws/">The Frugal Architect</a>). Yes, tokens are sometimes given as freebies by cloud providers, but the bill is due once the offer expires. Having the most bang for the buck is very much true in the world of ever-changing language models<strong>.</strong></p><p>The following is a list that I hope would benefit others just as much as it did for me:</p><p><strong>1. What’s My Setup?</strong> <a href="https://cursor.com/">Cursor</a> does the job — I still like seeing the code, stepping in when needed, and doing a quick review on the spot. Rules files, linters, .gitignore setups, and now things like <a href="https://cursor.com/docs/context/skills">Skills</a> all layer on top to make your prompting sharper and less repetitive. Less explaining yourself every session, more building.</p><p><strong>2. Type-Safety</strong> — Non-negotiable, especially when an LLM is churning out code at volume. TypeScript is my default, as it is full-stack, fast, and with extensive support from the community. Python shop? Fine, but reach for <a href="https://docs.pydantic.dev/latest/">Pydantic</a>. Don’t skip this.</p><p><strong>3. Code Review and Documentation</strong> — Bot-based review is table stakes now — tools like <a href="https://developers.google.com/gemini-code-assist/docs/review-github-code">Gemini Code Assist</a> and <a href="https://cursor.com/bugbot">Cursor Bugbot</a> catch what tired eyes miss. Some teams also set up Slack integrations so that a quick fix at midnight doesn’t require spinning up the full dev environment.</p><p><strong>4. Buy These, Don’t Build</strong> — Authentication is one of those things that looks simple until it absolutely isn’t. <a href="https://www.descope.com/">Descope</a> handles multiple auth methods, uses flow diagrams for customisation, and deploys instantly. This is not the hill to die on — buy it, move on, and spend your energy on what actually differentiates your product.</p><p><strong>5. Environments</strong> — Your dev environment should mirror production as closely as possible, but this separation is important as teams build at breakneck speeds. If your app touches large datasets, write impersonation scripts so you can test with representative data without waiting on a full pipeline run every time.</p><p><strong>6. Agentic Loops</strong> — The big question here is whether you roll your own or lean on a framework like <a href="https://www.langchain.com/langgraph">LangGraph</a> or <a href="https://www.crewai.com/">CrewAI</a>. Frameworks get you moving fast, but can feel like a cage when your use case gets specific. Starting from scratch gives control, but you’ll reinvent wheels. Know what you’re optimising for before you decide. I would say <a href="https://n8n.io/">n8n</a> and CrewAI are the most out-of-the-box, with the former being interactive. LangGraph gives you some flexibility, but I hope that you don’t hit yourself while using it.</p><p><strong>7. Tool Calls</strong> — This is where your agent meets the real world — APIs, databases, file systems, whatever. Define your tool schemas carefully and treat them like a contract. Sloppy tool definitions are the fastest route to unpredictable agent behaviour. Keep them focused and composable. Principles like ‘Separation of Concerns’ are very much valid here and allow prompts to easily identify which tools to utilise.</p><p><strong>8. RAG-Based Retrieval</strong> — Chunking, embedding, retrieval — there’s no one-size-fits-all here. The right approach depends on your dataset and your application’s needs, and what works today might not work once your data grows. More importantly, none of it matters if you’re not evaluating it, which brings us to the next point.</p><p><strong>9. Evals, Evals, Evals</strong> — This is genuinely what separates serious teams from everyone else. If you can’t measure how your stack is performing end-to-end, it will drift — silently, painfully. Platforms like <a href="https://www.braintrust.dev/">Braintrust</a> make it easier to run experiments and track regressions. Build your eval suite early and treat it as a first-class citizen.</p><p><strong>10. LLM Observability</strong> — You will switch models. Probably more often than you expect, as the landscape keeps shifting. Cloud-native observability is a start, but you’ll want something that spans providers, allows tracking token usage, latency, guardrail hits, and system prompt behaviour per task. This is again a situation where I would recommend using an existing service, as there are too many details and it is an evolving landscape. <a href="https://langfuse.com/">Langfuse</a> is emerging as a key player, although there are <a href="https://www.braintrust.dev/articles/langfuse-alternatives-2026">other alternatives</a>.</p><p><strong>11. Front-End Mistakes</strong> — Avoid inline styling — it becomes a nightmare at scale, and LLMs will happily generate it all day if you let them. Keep your component structure clean, and don’t underestimate state management. Start with React Context, but if you’re hitting performance walls or your state is getting complex, don’t be stubborn about reaching for <a href="https://redux.js.org/">Redux</a> or <a href="https://mobx.js.org/">MobX</a>, as code verbosity is no longer an excuse (This is React-flavoured advice, but the principle holds broadly).</p><p><strong>12. IaC-Based Deployment</strong> — <a href="https://developer.hashicorp.com/terraform">Terraform</a> is what most prefer, but what’s important is that it is leveraged consistently. Reproducibility alone is worth it, but you also get easier rollbacks, cleaner secret management, and no more “only Dave knows how this was set up.” There’s really no excuse not to do this in 2026.</p><p><strong>13. Obsess About the Network</strong> — This is the one layer that still bites you if you don’t think it through carefully upfront. Firewall rules, bastion hosts, private subnets, availability across zones — plan this out, sketch it with an LLM if it helps, and iterate. IaC makes the implementation clean, but the design still needs deliberate thought.</p><p><strong>14. Testing and Sanity Checks</strong> — Unit tests are necessary but not sufficient for agentic applications. You need periodic end-to-end sanity checks running in production, and platforms like <a href="https://www.checklyhq.com/">Checkly</a> are great for this. Make test suites mandatory at the branch merge level.</p><p><strong>15. How to Manage Going Forward?</strong> Teams are leaner, and a purely process-oriented manager is a hard sell in this environment. The people who’ll thrive are what I’d call <em>Agent Commanders — </em>folks who can handle stakeholders, translate fuzzy requirements into something actionable, and direct AI agents with the same clarity they’d direct a junior engineer. Soft skills are a bit more nuanced, which now involves talking to agents too, and in fact, are more leveraged.</p><p>(Opinions in this post are personal only)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1005f70819f8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[You’ve Made a Mesh]]></title>
            <link>https://gpavanb.medium.com/youve-made-a-mesh-e086e2d91a83?source=rss-98a3a42ba0d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/e086e2d91a83</guid>
            <category><![CDATA[generative-art]]></category>
            <category><![CDATA[art]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[finite-element-method]]></category>
            <dc:creator><![CDATA[Pavan B Govindaraju]]></dc:creator>
            <pubDate>Sat, 14 Feb 2026 10:43:47 GMT</pubDate>
            <atom:updated>2026-02-14T10:43:47.372Z</atom:updated>
            <content:encoded><![CDATA[<h4>Generative Art Created on Integration with Visualisation Tools</h4><p>For some reason, art class was never my favourite in school, perhaps because it was reduced to carefully tracing things rather than being creative. Building products also requires that mindset, although it is more artisanal than artistic. I was writing a custom <a href="https://en.wikipedia.org/wiki/VTK">VTK</a> output recently for <a href="https://splitfxm.com/">SplitFXM</a> and accidentally made a drawing that appealed to my aesthetics, and hoping it will for you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/572/1*gO54DiN0C37wxl06Y9HlBA.png" /><figcaption>Figure 1 — Initial work of art accidentally generated in ParaView</figcaption></figure><p>I really wanted to get to the bottom of how it was being generated. I had a vague idea that I was using a particular <a href="https://enterfea.com/what-are-the-types-of-elements-used-in-fea/">element type</a> for the solver and that the indices were out of order with the rendering tool’s (<a href="https://www.paraview.org/">ParaView</a>) expectations. The first step was to understand the basic repeating structure.</p><h4>Sudden Burst of Motif-ation</h4><p>Many works of art have recurring visual elements that repeat to create rhythm. These are <em>motifs </em>and occur everywhere — architecture, textiles, sculptures and even in the art piece above.</p><p>The first step to understanding the generation was to look at the fundamental unit — the motif</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*ujhqpyGxqZTMVk1gY4dINA.png" /><figcaption>Figure 2— Motif for Fig. 1 showing two nine-sided, mirrored figures</figcaption></figure><p>The repeating component was these two nine-sided figures, one mirrored with respect to the other, that were being tiled across a rectangular domain.</p><h4>Generative Approach</h4><p>Once this was deciphered, I realised I could generate many more intricate patterns by choosing a different permutation for mapping.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/562/1*2yD5Y8p13fIBBhhvrRKraw.png" /><figcaption>Figure 3 — Another art piece generated using motif-based approach</figcaption></figure><pre>import matplotlib.pyplot as plt<br><br>def plot_dg_scramble():<br>    fig, ax = plt.subplots(figsize=(8, 8))<br>    <br>    # 1. Define the 4 DG Elements with their offsets<br>    # E0: Top-Left, E1: Top-Right, E2: Bottom-Left, E3: Bottom-Right<br>    offsets = [(0, 4), (4, 4), (0, 0), (4, 0)]<br>    colors = [&#39;#3498db&#39;, &#39;#e74c3c&#39;, &#39;#2ecc71&#39;, &#39;#f1c40f&#39;] # B, R, G, Y<br><br>    # 2. Your specific nodal mapping for each 3x3 block<br>    # Based on: 3 4 2 (top) / 5 8 7 (mid) / 0 6 1 (bot)<br>    # Maps internal node index (0-8) to local (x, y) coordinates<br>    local_map = {<br>        0: (0,0), 6: (2,0), 1: (4,0),  # Bottom row<br>        5: (0,2), 8: (2,2), 7: (4,2),  # Middle row<br>        3: (0,4), 4: (2,4), 2: (4,4)   # Top row<br>    }<br><br>    # 3. ParaView&#39;s standard traversal order for a P2 Quad boundary:<br>    # Corner0 -&gt; Mid4 -&gt; Corner1 -&gt; Mid5 -&gt; Corner2 -&gt; Mid6 -&gt; Corner3 -&gt; Mid7 -&gt; Corner0<br>    # Crucially, ParaView looks for Mid-Nodes at indices 4, 5, 6, 7.<br>    vtk_traversal = [0, 4, 1, 5, 2, 6, 3, 7, 0]<br><br>    for i, (ox, oy) in enumerate(offsets):<br>        x_pts, y_pts = [], []<br>        <br>        for node_idx in vtk_traversal:<br>            lx, ly = local_map[node_idx]<br>            x_pts.append(lx + ox)<br>            y_pts.append(ly + oy)<br>            <br>        # Draw the &quot;spiked&quot; element<br>        ax.fill(x_pts, y_pts, color=colors[i], alpha=0.3, edgecolor=&#39;black&#39;, lw=1)<br>        # Add labels for the junction points you mentioned (1, 9, 20, 30)<br>        center_x, center_y = ox + 2, oy + 2<br>        ax.text(center_x, center_y, f&quot;E{i}&quot;, ha=&#39;center&#39;, fontsize=10)<br><br>    # Annotate the common points from your grid (The Junction at 4,4)<br>    ax.annotate(&quot;Junction (1/9/20/30)&quot;, xy=(4, 4), xytext=(5, 5),<br>                arrowprops=dict(facecolor=&#39;black&#39;, shrink=0.05, width=1))<br><br>    # Formatting<br>    ax.set_xlim(-1, 9)<br>    ax.set_ylim(-1, 9)<br>    ax.set_aspect(&#39;equal&#39;)<br>    ax.grid(True, linestyle=&#39;:&#39;, alpha=0.5)<br>    ax.set_title(&quot;Reconstructed DG P2 Multi-Permutation Error&quot;)<br>    plt.show()<br><br>plot_dg_scramble()</pre><p>The script shows how having a different order for storage and traversal can create intricate-looking patterns, especially when tiled across the domain. Figure 3 takes a simple P2 Quadrilateral element, but does the vertex traversal/joining in a different order.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/190/1*S4Ij-_gfD3mWlv9UFZTJqQ.png" /><figcaption>Figure 4 — Typical P2 element</figcaption></figure><p>Vertices being shared across blocks can also be permuted multiple times, and those lead to even more complicated patterns. You can get even more creative and do row/column stride mix-ups to generate other patterns.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/427/1*-Jd07k90QWviWNcV-4KZVQ.png" /><figcaption>Figure 5 — Art piece generated using motifs with row/column stride interchange and overlapped blocks</figcaption></figure><p>The script for Figure 5 is provided below. One can see in the comments that we use 5x5 grids to highlight the effect of overlapped blocks. In addition, interchanging the row/column stride gives quite complicated patterns.</p><pre>import numpy as np<br><br>def generate_decagon_artifact(filename=&quot;decagon_scramble.vtk&quot;):<br>    # 1. Create a 5x5 grid of physical points (for a 2x2 mesh of P2 Quads)<br>    # A P2 Quad needs 3x3 nodes. A 2x2 grid of them shares nodes to form 5x5.<br>    dim = 5<br>    x = np.linspace(0, 4, dim)<br>    y = np.linspace(0, 4, dim)<br>    <br>    # We create the points in standard Row-Major order<br>    xv, yv = np.meshgrid(x, y)<br>    points = np.stack([xv.ravel(), yv.ravel(), np.zeros_like(xv).ravel()], axis=1)<br><br>    # 2. Define the Scramble<br>    # Instead of mapping nodes correctly to their spatial neighbors,<br>    # we simulate a &#39;Stride Error&#39; where the index jumps by columns instead of rows.<br>    <br>    def get_scrambled_quad(offset_row, offset_col):<br>        # A 3x3 local block of nodes for a P2 Quad<br>        # We simulate a &quot;Transposed Read&quot; error<br>        indices = []<br>        for i in range(3):<br>            for j in range(3):<br>                # INTENTIONAL ERROR: swapping row/col index logic<br>                # This causes the &#39;diagonal mirroring&#39; effect in your image<br>                idx = (offset_col + j) * dim + (offset_row + i)<br>                indices.append(idx)<br>        return indices<br><br>    # Create 4 Quads (2x2 grid)<br>    # Each quad needs 9 nodes. VTK_QUADRATIC_QUAD = Type 23<br>    cells = [<br>        [9] + get_scrambled_quad(0, 0),<br>        [9] + get_scrambled_quad(0, 2),<br>        [9] + get_scrambled_quad(2, 0),<br>        [9] + get_scrambled_quad(2, 2)<br>    ]<br><br>    # 3. Write VTK File<br>    with open(filename, &quot;w&quot;) as f:<br>        f.write(&quot;# vtk DataFile Version 3.0\n&quot;)<br>        f.write(&quot;Decagon Artifact Simulation\n&quot;)<br>        f.write(&quot;ASCII\n&quot;)<br>        f.write(&quot;DATASET UNSTRUCTURED_GRID\n&quot;)<br>        <br>        f.write(f&quot;POINTS {len(points)} float\n&quot;)<br>        for p in points:<br>            f.write(f&quot;{p[0]} {p[1]} {p[2]}\n&quot;)<br>            <br>        total_ints = sum(len(c) for c in cells)<br>        f.write(f&quot;\nCELLS {len(cells)} {total_ints}\n&quot;)<br>        for c in cells:<br>            f.write(&quot; &quot;.join(map(str, c)) + &quot;\n&quot;)<br>            <br>        f.write(f&quot;\nCELL_TYPES {len(cells)}\n&quot;)<br>        for _ in cells:<br>            f.write(&quot;23\n&quot;) # 23 is VTK_QUADRATIC_QUAD<br><br>    print(f&quot;Success! Open &#39;{filename}&#39; in ParaView to see the decagons.&quot;)<br><br>if __name__ == &quot;__main__&quot;:<br>    generate_decagon_artifact()</pre><p>The third kind of error is when you provide the wrong control points for the reconstruction. ParaView uses parametric curves based on the points provided and the element to be made.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/163/1*9mIx8gHjyjcOjCvmYvMKgQ.png" /><figcaption>Figure 6— P2 element written out using row-major ordering</figcaption></figure><p>So, in a situation where a simple quadrilateral is expected, if you write the vertices in row-major order, as in Figure 6, you can get some interesting-looking figures.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/517/1*TWjovYoJLS9Foz4aEEToPQ.png" /><figcaption>Figure 7— Art piece generated using motif-based approach with row-major ordering mix-up</figcaption></figure><p>We can see that Figure 7 produces what looks like the <a href="https://chromedino.com/">Chrome Dino</a> to the artistic eye. And this was generated using the P2 elements written out in row-major ordering instead of what ParaView actually expects for such types.</p><p>Of course, the sky is the limit when it comes to what can be generated. I haven’t tried changing the block sizes, the element types and doing permutations of the kinds of mix-ups discussed. But I would leave it to the reader to figure out the exact mix-ups that happened to generate Figure 1 ;)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e086e2d91a83" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>