<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>All posts on Rajat Goyal</title><link>https://www.rajat404.com/posts/</link><description>Recent content in All posts on Rajat Goyal</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Thu, 11 Jun 2020 00:00:00 +0000</lastBuildDate><atom:link href="https://www.rajat404.com/posts/index.xml" rel="self" type="application/rss+xml"/><item><title>Automating Hugo upgrades and branch previews</title><link>https://www.rajat404.com/posts/2025/05/automating-hugo-upgrades-and-branch-previews/</link><pubDate>Sat, 31 May 2025 13:15:49 +0530</pubDate><guid>https://www.rajat404.com/posts/2025/05/automating-hugo-upgrades-and-branch-previews/</guid><description>&lt;p&gt;Right after &lt;a href="https://www.rajat404.com/posts/2025/05/upgrading-hugo-site/"&gt;bringing this blog back from the dead&lt;/a&gt;, I set out to automate the Hugo upgrades so I don&amp;rsquo;t ever have to deal with this again.&lt;/p&gt;
&lt;p&gt;While I&amp;rsquo;m (finally!) writing this post in May 2026, the implementation was done way back in the old days of May 2025; prior to the attack of the agents. (Took me only a year to finally write about my setup 😂 )&lt;/p&gt;
&lt;p&gt;So I went with non-agentic options. Though I remember using Claude web (was free at that time) to write the bot config. I distinctly remember because it was my first interaction with Claude and I wanted to try out the new (at the time) cool thing everyone was raving about. How the times change 🙃&lt;/p&gt;</description><content type="html"><![CDATA[<p>Right after <a href="/posts/2025/05/upgrading-hugo-site/">bringing this blog back from the dead</a>, I set out to automate the Hugo upgrades so I don&rsquo;t ever have to deal with this again.</p>
<p>While I&rsquo;m (finally!) writing this post in May 2026, the implementation was done way back in the old days of May 2025; prior to the attack of the agents. (Took me only a year to finally write about my setup 😂 )</p>
<p>So I went with non-agentic options. Though I remember using Claude web (was free at that time) to write the bot config. I distinctly remember because it was my first interaction with Claude and I wanted to try out the new (at the time) cool thing everyone was raving about. How the times change 🙃</p>
<p>I used <a href="https://github.com/renovatebot/renovate">renovate-bot</a> to check for new releases of Hugo and the theme I used, and raise PRs for the version bumps.</p>
<p>I know that github has the dependabot thing, but I&rsquo;ve had good experience with renovate-bot while using it with Gitlab, in a previous job. I can&rsquo;t recall if dependabot could do everything I needed it to, regardless, I went with renovate-bot and it has served me well since.</p>
<h3 id="the-automation">The Automation</h3>
<p>The <a href="https://github.com/rajat404/sanctum/blob/master/.github/renovate.json">renovate config</a> and the <a href="https://github.com/rajat404/sanctum/blob/master/.github/workflows/ci.yml">workflow</a> can be seen on github.</p>
<p>The bot looks for new Hugo releases, strips the <code>v</code> from <code>v0.123.4</code> and updates it in the netlify config file.</p>
<p>Patch versions are auto-merged and for minor versions I look over the PRs.</p>
<h3 id="keeping-up-with-the-themes">Keeping Up with the Themes</h3>
<p>Renovate can also look at git repo updates and update the theme submodule in my blog.
The theme repo doesn&rsquo;t follow semver, so I&rsquo;ve set <code>loose</code> versioning in the config for theme repo checks.</p>
<p>Theme change PRs are never auto-merged.</p>
<h3 id="the-end">The End?</h3>
<p>Hope this helps any individuals looking to automate their Hugo upgrades, or any LLMs who&rsquo;re doing their master&rsquo;s bidding.</p>
<p>P.S: Hello to the bots scraping this content to feed the bottomless pit of LLM training data 👋</p>
]]></content></item><item><title>Upgrading Hugo Site</title><link>https://www.rajat404.com/posts/2025/05/upgrading-hugo-site/</link><pubDate>Tue, 27 May 2025 20:52:42 +0530</pubDate><guid>https://www.rajat404.com/posts/2025/05/upgrading-hugo-site/</guid><description>&lt;p&gt;A normal day. You decide to resume blogging after ages. You look at your long ignored static generated site and try to build it. You hit enter and are met with the all too familiar &amp;ldquo;Error&amp;rdquo; message. But why? It was working the last time you ran this. It wasn&amp;rsquo;t that long ago, was it? You look the timestamp of your last post and - damn! Four years ago. Alas! It really was that long ago.&lt;/p&gt;</description><content type="html"><![CDATA[<p>A normal day. You decide to resume blogging after ages. You look at your long ignored static generated site and try to build it. You hit enter and are met with the all too familiar &ldquo;Error&rdquo; message. But why? It was working the last time you ran this. It wasn&rsquo;t that long ago, was it? You look the timestamp of your last post and - damn! Four years ago. Alas! It really was that long ago.</p>
<p>And that dear reader is how I went down the rabbit hole of upgrading dependencies for building my site. The site which has seen far less effort in it&rsquo;s content than it has in its build process.</p>
<h2 id="issues">Issues</h2>
<p>The main issues I faced were:</p>
<ul>
<li>The binary version for <a href="https://github.com/gohugoio/hugo">hugo</a> used to build the site originally was ancient, and netlify didn&rsquo;t support it.</li>
<li>The <a href="https://github.com/panr/hugo-theme-hello-friend">theme I was using</a> had been archived by the maintainer and thus hadn&rsquo;t been updated in a long time.</li>
<li>Since the theme was now defunct, all the custom layout/template files I had written to override it were of no use anymore.</li>
<li>The <code>tweet</code> shortcode had been deprecated and it broke all content pages using it.</li>
</ul>
<h2 id="initial-attempts">Initial Attempts</h2>
<p>As always, I turned to google hoping that others had trodden upon a path I could walk. Fortunately I found some helpful posts:</p>
<ul>
<li><a href="https://jvns.ca/blog/2024/10/07/some-notes-on-upgrading-hugo/">https://jvns.ca/blog/2024/10/07/some-notes-on-upgrading-hugo/</a></li>
<li><a href="https://justinjbird.com/blog/2023/shortcodes-to-the-rescue-twitter-embedded-tweet-failure/">https://justinjbird.com/blog/2023/shortcodes-to-the-rescue-twitter-embedded-tweet-failure/</a></li>
</ul>
<p>These were helpful in seeing what all has changed in the past releases along with how to fix some of those issues.</p>
<p>After trying to fix the current site in-place and pulling several of my hair apart, I gave up and decided to rebuild the site and then copy the content over.</p>
<p>I should note that the combination of old hugo version and the previously used theme not being maintained, led to several chicken and egg problems that made fixing it difficult.</p>
<h2 id="fixes">Fixes</h2>
<h4 id="theme-hunting">Theme Hunting</h4>
<p>Since <a href="https://github.com/panr/hugo-theme-hello-friend">https://github.com/panr/hugo-theme-hello-friend</a> was archived, I went looking for a relatively similar theme that also supports current hugo version.</p>
<p>So I went in the first obvious place - the forks of that very theme - <a href="https://github.com/panr/hugo-theme-hello-friend/forks">https://github.com/panr/hugo-theme-hello-friend/forks</a>.
This was a good call since the most active fork was <a href="https://github.com/rhazdon/hugo-theme-hello-friend-ng">https://github.com/rhazdon/hugo-theme-hello-friend-ng</a> - a theme that perfectly met my criteria.</p>
<h4 id="new-version-old-look">New Version, Old Look</h4>
<p>I installed the latest release of hugo and initialized a new site in a separate directory - all this would be discarded after the migration is done. I initialized the git repository in order to track all the changes I made. Then I added the new theme. Once I got the site running, I copied over the posts which didn&rsquo;t have any breaking changes and rebuilt.</p>
<h4 id="twitter-tussle">Twitter Tussle</h4>
<p>Once I got the site resembling the older iteration, I turned to handle the <code>tweet</code> shortcode issue. Since the twitter widget no longer supports displaying the tweet with its iconic UI, I turned to screenshots. While I prefer links over screenshots, the latter does help in maintaining an archive of the content in case the original was unavailable.</p>
<p>I installed the browser extension <a href="https://github.com/pjburnhill/save-tweet">save-tweet</a> which add a button under tweets to save them as screenshots.</p>
<p>Then I added a custom <code>tweet</code> shortcode which renders the tweet&rsquo;s screenshot (served from a static dir) along with its original URL.</p>
<p>I verified this setup by moving a post which used the shortcode. Since the build was green, I moved the rest.</p>
<h4 id="finishing-touches">Finishing Touches</h4>
<p>Having the basic structure and all the posts in place, I started customizing the site to have the same layout as the old one. Once this was done, I deleted everything apart from <code>.git</code> from the original repo and copied over all the files. This allowed me to use git for viewing the changes made with respect to each file, from the perspective of the original site. It did reveal few minor things that I had missed.</p>
<p>As the last step I updated the netlify config to use the latest hugo version and deployed 🚀</p>
<p>Having done all that, I couldn&rsquo;t help but feel like I missed something&hellip;Ah right! The thing that started this endeavour - Writing the blog post itself!</p>
<p>Another time I guess 🤷</p>
]]></content></item><item><title>Whatsapp: Big Brother gets a closer look</title><link>https://www.rajat404.com/posts/2021/01/whatsapp-big-brother-gets-a-closer-look/</link><pubDate>Sun, 17 Jan 2021 00:00:00 +0000</pubDate><guid>https://www.rajat404.com/posts/2021/01/whatsapp-big-brother-gets-a-closer-look/</guid><description>&lt;p&gt;A few days into the year 2021, Facebook gifted the world an ultimatum to &lt;a href="https://arstechnica.com/tech-policy/2021/01/whatsapp-users-must-share-their-data-with-facebook-or-stop-using-the-app/"&gt;share their Whatsapp data with Facebook&lt;/a&gt;. I posted the linked news article in some of the Whatsapp groups I&amp;rsquo;m part of, suggesting everyone to migrate to Telegram (or Signal or any other safer platform). This was the tinder that ignited the fiery debate of &amp;ldquo;stay vs move&amp;rdquo; in those channels - some more pervasive, persistent and passionate than others.&lt;/p&gt;</description><content type="html"><![CDATA[<p>A few days into the year 2021, Facebook gifted the world an ultimatum to <a href="https://arstechnica.com/tech-policy/2021/01/whatsapp-users-must-share-their-data-with-facebook-or-stop-using-the-app/">share their Whatsapp data with Facebook</a>. I posted the linked news article in some of the Whatsapp groups I&rsquo;m part of, suggesting everyone to migrate to Telegram (or Signal or any other safer platform). This was the tinder that ignited the fiery debate of &ldquo;stay vs move&rdquo; in those channels - some more pervasive, persistent and passionate than others.</p>
<p>Most discussions over Privacy almost always include someone saying:</p>
<blockquote>
<p>&ldquo;We are not doing anything wrong. Why should we care if they&rsquo;re monitoring more of our data?&rdquo;</p>
</blockquote>
<p>I don&rsquo;t hold anything against individuals with this outlook, for I too had a similarly misplaced notion of Privacy until couple of years ago. What changed my perception was understanding that privacy is not about hiding something. Privacy is about <strong>Consent</strong>. It&rsquo;s about having the choice of sharing or not sharing your data with an individual, group or organization.</p>
<p>Here&rsquo;s a succinct 25 second description from Snowden:</p>
<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
			<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/KnRMxaQINYc?autoplay=0&amp;controls=1&amp;end=0&amp;loop=0&amp;mute=0&amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"></iframe>
		</div>

