<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Notes on Prateek Sharma</title>
		<link>https://prateeksharma.me/notes/</link>
		<description>Recent content in Notes on Prateek Sharma</description>
		<generator>Hugo</generator>
		<language>en-us</language>
		
		
		
		
			<lastBuildDate>Mon, 31 Aug 2026 00:00:00 +0000</lastBuildDate>
		
			<atom:link href="https://prateeksharma.me/notes/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Whisper&#39;s turbo model beat large on noisy audio, in practice</title>
				<link>https://prateeksharma.me/notes/whisper-turbo-vs-large-on-noisy-audio/</link>
				<pubDate>Mon, 31 Aug 2026 00:00:00 +0000</pubDate>
				<guid>https://prateeksharma.me/notes/whisper-turbo-vs-large-on-noisy-audio/</guid>
				<description>&lt;p&gt;Building the &lt;a href=&#34;https://prateeksharma.me/projects/video-translator/&#34;&gt;Video Translator&lt;/a&gt;&#xA;, the assumption&#xA;going in was that OpenAI Whisper&amp;rsquo;s larger model would transcribe more&#xA;accurately. In practice, on clips with loud background music, the &lt;code&gt;turbo&lt;/code&gt; model&#xA;did noticeably better than &lt;code&gt;large&lt;/code&gt; — it seems to tolerate messy audio better&#xA;rather than just being a faster, lower-quality option. Separating vocals from&#xA;background music first (with demucs) didn&amp;rsquo;t help as much as expected either;&#xA;Whisper handled the mixed track better on its own. Worth trying &lt;code&gt;turbo&lt;/code&gt; first&#xA;rather than assuming bigger is more accurate.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Composite index column order should match the query, not the schema</title>
				<link>https://prateeksharma.me/notes/index-column-order-should-match-the-filter/</link>
				<pubDate>Sun, 30 Aug 2026 00:00:00 +0000</pubDate>
				<guid>https://prateeksharma.me/notes/index-column-order-should-match-the-filter/</guid>
				<description>&lt;p&gt;In the &lt;a href=&#34;https://prateeksharma.me/projects/tts-study-assistant/&#34;&gt;TTS Study Assistant&lt;/a&gt;&#xA; notes table, queries&#xA;filter by &lt;code&gt;user_id&lt;/code&gt; always and &lt;code&gt;domain&lt;/code&gt; often, so the index is declared in that&#xA;order:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e6edf3;background-color:#0d1117;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#ff7b72&#34;&gt;CREATE&lt;/span&gt;&lt;span style=&#34;color:#6e7681&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#ff7b72&#34;&gt;INDEX&lt;/span&gt;&lt;span style=&#34;color:#6e7681&#34;&gt; &lt;/span&gt;idx_uid_did&lt;span style=&#34;color:#6e7681&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#ff7b72&#34;&gt;ON&lt;/span&gt;&lt;span style=&#34;color:#6e7681&#34;&gt; &lt;/span&gt;notes(user_id,&lt;span style=&#34;color:#6e7681&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#ff7b72&#34;&gt;domain&lt;/span&gt;);&lt;span style=&#34;color:#6e7681&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;A composite index is only fully useful as a left-prefix: this index serves&#xA;&lt;code&gt;WHERE user_id = ?&lt;/code&gt; and &lt;code&gt;WHERE user_id = ? AND domain = ?&lt;/code&gt;, but not&#xA;&lt;code&gt;WHERE domain = ?&lt;/code&gt; alone. The rule of thumb is to order columns by how the&#xA;queries actually filter — most selective / most-always-present first — not by&#xA;declaration order in the table, and not alphabetically.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Daemon threads for WebSocket keepalives</title>
				<link>https://prateeksharma.me/notes/daemon-threads-for-websocket-keepalives/</link>
				<pubDate>Sat, 29 Aug 2026 00:00:00 +0000</pubDate>
				<guid>https://prateeksharma.me/notes/daemon-threads-for-websocket-keepalives/</guid>
				<description>&lt;p&gt;A WebSocket connection that needs periodic pings to stay open shouldn&amp;rsquo;t run that&#xA;ping loop on a plain, non-daemon thread. In the&#xA;&lt;a href=&#34;https://prateeksharma.me/projects/wazirx-connector-java/&#34;&gt;WazirX Java connector&lt;/a&gt;&#xA;, the ping thread is&#xA;started &lt;code&gt;onOpen&lt;/code&gt; and marked &lt;code&gt;setDaemon(true)&lt;/code&gt; before starting it:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e6edf3;background-color:#0d1117;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;pingThread&lt;span style=&#34;color:#6e7681&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#ff7b72;font-weight:bold&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#6e7681&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#ff7b72&#34;&gt;new&lt;/span&gt;&lt;span style=&#34;color:#6e7681&#34;&gt; &lt;/span&gt;Thread(&lt;span style=&#34;color:#ff7b72&#34;&gt;new&lt;/span&gt;&lt;span style=&#34;color:#6e7681&#34;&gt; &lt;/span&gt;PingMessage(&lt;span style=&#34;color:#ff7b72&#34;&gt;this&lt;/span&gt;));&lt;span style=&#34;color:#6e7681&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;pingThread.setDaemon(&lt;span style=&#34;color:#79c0ff&#34;&gt;true&lt;/span&gt;);&lt;span style=&#34;color:#6e7681&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;pingThread.start();&lt;span style=&#34;color:#6e7681&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;A non-daemon thread keeps the JVM alive until it finishes. If a caller opens a&#xA;socket, forgets to close it, and the rest of the application shuts down, a&#xA;non-daemon ping thread will keep the process running indefinitely. A daemon&#xA;thread just gets killed when everything else is done — which is the right&#xA;default for background keepalive work that isn&amp;rsquo;t itself the point of the&#xA;program.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
