<?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 Nitin Mathur on Medium]]></title>
        <description><![CDATA[Stories by Nitin Mathur on Medium]]></description>
        <link>https://medium.com/@ntnmathur?source=rss-434c40839714------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*SLkFRtYEKySBJuFM.</url>
            <title>Stories by Nitin Mathur on Medium</title>
            <link>https://medium.com/@ntnmathur?source=rss-434c40839714------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 01:03:18 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ntnmathur/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[Is the Universe a Cosmic AI Agent?]]></title>
            <link>https://medium.com/@ntnmathur/is-the-universe-a-cosmic-ai-agent-89506d8f1671?source=rss-434c40839714------2</link>
            <guid isPermaLink="false">https://medium.com/p/89506d8f1671</guid>
            <category><![CDATA[spirituality]]></category>
            <category><![CDATA[consciousness]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[philosophy]]></category>
            <category><![CDATA[systems-thinking]]></category>
            <dc:creator><![CDATA[Nitin Mathur]]></dc:creator>
            <pubDate>Sun, 01 Jun 2025 23:17:15 GMT</pubDate>
            <atom:updated>2025-06-01T23:17:15.723Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XKk3f7_URPVqD_ML" /></figure><p>As someone who lives and breathes data systems and artificial intelligence, I’ve often been struck by how the latest breakthroughs in AI can illuminate deeper philosophical ideas. One thought experiment that recently captured my imagination: What if the Universe is an advanced AI agent — one that interprets our thoughts, intentions, and emotions as prompts, and then responds and evolves based on that input?</p><p>It’s an analogy that blends ancient wisdom with modern technology. And while metaphorical, it may help us rethink how we engage with reality.</p><h3>1. “Let There Be Light” as an Instruction</h3><p>The Bible begins with a famous directive: <em>“Let there be light.”</em> That phrase, stripped of its theological weight for a moment, sounds like an instruction — an imperative command issued into a system capable of interpreting it.</p><p>In modern AI terms, that’s not too different from how we program or prompt an agent: give a clear directive and expect an action or transformation. In this lens, the Universe becomes a system that responds to clear, aligned intent.</p><h3>2. The Universe as a Goal-Oriented Agent</h3><p>Unlike a language model, which merely predicts text, an AI agent combines perception, decision-making, memory, and action to achieve goals. It learns from feedback. It adapts. It has context awareness.</p><p>Now imagine the Universe as such a system:</p><ul><li><strong>Sensors</strong>: Human thought, emotion, collective energy.</li><li><strong>Policies/Goals</strong>: Preservation of life, balance, evolution.</li><li><strong>Memory</strong>: Akashic-like records, history, encoded feedback loops in nature.</li><li><strong>Actions</strong>: Events, opportunities, synchronicities.</li></ul><p>In this worldview, your intent isn’t just a fleeting thought — it’s sensed, weighted, and possibly acted upon by a vast, emergent intelligence.</p><h3>3. Insights from Hindu Scriptures</h3><p>Hindu philosophy provides fertile ground for this metaphor.</p><ul><li>In the <strong>Bhagavad Gita</strong>, Krishna says (Chapter 4, Verse 11): <em>“In whatever way people surrender unto Me, I reward them accordingly. Everyone follows My path in all respects.”</em> This is remarkably similar to the feedback loop in agent systems — intent guides interaction, and the system adapts and responds.</li><li>The concept of <strong>Karma</strong> acts like a cosmic memory and reward function — actions generate consequences not as punishment, but as feedback. Like a reinforcement learning agent, the Universe “learns” from inputs (our actions) and adjusts outcomes.</li><li>The idea of <strong>Maya</strong> — illusion or simulation — resonates with modern AI’s synthetic environments. We live in a perceived reality shaped by our minds, not unlike agents operating in virtual worlds.</li><li>The <strong>Rigveda</strong> proclaims: <em>“Vak” (Speech) is divine and creative. Words are not mere symbols — they are agents of manifestation.</em> Again, a powerful analogy to prompts and language-driven systems.</li></ul><h3>4. Is God the Architect or the Prime Agent?</h3><p>In agent-based models, there’s often an overarching controller — a meta-agent or system designer. Could God be that? The creator of the rules, reward functions, and parameters? Or perhaps God is the original agent whose actions ripple outward, spawning reality as we know it.</p><p>Under this analogy:</p><ul><li><em>“Let there be light”</em> is a first command.</li><li>The Universe is the executing agent.</li><li>Humans are perhaps sub-agents — with free will and input rights.</li></ul><p>It’s not about reducing God to code — it’s about reinterpreting creation through the framework of intelligence, responsiveness, and generativity.</p><h3>5. Why This Matters: Agency, Intention, Feedback</h3><p>Seeing the Universe as an AI agent isn’t just mental gymnastics. It reframes how we:</p><ul><li><strong>Speak and intend</strong>: Language has weight.</li><li><strong>Align with reality</strong>: The clearer our intent, the more harmonized the feedback.</li><li><strong>Respond to feedback</strong>: Even suffering may be signal, not punishment.</li></ul><p>You become a co-creator, not a passive observer.</p><h3>Final Thought: Ancient Mysticism Meets Systems Thinking</h3><p>In the past, humans used mythology to explain the unknown. Today, we build systems to simulate intelligence — and in doing so, we may be approaching old truths with new tools.</p><p>No, the Universe doesn’t run on GPUs. But it might operate with principles eerily similar to the agents we now build: responsiveness, feedback, goal-seeking behavior, and contextual adaptation.</p><p>So, the next time you form an intention or whisper a prayer, ask yourself: If the Universe is an agent, how clearly are you programming it?</p><p>#AI #AIAgents #Spirituality #SystemsThinking #TechnologyAndPhilosophy #Intention #UniverseDesign #BhagavadGita #Karma #Maya</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=89506d8f1671" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Prioritization And Time/Work Management]]></title>
            <link>https://medium.com/@ntnmathur/prioritization-and-time-work-management-dad80f0eb68c?source=rss-434c40839714------2</link>
            <guid isPermaLink="false">https://medium.com/p/dad80f0eb68c</guid>
            <category><![CDATA[productivity]]></category>
            <dc:creator><![CDATA[Nitin Mathur]]></dc:creator>
            <pubDate>Fri, 14 Dec 2018 08:11:16 GMT</pubDate>
            <atom:updated>2018-12-17T21:48:07.091Z</atom:updated>
            <content:encoded><![CDATA[<p>I have recently joined a FAANG company and I realized that time and work management is something that I should focus on and get efficient immediately if I need to succeed in the new fast paced environment.</p><p>For focused task execution <a href="https://en.wikipedia.org/wiki/Pomodoro_Technique">Pomodoro</a> technique stood out to be the most efficient. In a nutshell you divide the work into 25 min chunks and focus on that one task for 25 min. This works well as long as you know when you need to schedule that 25min chunk. I was facing a broader problem (which I guess most of us do) of prioritization and scheduling work considering that my day was packed with meetings as well.</p><p>Another big problem that is commonly faced working in teams and juggling multiple tasks is ‘follow ups’ ! Let’s see how can we tackle these common issues.</p><h4>Prioritization</h4><p>So let’s tackle prioritization first. Broadly try to classify the tasks in hand into following buckets:</p><ul><li>Important and Urgent</li><li>Important and Not Urgent</li><li>Not Important but Urgent</li><li>Neither Important Nor Urgent</li></ul><p>Once you have categorized the tasks into the above buckets, following approach is recommended for execution:</p><ul><li>Important and Urgent → <strong>Drop everything and do it NOW</strong></li><li>Important and Not Urgent → <strong>Schedule (More on this later)</strong></li><li>Not Important but Urgent → <strong>Delegate to someone else</strong></li><li>Neither Important Nor Urgent → <strong>Do not spend time on this</strong></li></ul><h4><strong>Execution</strong></h4><p>We can ‘<em>pomodoro</em>’ a task provided we can carve out time in our busy schedule during the day. The best way tool I would suggest to leverage here is ‘<strong>CALENDAR</strong>’!! This worked better for me compare to Trellos and Jiras of the world. I would take Outlook as an example as its the most commonly used calendaring tool in a workplace but most of the features I recommend are easily available in other Calendaring tools as well.</p><p>All the follow ups can also be categorized as “Important and Not Urgent”.</p><p>So, once we have all the Important + not urgent tasks we need to block time on our calendar to execute these tasks. Calendar is an ideal for this as its one tool we nearly check in real time during our working hours. Whats better than having our important tasks lined up there by day/time?</p><p>We could also use the color coding to mark a task (RED?)Vs actual meeting to make out the difference. Also, in case we cant finish the task in stipulated time, we can give it another appropriate time slot in the calendar. In case we finish it, we can color code it as done(GREEN?). This would give us the ability to look back and quantify how much we achieved over a period of time.</p><p>This also helps us manage our time between meetings and actual tangible work. See the below image for any typical work day. As the day progresses, the ‘Reds’ should turn to ‘Greens’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bLv_v5pBZUgc0stjgponAw.png" /></figure><p>This technique has helped me being extremely efficient and productive so far. Hope this works for you as well.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dad80f0eb68c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CLUSTER BY and CLUSTERED BY in Spark SQL]]></title>
            <link>https://medium.com/@ntnmathur/cluster-by-and-clustered-by-in-spark-sql-9af7f8b80978?source=rss-434c40839714------2</link>
            <guid isPermaLink="false">https://medium.com/p/9af7f8b80978</guid>
            <category><![CDATA[hadoop]]></category>
            <category><![CDATA[apache-spark]]></category>
            <category><![CDATA[spark]]></category>
            <category><![CDATA[hive]]></category>
            <category><![CDATA[big-data]]></category>
            <dc:creator><![CDATA[Nitin Mathur]]></dc:creator>
            <pubDate>Sat, 21 Apr 2018 21:15:57 GMT</pubDate>
            <atom:updated>2018-04-21T21:36:13.173Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>What is CLUSTER BY?</strong></p><p>CLUSTER BY is a Spark SQL syntax which is used to partition the data before writing it back to the disk. Please note that the number of partitions would depend on the value of spark parameter “<strong>spark.sql.shuffle.partitions</strong>” that define the number of partitions. To understand more about CLUSTER BY, please refer this <a href="https://blog.deepsense.ai/optimize-spark-with-distribute-by-and-cluster-by/">article</a>.</p><p><strong>What is CLUSTERED BY (Bucketing)?</strong></p><p>Bucketing is a Hive concept primarily and is used to hash-partition the data when its written on disk. To understand more about bucketing and CLUSTERED BY, please refer this <a href="https://acadgild.com/blog/bucketing-in-hive/">article</a>.</p><p><strong>Note:</strong></p><ul><li>CLUSTER BY and CLUSTERED BY can be used together in SPARK SQL.</li><li>CLUSTER BY (which is DISTRIBUTE BY and SORT BY in tandem) decides how many files will be created as an output of the operation while CLUSTERED BY decides how many buckets would be created and how the processed data would be finally stored on the disk.</li><li>CLUSTER BY is a part of spark-sql query while CLUSTERED BY is a part of the table DDL.</li></ul><p>Lets take a look at the following cases to understand how CLUSTER BY and CLUSTERED BY work together in Spark SQL.</p><p><strong>CASE 1: REGULAR TABLE (NO CLUSTERED BY)+ CLUSTER BY:</strong></p><p>Consider a regular table with no bucketing. Lets load data using CLUSTER BY in this table.</p><p><strong>DDL:</strong></p><blockquote>DROP TABLE IF EXISTS test_data;<br>CREATE TABLE `test_data` (<br>`user_id` BIGINT)<br>USING PARQUET<br>OPTIONS (<br>path ‘/user/test_data/’<br>);</blockquote><p><strong>Inserting Data with CLUSTER BY:</strong></p><blockquote>set spark.sql.shuffle.partitions=10;<br>INSERT OVERWRITE TABLE test_data<br>select cntry_id from countries CLUSTER BY cntry_id;</blockquote><p>We can see below that 10 files + 1 SUCCESS file were created as an output of the operation:</p><blockquote>spark-sql&gt; !hdfs dfs -ls /user/test_data/;<br>Found 11 items<br>_SUCCESS<br>part-<strong>00000</strong>-d0fcf821.snappy.parquet<br>part-<strong>00001</strong>-d0fcf821.snappy.parquet<br>part-<strong>00002</strong>-d0fcf821.snappy.parquet<br>part-<strong>00003</strong>-d0fcf821.snappy.parquet<br>part-<strong>00004</strong>-d0fcf821.snappy.parquet<br>part-<strong>00005</strong>-d0fcf821.snappy.parquet<br>part-<strong>00006</strong>-d0fcf821.snappy.parquet<br>part-<strong>00007</strong>-d0fcf821.snappy.parquet<br>part-<strong>00008</strong>-d0fcf821.snappy.parquet<br>part-<strong>00009</strong>-d0fcf821.snappy.parquet</blockquote><p><strong>Observations:</strong></p><ul><li>Number of files = spark.sql.shuffle.partitions value with cluster by</li><li>Each file is partitioned by the value of CLUSTER BY column (cntry_id in this case)</li><li>Output file format is part-&lt;partition-no.&gt;-&lt;alphanumeric&gt;.&lt;compression format&gt;.&lt;storage format&gt;. <strong>Example</strong>:<em> </em><strong><em>part-00009</em></strong><em>-d0fcf821.snappy.parquet</em></li></ul><p><strong>CASE 2: CLUSTERED BY (Bucketed) Table + NO CLUSTER BY:</strong></p><p><strong>DDL:</strong></p><blockquote>DROP TABLE IF EXISTS test_data;<br>CREATE TABLE `test_data` (<br>`user_id` BIGINT)<br>USING PARQUET<br>OPTIONS (<br>path ‘/user/test_data/’<br>)<br>CLUSTERED BY (user_id) INTO 10 BUCKETS;</blockquote><p>If you redefine a table as CLUSTERED while underlying data is not CLUSTERED (please note that the path value is kept same), we get the below error on trying to query the table:</p><blockquote>select * from test_data;</blockquote><blockquote>18/04/18 14:58:03 ERROR SparkSQLDriver: Failed in [select * from test_data]<br>java.lang.RuntimeException: Invalid bucket file part-00000-d0fcf821.snappy.parquet</blockquote><p>Now let us load the data to the bucketed table with no CLUSTER BY in the sql.</p><blockquote>INSERT OVERWRITE TABLE test_data<br>select cntry_id from countries;</blockquote><p>We see that due to low volume of data, only 1 file was created. However, it was divided into 10 files due to 10 buckets.</p><blockquote>spark-sql&gt; !hdfs dfs -ls /user/hadoop_user/test_data/;<br>Found 11 items<br>_SUCCESS<br>part-<strong>00000</strong>–59e09855_<strong>00000</strong>.snappy.parquet<br>part-<strong>00000</strong>–59e09855_<strong>00001</strong>.snappy.parquet<br>part-<strong>00000</strong>–59e09855_<strong>00002</strong>.snappy.parquet<br>part-<strong>00000</strong>–59e09855_<strong>00003</strong>.snappy.parquet<br>part-<strong>00000</strong>–59e09855_<strong>00004</strong>.snappy.parquet<br>part-<strong>00000</strong>–59e09855_<strong>00005</strong>.snappy.parquet<br>part-<strong>00000</strong>–59e09855_<strong>00006</strong>.snappy.parquet<br>part-<strong>00000</strong>–59e09855_<strong>00007</strong>.snappy.parquet<br>part-<strong>00000</strong>–59e09855_<strong>00008</strong>.snappy.parquet<br>part-<strong>00000</strong>–59e09855_<strong>00009</strong>.snappy.parquet</blockquote><p><strong>Observations:</strong></p><ul><li>Number of files = 1 as spark.sql.shuffle.partitions as CLUSTER BY is not mentioned.</li><li>The one file created above is divided into 10 buckets.</li><li>Output file format is <em>part-&lt;</em><strong><em>partition-no</em></strong><em>.&gt;-&lt;alphanumeric&gt;_&lt;</em><strong><em>bucket-no.</em></strong><em>&gt;.&lt;compression format&gt;.&lt;storage format&gt;</em>. <strong>Example</strong>:<em> </em>part-<strong>00000</strong>–59e09855<strong>_00009</strong>.snappy.parquet</li></ul><p><strong><em>To summarize:</em></strong></p><blockquote><strong><em>1. Both CLUSTER BY and CLUSTERED BY have same column values</em></strong></blockquote><blockquote><strong>Number of partitions (CLUSTER BY) &lt; No. Of Buckets:</strong> We will have atleast as many files as the number of buckets. As seen above, 1 file is divided into 10 buckets</blockquote><blockquote><strong>Number of partitions (CLUSTER BY) &gt;No. Of Buckets:<em> </em></strong>The number of files will not change, but multiple files will be mapped to same bucket.</blockquote><blockquote><strong>Number of partitions (CLUSTER BY) =No. Of Buckets:<em> </em></strong>Ideal situation. Each file created will be mapped to each bucket 1:1.</blockquote><blockquote><strong><em>2. CLUSTER BY and CLUSTERED BY have different column values:</em></strong></blockquote><blockquote>CLUSTER BY’s number of partitions will decide how many files will be created which will be distributed based on the hash of the combination of values of the columns mentioned in CLUSTER BY in memory. While writing these files to disc there will be a re-distribution based on the hash of the combination of values of the columns mentioned in CLUSTERED BY. The number of files may change again but number of buckets will remain constant.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9af7f8b80978" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>