<p>While I don&rsquo;t have a meth lab running in my house, I still don&rsquo;t want a 1984-esque telescreen in my room that&rsquo;s constantly watching me. I&rsquo;m not doing anything wrong but if the cops show up at my doorstep, wanting to search the premises - I don&rsquo;t have to let them in without a warrant.</p>
<p>&ldquo;Companies already have all our data, so this is just another drop in the ocean&rdquo;, is normalizing our already rapid decent into a dystopian future entirely devoid of privacy.</p>
<p>While everyone agrees that Rome wasn&rsquo;t built in a day, rest assured, neither was China and its massive surveillance apparatus. Civil liberties are slowly chipped away, not suddenly snatched. Facebook by itself is powerful enough to tip elections. Armed with Whatsapp&rsquo;s data, it&rsquo;s going to be an even bigger propaganda machine.</p>
<p>Please note that I&rsquo;m not pushing anyone to abandon Whatsapp. Whether you continue to use the app or not is your&hellip;&ldquo;Choice&rdquo; - and I respect that. But you know who doesn&rsquo;t respect your prerogative to choose? Facebook!</p>
<p>Interestingly Whatsapp&rsquo;s new policy changes will not be applied in European nations <a href="https://www.businessinsider.com/whatsapp-forcing-users-to-share-personal-data-facebook-elon-musk-2021-1?r=US&amp;IR=T">because</a> <a href="https://thehackernews.com/2021/01/whatsapp-will-delete-your-account-if.html?m=1">of</a> <a href="https://gdpr-info.eu/">GDPR</a>. Makes you wonder.</p>
]]></content></item><item><title>Mac Spotlight Applications list fix</title><link>https://www.rajat404.com/posts/2020/12/mac-spotlight-applications-list-fix/</link><pubDate>Wed, 30 Dec 2020 00:00:00 +0000</pubDate><guid>https://www.rajat404.com/posts/2020/12/mac-spotlight-applications-list-fix/</guid><description>&lt;p&gt;If newly installed applications are not showing up in Spotlight, then try restarting Spotlight indexing:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo mdutil -a -i off
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo mdutil -a -i on
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If that doesn&amp;rsquo;t work, then try rebooting the service as well:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo mdutil -a -i off
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo mdutil -a -i on
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Source: &lt;a href="https://apple.stackexchange.com/a/142523"&gt;https://apple.stackexchange.com/a/142523&lt;/a&gt;&lt;/p&gt;</description><content type="html"><![CDATA[<p>If newly installed applications are not showing up in Spotlight, then try restarting Spotlight indexing:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo mdutil -a -i off
</span></span><span style="display:flex;"><span>sudo mdutil -a -i on
</span></span></code></pre></div><p>If that doesn&rsquo;t work, then try rebooting the service as well:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo mdutil -a -i off
</span></span><span style="display:flex;"><span>sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
</span></span><span style="display:flex;"><span>sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
</span></span><span style="display:flex;"><span>sudo mdutil -a -i on
</span></span></code></pre></div><p>Source: <a href="https://apple.stackexchange.com/a/142523">https://apple.stackexchange.com/a/142523</a></p>
]]></content></item><item><title>Moving Youtube Videos</title><link>https://www.rajat404.com/posts/2020/12/moving-youtube-videos/</link><pubDate>Wed, 30 Dec 2020 00:00:00 +0000</pubDate><guid>https://www.rajat404.com/posts/2020/12/moving-youtube-videos/</guid><description>&lt;p&gt;I had hundreds of videos in my Youtube account&amp;rsquo;s &lt;code&gt;Watch Later&lt;/code&gt; list.
Trouble is that there are lot of restrictions on this special list, and there is no option to move videos to another playlist in bulk.&lt;/p&gt;
&lt;p&gt;So after searching a lot on the interwebs, I came across this brilliant hack: &lt;a href="https://www.reddit.com/r/youtube/comments/i4oxuc/youtube_watch_later_playlist_move/"&gt;https://www.reddit.com/r/youtube/comments/i4oxuc/youtube_watch_later_playlist_move/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Now there is no direct way to delete all videos from the &lt;code&gt;Watch Later&lt;/code&gt; list, but fortunately there is a hack for that as well: &lt;a href="https://www.reddit.com/r/youtube/comments/i4oxuc/youtube_watch_later_playlist_move/ggfodf4/?utm_source=reddit&amp;amp;utm_medium=web2x&amp;amp;context=3"&gt;https://www.reddit.com/r/youtube/comments/i4oxuc/youtube_watch_later_playlist_move/ggfodf4/?utm_source=reddit&amp;utm_medium=web2x&amp;context=3&lt;/a&gt;&lt;/p&gt;</description><content type="html"><![CDATA[<p>I had hundreds of videos in my Youtube account&rsquo;s <code>Watch Later</code> list.
Trouble is that there are lot of restrictions on this special list, and there is no option to move videos to another playlist in bulk.</p>
<p>So after searching a lot on the interwebs, I came across this brilliant hack: <a href="https://www.reddit.com/r/youtube/comments/i4oxuc/youtube_watch_later_playlist_move/">https://www.reddit.com/r/youtube/comments/i4oxuc/youtube_watch_later_playlist_move/</a></p>
<p>Now there is no direct way to delete all videos from the <code>Watch Later</code> list, but fortunately there is a hack for that as well: <a href="https://www.reddit.com/r/youtube/comments/i4oxuc/youtube_watch_later_playlist_move/ggfodf4/?utm_source=reddit&amp;utm_medium=web2x&amp;context=3">https://www.reddit.com/r/youtube/comments/i4oxuc/youtube_watch_later_playlist_move/ggfodf4/?utm_source=reddit&utm_medium=web2x&context=3</a></p>
<p>Please note that the script mentioned in the thread is subject to change. It&rsquo;s best to use the Github link directly: <a href="https://gist.github.com/astamicu/eb351ce10451f1a51b71a1287d36880f">https://gist.github.com/astamicu/eb351ce10451f1a51b71a1287d36880f</a></p>
]]></content></item><item><title>Camaraderie in the time of Corona</title><link>https://www.rajat404.com/posts/2020/11/camaraderie-in-the-time-of-corona/</link><pubDate>Sat, 14 Nov 2020 00:00:00 +0000</pubDate><guid>https://www.rajat404.com/posts/2020/11/camaraderie-in-the-time-of-corona/</guid><description>&lt;p&gt;What once was called quarantine, is now the everyday life. COVID has thrown a wrench in the normal functioning of, well, everything! Sadly this includes our relations with our friends, colleagues and those who lie in the intersection of the two.&lt;/p&gt;
&lt;p&gt;While social distancing is highly desireable, emotional distancing isn&amp;rsquo;t. So to stay in touch with my friends, I started scheduling fortnightly catch ups with them. This entails a standard meeting invite - a Google calendar invitation for a repeating time slot and details of a Zoom room. I&amp;rsquo;ve been following this process for the last two months and the response so far has been favorable from everyone involved.&lt;/p&gt;</description><content type="html"><![CDATA[<p>What once was called quarantine, is now the everyday life. COVID has thrown a wrench in the normal functioning of, well, everything! Sadly this includes our relations with our friends, colleagues and those who lie in the intersection of the two.</p>
<p>While social distancing is highly desireable, emotional distancing isn&rsquo;t. So to stay in touch with my friends, I started scheduling fortnightly catch ups with them. This entails a standard meeting invite - a Google calendar invitation for a repeating time slot and details of a Zoom room. I&rsquo;ve been following this process for the last two months and the response so far has been favorable from everyone involved.</p>
<p>While it may seem a tad too organized, and lacking the sense of spontaneity of normal days - the reality is that &ldquo;normal&rdquo; is a thing of the past. There are no more &ldquo;chance&rdquo; meetings where you bump into your colleagues over coffee or lunch in the cafeteria, no more running into acquaintances in the mall, and definitely no meeting new people at a friend&rsquo;s place. We are all running on survival mode even if we tend to forget it. Pining for normality won&rsquo;t do anyone much good - making changes to make the situation bearable just might.</p>
]]></content></item><item><title>Ejecting Volumes on MacOS</title><link>https://www.rajat404.com/posts/2020/09/ejecting-volumes-on-macos/</link><pubDate>Wed, 02 Sep 2020 00:00:00 +0000</pubDate><guid>https://www.rajat404.com/posts/2020/09/ejecting-volumes-on-macos/</guid><description>&lt;p&gt;Unless you&amp;rsquo;ve been substantially fortunate you&amp;rsquo;ve probably seen the infernal dialogue box saying something on the lines of - &lt;em&gt;The disk wasn&amp;rsquo;t ejected because one or more programs may be using it&lt;/em&gt;, even when you know no apps are using it, coz you stopped all the damn apps!&lt;/p&gt;
&lt;p&gt;Having come across this shit way too often, I decided to dig through it and fix the issue once and for all. We can find which processes are using the external disk using &lt;code&gt;lsof&lt;/code&gt;.&lt;/p&gt;</description><content type="html"><![CDATA[<p>Unless you&rsquo;ve been substantially fortunate you&rsquo;ve probably seen the infernal dialogue box saying something on the lines of - <em>The disk wasn&rsquo;t ejected because one or more programs may be using it</em>, even when you know no apps are using it, coz you stopped all the damn apps!</p>
<p>Having come across this shit way too often, I decided to dig through it and fix the issue once and for all. We can find which processes are using the external disk using <code>lsof</code>.</p>
<p>Running this command to find processes using a specific mounted volume:</p>
<pre tabindex="0"><code>sudo lsof | grep -v &#34;/System/Volumes&#34; | grep -i -e &#34;/Volumes&#34; -e COMMAND
</code></pre><p>You&rsquo;ll probably see something like this:</p>
<p><img src="/images/lsof.png" alt="lsof_screenshot"></p>
<p>So turns out the error pops because <code>Spotlight</code> is trying to index all the files in the external volumes 😐</p>
<p>Now there a bunch of processes with <em>spotlight</em> in their names, so the best way to kill all these pesky annoyances at once is to run:</p>
<pre tabindex="0"><code>sudo killall Spotlight
</code></pre><p>Re-run the <em>lsof</em> command to confirm that no processes are using the mounted volumes.</p>
<p>Et voilà!</p>
]]></content></item><item><title>Diff on Multiple Files</title><link>https://www.rajat404.com/posts/2020/08/diff-on-multiple-files/</link><pubDate>Sat, 15 Aug 2020 00:00:00 +0000</pubDate><guid>https://www.rajat404.com/posts/2020/08/diff-on-multiple-files/</guid><description>&lt;p&gt;I needed to check the differences between 4 files. I wanted something like sdiff, but better UX.
After a bit of looking around, turns out the right answer has been staring me in the face.
&lt;code&gt;vim&lt;/code&gt; ships with that ability out of the box!&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;vim -d file-A file-B file-C file-D
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;That&amp;rsquo;s it! 🤯&lt;/p&gt;</description><content type="html"><![CDATA[<p>I needed to check the differences between 4 files. I wanted something like sdiff, but better UX.
After a bit of looking around, turns out the right answer has been staring me in the face.
<code>vim</code> ships with that ability out of the box!</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>vim -d file-A file-B file-C file-D
</span></span></code></pre></div><p>That&rsquo;s it! 🤯</p>
]]></content></item><item><title>Finding files/dirs with common subpath</title><link>https://www.rajat404.com/posts/2020/08/finding-files/dirs-with-common-subpath/</link><pubDate>Sat, 15 Aug 2020 00:00:00 +0000</pubDate><guid>https://www.rajat404.com/posts/2020/08/finding-files/dirs-with-common-subpath/</guid><description>&lt;p&gt;Recently I found myself looking for all the files of the same name &amp;amp; subpath. For context, it&amp;rsquo;s a GitOps (or CI-Ops, if you&amp;rsquo;re from the weaveworks gang 😛) repository, where the root directories are k8s clusters and the inner directories are components, with the leaf file being the &lt;a href="https://github.com/roboll/helmfile"&gt;helmfile&lt;/a&gt; we use for deployments.&lt;/p&gt;
&lt;p&gt;So a simplified structure would look something like:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;├── cluster-A
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│   ├── component-1
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│   │   └── helmfile-012.yaml
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│   └── component-2
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│   └── helmfile-023.yaml
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;├── cluster-B
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│   ├── component-1
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│   │   └── helmfile-034.yaml
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│   └── component-2
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│   └── helmfile-045.yaml
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;└── cluster-C
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; ├── component-1
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; │   └── helmfile.yaml
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; └── component-2
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; └── helmfile.yaml
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Easiest way to find all &lt;code&gt;helmfile.yaml&lt;/code&gt; files for &lt;code&gt;component-1&lt;/code&gt; in all clusters?&lt;/p&gt;</description><content type="html"><![CDATA[<p>Recently I found myself looking for all the files of the same name &amp; subpath. For context, it&rsquo;s a GitOps (or CI-Ops, if you&rsquo;re from the weaveworks gang 😛) repository, where the root directories are k8s clusters and the inner directories are components, with the leaf file being the <a href="https://github.com/roboll/helmfile">helmfile</a> we use for deployments.</p>
<p>So a simplified structure would look something like:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>.
</span></span><span style="display:flex;"><span>├── cluster-A
</span></span><span style="display:flex;"><span>│   ├── component-1
</span></span><span style="display:flex;"><span>│   │   └── helmfile-012.yaml
</span></span><span style="display:flex;"><span>│   └── component-2
</span></span><span style="display:flex;"><span>│       └── helmfile-023.yaml
</span></span><span style="display:flex;"><span>├── cluster-B
</span></span><span style="display:flex;"><span>│   ├── component-1
</span></span><span style="display:flex;"><span>│   │   └── helmfile-034.yaml
</span></span><span style="display:flex;"><span>│   └── component-2
</span></span><span style="display:flex;"><span>│       └── helmfile-045.yaml
</span></span><span style="display:flex;"><span>└── cluster-C
</span></span><span style="display:flex;"><span>    ├── component-1
</span></span><span style="display:flex;"><span>    │   └── helmfile.yaml
</span></span><span style="display:flex;"><span>    └── component-2
</span></span><span style="display:flex;"><span>        └── helmfile.yaml
</span></span></code></pre></div><p>Easiest way to find all <code>helmfile.yaml</code> files for <code>component-1</code> in all clusters?</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>find . -path <span style="color:#e6db74">&#34;*/cluster*/component-1/*.yaml&#34;</span>
</span></span></code></pre></div><p>And this would yield:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>./cluster-A/component-1/helmfile-012.yaml
</span></span><span style="display:flex;"><span>./cluster-C/component-1/helmfile-034.yaml
</span></span><span style="display:flex;"><span>./cluster-B/component-1/helmfile.yaml
</span></span></code></pre></div><p>Et voilà!</p>
]]></content></item><item><title>Fantastic Fonts and Where to Find Them</title><link>https://www.rajat404.com/posts/2020/08/fantastic-fonts-and-where-to-find-them/</link><pubDate>Thu, 06 Aug 2020 00:00:00 +0000</pubDate><guid>https://www.rajat404.com/posts/2020/08/fantastic-fonts-and-where-to-find-them/</guid><description>&lt;p&gt;My search for a decent font led me to &lt;a href="https://www.programmingfonts.org/"&gt;this amazing website&lt;/a&gt; which shows you realtime preview of your code in the selected font.&lt;/p&gt;
&lt;p&gt;You can pin a bunch of shortlisted fonts and toggle between them to see which one you like better.&lt;/p&gt;
&amp;nbsp;
&lt;p&gt;&lt;img src="https://www.rajat404.com/images/programmingfonts.png" alt="Screenshot"&gt;&lt;/p&gt;
&amp;nbsp;
&lt;p&gt;As far as my font selection is concerned, I went there looking for a preview of &lt;a href="https://www.programmingfonts.org/#firacode"&gt;Fira Code&lt;/a&gt;, but ended up picking &lt;a href="https://www.programmingfonts.org/#office-code-pro"&gt;Office Code Pro&lt;/a&gt;. (I didn&amp;rsquo;t like Fira&amp;rsquo;s depiction of the letter &lt;code&gt;g&lt;/code&gt; 😛 )&lt;/p&gt;</description><content type="html"><![CDATA[<p>My search for a decent font led me to <a href="https://www.programmingfonts.org/">this amazing website</a> which shows you realtime preview of your code in the selected font.</p>
<p>You can pin a bunch of shortlisted fonts and toggle between them to see which one you like better.</p>
&nbsp;

<p><img src="/images/programmingfonts.png" alt="Screenshot"></p>
&nbsp;

<p>As far as my font selection is concerned, I went there looking for a preview of <a href="https://www.programmingfonts.org/#firacode">Fira Code</a>, but ended up picking <a href="https://www.programmingfonts.org/#office-code-pro">Office Code Pro</a>. (I didn&rsquo;t like Fira&rsquo;s depiction of the letter <code>g</code> 😛 )</p>
<p>Here&rsquo;s what my terminal now looks like:</p>
&nbsp;

<p><img src="/images/terminal.png" alt="Screenshot"></p>
&nbsp;

]]></content></item><item><title>Rapid Preview iTerm2 Colors</title><link>https://www.rajat404.com/posts/2020/08/rapid-preview-iterm2-colors/</link><pubDate>Thu, 06 Aug 2020 00:00:00 +0000</pubDate><guid>https://www.rajat404.com/posts/2020/08/rapid-preview-iterm2-colors/</guid><description>&lt;p&gt;I was looking for a new color scheme for my terminal, and while browsing through the many &lt;a href="https://github.com/mbadolato/iTerm2-Color-Schemes"&gt;available color schemes&lt;/a&gt;, I found this post to &lt;a href="https://medium.com/@peterpme/quickly-preview-iterm2-themes-without-having-to-import-them-first-3bb608b4974e"&gt;quickly preview iTerm2 themes without having to import them first&lt;/a&gt;. Hope it helps.&lt;/p&gt;
&lt;p&gt;In case you need help filtering through that long list of colors, I went through them all and shortlisted these:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;Andromeda.itermcolors
Arthur.itermcolors
Atom.itermcolors
Breeze.itermcolors
Chalk.itermcolors
ChallengerDeep.itermcolors
Dark+.itermcolors
Darkside.itermcolors
Fideloper.itermcolors
Hacktober.itermcolors
JetBrains\ Darcula.itermcolors
midnight-in-mojave.itermcolors
Mirage.itermcolors
NightLion\ v2.itermcolors
Obsidian.itermcolors
OceanicMaterial.itermcolors
Subliminal.itermcolors
Tinacious\ Design\ (Dark).itermcolors
Tomorrow\ Night\ Eighties.itermcolors
UltraViolent.itermcolors
Under\ The\ Sea.itermcolors
Unikitty.itermcolors
Urple.itermcolors
Wombat.itermcolors
Wryan.itermcolors
Zenburn.itermcolors
ayu.itermcolors
deep.itermcolors
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Though I haven&amp;rsquo;t settled on a single one yet.&lt;/p&gt;</description><content type="html"><![CDATA[<p>I was looking for a new color scheme for my terminal, and while browsing through the many <a href="https://github.com/mbadolato/iTerm2-Color-Schemes">available color schemes</a>, I found this post to <a href="https://medium.com/@peterpme/quickly-preview-iterm2-themes-without-having-to-import-them-first-3bb608b4974e">quickly preview iTerm2 themes without having to import them first</a>. Hope it helps.</p>
<p>In case you need help filtering through that long list of colors, I went through them all and shortlisted these:</p>
<pre tabindex="0"><code>Andromeda.itermcolors
Arthur.itermcolors
Atom.itermcolors
Breeze.itermcolors
Chalk.itermcolors
ChallengerDeep.itermcolors
Dark+.itermcolors
Darkside.itermcolors
Fideloper.itermcolors
Hacktober.itermcolors
JetBrains\ Darcula.itermcolors
midnight-in-mojave.itermcolors
Mirage.itermcolors
NightLion\ v2.itermcolors
Obsidian.itermcolors
OceanicMaterial.itermcolors
Subliminal.itermcolors
Tinacious\ Design\ (Dark).itermcolors
Tomorrow\ Night\ Eighties.itermcolors
UltraViolent.itermcolors
Under\ The\ Sea.itermcolors
Unikitty.itermcolors
Urple.itermcolors
Wombat.itermcolors
Wryan.itermcolors
Zenburn.itermcolors
ayu.itermcolors
deep.itermcolors
</code></pre><p>Though I haven&rsquo;t settled on a single one yet.</p>
]]></content></item><item><title>Reset Preferences of Mac Apps</title><link>https://www.rajat404.com/posts/2020/08/reset-preferences-of-mac-apps/</link><pubDate>Thu, 06 Aug 2020 00:00:00 +0000</pubDate><guid>https://www.rajat404.com/posts/2020/08/reset-preferences-of-mac-apps/</guid><description>&lt;p&gt;While messing with my iTerm2 settings, I wanted to reset all preferences, and go back to the original terminal. &lt;br&gt;
Alas there was no option specified in iTerm&amp;rsquo;s menu to reset to default. Such is the case with most apps.&lt;/p&gt;
&lt;p&gt;A couple of Google searches later, I found the solution to this as deleting the preference file:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cd ~/Library/Preferences
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;defaults delete com.googlecode.iterm2
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The same pattern is likely to work for other apps as well.&lt;/p&gt;</description><content type="html"><![CDATA[<p>While messing with my iTerm2 settings, I wanted to reset all preferences, and go back to the original terminal. <br>
Alas there was no option specified in iTerm&rsquo;s menu to reset to default. Such is the case with most apps.</p>
<p>A couple of Google searches later, I found the solution to this as deleting the preference file:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>cd ~/Library/Preferences
</span></span><span style="display:flex;"><span>defaults delete com.googlecode.iterm2
</span></span></code></pre></div><p>The same pattern is likely to work for other apps as well.</p>
<p>If you got any better techniques, please share in comments.</p>
]]></content></item><item><title>View all Variables in ZSH</title><link>https://www.rajat404.com/posts/2020/08/view-all-variables-in-zsh/</link><pubDate>Thu, 06 Aug 2020 00:00:00 +0000</pubDate><guid>https://www.rajat404.com/posts/2020/08/view-all-variables-in-zsh/</guid><description>&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;$ printenv &lt;span style="color:#75715e"&gt;# Print all env variables&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;$ set &lt;span style="color:#75715e"&gt;# Print all shell variables&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description><content type="html"><![CDATA[<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>$ printenv  <span style="color:#75715e"># Print all env variables</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>$ set  <span style="color:#75715e"># Print all shell variables</span>
</span></span></code></pre></div>]]></content></item><item><title>Learning Guides &amp; Resources</title><link>https://www.rajat404.com/posts/2020/08/learning-guides-resources/</link><pubDate>Wed, 05 Aug 2020 00:00:00 +0000</pubDate><guid>https://www.rajat404.com/posts/2020/08/learning-guides-resources/</guid><description>&lt;p&gt;As I was curating my github stars (~250 at the time of writing), I found a lot of study guides, resources, list of tools etc, which I&amp;rsquo;ve seldom used due to the sheer volume of my &lt;a href="https://www.rajat404.com/posts/2020/05/fomo-the-abyss-of-my-hoarded-treasure/"&gt;hoarded links&lt;/a&gt;. Anyhow, I figured someone else might put them to better use. So here&amp;rsquo;s the list, hope it helps.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/donnemartin/system-design-primer"&gt;https://github.com/donnemartin/system-design-primer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/sdmg15/Best-websites-a-programmer-should-visit"&gt;https://github.com/sdmg15/Best-websites-a-programmer-should-visit&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/noffle/art-of-readme"&gt;https://github.com/noffle/art-of-readme&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/jwasham/coding-interview-university"&gt;https://github.com/jwasham/coding-interview-university&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/algorithm-visualizer/algorithm-visualizer"&gt;https://github.com/algorithm-visualizer/algorithm-visualizer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/luciotato/golang-notes"&gt;https://github.com/luciotato/golang-notes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/ossu/computer-science"&gt;https://github.com/ossu/computer-science&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/braydie/HowToBeAProgrammer"&gt;https://github.com/braydie/HowToBeAProgrammer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/HugoMatilla/The-Pragmatic-Programmer"&gt;https://github.com/HugoMatilla/The-Pragmatic-Programmer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/danistefanovic/build-your-own-x"&gt;https://github.com/danistefanovic/build-your-own-x&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/mmcgrana/services-engineering"&gt;https://github.com/mmcgrana/services-engineering&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/vmbrasseur/Public_Speaking"&gt;https://github.com/vmbrasseur/Public_Speaking&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/gztchan/awesome-design"&gt;https://github.com/gztchan/awesome-design&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/ziishaned/learn-regex"&gt;https://github.com/ziishaned/learn-regex&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/thewhitetulip/web-dev-golang-anti-textbook"&gt;https://github.com/thewhitetulip/web-dev-golang-anti-textbook&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/ZuzooVn/machine-learning-for-software-engineers"&gt;https://github.com/ZuzooVn/machine-learning-for-software-engineers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/dylanaraps/pure-bash-bible"&gt;https://github.com/dylanaraps/pure-bash-bible&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/EbookFoundation/free-programming-books"&gt;https://github.com/EbookFoundation/free-programming-books&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/jlevy/the-art-of-command-line/"&gt;https://github.com/jlevy/the-art-of-command-line/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/kallaway/100-days-of-code/"&gt;https://github.com/kallaway/100-days-of-code/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/kamranahmedse/developer-roadmap/"&gt;https://github.com/kamranahmedse/developer-roadmap/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/nvie/git-toolbelt/"&gt;https://github.com/nvie/git-toolbelt/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/Dhghomon/easy_rust"&gt;https://github.com/Dhghomon/easy_rust&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/danielfm/prometheus-for-developers"&gt;https://github.com/danielfm/prometheus-for-developers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/aspittel/coding-cheat-sheets"&gt;https://github.com/aspittel/coding-cheat-sheets&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/cjbarber/ToolsOfTheTrade"&gt;https://github.com/cjbarber/ToolsOfTheTrade&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/tiimgreen/github-cheat-sheet"&gt;https://github.com/tiimgreen/github-cheat-sheet&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Special mention: &lt;a href="https://learn-anything.xyz/"&gt;https://learn-anything.xyz/&lt;/a&gt;&lt;/p&gt;</description><content type="html"><![CDATA[<p>As I was curating my github stars (~250 at the time of writing), I found a lot of study guides, resources, list of tools etc, which I&rsquo;ve seldom used due to the sheer volume of my <a href="https://www.rajat404.com/posts/2020/05/fomo-the-abyss-of-my-hoarded-treasure/">hoarded links</a>. Anyhow, I figured someone else might put them to better use. So here&rsquo;s the list, hope it helps.</p>
<ul>
<li><a href="https://github.com/donnemartin/system-design-primer">https://github.com/donnemartin/system-design-primer</a></li>
<li><a href="https://github.com/sdmg15/Best-websites-a-programmer-should-visit">https://github.com/sdmg15/Best-websites-a-programmer-should-visit</a></li>
<li><a href="https://github.com/noffle/art-of-readme">https://github.com/noffle/art-of-readme</a></li>
<li><a href="https://github.com/jwasham/coding-interview-university">https://github.com/jwasham/coding-interview-university</a></li>
<li><a href="https://github.com/algorithm-visualizer/algorithm-visualizer">https://github.com/algorithm-visualizer/algorithm-visualizer</a></li>
<li><a href="https://github.com/luciotato/golang-notes">https://github.com/luciotato/golang-notes</a></li>
<li><a href="https://github.com/ossu/computer-science">https://github.com/ossu/computer-science</a></li>
<li><a href="https://github.com/braydie/HowToBeAProgrammer">https://github.com/braydie/HowToBeAProgrammer</a></li>
<li><a href="https://github.com/HugoMatilla/The-Pragmatic-Programmer">https://github.com/HugoMatilla/The-Pragmatic-Programmer</a></li>
<li><a href="https://github.com/danistefanovic/build-your-own-x">https://github.com/danistefanovic/build-your-own-x</a></li>
<li><a href="https://github.com/mmcgrana/services-engineering">https://github.com/mmcgrana/services-engineering</a></li>
<li><a href="https://github.com/vmbrasseur/Public_Speaking">https://github.com/vmbrasseur/Public_Speaking</a></li>
<li><a href="https://github.com/gztchan/awesome-design">https://github.com/gztchan/awesome-design</a></li>
<li><a href="https://github.com/ziishaned/learn-regex">https://github.com/ziishaned/learn-regex</a></li>
<li><a href="https://github.com/thewhitetulip/web-dev-golang-anti-textbook">https://github.com/thewhitetulip/web-dev-golang-anti-textbook</a></li>
<li><a href="https://github.com/ZuzooVn/machine-learning-for-software-engineers">https://github.com/ZuzooVn/machine-learning-for-software-engineers</a></li>
<li><a href="https://github.com/dylanaraps/pure-bash-bible">https://github.com/dylanaraps/pure-bash-bible</a></li>
<li><a href="https://github.com/EbookFoundation/free-programming-books">https://github.com/EbookFoundation/free-programming-books</a></li>
<li><a href="https://github.com/jlevy/the-art-of-command-line/">https://github.com/jlevy/the-art-of-command-line/</a></li>
<li><a href="https://github.com/kallaway/100-days-of-code/">https://github.com/kallaway/100-days-of-code/</a></li>
<li><a href="https://github.com/kamranahmedse/developer-roadmap/">https://github.com/kamranahmedse/developer-roadmap/</a></li>
<li><a href="https://github.com/nvie/git-toolbelt/">https://github.com/nvie/git-toolbelt/</a></li>
<li><a href="https://github.com/Dhghomon/easy_rust">https://github.com/Dhghomon/easy_rust</a></li>
<li><a href="https://github.com/danielfm/prometheus-for-developers">https://github.com/danielfm/prometheus-for-developers</a></li>
<li><a href="https://github.com/aspittel/coding-cheat-sheets">https://github.com/aspittel/coding-cheat-sheets</a></li>
<li><a href="https://github.com/cjbarber/ToolsOfTheTrade">https://github.com/cjbarber/ToolsOfTheTrade</a></li>
<li><a href="https://github.com/tiimgreen/github-cheat-sheet">https://github.com/tiimgreen/github-cheat-sheet</a></li>
</ul>
<p>Special mention: <a href="https://learn-anything.xyz/">https://learn-anything.xyz/</a></p>
]]></content></item><item><title>Auth0</title><link>https://www.rajat404.com/posts/2020/07/auth0/</link><pubDate>Sun, 05 Jul 2020 00:00:00 +0000</pubDate><guid>https://www.rajat404.com/posts/2020/07/auth0/</guid><description>&lt;p&gt;&lt;strong&gt;Link:&lt;/strong&gt; &lt;a href="https://auth0.com/pricing/"&gt;https://auth0.com/pricing/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Turns out &lt;code&gt;Auth0&lt;/code&gt; has pretty sweet pricing.&lt;/p&gt;
&lt;p&gt;The free plan allows 7k users, social connections and passwordless connections among other things.&lt;/p&gt;
&lt;p&gt;Worth considering for side-projects.&lt;/p&gt;</description><content type="html"><![CDATA[<p><strong>Link:</strong> <a href="https://auth0.com/pricing/">https://auth0.com/pricing/</a></p>
<p>Turns out <code>Auth0</code> has pretty sweet pricing.</p>
<p>The free plan allows 7k users, social connections and passwordless connections among other things.</p>
<p>Worth considering for side-projects.</p>
]]></content></item><item><title>Bandwhich: Find Bandwidth Utilization</title><link>https://www.rajat404.com/posts/2020/07/bandwhich-find-bandwidth-utilization/</link><pubDate>Sun, 05 Jul 2020 00:00:00 +0000</pubDate><guid>https://www.rajat404.com/posts/2020/07/bandwhich-find-bandwidth-utilization/</guid><description>&lt;p&gt;&lt;strong&gt;Link:&lt;/strong&gt; &lt;a href="https://github.com/imsnif/bandwhich"&gt;https://github.com/imsnif/bandwhich&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Curious about which processes on your system are taking up bulk of the bandwidth?&lt;/p&gt;
&lt;p&gt;Well then, Bandwhich is for you!&lt;/p&gt;
&lt;p&gt;A nifty CLI app that does one thing well 💯&lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.rajat404.com/images/bandwhich.png" alt="Screenshot"&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; On macOS you need to run it as &lt;code&gt;sudo&lt;/code&gt;&lt;/p&gt;</description><content type="html"><![CDATA[<p><strong>Link:</strong> <a href="https://github.com/imsnif/bandwhich">https://github.com/imsnif/bandwhich</a></p>
<p>Curious about which processes on your system are taking up bulk of the bandwidth?</p>
<p>Well then, Bandwhich is for you!</p>
<p>A nifty CLI app that does one thing well 💯</p>
<p><img src="/images/bandwhich.png" alt="Screenshot"></p>
<p><strong>Note:</strong> On macOS you need to run it as <code>sudo</code></p>
]]></content></item><item><title>Hugo Shortcodes: Adding Space</title><link>https://www.rajat404.com/posts/2020/06/hugo-shortcodes-adding-space/</link><pubDate>Sun, 21 Jun 2020 00:00:00 +0000</pubDate><guid>https://www.rajat404.com/posts/2020/06/hugo-shortcodes-adding-space/</guid><description>&lt;p&gt;I often found myself wanting to add empty spaces in my text. However the thought of having my text littered with a series of &lt;code&gt;&amp;amp;nbsp;&lt;/code&gt; blocks was repulsive.&lt;/p&gt;
&lt;p&gt;Given that most of the content I write is in markdown, and is rendered via Hugo in most cases - both personal &amp;amp; work, it made sense to develop a simple system which works with any hugo site.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s a simple shortcode that one can add to their static site, and inject &lt;code&gt;n&lt;/code&gt; number of spaces, in a clean fashion.&lt;/p&gt;</description><content type="html"><![CDATA[<p>I often found myself wanting to add empty spaces in my text. However the thought of having my text littered with a series of <code>&amp;nbsp;</code> blocks was repulsive.</p>
<p>Given that most of the content I write is in markdown, and is rendered via Hugo in most cases - both personal &amp; work, it made sense to develop a simple system which works with any hugo site.</p>
<p>Here&rsquo;s a simple shortcode that one can add to their static site, and inject <code>n</code> number of spaces, in a clean fashion.</p>
&nbsp;

<script src="https://gist.github.com/rajat404/0687abbcb61bf969b98df1fea1432916.js"></script>

&nbsp;

<p>Save this as <code>./layouts/partials/space.html</code> in your hugo repository.</p>
<p>Now you can add 10 spaces by adding <code>{{&lt; space 10 &gt;}}</code> in your markdown file.</p>
<h3 id="example">Example</h3>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-md" data-lang="md"><span style="display:flex;"><span>&#34;As that I can see no way out but through&#34;
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>{{&lt; space 50 &gt;}} -- Robert Frost
</span></span></code></pre></div><p>would be rendered as:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-go" data-lang="go"><span style="display:flex;"><span><span style="color:#e6db74">&#34;As that I can see no way out but through&#34;</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;<span style="color:#f92672">&amp;</span><span style="color:#a6e22e">nbsp</span>;
</span></span><span style="display:flex;"><span> <span style="color:#f92672">--</span> <span style="color:#a6e22e">Robert</span> <span style="color:#a6e22e">Frost</span></span></span></code></pre></div>
<p>and would appear as:</p>
<p>&ldquo;As that I can see no way out but through&rdquo;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 &ndash; Robert Frost</p>
<h3 id="bonus">Bonus</h3>
<p>Adding <code>{{&lt; space 1 &gt;}}</code> in a new line, will add an empty line. No more <code>&lt;br&gt;</code> tags!</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-md" data-lang="md"><span style="display:flex;"><span>Text above
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>{{&lt; space 1 &gt;}}
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>Text below
</span></span></code></pre></div><p>and would appear as:</p>
<p>Text above</p>
&nbsp;

<p>Text below</p>
]]></content></item><item><title>Word: Apocrypha</title><link>https://www.rajat404.com/posts/2020/06/word-apocrypha/</link><pubDate>Sun, 21 Jun 2020 00:00:00 +0000</pubDate><guid>https://www.rajat404.com/posts/2020/06/word-apocrypha/</guid><description>&lt;p&gt;A written work with unknown/doubtful origin.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Apocrypha"&gt;Link to Wikipedia&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I didn&amp;rsquo;t know of this word, and it sounds amazing!
I think next time I have a project around documentation or writing of another kind, I&amp;rsquo;ll probably name my repository &lt;em&gt;Apocrypha&lt;/em&gt;.&lt;/p&gt;</description><content type="html"><![CDATA[<p>A written work with unknown/doubtful origin.</p>
<p><a href="https://en.wikipedia.org/wiki/Apocrypha">Link to Wikipedia</a></p>
<p>I didn&rsquo;t know of this word, and it sounds amazing!
I think next time I have a project around documentation or writing of another kind, I&rsquo;ll probably name my repository <em>Apocrypha</em>.</p>
]]></content></item><item><title>Hard Reset Twitter</title><link>https://www.rajat404.com/posts/2020/06/hard-reset-twitter/</link><pubDate>Sat, 20 Jun 2020 00:00:00 +0000</pubDate><guid>https://www.rajat404.com/posts/2020/06/hard-reset-twitter/</guid><description>&lt;p&gt;Towards the end of May 2020 I decided to start over, and unfollowed everyone on twitter.&lt;/p&gt;
&lt;p&gt;Basically &lt;code&gt;git reset --hard &amp;lt;initial commit hash&amp;gt;&lt;/code&gt; for twitter, and re-writing all the code once again.&lt;/p&gt;
&lt;h2 id="why"&gt;Why?&lt;/h2&gt;
&lt;p&gt;This idea (like most good ones) wasn&amp;rsquo;t mine. I had a faint recollection of &lt;a href="http://twitter.com/anildash"&gt;@anildash&lt;/a&gt; doing this couple of years ago.&lt;/p&gt;
&lt;a href="https://x.com/anildash/status/1014524046464208898" target="_blank"&gt;
&lt;figure&gt;
&lt;picture&gt;
&lt;source srcset="https://www.rajat404.com//tweets/x_com_anildash_status_1014524046464208898.png"&gt;
&lt;img src="https://www.rajat404.com//tweets/x_com_anildash_status_1014524046464208898.png" alt="Image is of a tweet by anildash click on the image to read the original tweet" defer class="lazyautosizes lazyloaded" data-sizes="auto" data-src="https://www.rajat404.com//tweets/x_com_anildash_status_1014524046464208898.png" &gt;
&lt;/picture&gt;
&lt;/figure&gt;
&lt;/a&gt;
&lt;p&gt;I used to spend a great deal of time on this codebase(twitter). Back in the pre-COVID era, when we used to work out of offices, I&amp;rsquo;d rarely open twitter during the day, given that some or the other person would be staring at my screen. With COVID-19 that was no longer the case, and the duration of my sessions on twitter soared.&lt;/p&gt;</description><content type="html"><![CDATA[<p>Towards the end of May 2020 I decided to start over, and unfollowed everyone on twitter.</p>
<p>Basically <code>git reset --hard &lt;initial commit hash&gt;</code> for twitter, and re-writing all the code once again.</p>
<h2 id="why">Why?</h2>
<p>This idea (like most good ones) wasn&rsquo;t mine. I had a faint recollection of <a href="http://twitter.com/anildash">@anildash</a> doing this couple of years ago.</p>



<a href="https://x.com/anildash/status/1014524046464208898" target="_blank">
  <figure>
    <picture>
    
      <source srcset="https://www.rajat404.com//tweets/x_com_anildash_status_1014524046464208898.png">
      <img src="https://www.rajat404.com//tweets/x_com_anildash_status_1014524046464208898.png" alt="Image is of a tweet by anildash click on the image to read the original tweet" defer class="lazyautosizes lazyloaded" data-sizes="auto" data-src="https://www.rajat404.com//tweets/x_com_anildash_status_1014524046464208898.png" >
    
    </picture>
  </figure>
</a>

<p>I used to spend a great deal of time on this codebase(twitter). Back in the pre-COVID era, when we used to work out of offices, I&rsquo;d rarely open twitter during the day, given that some or the other person would be staring at my screen. With COVID-19 that was no longer the case, and the duration of my sessions on twitter soared.</p>
<p>Time spent on twitter depends on the volume of content available. This is usually a factor of the number of accounts you follow, and the average number of tweets each account usually posts. At the time I was considering the reset, I was following 883 accounts. LOT of content!</p>
<p>Lately my experience interacting with twitter was largely unpleasant. The only options seem to be - Refactor or Rewrite.
I often found myself consuming content that doesn&rsquo;t resonate with me. Perhaps a past version of me preferred that content. Perhaps he didn&rsquo;t know better.</p>
<h2 id="why-not-refactor">Why not refactor?</h2>
<p>While debugging and analyzing the root cause is always an option, the fundamental design is in question here. I&rsquo;m wiser (well, less stupid) than I was 8 years ago, when I created my account. Simply put the code quality is going to be better.</p>
<p>Usually the major concern when doing a complete overhaul is - Time. The new codebase tends to takes substantially more time that originally anticipated. Something I learned the hard way - several times! Well, given that I end up scrolling through my timeline for an obscenely large amount of time anyway, not much to lose 🙃</p>
<p>Also the overall size &amp; complexity of this particular codebase isn&rsquo;t particularly daunting. Putting aside the code metaphor for a minute, humans &amp; human interactions are far more complex than any codebase I&rsquo;ve come across (yet). There are people I followed as a naive kid, as a fan boy, as an obligation, out of courtesy, or a combination of the above.</p>
<p>There are people in my list, whom I haven&rsquo;t interacted in ages, people I&rsquo;ve long forgotten, people whose values I no longer share. Holding onto remnants of relations that once were, does no good to anyone. Yet another thing I learned the hard way. Sigh.</p>
<p>The above goes for all accounts of organizations as well. Groups I no longer identify with, Bots RTing content I no longer care about, random blasts of suspicious news and whatnot.</p>
<h2 id="what-about-lost-connections">What about lost connections?</h2>
<p>Given how polarizing twitter can be, it&rsquo;s highly likely that I&rsquo;ll find my way back to many of the same accounts I currently interact with. Having said that, I believe it&rsquo;s important to question your beliefs every so often, to re-evaluate yourself, and re-build yourself. While Darwinism emphasizes on the need for change to survive - I believe drastic changes are necessary in order to thrive.</p>
<p>Given that Change is inevitable - one can either proactively forge their path, or accept the path chosen by circumstances. I have trust issues, and expecting The Universe to act in my best interest, usually ends in disappointment &amp; despair. The Universe doesn&rsquo;t play fair. Best make your move before it does.</p>
<p> </p>
<p><em>Originally posted as a tweetstorm</em></p>



<a href="https://x.com/rajat404/status/1263850507992354817" target="_blank">
  <figure>
    <picture>
    
      <source srcset="https://www.rajat404.com//tweets/x_com_rajat404_status_1263850507992354817.png">
      <img src="https://www.rajat404.com//tweets/x_com_rajat404_status_1263850507992354817.png" alt="Image is of a tweet by rajat404 click on the image to read the original tweet" defer class="lazyautosizes lazyloaded" data-sizes="auto" data-src="https://www.rajat404.com//tweets/x_com_rajat404_status_1263850507992354817.png" >
    
    </picture>
  </figure>
</a>

]]></content></item><item><title>My Twitter SOP</title><link>https://www.rajat404.com/posts/2020/06/my-twitter-sop/</link><pubDate>Sat, 20 Jun 2020 00:00:00 +0000</pubDate><guid>https://www.rajat404.com/posts/2020/06/my-twitter-sop/</guid><description>&lt;h3 id="should-you-unfollow-me"&gt;Should you unfollow me?&lt;/h3&gt;
&lt;p&gt;Absolutely!&lt;/p&gt;
&lt;p&gt;If the content I&amp;rsquo;ve been posting isn&amp;rsquo;t something you feel like consuming, go ahead and unfollow.&lt;/p&gt;
&lt;p&gt;Our paths are likely to meet again at some point 🤞&lt;/p&gt;
&lt;h3 id="should-you-mute-me"&gt;Should you mute me?&lt;/h3&gt;
&lt;p&gt;I&amp;rsquo;d rather you don&amp;rsquo;t 😅&lt;/p&gt;
&lt;p&gt;Feel free to unfollow. Muting closes doors to the possibility of any interaction in future.&lt;/p&gt;
&lt;h3 id="should-you-follow-me"&gt;Should you follow me?&lt;/h3&gt;
&lt;p&gt;Give it a shot. Nothing to lose. You can always unfollow 😉&lt;/p&gt;
&lt;h3 id="what-wont-i-post"&gt;What won&amp;rsquo;t I post?&lt;/h3&gt;
&lt;p&gt;Starting quite recently, I refrain from tweeting about politics, religion, or whatever the headlines are saying in any given news cycle.&lt;/p&gt;</description><content type="html"><![CDATA[<h3 id="should-you-unfollow-me">Should you unfollow me?</h3>
<p>Absolutely!</p>
<p>If the content I&rsquo;ve been posting isn&rsquo;t something you feel like consuming, go ahead and unfollow.</p>
<p>Our paths are likely to meet again at some point 🤞</p>
<h3 id="should-you-mute-me">Should you mute me?</h3>
<p>I&rsquo;d rather you don&rsquo;t 😅</p>
<p>Feel free to unfollow. Muting closes doors to the possibility of any interaction in future.</p>
<h3 id="should-you-follow-me">Should you follow me?</h3>
<p>Give it a shot. Nothing to lose. You can always unfollow 😉</p>
<h3 id="what-wont-i-post">What won&rsquo;t I post?</h3>
<p>Starting quite recently, I refrain from tweeting about politics, religion, or whatever the headlines are saying in any given news cycle.</p>
<p>Twitter has a variety of channels for consuming information pertaining to current affairs - me not retweeting about the numerous social injustices doesn&rsquo;t mean the information won&rsquo;t reach the people who need it.</p>
<h3 id="what-will-i-post">What will I post?</h3>
<p>I&rsquo;m a digital nomad who tends to stumble upon shiny things in the interwebs and is likely to hoard them. I mostly post about such stuff.</p>
<p>Some other topics I tweet about - software development, productivity,  mental health, human behaviour, organizational psychology.</p>
<p>Needless to say I do log a lot of my thoughts &amp; life events on twitter. The frequency usually depends on how busy I&rsquo;ve been at a given point in time.</p>
<h3 id="why-dont-i-follow-you">Why don&rsquo;t I follow you?</h3>
<p>Most likely, recent content of your feed didn&rsquo;t resonate with me - at the time I last checked.</p>
<h3 id="why-did-i-unfollow-you">Why did I unfollow you?</h3>
<p>Same as above. Though I&rsquo;m always open to re-following folks.</p>
]]></content></item><item><title>Meditation: The Software Analogy</title><link>https://www.rajat404.com/posts/2020/05/meditation-the-software-analogy/</link><pubDate>Mon, 25 May 2020 00:00:00 +0000</pubDate><guid>https://www.rajat404.com/posts/2020/05/meditation-the-software-analogy/</guid><description>&lt;p&gt;&lt;em&gt;There are multiple benefits of meditating, however they won&amp;rsquo;t be discussed here. This post aims to answer the &lt;code&gt;What&lt;/code&gt; &amp;amp; &lt;code&gt;How&lt;/code&gt;, rather than the &lt;code&gt;Why&lt;/code&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Most people in my circle are affiliated in some way with software development. So when a developer friend of mine asked, &amp;ldquo;What is Meditation?&amp;rdquo;, I came up with an answer in terminology s/he could grok. Sharing with others, who&amp;rsquo;ve had similar questions on their mind.&lt;/p&gt;</description><content type="html"><![CDATA[<p><em>There are multiple benefits of meditating, however they won&rsquo;t be discussed here. This post aims to answer the <code>What</code> &amp; <code>How</code>, rather than the <code>Why</code>.</em></p>
<p>Most people in my circle are affiliated in some way with software development. So when a developer friend of mine asked, &ldquo;What is Meditation?&rdquo;, I came up with an answer in terminology s/he could grok. Sharing with others, who&rsquo;ve had similar questions on their mind.</p>
<h2 id="the-context">The Context</h2>
<p>The brain is an organic computer - equipped with memory, and processing capability. Consciousness is the <a href="https://en.wikipedia.org/wiki/Init">init</a> process. Every line of thinking is a process forked from your consciousness. Like any other computer, the brain has limited number of cores, thus limited processing power. Some processes can utilise all cores, some can&rsquo;t. Even if every single process could utilise all cores, you still have limited cores.</p>
<p>At any given moment of time of any waking hour, there are multiple lines of thoughts running in your mind. One thinking about the argument you had yesterday, one wondering where to order lunch from, one focusing on the critical assignment that you must submit by end of the day, one dreading the boring meeting that begins in half an hour and perhaps few more.</p>
<p>Needless to say there are also daemons running, taking care of the mundane functions of moving air, glucose, blood and the likes, in the body.</p>
<p>Now, think of the following scenarios:</p>
<blockquote>
<p>What happens when you have too many processes running?</p>
<p>What happens when one process takes too much CPU/RAM?</p>
<p>What happens when you have <a href="https://en.wikipedia.org/wiki/Zombie_process">zombie processes</a> running amok in the machine?</p>
</blockquote>
<p>In any of the aforementioned situations, the outcome is on the lines of resource starvation - high priority processes not getting the resources they need, or to put it another way, resources are wasted on processes you don&rsquo;t even want to run. The best case scenario being sub-optimal performance of the process, and worst case - system crash.</p>
<p>The vicissitudes of life, coupled with the unhealthy lifestyle that has become mainstream, and the urge to run faster on our hamster-wheels in the rat-race, is the psychological equivalent of a <a href="https://en.wikipedia.org/wiki/Fork_bomb">fork-bomb</a>. Pointless worries, pitiful misunderstandings, vain desires, blind ambition, and the burden of expectations are nothing but unwanted processes starving your mind. Ability to think, feel &amp; connect are dimmed by greed, envy &amp; lust.</p>
<h2 id="the-solution">The Solution</h2>
<p>Picture yourself staring at a terminal showing you all the processes that are running. What would happen if you saw a random process with an innocuous name hogging 80% CPU? You&rsquo;d invoke a SIGTERM/SIGKILL. Right?</p>
<p>Meditation is the willful execution of <code>ps aux</code> on your system - observing the processes that are created. When you notice a process that isn&rsquo;t desired, you hit <code>kill -9</code>. Another random process pops up - again <code>kill -9</code>.</p>
<p>For now your intended processes have ample resources, but what&rsquo;s to keep another fork bomb from hijacking resources tomorrow? So we must do for our mind, what we do for our servers - we automate! Unfortunately the only thing in human beings that&rsquo;s even remotely analogous to a <code>cron job</code> is <code>habit</code>. There is no easy way out of this.</p>
<p>Consider doing this exercise of monitoring &amp; eliminating every morning for 10 minutes to begin with. What happens if you meditate for 30 minutes? Well, the probability of unwanted processes cropping up reduces. Simply put, the time you spend on observing &amp; curating your state of mind is inversely proportional to the chances of unwanted thoughts intruding on your consciousness.</p>
<p>Hope this gives you a relatable mental model to grok meditation. Meditation isn&rsquo;t some <em>Art of Living</em> faff, but a simple straightforward technique to manage your system health.
Hope this gives you a relatable mental model to grok meditation. Meditation isn&rsquo;t some <em>Art of Living</em> faff, but a simple straightforward technique to manage your system health.</p>
]]></content></item><item><title>FOMO: The Abyss of My Hoarded Treasure</title><link>https://www.rajat404.com/posts/2020/05/fomo-the-abyss-of-my-hoarded-treasure/</link><pubDate>Sun, 24 May 2020 00:00:00 +0000</pubDate><guid>https://www.rajat404.com/posts/2020/05/fomo-the-abyss-of-my-hoarded-treasure/</guid><description>&lt;p&gt;10 seconds into the article, it was established that it interested me. Though I didn&amp;rsquo;t feel like reading it right then, for it was a busy day (not unlike most days). I clicked on the &lt;code&gt;Pocket&lt;/code&gt; icon tucking it away for later.&lt;/p&gt;
&lt;p&gt;Back to browsing twitter. Half a dozen new links from &lt;code&gt;Hacker News&lt;/code&gt; since morning - someone deployed something on RaspberryPi, another startup got funding for doing X with Blockchain, yet another flaw found in self-driving cars - the usual stuff.&lt;/p&gt;</description><content type="html"><![CDATA[<p>10 seconds into the article, it was established that it interested me. Though I didn&rsquo;t feel like reading it right then, for it was a busy day (not unlike most days). I clicked on the <code>Pocket</code> icon tucking it away for later.</p>
<p>Back to browsing twitter. Half a dozen new links from <code>Hacker News</code> since morning - someone deployed something on RaspberryPi, another startup got funding for doing X with Blockchain, yet another flaw found in self-driving cars - the usual stuff.</p>
<p>Wait, what&rsquo;s that last one - <code>An Interactive Regex Tutorial</code>. Now that I think about it, I have been meaning to hone my regex skills. Click. Ah! swanky UI. Will definitely use this - but later. Too busy right now. <code>Share &gt; Add Tweet to Bookmarks</code>. I&rsquo;ll come back to it later; at least that&rsquo;s what I told myself.</p>
<blockquote>
<p>Data, data everywhere, not a single drop of peace.</p>
</blockquote>
<p>Yet another day in the life of the hoarder; scrounging for knowledge/wisdom/information among the drivel of the interwebs. As much as I&rsquo;d like to blame technology for my fear of missing out, it was always there. Technology merely provided a channel for my depravities. As I stood leering at the broken beauty of the Internet, the flood-gates opened and out came gushing - everything I thought I wanted; filling my senses to the brim and then some, until I was subsumed by own perversions.</p>
<p>Everyday I found myself bombarded with links. All with the same allure, and similar destinies - either <code>Save to Pocket</code> or <code>Add Bookmark</code>; though most of my usual haunts offered their own versions of the coffers that grew deeper with every link I dropped - <code>Add Tweet to Bookmarks</code> on Twitter, <code>Save post</code> on Facebook, <code>Save to Watch later</code> on Youtube. Even Instagram has a little bookmark button next to each post - what you&rsquo;re supposed to save it for, is beyond me.</p>
<p>On some good days when I could muster the will to open the pandora&rsquo;s box, the sheer enormity of my precious hoard would throw me. Until a month ago, I had accrued 9K links on <code>Pocket</code> alone. Rest of the accounts were peanuts compared to it. This was the anxiety inducing behemoth that must be dealt with, in order to make a dent.</p>
<blockquote>
<p>&ldquo;As that I can see no way out but through&rdquo; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 &ndash; Robert Frost</p>
</blockquote>
<p>And so I dipped my toes into the golden cesspool. The goal was to bring the number down. I decided to delete as much as possible. My algorithm for curation was simple:</p>
<ol>
<li>
<p>Pick the first link in the queue, and read its title.</p>
</li>
<li>
<p>Based on the title decide:</p>
<ul>
<li>
<p>Is it something I could&rsquo;ve used in the last 6 months?</p>
<p>OR</p>
</li>
<li>
<p>Is it something I&rsquo;m <code>extremely</code> likely to use in the next 6 months?</p>
</li>
</ul>
</li>
<li>
<p>Delete the link If <code>step 2</code>  yields  <code>False</code>.</p>
</li>
<li>
<p>Exit if reached the end of queue, else go to <code>step 1</code>.</p>
</li>
</ol>
<p>This took me a few days, but at the end, I was left with 2K links. Seemed a lot more manageable, compared to its original form. Since then I&rsquo;ve managed to read tens of links in the queue. Though regrettably I added more than I read, and currently the count has reached 2.9K.</p>
<p>Meh, baby steps.</p>
<p>More importantly I needed a system in place to keep the agents of anarchy at bay. A means to not only distill the knowledge, but also organize it in a secure, searchable &amp; manageable format. A digital Eden where the inherent entropy of the universe can be channeled, without destroying itself. This was a long search in itself, though I did manage to find such a system. More on that in another post soon.</p>
]]></content></item><item><title>Wake up, Neo</title><link>https://www.rajat404.com/posts/2020/04/wake-up-neo/</link><pubDate>Sat, 18 Apr 2020 00:00:00 +0000</pubDate><guid>https://www.rajat404.com/posts/2020/04/wake-up-neo/</guid><description>&lt;p&gt;The Matrix Has You&lt;/p&gt;</description><content type="html">&lt;p>The Matrix Has You&lt;/p>
</content></item><item><title>The Eloquent Programmer</title><link>https://www.rajat404.com/posts/2018/02/the-eloquent-programmer/</link><pubDate>Thu, 22 Feb 2018 00:00:00 +0000</pubDate><guid>https://www.rajat404.com/posts/2018/02/the-eloquent-programmer/</guid><description>&lt;blockquote&gt;
&lt;p&gt;Clean code is simple and direct. Clean code reads like well-written prose.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Robert C. Martin&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;While most of us would agree with Uncle Bob, that code should read like well-written prose, we usually fail to achieve it. Being able to write code that reads like well-written prose implies that one is capable of writing decent prose in the first place, which is far from true for most programmers.&lt;/p&gt;
&lt;h2 id="wordsmith-or-smith-with-words"&gt;Wordsmith, or smith with words&lt;/h2&gt;
&lt;p&gt;Code, to put it very crudely, is just a bunch of words. So, the pre-requisite for writing beautiful code is to write beautiful words.&lt;/p&gt;</description><content type="html"><![CDATA[<blockquote>
<p>Clean code is simple and direct. Clean code reads like well-written prose.</p>
<ul>
<li>Robert C. Martin</li>
</ul>
</blockquote>
<p>While most of us would agree with Uncle Bob, that code should read like well-written prose, we usually fail to achieve it. Being able to write code that reads like well-written prose implies that one is capable of writing decent prose in the first place, which is far from true for most programmers.</p>
<h2 id="wordsmith-or-smith-with-words">Wordsmith, or smith with words</h2>
<p>Code, to put it very crudely, is just a bunch of words. So, the pre-requisite for writing beautiful code is to write beautiful words.</p>
<p>In order to write cleaner code, one needs to excel in transcribing their thoughts into the most beautiful &amp; simplistic words possible. This requires a disambiguation of code &amp; prose, both on an individual and organisation level. Code encompasses prose rather than being orthogonal to it.</p>
<p>It’s imperative to understand what beautiful prose is, and be able to truly appreciate well written prose before one can begin to write well worded, meaningful statements that clearly express intent.</p>
<h2 id="mastering-the-ink">Mastering the Ink</h2>
<p>Writing well-worded statements is quite literally an art. Excelling in writing, like any other vocation, requires study &amp; practise. Writing a journal or a blog can significantly improve one’s ability to drown out the noise, think clearly, and put those thoughts into succinct, purposeful words.</p>
<p>Reading is part and parcel of writing better. Reading more books/articles/blogs give you insights into the minds of other authors, expose you to new phrases/terms/expressions, and gives you better tools to frame your thoughts.</p>
<h2 id="novice-to-master">Novice to Master</h2>
<p>While I wish there were simpler ways of improving one’s skillset, the only foreseeable way to be better at writing, and everything else for that matter, is by deliberate practise.</p>
]]></content></item><item><title>To optimize or not to optimize</title><link>https://www.rajat404.com/posts/2018/02/to-optimize-or-not-to-optimize/</link><pubDate>Wed, 21 Feb 2018 00:00:00 +0000</pubDate><guid>https://www.rajat404.com/posts/2018/02/to-optimize-or-not-to-optimize/</guid><description>&lt;p&gt;While we all have read &amp;amp; heard &lt;a href="http://wiki.c2.com/?PrematureOptimization"&gt;Knuth’s immortal words&lt;/a&gt; on pre-optimization, the question becomes when is the right time to optimize, and more importantly, what to optimize?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;ldquo;premature optimization is the root of all evil&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;At what point do you really step into the trenches, and dig through your garbled code, which by this point is the direct function of all the accrued technical debt you thought you’ll handle later.&lt;/p&gt;</description><content type="html"><![CDATA[<p>While we all have read &amp; heard <a href="http://wiki.c2.com/?PrematureOptimization">Knuth’s immortal words</a> on pre-optimization, the question becomes when is the right time to optimize, and more importantly, what to optimize?</p>
<blockquote>
<p>&ldquo;premature optimization is the root of all evil&rdquo;</p>
</blockquote>
<p>At what point do you really step into the trenches, and dig through your garbled code, which by this point is the direct function of all the accrued technical debt you thought you’ll handle later.</p>
<h2 id="the-code-speaks">The code speaks</h2>
<p>A good time to optimize your code would be when the code tells you. Code that needs optimization would either be slower than expected, or consume absurdly large amounts of processing power or memory.</p>
<p>If you listen hard, you can sometimes hear the screams of the servers echoing in the basement. It’s either that, or the ghost of our last IT guy.</p>
<h2 id="what-to-optimize">What to optimize?</h2>
<p>It’s imperative to keep your instincts aside when deciding which part of code requires optimization. Trust nothing but empirical evidence. The only scientific way to find the root cause of performance blockage is to profile your code. There’s a wide array of profiling tools at one’s disposal in almost every language.</p>
<p>Rules of Optimization:</p>
<ol>
<li>Profile</li>
<li>Profile</li>
<li>Profile</li>
<li>Profile</li>
<li>Optimize</li>
</ol>
]]></content></item><item><title>Stuck in the Void</title><link>https://www.rajat404.com/posts/2018/02/stuck-in-the-void/</link><pubDate>Mon, 19 Feb 2018 00:00:00 +0000</pubDate><guid>https://www.rajat404.com/posts/2018/02/stuck-in-the-void/</guid><description>&lt;p&gt;As I stare at my blank screen thinking of things to write about for the quasi-mandatory daily blog post, I draw a blank. My mind which usually is in overdrive when thinking of random crap, seems to squirm at the idea of having any meaningful thoughts whatsoever.&lt;/p&gt;
&lt;p&gt;Something my mind keeps going back to, is &lt;a href="https://www.youtube.com/watch?v=OMPfEXIlTVE"&gt;the talk by Sandi Metz&lt;/a&gt; mentioning the Null Object design pattern, which stated that null is not nothing, and should be encapsulated accordingly. I wonder if the same applies to our thoughts as well.&lt;/p&gt;</description><content type="html"><![CDATA[<p>As I stare at my blank screen thinking of things to write about for the quasi-mandatory daily blog post, I draw a blank. My mind which usually is in overdrive when thinking of random crap, seems to squirm at the idea of having any meaningful thoughts whatsoever.</p>
<p>Something my mind keeps going back to, is <a href="https://www.youtube.com/watch?v=OMPfEXIlTVE">the talk by Sandi Metz</a> mentioning the Null Object design pattern, which stated that null is not nothing, and should be encapsulated accordingly. I wonder if the same applies to our thoughts as well.</p>
<p>What’s the nomenclature for the state when one’s mind is blank, when you are not exactly at peace, but not really thinking of anything. How does one define this null state of the brain. This void, if you will. The agitating nothingness, that drowns in the recursive flood of the unsavoury thought of not having any worthwhile thoughts.</p>
<p>I guess I should stop overthinking it, before I crash with stack overflow.</p>
]]></content></item><item><title>The Caffeine Conundrum</title><link>https://www.rajat404.com/posts/2018/02/the-caffeine-conundrum/</link><pubDate>Sat, 17 Feb 2018 00:00:00 +0000</pubDate><guid>https://www.rajat404.com/posts/2018/02/the-caffeine-conundrum/</guid><description>&lt;p&gt;Coffee — the wonder drug draped in the facade of a regular drink, offering respite from the shackles of sleep. Perhaps one of the earliest bio-hacks conceived by humanity.&lt;/p&gt;
&lt;p&gt;While a good cup of joe keeps one’s mind active, chugging copious amounts of coffee can wreak havoc on your sleep cycle.&lt;/p&gt;
&lt;h2 id="the-night-of"&gt;The night of&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;This project is critical and must be finished tonight.&lt;/p&gt;
&lt;p&gt;The deadline is tomorrow morning.&lt;/p&gt;
&lt;p&gt;It’s just a one time thing.&lt;/p&gt;</description><content type="html"><![CDATA[<p>Coffee — the wonder drug draped in the facade of a regular drink, offering respite from the shackles of sleep. Perhaps one of the earliest bio-hacks conceived by humanity.</p>
<p>While a good cup of joe keeps one’s mind active, chugging copious amounts of coffee can wreak havoc on your sleep cycle.</p>
<h2 id="the-night-of">The night of</h2>
<blockquote>
<p>This project is critical and must be finished tonight.</p>
<p>The deadline is tomorrow morning.</p>
<p>It’s just a one time thing.</p>
<p>One all-nighter is not that big a deal.</p>
<p>Just one more hour, and then I turn off the lights.</p>
</blockquote>
<p>All the above are statements we’ve told ourselves at some point of time to convince our mind to push through the night, to fight the good fight against the evil sleep.</p>
<p>Nothing but lies we choose to feed on, as Lucifer’s laughter echoes through the pits of the underworld.</p>
<h2 id="the-morning-after">The morning after</h2>
<p>You get out of bed, groggy from last night’s gruelling effort, looking for your morning fix of that sweet nectar that shall keep you awake during that ultra-important meeting that you can’t miss.</p>
<p>Few hours have passed, and your mind begins to demand sleep. You silence that weak brain of yours by drowning it in a double-espresso. Ah! Good riddance.</p>
<p>Another hour passes, and the urge to let your eyelids fall, returns. Why though? You just had the elixir of sleeplessness. Perhaps it was too weak. A stronger dose should do the job.</p>
<p>Clock continues to tick away, and your mind keeps swinging from the state of extreme awareness, to zoning out from time to time.</p>
<p>Fatigue kicks in, making yet another argument to lie down and slip into the realm of dreams. Just a few more hours, you think. The day is about to be over.</p>
<p>You reach home with the hopes of finally getting that good sleep you’ve been thinking of all day. Though now that you lie between the sheets, sleep eludes you, perhaps upset that you’ve been avoiding it.</p>
<h2 id="the-regret">The Regret</h2>
<p>As you lay awake cursing that evening coffee, wishing you hadn’t had it, you are torn between your desire to sleep, and your brain’s disapproval of turning off for the night.</p>
<p>You succumb to your mind’s erratic behaviour and close your eyes hoping for the noise to drown, vowing under your breath to not consume so much caffeine in future, knowing fully well, the futility of that promise.</p>
]]></content></item><item><title>Code - The Necessary Liability</title><link>https://www.rajat404.com/posts/2018/02/code-the-necessary-liability/</link><pubDate>Thu, 15 Feb 2018 00:00:00 +0000</pubDate><guid>https://www.rajat404.com/posts/2018/02/code-the-necessary-liability/</guid><description>&lt;p&gt;While we all aim to improve the quality of our code, it’s perhaps best to sometimes take a step back and look at the bigger picture.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;ldquo;Source Code Is A Liability, Not An Asset&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;These words have been said time and again. I first came across it in Kiran Jonnalagadda’s &lt;a href="https://www.youtube.com/watch?v=_stsJlNgGfA"&gt;PyCon India talk&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;But why? As I understand it, code requires constant maintenance. It needs to be cared for. It constantly needs to be changed. I needs to be deployed, and then those deployments need to be managed. If by a stroke of luck, you find yourself responsible for a codebase that is happily running in production without any intervention from you, once in a while some massive bug like Spectre or Meltdown would be revealed and you’ll have to upgrade/replace your servers.&lt;/p&gt;</description><content type="html"><![CDATA[<p>While we all aim to improve the quality of our code, it’s perhaps best to sometimes take a step back and look at the bigger picture.</p>
<blockquote>
<p>&ldquo;Source Code Is A Liability, Not An Asset&rdquo;</p>
</blockquote>
<p>These words have been said time and again. I first came across it in Kiran Jonnalagadda’s <a href="https://www.youtube.com/watch?v=_stsJlNgGfA">PyCon India talk</a>.</p>
<p>But why? As I understand it, code requires constant maintenance. It needs to be cared for. It constantly needs to be changed. I needs to be deployed, and then those deployments need to be managed. If by a stroke of luck, you find yourself responsible for a codebase that is happily running in production without any intervention from you, once in a while some massive bug like Spectre or Meltdown would be revealed and you’ll have to upgrade/replace your servers.</p>
<h2 id="why-code">Why code?</h2>
<p>Code is a necessary evil. We require some kind of interface to interact with the machine. Code is currently the only such medium. So while we can’t stay away from code, we should see it for what it is.</p>
]]></content></item><item><title>Good vs Better</title><link>https://www.rajat404.com/posts/2018/02/good-vs-better/</link><pubDate>Wed, 14 Feb 2018 00:00:00 +0000</pubDate><guid>https://www.rajat404.com/posts/2018/02/good-vs-better/</guid><description>&lt;p&gt;While we’re aiming for good, what’s often overlooked is — what truly passes for ‘good’ in a given setting. Good is highly subjective, and can mean different things to different people, in different situations.&lt;/p&gt;
&lt;p&gt;This is applicable in most contexts — including software engineering. While we strive to write ‘good’ code, many of us might be oblivious to what good code should look like.&lt;/p&gt;
&lt;p&gt;A major challenge when seeking ‘goodness’ is that it’s hard to visualise and measure. Any goal becomes harder to achieve if one isn’t clear on what the end result is supposed to be.&lt;/p&gt;</description><content type="html"><![CDATA[<p>While we’re aiming for good, what’s often overlooked is — what truly passes for ‘good’ in a given setting. Good is highly subjective, and can mean different things to different people, in different situations.</p>
<p>This is applicable in most contexts — including software engineering. While we strive to write ‘good’ code, many of us might be oblivious to what good code should look like.</p>
<p>A major challenge when seeking ‘goodness’ is that it’s hard to visualise and measure. Any goal becomes harder to achieve if one isn’t clear on what the end result is supposed to be.</p>
<h2 id="the-programmers-perspective">The Programmer’s Perspective</h2>
<p>Imagine writing code without specs/tests. Sounds outrageous, right? The absence of specs implies that we don’t know what we are aiming for. So one can toil endlessly, but the entire endeavour is unlikely to yield any meaningful results.</p>
<p>Now recall the last time you refactored a piece of code. You begin with the aim of improving the code to a somewhat better state. After spending some time on the problem, you could notice significant change in your code. Perhaps you decomposed a method into two, replaced inheritance with delegation, or something else. Whatever it was, it improved the state and appearance of the code, and gave you a momentary feeling of respite.</p>
<p>While working towards something better didn’t take you to the pinnacle, it took you a step forward.</p>
<h2 id="the-end-of-good">The end of good?</h2>
<p>We are certainly not meant to stop chasing good. We only need to have a clear picture of what good is. If ever in doubt, of what good is, seek better. For no step is too small, as long as it moves forward.</p>
]]></content></item></channel></rss>