<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[Narendra Vardi]]></title><description><![CDATA[The diary of an Indian programmer.]]></description><link>https://www.narendravardi.com/</link><image><url>https://www.narendravardi.com/favicon.png</url><title>Narendra Vardi</title><link>https://www.narendravardi.com/</link></image><generator>Ghost 5.79</generator><lastBuildDate>Fri, 23 Feb 2024 03:51:01 GMT</lastBuildDate><atom:link href="https://www.narendravardi.com/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[😃 How to introduce yourself as a new tenant in a small apartment complex]]></title><description><![CDATA[In this article, I narrate how my friend introduced himself to all the members of an apartment complex when he shifted to this new apartment complex.]]></description><link>https://www.narendravardi.com/how-to-make-a-good-impression-as-a-new-tenant/</link><guid isPermaLink="false">6348ecc26a7d7e004d9fb8e4</guid><category><![CDATA[Misc]]></category><dc:creator><![CDATA[Narendra Vardi]]></dc:creator><pubDate>Fri, 22 Dec 2023 10:30:33 GMT</pubDate><media:content url="https://www.narendravardi.com/content/images/2023/12/DALL-E-2023-12-20-21.20.16---In-the-corner-of-the-room--there-is-a-stoll-on-which-has-a-letter-and-bunch-of-chocolate-are-present.-With-a-note-which-is-clearly-visible-_help-yours.png" medium="image"/><content:encoded><![CDATA[<img src="https://www.narendravardi.com/content/images/2023/12/DALL-E-2023-12-20-21.20.16---In-the-corner-of-the-room--there-is-a-stoll-on-which-has-a-letter-and-bunch-of-chocolate-are-present.-With-a-note-which-is-clearly-visible-_help-yours.png" alt="&#x1F603; How to introduce yourself as a new tenant in a small apartment complex"><p>Recently, I met a college friend after several years. He had relocated to a new city, and we discussed many things. While we were catching up on our lives, he discussed what he did in the early days of relocating to this new city to introduce himself to all the tenants in the apartment building. </p><p>This is a small apartment complex with five to six flats. Hence, it is easy to follow this sweet trick.</p><p>He was very brief regarding the explanation, but this is what I imagined he would&apos;ve done!  </p><hr><p>After getting rest from all the relocation chores, he went to the supermarket to buy chocolates, decorative items, and A4 sheets. </p><p>He wrote an A4 sheet, an introductory note with a miniature painting and pasted it to the main hallway. </p><p>He decorated the area around the hallway and kept all the chocolates on a small stool, with a note saying &quot;help yourself!&quot; near the introductory poster he had posted.</p><hr><p>In my opinion, it is a simple idea, and I felt nice listening to this idea. This gesture from a new tenant makes me at least take the initiative to knock on the door and say, &quot;Welcome!&quot;</p><p>How would you receive a new tenant if they did something like this? Let me know in the comments below, or <a href="mailto:narendravardi1127@gmail.com">drop me an email</a>.</p><hr><div class="kg-card kg-button-card kg-align-center"><a href="https://www.narendravardi.com/#/portal/signup/free" class="kg-btn kg-btn-accent">Subscribe for Free</a></div><hr><p><strong>Recommendations</strong></p><p>If you liked this article, you might also like reading the following.</p><ul><li><a href="https://www.narendravardi.com/reaching-alone/">Travelling to Paris all alone</a></li><li><a href="https://www.narendravardi.com/360-picture-work/">My work on the 360&#xB0; photographs</a></li><li><a href="https://www.narendravardi.com/international-purchases/">International purchases and the sweet kick on the butt</a></li></ul><hr><p>&#x2764;&#xFE0F; Enjoyed this article?</p><p>Forward to a friend and let them know where they can subscribe (hint: it&apos;s <a href="https://www.narendravardi.com/#/portal/signup/free">here</a>).</p><p>Anything else? Comment below to say hello!</p><hr>]]></content:encoded></item><item><title><![CDATA[✍️ Understanding the difference between Pre-Increment and Post-Increment Operator in Java (and C and C++)]]></title><description><![CDATA[In this article, I will show you a straight-forward way of looking at pre and post increment operators that are common in languages like C, C++ and Java ]]></description><link>https://www.narendravardi.com/pre-post-increment/</link><guid isPermaLink="false">651ef522e7db2d0001b494a0</guid><category><![CDATA[Programming]]></category><category><![CDATA[2023]]></category><dc:creator><![CDATA[Narendra Vardi]]></dc:creator><pubDate>Sat, 14 Oct 2023 10:30:25 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1550439062-609e1531270e?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDQ2fHxjb2RlfGVufDB8fHx8MTY5NjUyNzgzNHww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" medium="image"/><content:encoded><![CDATA[<img src="https://images.unsplash.com/photo-1550439062-609e1531270e?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDQ2fHxjb2RlfGVufDB8fHx8MTY5NjUyNzgzNHww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" alt="&#x270D;&#xFE0F; Understanding the difference between Pre-Increment and Post-Increment Operator in Java (and C and C++)"><p><em>Hi! My name is Narendra Vardi, and I write about my learnings, observations and trends in the Software world. Besides software, I also talk about photography, travel stories, books and movies. If that&apos;s something that interests you, consider&#xA0;<a href="https://www.narendravardi.com/#/portal/signup/free"><em>subscribing</em></a>.</em></p><hr><div class="kg-card kg-callout-card kg-callout-card-green"><div class="kg-callout-emoji">&#x1F4A1;</div><div class="kg-callout-text">There is a bit of easy code in this article. Don&apos;t feel intimidated! :D</div></div><p>Before we get into the details of the article, let me ask you a question. </p><h3 id="can-you-tell-me-what-will-be-the-output-of-following-program">Can you tell me what will be the output of following program? </h3><figure class="kg-card kg-code-card"><pre><code class="language-Java">class Main {
    public static void main(String[] args) {
        int a = 2;
        int b = 2;
        a++;
        b++;
        System.out.println(a);
        System.out.println(b);
    }
}
</code></pre><figcaption><p><span style="white-space: pre-wrap;">Example #1</span></p></figcaption></figure><p>It&apos;s fairly easy one right? </p><p>The output must be the following, correct?</p><figure class="kg-card kg-code-card"><pre><code>3
3</code></pre><figcaption><p><span style="white-space: pre-wrap;">Output of Example #1</span></p></figcaption></figure><hr><h3 id="now-lets-take-one-more-sample-code-what-will-be-the-output-of-following-program">Now, let&apos;s take one more sample code. What will be the output of following program?</h3><figure class="kg-card kg-code-card"><pre><code class="language-Java">class Main {
    public static void main(String[] args) {
        int a = 2;
        int b = 2;

        System.out.println(++a);
        System.out.println(b++);
    }
}</code></pre><figcaption><p><span style="white-space: pre-wrap;">Example #2</span></p></figcaption></figure><p>It&apos;s fairly easy but also a tricky one isn&apos;t it? </p><p>So, the output is:</p><figure class="kg-card kg-code-card"><pre><code>3
2</code></pre><figcaption><p><span style="white-space: pre-wrap;">Output of Example #2</span></p></figcaption></figure><p>Now if you understood this output, you can stop reading this article! (Having said that you can share some feedback on how the article is provided that you know the concepts &#x1F604;)</p><p>If you didn&apos;t understand this output, let me tell you what&apos;s happening. </p><p>When we are taught these operators in colleges or beginner books, the first example they would give is using these operators as a single statement. </p><pre><code>a++; // single statement
++a; // single statement</code></pre><p>Because of the way it is used, we only see <code>++</code> as a increment operator and we don&apos;t really focus on whats the difference between <code>++a</code> and <code>a++</code></p><p>Now when we combine <code>++a</code> and <code>a++</code> with other operators (or used in methods as Example #2), we will get to know the difference. </p><h3 id="so-whats-the-major-difference"><strong>So, what&apos;s the major difference? </strong></h3><p>Before we get into the differences, lets see what&apos;s the increment operator doing. </p><p><strong>What&apos;s the increment operator? </strong></p><p>Increment operator has two functionalities. </p><ol><li>It increments the value of the variable and </li><li>It returns a value (What value - we will talk about it)</li></ol><p>Now talking about <code>It increments the value of the variable</code> functionality, this is same for <code>++a</code> and <code>a++</code> . <code>a</code> value will be incremented by <code>1</code> in both the usages.</p><p>The major difference is observed with the second functionality, <code>It returns a value</code></p><ul><li><code>++a</code> -&gt; returns incremented value where as </li><li><code>a++</code> -&gt; returns the value and does the increment later. </li></ul><p>And that&apos;s the reason why <code>System.out.println(++a);</code> returned 3 when a was initially 2 but <code>System.out.println(a++);</code> remained 2.</p><p>To clarify even better, I wrote a Java class that helps us visualise the work of Pre and Post Increment Operators. </p><p>Here&apos;s the code for the same. Take a look at it and let me know what you think! </p><figure class="kg-card kg-code-card"><pre><code class="language-Java">public class PostIncrement {
  private int x;

  public PostIncrement(int x) {
    this.x = x;
  }

  // similar to x++;
  public int increment() {
    int temp = x;
    x = x + 1;
    return temp;
  }
  
  public int getX() {
    return x;
  }
  // add a toString() method.
}</code></pre><figcaption><p><span style="white-space: pre-wrap;">PostIncrement.java</span></p></figcaption></figure><figure class="kg-card kg-code-card"><pre><code class="language-Java">public class PreIncrement {
    private int x;

    public PreIncrement(int x) {
        this.x = x;
    }

    // similar to ++x
    public int increment() {
        x = x + 1;
        return x;
    }

    public int getX() {
        return x;
    }
    // add a toString() method.
}</code></pre><figcaption><p><span style="white-space: pre-wrap;">PreIncrement.java</span></p></figcaption></figure><p>Finally, let&apos;s see how the <code>example #2</code> looks using the increment class that I have written. </p><figure class="kg-card kg-code-card"><pre><code class="language-Java">class Main {
    public static void main(String[] args) {
        PreIncrement a = new PreIncrement(2);
        PostIncrement b = new PostIncrement(2);
        System.out.println(a.increment());
        System.out.println(b.increment());
    }
}
</code></pre><figcaption><p dir="ltr"><span style="white-space: pre-wrap;">Example #2 using PostIncrement and PreIncrement classes.</span></p></figcaption></figure><p>With the provided examples, were you able to identify clearly understand what&apos;s the difference between Pre and Post Increment Operators? </p><p>Can you write the classes for Decrement operators as well? Please feel free to comment below or shoot an&#xA0;<a href="mailto:narendravardi1127@gmail.com">email</a>.</p><hr><p><strong>Share this article</strong></p><p>Copy and share this article: <a href="https://www.narendravardi.com/pre-post-increment/">narendravardi.com/pre-post-increment/</a></p><hr><p><strong>Recommendations</strong></p><p>If you liked this article, you might also enjoy reading the following.</p><ul><li><a href="https://www.narendravardi.com/java-predicate/" rel="noreferrer">&#x1F929;How to write extensible filter logic in Java code</a></li><li><a href="https://www.narendravardi.com/list-automation/">&#x1F916;Automating the boring stuff: How I obtained the titles of all articles on my blog</a></li><li><a href="https://www.narendravardi.com/interview-prep/">Future Software Engineers, read this article before and during your placements</a></li></ul><hr><p>&#x2764;&#xFE0F;<strong>&#xA0;Enjoyed this article?</strong></p><p>Forward to a friend and tell them where they can subscribe (hint: it&apos;s&#xA0;<a href="https://www.narendravardi.com/#/portal/signup/free">here</a>).<br><br>Anything else? Comment below to say hello, or drop an&#xA0;<a href="mailto:narendravardi1127@gmail.com?ref=narendra-vardi">email</a>!</p><p></p><p></p>]]></content:encoded></item><item><title><![CDATA[🤩 What's it like to read a Manga Book]]></title><description><![CDATA[In this article, I talk about my experience of reading Manga in the form of a Physical book. ]]></description><link>https://www.narendravardi.com/manga-book/</link><guid isPermaLink="false">64eaf649c5fcae0001adfab8</guid><category><![CDATA[Books]]></category><category><![CDATA[Misc]]></category><dc:creator><![CDATA[Narendra Vardi]]></dc:creator><pubDate>Sat, 23 Sep 2023 10:30:26 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1531501410720-c8d437636169?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDF8fG1hbmdhfGVufDB8fHx8MTY5MzEyMDA4MHww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" medium="image"/><content:encoded><![CDATA[<img src="https://images.unsplash.com/photo-1531501410720-c8d437636169?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDF8fG1hbmdhfGVufDB8fHx8MTY5MzEyMDA4MHww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" alt="&#x1F929; What&apos;s it like to read a Manga Book"><p><em>Hi! My name is Narendra Vardi, and I write about my learnings, observations and trends in the Software world. Besides software, I also talk about photography, travel stories, books and movies. If that&apos;s something that interests you, consider&#xA0;<a href="https://www.narendravardi.com/#/portal/signup/free"><em>subscribing</em></a>.</em></p>
<hr>
<p>If you read my <a href="https://www.narendravardi.com/about/" rel="noreferrer">about me</a> section, you would know that I like reading graphic novels . Besides graphic novels, you will also know that I follow <a href="https://en.wikipedia.org/wiki/One_Piece?ref=narendravardi.com" rel="noreferrer">One Piece</a> Manga. I have been following it for more than a decade now. Initially I started with watching animated version of it called Anime and now I read their manga. The switch to reading manga helped me to save a lot of time for my work and it also helped me stay up to date with the story (Though I haven&apos;t read the manga in the last few years). </p>
<p>Recently I came across a bookstore which was selling <em>unique books. </em>From my various visits to different bookstores in Bangalore, I can say confidently that majority of the books that <em>catch your eyes </em>in the normal b&#x200B;ookstores are either paid by publishers to be kept visible or the bookstore has a great margin that they chose to keep it clearly visible. One of the common feature of these <em>visible books</em> is that they will be in the Amazon&apos;s most selling booklist. Being a Kindle user myself, I get bombarded by Amazon with this same list. So, when I visit a bookstore I just find myself seeing the nearly same books and think, &quot;These must be some exceptional books but I have seen these books&apos; covers so many times and it&apos;s mostly cheaper on Kindle or Audible, so I will skip purchasing now&quot;. At the end, I move on without purchasing these <em>visible books</em>.</p>
<p>Now when I say <em>unique books, </em>I mean the books that are not in this <em>visible book </em>list. It was a lot of fun to see so many <em>unique books </em>around. As I was looking around, I saw a collection of One Piece Volumes (Books) and I bought the first volume immediately. </p>
<p>If you read manga, you would know that we read manga comics from right to left. But American comics are different, you read them from left to right. So, having a book helped me to understand how people actually read manga offline. </p>
<p>Here&apos;s a video of how the book looks like: </p>
<figure class="kg-card kg-embed-card kg-card-hascaption"><iframe width="200" height="113" src="https://www.youtube.com/embed/tkO_SNguMF4?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen title="How a Manga book looks like&#x1F601;  #onepiece #mangabook #"></iframe><figcaption><p><span style="white-space: pre-wrap;">How a Manga book looks like</span></p></figcaption></figure>
<figure class="kg-card kg-gallery-card kg-width-wide kg-card-hascaption"><div class="kg-gallery-container"><div class="kg-gallery-row"><div class="kg-gallery-image"><img src="https://www.narendravardi.com/content/images/2023/08/20230827_093459.jpg" width="500" height="667" loading="lazy" alt="&#x1F929; What&apos;s it like to read a Manga Book"></div><div class="kg-gallery-image"><img src="https://www.narendravardi.com/content/images/2023/08/20230827_093634.jpeg" width="500" height="667" loading="lazy" alt="&#x1F929; What&apos;s it like to read a Manga Book"></div></div></div><figcaption><p><span style="white-space: pre-wrap;">Back Cover, Front Cover</span></p></figcaption></figure>
<p></p>
<p>Notice that the bar code is at the front side cover of the book and the title of the book is at the back side cover of the book. </p>
<p>The manga books are read from the back. </p>
<figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.narendravardi.com/content/images/2023/08/20230827_093708.jpg" class="kg-image" alt="&#x1F929; What&apos;s it like to read a Manga Book" loading="lazy" width="1500" height="2000" srcset="https://www.narendravardi.com/content/images/size/w600/2023/08/20230827_093708.jpg 600w, https://www.narendravardi.com/content/images/size/w1000/2023/08/20230827_093708.jpg 1000w, https://www.narendravardi.com/content/images/2023/08/20230827_093708.jpg 1500w" sizes="(min-width: 720px) 720px"><figcaption><span style="white-space: pre-wrap;">The first page from the front cover page</span></figcaption></figure>
<p>The first page from the front cover page gives a clear idea on how to read manga and the initial failures of using mirror image technique in the US.</p>
<p>Coming to my experience of reading this volume, I completed this book in two sittings. 80% of it in the first sitting and the remaining in the second sitting. I loved reading a book over manga online. I think these are few reasons which I felt might lead to this wonderful experience.</p>
<ul><li>Manga is partitioned into chapter (1 chapter ~ 20 pages). What this means is that if you want to revisit something from few chapters back, you need to load all the chapters and then figure out it yourself. </li><li>There will be way too many ads while reading online. </li><li>Reading manga on mobile is uncomfortable and reading on laptop is distracting (I tend to check for mails or other updates). </li><li>Finally and most importantly, I feel guilty reading manga online because of the strain reading via device has on my eyes. </li></ul>
<p>Though physical book elevates the experience of reading manga, I would still continue to read it online for a decade or so due to their less availability and high cost. I paid 800 INR for nearly 10 manga online episodes. There are 1000+ episodes, which means I might end up paying 80k &#x1F972; If more and more people start reading, the availability also increases and cost incurred on transport get less. Hoping for a cost-effective volumes (for an Indian) in future.</p>
<p>That&apos;s it from my side. Which Anime/Manga are you following now? What&apos;s your favourite so far, let me know in the comments below or feel free to shoot an&#xA0;<a href="mailto:narendravardi1127@gmail.com">email</a>.</p>
<hr>
<p><strong>Share this article</strong></p>
<p>Copy and share this article:&#xA0;<a href="https://www.narendravardi.com/manga-book/">narendravardi.com/manga-book</a></p>
<hr>
<p><strong>Recommendations</strong></p>
<p>If you liked this article, you might also enjoy reading the following.</p>
<ul><li><a href="https://www.narendravardi.com/bad-book/">What did you like about this book?</a></li><li><a href="https://www.narendravardi.com/podcasts-i-listen-to/">Podcasts I listen to these days</a></li><li><a href="https://www.narendravardi.com/famous-paintings/">&#x1F3A8;Let&apos;s talk about some of the famous paintings of the world</a></li></ul>
<hr>
<p>&#x2764;&#xFE0F;<strong>&#xA0;Enjoyed this article?</strong></p>
<p>Forward to a friend and tell them where they can subscribe (hint: it&apos;s&#xA0;<a href="https://www.narendravardi.com/#/portal/signup/free">here</a>).<br><br>Anything else? Comment below to say hello, or drop an&#xA0;<a href="mailto:narendravardi1127@gmail.com?ref=narendra-vardi">email</a>!</p>]]></content:encoded></item><item><title><![CDATA[🤩How to write extensible filter logic in Java code]]></title><description><![CDATA[In this article, I will detail how to use the Predicate<T> interface for maintaining multiple filters in the application code. ]]></description><link>https://www.narendravardi.com/java-predicate/</link><guid isPermaLink="false">649973006bd40f0001121696</guid><category><![CDATA[Programming]]></category><category><![CDATA[2023]]></category><dc:creator><![CDATA[Narendra Vardi]]></dc:creator><pubDate>Fri, 30 Jun 2023 10:30:39 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1511225317751-5c2d61819d58?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDF8fGZpbHRlcnxlbnwwfHx8fDE2ODc3NzE4NzR8MA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" medium="image"/><content:encoded><![CDATA[<img src="https://images.unsplash.com/photo-1511225317751-5c2d61819d58?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDF8fGZpbHRlcnxlbnwwfHx8fDE2ODc3NzE4NzR8MA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" alt="&#x1F929;How to write extensible filter logic in Java code"><p><em>Hi! My name is Narendra Vardi, and I write about my learnings, observations and trends in the Software world. Besides software, I also talk about photography, travel stories, books and movies. If that&apos;s something that interests you, consider <a href="https://www.narendravardi.com/#/portal/signup/free"><em>subscribing</em></a>.</em></p>
<div class="kg-card kg-callout-card kg-callout-card-green"><div class="kg-callout-emoji">&#x1F4A1;</div><div class="kg-callout-text"><p><span>This is one of those articles in which I really wanted to give an idea of how I think. Hopefully, it doesn&apos;t only make sense to you but you would love the way this article is written! :)</span><br><br><span>There is a lot of code in this article. But it is simple code. Don&apos;t feel intimidated! :D</span></p></div></div>
<p>The below problem is similar to a problem that I encountered in the industry. In this article, the problem is simplified! Now let&apos;s dive in.</p>
<p>Imagine that you are given a <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?ref=narendravardi.com">collection</a> of <code>Property</code> objects (class code provided below) and you need to return all the properties whose location is <code>blr</code>.</p>
<figure class="kg-card kg-code-card"><pre><code class="language-Java">// package and import details 

public class Property {
    private String location;
    private double price;
    private String id;
    private String PropertyType;
    private String ownerId;
    private boolean isSoldOut;

    // boilerplate code 
}</code></pre><figcaption>&lt;p&gt;&lt;span&gt;Property.java file with no boilerplate code&lt;/span&gt;&lt;/p&gt;</figcaption></figure>
<p>How will you approach it? </p>
<p>If you are new to Java, you might write a for loop and do a check on location. The sample function might look like the below code.</p>
<figure class="kg-card kg-code-card"><pre><code class="language-Java">public static List&lt;Property&gt; getFilteredProperties(List&lt;Property&gt; properties) {
        List&lt;Property&gt; result = new ArrayList&lt;&gt;();
        for (Property p: properties) {
            if (p.getLocation().equals(&quot;blr&quot;)) {
                result.add(p);
            }
        }
        return result;
    }</code></pre><figcaption>&lt;p&gt;&lt;span&gt;Iterate and search for &apos;blr&apos; location properties.&lt;/span&gt;&lt;/p&gt;</figcaption></figure>
<p>The only problem with this code is if we want to get properties with location <code>hyd</code> , we will have to write an additional function. </p>
<p>Instead of this, we can update the existing function to accept the location that needs to be searched for as a function argument. Let&apos;s see how the code evolves. </p>
<pre><code class="language-Java">public static List&lt;Property&gt; getFilteredProperties(List&lt;Property&gt; properties, String locationToSearch) { // notice locationToSearch is added here
        List&lt;Property&gt; result = new ArrayList&lt;&gt;();
        for (Property p: properties) {
            if (p.getLocation().equals(locationToSearch)) {
                result.add(p);
            }
        }
        return result;
    }</code></pre>
<p>Now, we want to add a filter on price also. I mean providing a price range filter is awesome for customers isn&apos;t it? We learnt already that passing search filter values as function arguments makes code generic enough to accept different values. So, we will accept the lower and higher property thresholds from the function argument itself. </p>
<p>Now how does the code evolve? </p>
<pre><code class="language-Java">    public static List&lt;Property&gt; getFilteredProperties(List&lt;Property&gt; properties, String locationToSearch,
                                                                       double lowerPrice, double higherPrice) { // lowerPrice and higherPrice added here
        List&lt;Property&gt; result = new ArrayList&lt;&gt;();
        for (Property p: properties) {
            if (p.getLocation().equals(locationToSearch) 
                    &amp;&amp; p.getPrice() &lt;= higherPrice &amp;&amp; p.getPrice() &gt;= lowerPrice) { // logic to check if the price is within price range is added here.
                result.add(p);
            }
        }
        return result;
    }</code></pre>
<p>Now the customer wants to filter on <code>twobhk</code> <code>propertyType</code>. </p>
<p>Let&apos;s see how the code looks. </p>
<pre><code class="language-Java">public static List&lt;Property&gt; getFilteredProperties(List&lt;Property&gt; properties, String locationToSearch,
                                                                       double lowerPrice, double higherPrice,
                                                                       String propertyType) { propertyType added here 
        List&lt;Property&gt; result = new ArrayList&lt;&gt;();
        for (Property p: properties) {
            if (p.getLocation().equals(locationToSearch)
                    &amp;&amp; p.getPrice() &lt;= higherPrice &amp;&amp; p.getPrice() &gt;= lowerPrice
            &amp;&amp; propertyType.equals(p.getPropertyType())) { // propertyType check added here
                result.add(p);
            }
        }
        return result;
    }</code></pre>
<p>Problems with this function include:</p>
<ol><li>Increase in the number of arguments for the function as we add <code>more</code> filters.</li><li>The <code>if</code> condition keeps getting complicated and the code is getting changed in the code execution path which can directly impact the production flow in case of any bugs.</li></ol>
<p>How do we solve this problem? </p>
<p>The first problem can be fixed if we use a new class to hold the function arguments. </p>
<p>Code after the first fix:</p>
<figure class="kg-card kg-code-card"><pre><code class="language-Java">public class FilterParams {
    private String location;
    private double lowerPrice;
    private double upperPrice;
    private String propertyType;
    // boilerplate code.     
}</code></pre><figcaption>&lt;p&gt;&lt;span&gt;FilterParams.java&lt;/span&gt;&lt;/p&gt;</figcaption></figure>
<pre><code class="language-Java">public static List&lt;Property&gt; getFilteredProperties(List&lt;Property&gt; properties, FilterParams filterParams) { // look how filterParams helps here.
        List&lt;Property&gt; result = new ArrayList&lt;&gt;();
        for (Property p: properties) {
            if (p.getLocation().equals(filterParams.getLocation())
                    &amp;&amp; p.getPrice() &lt;= filterParams.getUpperPrice() &amp;&amp; p.getPrice() &gt;= filterParams.getLowerPrice()
            &amp;&amp; filterParams.getPropertyType().equals(p.getPropertyType())) {
                result.add(p);
            }
        }
        return result;
    }</code></pre>
<p>Now let&apos;s solve the following:</p>
<blockquote><code>The if condition keeps getting complicated and the code is getting changed in the code execution path which can directly impact the production flow in case of any bugs</code></blockquote>
<p>To fix this problem, we will use <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Predicate.html?ref=narendravardi.com">Predicate functional interface</a> (please read about this interface as I am not explaining it in detail in this article). I will show how to use the Predicate interface by modifying the location-only filter example.</p>
<p>How to filter on location using <code>Predicate</code> interface? </p>
<pre><code class="language-Java">// getFilteredProperties without using Predicate interface.
public static List&lt;Property&gt; getFilteredProperties(List&lt;Property&gt; properties, String locationToFilter) {
        List&lt;Property&gt; result = new ArrayList&lt;&gt;();
        for (Property p: properties) {
            if (p.getLocation().equals(locationToFilter)) {
                result.add(p);
            }
        }
        return result;
    }

// The above can be transformed using Predicate in this format. 


// First create an implementation of Predicate. 
// Here we are creating one class for LocationFilter.
public class LocationFilter implements Predicate&lt;Property&gt; {
    private String location;

    public LocationFilter(String location) {
        this.location = location;
    }
    @Override
    public boolean test(Property property) {
        return property.getLocation().equals(location);
    }
}

// The function looks like the following: 
public static List&lt;Property&gt; getFilteredProperties(List&lt;Property&gt; properties, String locationToFilter) {
        List&lt;Property&gt; result = new ArrayList&lt;&gt;();
        for (Property p: properties) {
            Predicate&lt;Property&gt; locFilter = new LocationFilter(locationToFilter);
            if (locFilter.test(p)) {
                result.add(p);
            }
        }
        return result;
    }
</code></pre>
<p>If you notice the above code, locFilter has taken up the responsibility of abstracting the location filter logic. </p>
<p>Similarly, we can add a new Filter for price and PropertyType. </p>
<figure class="kg-card kg-code-card"><pre><code class="language-Java">
public class PriceFilter implements Predicate&lt;Property&gt; {
    private double lowerPrice;
    private double upperPrice;

    public PriceFilter(double lowerPrice, double upperPrice) {
        this.lowerPrice = lowerPrice;
        this.upperPrice = upperPrice;
    }

    @Override
    public boolean test(Property property) {
        return property.getPrice() &gt;= lowerPrice &amp;&amp; property.getPrice() &lt;= upperPrice;
    }
}
</code></pre><figcaption>&lt;p&gt;&lt;span&gt;PriceFilter.java&lt;/span&gt;&lt;/p&gt;</figcaption></figure>
<figure class="kg-card kg-code-card"><pre><code class="language-Java">
public class PropertyTypeFilter implements Predicate&lt;Property&gt; {
    private String propertyType;

    public PropertyTypeFilter(String propertyType) {
        this.propertyType = propertyType;
    }

    @Override
    public boolean test(Property property) {
        return propertyType.equals(property.getPropertyType());
    }
}</code></pre><figcaption>&lt;p&gt;&lt;span&gt;PropertyTypeFilter.java&lt;/span&gt;&lt;/p&gt;</figcaption></figure>
<p>We have three implementations of <code>Predicate</code> interface and we can use this interface to extend our filter functionality easily in future.  </p>
<p>We have <code>PropertyTypeFilter.java</code>, <code>LocationFilter.java</code> and <code>PriceFilter.java</code> files. </p>
<p>To segregate these three filters, let&apos;s use an additional <code>helper</code> method as listed below.</p>
<figure class="kg-card kg-code-card"><pre><code class="language-Java">
public class FilterHelper {
    public static Predicate&lt;Property&gt; getFilters(FilterParams filterParams) {
        Predicate&lt;Property&gt; locationFilter = new LocationFilter(filterParams.getLocation());
        Predicate&lt;Property&gt; priceFilter = new PriceFilter(filterParams.getLowerPrice(), filterParams.getUpperPrice());
        Predicate&lt;Property&gt; propertyPredicate = new PropertyTypeFilter(filterParams.getPropertyType());

        // If a new filter needs to be added, you can add it here.
        // To avoid bugs, that new filter&apos;s `test` method can use an &apos;AB testing strategy&apos; to roll out the filter to 100% safely.
        Predicate&lt;Property&gt; compositeFilter = locationFilter.and(priceFilter).and(propertyPredicate); // Using an AND operation here for OR operation, use `.or()` method
        return compositeFilter;
    }
}
</code></pre><figcaption>&lt;p&gt;&lt;span&gt;FilterHelper.java file&lt;/span&gt;&lt;/p&gt;</figcaption></figure>
<p>Now the function code becomes, the following: </p>
<pre><code class="language-Java">public static List&lt;Property&gt; getFilteredProperties(List&lt;Property&gt; properties, FilterParams filterParams) {
        return properties
                .stream()
                .filter(FilterHelper.getFilters(filterParams))
                .collect(Collectors.toList());
    }
</code></pre>
<p>If I have seen this code during my college days or right after college, I would have thought, why complicate the code by moving the logic into multiple files? But today, I realise the value of extensibility. The above code is incredible in case of code extensibility and since the Filter logic is independent, we can change the FilterLogic however we want without disturbing the actual function.</p>
<p>I have created a Github repo that hosts the final code detailed in this article. Find the Github repo at <a href="https://github.com/narendravardi/MultiFilters/?ref=narendravardi.com">github.com/narendravardi/MultiFilters</a> </p>
<p>How did you feel the code is? Do you have any queries? Please feel free to comment below or shoot an <a href="mailto:narendravardi1127@gmail.com">email</a>.</p>
<hr>
<p><strong>Share this article</strong></p>
<p>Copy and share this article: <a href="https://www.narendravardi.com/java-predicate/">narendravardi.com/java-predicate/</a></p>
<hr>
<p><strong>Recommendations</strong></p>
<p>If you liked this article, you might also enjoy reading the following.</p>
<ul><li><a href="https://www.narendravardi.com/interview-prep/">Future Software Engineers, read this article before and during your placements</a></li><li><a href="https://www.narendravardi.com/list-automation/">&#x1F916;Automating the boring stuff: How I obtained the titles of all articles on my blog</a></li><li><a href="https://www.narendravardi.com/nth-salary/">&#x270D;&#xFE0F;Finding the Nth highest salary from an SQL table</a></li></ul>
<hr>
<p>&#x2764;&#xFE0F;<strong> Enjoyed this article?</strong></p>
<p>Forward to a friend and tell them where they can subscribe (hint: it&apos;s <a href="https://www.narendravardi.com/#/portal/signup/free">here</a>).<br><br>Anything else? Comment below to say hello, or drop an <a href="mailto:narendravardi1127@gmail.com?ref=narendra-vardi">email</a>!</p>
<p></p>
<p></p>
<p> </p>]]></content:encoded></item><item><title><![CDATA[✍️Documenting some Adobe Lightroom tips, tricks, and shortcuts]]></title><description><![CDATA[In this article, I list out the tips, tricks and shortcuts which can be helpful for beginner Lightroom users.

This article will be updated continuously to discuss more useful Lightroom content. ]]></description><link>https://www.narendravardi.com/lightroom-tips/</link><guid isPermaLink="false">648ae90ffa469b000108d6be</guid><category><![CDATA[2023]]></category><category><![CDATA[Photography]]></category><category><![CDATA[Tools]]></category><dc:creator><![CDATA[Narendra Vardi]]></dc:creator><pubDate>Fri, 16 Jun 2023 10:30:37 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1526920929362-5b26677c148c?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDN8fHNob3J0Y3V0fGVufDB8fHx8MTY4NjgzMDMxM3ww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" medium="image"/><content:encoded><![CDATA[<img src="https://images.unsplash.com/photo-1526920929362-5b26677c148c?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDN8fHNob3J0Y3V0fGVufDB8fHx8MTY4NjgzMDMxM3ww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" alt="&#x270D;&#xFE0F;Documenting some Adobe Lightroom tips, tricks, and shortcuts"><p><em>Hi! My name is Narendra Vardi, and I write about my learnings, observations and trends in the Software world. Besides software, I also talk about photography, travel stories, books and movies. If that&apos;s something that interests you, consider <a href="https://www.narendravardi.com/#/portal/signup/free"><em>subscribing</em></a>.</em></p>
<hr>
<h2 id="tip-1-how-to-rotate-an-image-from-landscape-to-vertical-and-vice-versa-windows-app">Tip #1: How to rotate an image from landscape to vertical and vice-versa (Windows app)</h2>
<p>Use the <em>Photo </em>button on the top left<em> </em>-&gt; &apos;Rotate Left&apos; or &apos;Rotate Right&apos;  (shortcut: <strong>Ctrl + [</strong> or <strong>Ctrl + ]</strong>)</p>
<hr>
<h2 id="tip-2-how-to-reverse-the-aspect-ratio-while-cropping-windows-app">Tip #2: How to reverse the aspect ratio while cropping (Windows app)</h2>
<p>First click on Crop window (crop shortcut: R) and on the keyboard, press button X (shortcut: for reversing the crop)</p>
<hr>
<h2 id="tip-3-shortcut-to-change-grid-overlays-in-crop-tool-windows-app">Tip #3: Shortcut to change Grid overlays in crop tool (Windows app)</h2>
<p>Hit &#x201C;O&#x201D; when using crop tool.</p>
<hr>
<p><strong>Share this article</strong></p>
<p>Copy and share this article: <a href="https://www.narendravardi.com/lightroom-tips/">narendravardi.com/lightroom-tips</a></p>
<hr>
<p><strong>Recommendations</strong></p>
<p>If you liked this article, you might also enjoy reading the following.</p>
<ul><li><a href="https://www.narendravardi.com/part1-djimini3pro/"><a href="https://www.narendravardi.com/light-trails/">Capturing light trails of traffic in Bangalore</a></a></li><li><a href="https://www.narendravardi.com/360-photo/">&#x1F525; Breath-taking 360&#xB0; photograph up in the air</a></li><li><a href="https://www.narendravardi.com/embed-360/">How to embed your 360s on Ghost</a></li></ul>
<hr>
<p>&#x2764;&#xFE0F;<strong> Enjoyed this article?</strong></p>
<p>Forward to a friend and let them know where they can subscribe (hint: it&apos;s <a href="https://www.narendravardi.com/#/portal/signup/free">here</a>).<br><br>Anything else? Comment below to say hello, or drop an <a href="mailto:narendravardi1127@gmail.com?ref=narendra-vardi">email</a>!</p>
<p></p>
<p></p>]]></content:encoded></item><item><title><![CDATA[✍️Mapping Google Maps' location to Mappls' MapmyIndia location]]></title><description><![CDATA[In this article, I talk about how to look up locations on Google Maps to MapmyIndia. This is especially useful for drone users of India to identify Green, Yellow and Red zones with more precision on the DigitalSky app. ]]></description><link>https://www.narendravardi.com/gmaps-mapmyindia/</link><guid isPermaLink="false">6481882302730c000187fd43</guid><category><![CDATA[2023]]></category><category><![CDATA[Tools]]></category><dc:creator><![CDATA[Narendra Vardi]]></dc:creator><pubDate>Fri, 09 Jun 2023 10:30:51 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1508444845599-5c89863b1c44?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDN8fGRyb25lfGVufDB8fHx8MTY4NjIxMDYzOHww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" medium="image"/><content:encoded><![CDATA[<img src="https://images.unsplash.com/photo-1508444845599-5c89863b1c44?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDN8fGRyb25lfGVufDB8fHx8MTY4NjIxMDYzOHww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" alt="&#x270D;&#xFE0F;Mapping Google Maps&apos; location to Mappls&apos; MapmyIndia location"><p></p>
<p><em>Hi! My name is Narendra Vardi, and I write about my learnings, observations and trends in the Software world. Besides software, I also talk about photography, travel stories, books and movies. If that&apos;s something that interests you, consider <a href="https://www.narendravardi.com/#/portal/signup/free"><em>subscribing</em></a>.</em></p>
<hr>
<p>In this article, I wanted to discuss about how one can map a Google maps location to a MapMyIndia location. </p>
<blockquote>This article is primarily focused on helping drone pilots in India who need to identify if an area falls under Red, Yellow or Green zones.</blockquote>
<p>The DGCA&apos;s <a href="https://digitalsky.dgca.gov.in/airspace-map/?ref=narendravardi.com#/app">Airspace Map</a> is an interactive map of India that shows if a location falls under Green or yellow or red zones across the country. </p>
<p>Airspace Map uses Mappls&apos; MapmyIndia for showcasing the zones. MapmyIndia works well (only in the context of Airspace Map) when the location is quite famous or historic. But If you are in a remote area where there is no clear landmark, it fails to show the zones and the user will be forced to search visually. Besides this downside, Airspace Map doesn&apos;t identify your location also. This could be for security reasons but still, it is not an easy activity if the app forces the users to make unnecessary effort to search the MapmyIndia app <em>visually </em>and <em>manually</em>.  </p>
<p>To solve this problem, I have come up with the idea of searching for a remote location (or current location) on Google Maps and then using the coordinates of the same on MapmyIndia.</p>
<h3 id="here-are-the-steps-involved"><strong>Here are the steps involved:</strong></h3>
<ol><li>Search for the location you are interested in on Google Maps. </li><li>Touch and hold an area of the map that isn&#x2019;t labelled to drop a red pin.</li><li>Now copy the coordinates in the search box.</li><li>Visit the Airspace Map app and near the search box, identify the dropdown and select coordinates. </li><li>Enter the coordinates copied from Google Maps onto Airspace Map search. </li></ol>
<h3 id="example"><strong>Example:</strong></h3>
<p>Let&apos;s check if <a href="https://goo.gl/maps/6K2ePEyHdgLPQ3Yn6?ref=narendravardi.com">your space Bangalore Koramangala Boys</a> is a Green Zone or not.</p>
<figure class="kg-card kg-image-card"><img src="https://www.narendravardi.com/content/images/2023/06/Screenshot_20230608_162537_Chrome-3.jpg" alt="&#x270D;&#xFE0F;Mapping Google Maps&apos; location to Mappls&apos; MapmyIndia location" loading="lazy" width="288" height="618"><figcaption><span>1. Searched on MapmyIndia for &quot;your space Bangalore Koramangala Boys&quot; but I couldn&apos;t find it.</span></figcaption></figure>
<figure class="kg-card kg-image-card"><img src="https://www.narendravardi.com/content/images/2023/06/Screenshot_20230608_162552_Maps-3.jpg" alt="&#x270D;&#xFE0F;Mapping Google Maps&apos; location to Mappls&apos; MapmyIndia location" loading="lazy" width="288" height="618"><figcaption><span>2. Searched for the same on Google Maps and found the listing.</span></figcaption></figure>
<h2 id></h2>
<figure class="kg-card kg-image-card"><img src="https://www.narendravardi.com/content/images/2023/06/Screenshot_20230608_162619_Maps-1.jpg" alt="&#x270D;&#xFE0F;Mapping Google Maps&apos; location to Mappls&apos; MapmyIndia location" loading="lazy" width="288" height="618"><figcaption><span>3. Touch and hold an area of the map that isn&#x2019;t labelled to drop a red pin. Notice that this red pin is just beside the location of our interest. </span></figcaption></figure>
<figure class="kg-card kg-image-card"><img src="https://www.narendravardi.com/content/images/2023/06/Screenshot_20230608_162629_Maps-1.jpg" alt="&#x270D;&#xFE0F;Mapping Google Maps&apos; location to Mappls&apos; MapmyIndia location" loading="lazy" width="288" height="618"><figcaption><span>Copy the coordinates of the Dropped Pin</span></figcaption></figure>
<figure class="kg-card kg-image-card"><img src="https://www.narendravardi.com/content/images/2023/06/Screenshot_20230608_162653_Chrome.jpg" alt="&#x270D;&#xFE0F;Mapping Google Maps&apos; location to Mappls&apos; MapmyIndia location" loading="lazy" width="288" height="618"><figcaption><span>Click on the dropdown button to the left of Search bar on Airspace Map.</span></figcaption></figure>
<figure class="kg-card kg-image-card"><img src="https://www.narendravardi.com/content/images/2023/06/Screenshot_20230608_162657_Chrome.jpg" alt="&#x270D;&#xFE0F;Mapping Google Maps&apos; location to Mappls&apos; MapmyIndia location" loading="lazy" width="288" height="618"><figcaption><span>Select Coordinates</span></figcaption></figure>
<figure class="kg-card kg-image-card"><img src="https://www.narendravardi.com/content/images/2023/06/Screenshot_20230608_162723_Chrome.jpg" alt="&#x270D;&#xFE0F;Mapping Google Maps&apos; location to Mappls&apos; MapmyIndia location" loading="lazy" width="288" height="618"><figcaption><span>Enter the coordinates copied from Google Maps on to the search bar now. </span></figcaption></figure>
<p>As you can observe, the coordinate fall onto the Red Zone. This is why it is important to do this activity to be sure that you are flying a drone in a safe zone. </p>
<hr>
<p><strong>Share this article</strong></p>
<p>Copy and share this article: <a href="https://www.narendravardi.com/gmaps-mapmyindia/">narendravardi.com/gmaps-mapmyindia/</a></p>
<hr>
<p><strong>Recommendations</strong></p>
<p>If you liked this article, you might also enjoy reading the following.</p>
<ul><li><a href="https://www.narendravardi.com/part1-djimini3pro/">&#x270D;&#xFE0F;Why DJI Mini3 Pro is the best beginner drone - Part I</a></li><li><a href="https://www.narendravardi.com/farm-patterns/">&#x1F4F7;Minimalist photographs of farm fields</a></li><li><a href="https://www.narendravardi.com/360-photo/">&#x1F525; Breath-taking 360&#xB0; photograph up in the air</a></li><li><a href="https://www.instagram.com/worthyphotographer?ref=narendravardi.com">Follow @worthyphotographer on Instagram</a></li></ul>
<hr>
<p>&#x2764;&#xFE0F;<strong> Enjoyed this article?</strong></p>
<p>Forward to a friend and let them know where they can subscribe (hint: it&apos;s <a href="https://www.narendravardi.com/#/portal/signup/free">here</a>).<br><br>Anything else? Comment below to say hello, or drop an <a href="mailto:narendravardi1127@gmail.com?ref=narendra-vardi">email</a>!</p>]]></content:encoded></item><item><title><![CDATA[😔How to prepare for your next layoff in India]]></title><description><![CDATA[In this article, I am sharing some measures that, in my opinion, would help an individual to be prepared for the next layoff.]]></description><link>https://www.narendravardi.com/next-layoff/</link><guid isPermaLink="false">63d2515694053d004d159f12</guid><category><![CDATA[Learnings]]></category><category><![CDATA[Business]]></category><category><![CDATA[2023]]></category><dc:creator><![CDATA[Narendra Vardi]]></dc:creator><pubDate>Sat, 25 Mar 2023 10:30:16 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1453227588063-bb302b62f50b?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwxMTc3M3wwfDF8c2VhcmNofDE3fHxzYWR8ZW58MHx8fHwxNjc5NjQyNTI1&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" medium="image"/><content:encoded><![CDATA[<img src="https://images.unsplash.com/photo-1453227588063-bb302b62f50b?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwxMTc3M3wwfDF8c2VhcmNofDE3fHxzYWR8ZW58MHx8fHwxNjc5NjQyNTI1&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" alt="&#x1F614;How to prepare for your next layoff in India"><p><em><em><em><em>Hi! My name is Narendra Vardi, and I write about my learnings, observations and trends in the Software world. Besides software, I also talk about photography, travel stories, books and movies. If that&apos;s something that interests you, consider </em></em></em></em><a href="https://www.narendravardi.com/#/portal/signup/free"><em><em><em><em>subscribing</em></em></em></em></a><em><em><em><em>.</em></em></em></em></p><hr><p>Since companies like Amazon, Google, Meta and Microsoft are laying off many employees, we should accept that layoffs as a concept will be more common in the IT industry soon, and no company will promise good job security. </p><p>In this article, I am sharing some measures that, in my opinion, would help an individual to be prepared for the next layoff. Though this is not directed towards freshers and college students, I hope even for them; this article comes in handy.</p><p>These precautions are primarily intended for Indian programmers, but you can also refer to these precautions and find a similar alternative for your job and country.</p><p>This is not an exhaustive list, so take it with a pinch of salt.</p><p>Let&apos;s get started!</p><hr><h2 id="after-the-layoff">After the layoff</h2><h3 id="accept-that-the-layoff-is-beyond-your-control">Accept that the layoff is beyond your control</h3><p>One of the surprising moments after a layoff is not being able to accept it. We would have worked hard or stayed loyal to the company for a long time despite better outside opportunities, and still, a layoff is an outcome. It hurts. We try to find answers on how things went wrong and how we can fix them. This behaviour only creates unrest in your mind. The best thing would be to accept that it&apos;s beyond your control and identify the next step you want to take in your life.</p><h3 id="take-care-of-your-mental-health">Take care of your mental health </h3><p>As mentioned in the above point, &#xA0;there&#x2019;s a lot of scope for unrest in your mind, and because layoffs are considered performance-based and there is a lot of stigma surrounding layoffs in society, you might feel like a failure. Don&#x2019;t give in to that thought process.</p><p>If people are mocking you because you got laid off, reduce the interactions with them until things get settled and find a group that can be supportive. You can find such people on LinkedIn. An easier way to meet supportive people is to DM people who got laid. </p><h3 id="take-help-from-your-network">Take help from your network.</h3><p>One of the things that gets important as you transition from junior to an experienced engineer is the use of your professional network. Get <a href="https://www.linkedin.com/help/linkedin/answer/a541653/recommendations-on-linkedin?lang=en&amp;ref=narendravardi.com">LinkedIn recommendations</a> from your managers and team members. Notify your close friends and colleagues that you are actively seeking a job.</p><hr><h2 id="during-the-layoff">During the layoff</h2><h3 id="negotiate-the-exit-terms">Negotiate the exit terms</h3><p>One of the things employees are not aware of is that you can negotiate your exit terms. You can&apos;t negotiate groundbreaking things here, but you can negotiate things to help you become comfortable after the layoff.</p><p>Here are a few things that I have seen people in my circle negotiate with success</p><ul><li><strong>Negotiate the exit date:</strong> You can negotiate so that your exit date on the <em>experience letter</em> is reflected as a few weeks later than your <em>actual</em> termination date. This helps you avoid a career break (in case it&apos;s taking a lot of time to get a new job) on your resume. </li><li><strong>Negotiate Health Insurance: </strong>It is best to negotiate if a person in the family needs continuous doctor consultation or hospitalisation. Having said that, you can request this to avoid emergencies (explained more in the health insurance section below).</li><li><strong>Negotiate higher severance payment: </strong>This becomes very important if you lack funds to sustain for weeks without a job. Discuss your situation and let your supervisor or HR know why you <em>need a </em>higher severance payment. </li><li><strong>Negotiate recommendations or recommendation letters: </strong>If all the negotiations listed above are not accepted, you can ask your supervisor/manager/HR for a recommendation letter (or LinkedIn recommendations).</li></ul><hr><h2 id="before-the-layoff">Before the layoff</h2><h3 id="start-maintaining-a-reserve-fund">Start maintaining a reserve fund. </h3><p>Once you get a job, you&apos;ll have to start saving money to equip yourself for the next layoff better. This is old-school advice, and you may want to stop reading here but listen to me, jobs in IT are not financially secure, and you can be fired anytime. If our older generations worked in Government, which is very safe compared to IT jobs, and still saved money for the future, why can&apos;t we do that? </p><p>Maintain a reserve fund. The reserve fund is something that you can use in case of emergencies. I am not talking about health emergencies but a crisis like job loss. Think of reserve funds as reserve fuel in a motor vehicle. Reserve fuel helps you find a petrol pump nearby. Similarly, a reserve fund helps you sustain your family financially until you find another means of financial stability. </p><p>Reserve fund value can be calculated in multiple ways. The way I like it is to save the money that covers at least <em>six months of my expenses</em>. This is something I read as a best practice from a startup founder during my college days on Quora (I think it&apos;s <a href="https://www.quora.com/profile/Jimmy-Wales?ref=narendravardi.com">Jimmy Wales</a> who talked about it - but I can&apos;t find the answer)</p><div class="kg-card kg-button-card kg-align-center"><a href="https://www.narendravardi.com/#/portal/signup/free" class="kg-btn kg-btn-accent">Subscribe to receive articles directly to your inbox</a></div><h3 id="get-personal-health-insurance-for-yourself-and-your-family">Get personal health insurance for yourself and your family</h3><p>This is my favourite recommendation. Even if you are sure you&#x2019;ll not be laid off, &#xA0;you should get personal health insurance. &#xA0;</p><p>Personal insurance helps with a lot of things. It can help you to take a break and do that adventure, or it can help you get better medical treatment for yourself or your parents. This can be a huge burden if you do not have a job. </p><p>If you are content with office insurance, buy one for your parents separately. The premium for your parents might increase every year. The quicker you get insurance for them, the merrier the insurance premium will be.</p><div class="kg-card kg-callout-card kg-callout-card-green"><div class="kg-callout-emoji">&#x1F603;</div><div class="kg-callout-text">This insurance also comes in handy when you are in-between jobs.</div></div><h3 id="consider-layoffs-in-your-loan-planning">Consider layoffs in your loan planning</h3><p>While taking a loan (especially a home loan, OMG! Bangalore is super expensive!), it&apos;s better to plan a scenario where you got laid off, and it took a couple of months to find a job.</p><p>In most cases, the loan planning goes something like this, every year, the average increment is x% basic salary and considering that x% increment, people plan a home loan. This is not a bad idea, but it can be awful if you don&apos;t maintain enough reserve funds for loan payments after the layoff. </p><div class="kg-card kg-callout-card kg-callout-card-green"><div class="kg-callout-emoji">&#x1F603;</div><div class="kg-callout-text">Properly planned out loans also helps you to switch between companies confidently. I see many people work in unfit positions or teams because they fear being unable to pay for the loan installments.</div></div><hr><h2 id="finding-a-job">Finding a job</h2><p>Finding a job is difficult when you get laid off during a financial crisis. Nonetheless, the steps remain the same if you are finding a job during the normal situation. Just remember, it just takes more time, and have patience. &#xA0;</p><h3 id="prepare-your-resume">Prepare your Resume </h3><p>One of the tiresome tasks for me is preparing my resume. Most of the time, I spend weeks without making a single change. I solved this problem by maintaining a slightly relaxed deadline for a resume update.</p><p>Just remember, your resume need not be perfect. It needs to be <em>available </em>for job application. You can make updates to it later on.</p><h3 id="start-practising-for-the-interviews">Start practising for the interviews</h3><p>One of the easiest ways to practice interviews is by asking your former colleagues or friends to take your interviews. Most of the time, this is good enough. In case they are busy, consider using platforms like <a href="https://www.pramp.com/?ref=narendravardi.com">pramp</a> or <a href="https://www.mentoring-club.com/?ref=narendravardi.com">mentoring-club</a>.</p><h3 id="apply-for-open-positions-and-reach-out-to-your-network-for-open-jobs">Apply for open positions and reach out to your network for open jobs</h3><p>Update on LinkedIn that you are #OpenToWork and reach out to former colleagues and recruiters on LinkedIn via message and share your interest. </p><p>You can also use platforms like <a href="https://teamblind.com/?ref=narendravardi.com">teamblind</a> or <a href="https://instahyre.com/?ref=narendravardi.com">instahyre</a> to find new opportunities. </p><hr><h3 id="finally-a-tip-from-a-venture-capitalist-on-personal-finance">Finally, a tip from a Venture capitalist on Personal Finance</h3><p>I follow a venture capitalist from India called <a href="https://www.linkedin.com/in/aviral-bhatnagar-72391044/?ref=narendravardi.com">Aviral Bhatnagar</a>. His tip on personal finance is very thought-provoking and can help you manage your finances well. </p><p>From <a href="https://ajuniorvc.com/explainers/personal-finance-wealth-making-money/?ref=narendravardi.com">Aviral&apos;s personal finance</a> article. </p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.narendravardi.com/content/images/2023/03/image.png" class="kg-image" alt="&#x1F614;How to prepare for your next layoff in India" loading="lazy" width="1545" height="337" srcset="https://www.narendravardi.com/content/images/size/w600/2023/03/image.png 600w, https://www.narendravardi.com/content/images/size/w1000/2023/03/image.png 1000w, https://www.narendravardi.com/content/images/2023/03/image.png 1545w" sizes="(min-width: 720px) 720px"><figcaption>Thought-provoking Personal Finance tip from VC, Aviral Bhatnagar</figcaption></figure><hr><p><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong>Share this article</strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></p><p>Copy and share this article: <a href="https://www.narendravardi.com/next-layoff/">https://www.narendravardi.com/next-layoff/</a></p><hr><p><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong>Recommendation</strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong>s</strong></strong></strong></strong></strong></strong></strong></strong></p><p>If you liked this article, you might also enjoy reading the following.</p><ul><li><a href="https://www.narendravardi.com/interview-prep/">Future Software Engineers, read this article before and during your placements</a></li><li><a href="https://www.narendravardi.com/resume-mistakes/">Five mistakes people make while building a resume for the first time</a></li><li>Relax by reading <a href="https://www.narendravardi.com/reaching-alone/">Travelling to Paris all alone</a></li></ul><hr><p>&#x2764;&#xFE0F;<strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong> Enjoyed this article?</strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></p><p>Forward to a friend and tell them where they can subscribe (hint: it&apos;s <a href="https://www.narendravardi.com/#/portal/signup/free">here</a>).<br><br>Anything else? Comment below to say hello, or drop an <a href="mailto:narendravardi1127@gmail.com?ref=narendra-vardi">email</a>!</p>]]></content:encoded></item><item><title><![CDATA[✍️Does consistency win over quality?]]></title><description><![CDATA[Would you pick an inconsistently available, Great fruit bowl seller or a consistently available, good enough one?]]></description><link>https://www.narendravardi.com/consistency-over-quality/</link><guid isPermaLink="false">640afd8ca9d077003df676bb</guid><category><![CDATA[Business]]></category><category><![CDATA[Thoughts]]></category><category><![CDATA[2023]]></category><dc:creator><![CDATA[Narendra Vardi]]></dc:creator><pubDate>Sat, 18 Mar 2023 10:30:27 GMT</pubDate><media:content url="https://www.narendravardi.com/content/images/2023/03/consistency.jpeg" medium="image"/><content:encoded><![CDATA[<img src="https://www.narendravardi.com/content/images/2023/03/consistency.jpeg" alt="&#x270D;&#xFE0F;Does consistency win over quality?"><p><em><em>Hi! My name is Narendra Vardi, and I write about my learnings, observations and trends in the Software world. Besides software, I also talk about photography, travel stories, books and movies. If that&apos;s something that interests you, consider </em></em><a href="https://www.narendravardi.com/#/portal/signup/free"><em><em>subscribing</em></em></a><em><em>.</em></em></p><hr><p>In my city, there is a fruit bowl seller, let&apos;s call him a <strong><em>Great fruit bowl seller</em></strong>, who has an excellent eye for identifying sweet and delicious fruits and selling them cut into bowls to the customers. Not surprisingly, I am one of his customers. </p><p>This fruit bowl seller is ten minutes from my place, and there are various other fruit bowl sellers during this ten-minute walk. They charge the same, but their fruit quality isn&apos;t that great. They are of good quality but compared to the <em><strong>Great fruit bowl seller</strong></em>&apos;s fruit bowl, they are not good. </p><p>I only recently discovered a <strong><em>Great fruit bowl seller</em></strong>, and I visited him frequently whenever I wanted a fruit bowl. Initially, I felt good, but then a problem arose.</p><p>The problem was his inconsistency. </p><p>He&apos;s not available to sell every day. He doesn&apos;t maintain a timetable also. It&apos;s as if he went in search of great fruits and disappeared for a few days. Once I asked about his absence, and he just gave a smile - which I felt was a zero-mark answer. </p><p>Anyways, long story short, I can&apos;t trust this <strong><em>Great fruit bowl seller</em></strong> to be available when I need a fruit bowl the most, and it has become frustrating that I will have to cross all the good enough fruit bowl sellers to reach this great fruit bowl seller and only to find him absent.</p><p>After observing for a few weeks, I shifted from relying on the <strong><em>Great fruit bowl seller </em></strong>to good-enough fruit bowl sellers. </p><p>I always think about visiting the <strong><em>Great fruit bowl seller, </em></strong>but then the unreliability of his presence bothers me and wastes my time.</p><p>So, <strong><em>Great fruit bowl seller </em></strong>thanks for your time! :)</p><p>What would you pick if you were in my situation? An inconsistent <em><strong>Great fruit bowl seller </strong></em>or a consistently available, good enough fruit bowl seller? Let me know your thoughts in the comments below!</p><p>Do you know of situations where consistency can become a dominating factor? </p><div class="kg-card kg-button-card kg-align-center"><a href="https://www.narendravardi.com/#/portal/signup/free" class="kg-btn kg-btn-accent">Subscribe to receive articles directly to your inbox.</a></div><hr><p><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong>Share this article</strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></p><p>Copy and share this article: <a href="https://www.narendravardi.com/ac-remote/">https://www.narendravardi.com/ac-remote/</a></p><hr><p><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong>Recommendation</strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong>s</strong></strong></strong></strong></p><p>If you liked this article, you might also enjoy reading the following.</p><ul><li><a href="https://www.narendravardi.com/dall-e/">The magician who creates digital images from the text: DALL-E</a></li><li><a href="https://www.narendravardi.com/miserable-farewell/">Why was I so miserable during my farewell?</a></li><li><a href="https://www.narendravardi.com/boring-domain/">Why I chose a boring domain name</a></li></ul><hr><p>&#x2764;&#xFE0F;<strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong> Enjoyed this article?</strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></p><p>Forward to a friend and let them know where they can subscribe (hint: it&apos;s <a href="https://www.narendravardi.com/#/portal/signup/free">here</a>).<br><br>Anything else? Comment below to say hello, or drop an <a href="mailto:narendravardi1127@gmail.com?ref=narendra-vardi">email</a>!</p>]]></content:encoded></item><item><title><![CDATA[✍️Why DJI Mini3 Pro is the best beginner drone - Part I]]></title><description><![CDATA[In this article, I discuss the features built into DJI Mini3 Pro that make it one of the safest and most secure drones to drive. ]]></description><link>https://www.narendravardi.com/part1-djimini3pro/</link><guid isPermaLink="false">640a0e54a9d077003df6751d</guid><category><![CDATA[Photography]]></category><category><![CDATA[2023]]></category><category><![CDATA[Tech]]></category><dc:creator><![CDATA[Narendra Vardi]]></dc:creator><pubDate>Sat, 11 Mar 2023 10:30:08 GMT</pubDate><media:content url="https://www.narendravardi.com/content/images/2023/03/WhatsApp-Image-2023-03-10-at-13.16.52.jpeg" medium="image"/><content:encoded><![CDATA[<img src="https://www.narendravardi.com/content/images/2023/03/WhatsApp-Image-2023-03-10-at-13.16.52.jpeg" alt="&#x270D;&#xFE0F;Why DJI Mini3 Pro is the best beginner drone - Part I"><p><em><em>Hi! My name is Narendra Vardi, and I write about my learnings, observations and trends in the Software world. Besides software, I also talk about photography, travel stories, books and movies. If that&apos;s something that interests you, consider </em></em><a href="https://www.narendravardi.com/#/portal/signup/free"><em><em>subscribing</em></em></a><em><em>.</em></em></p><hr><p>On my Instagram photography account: <a href="https://www.instagram.com/worthyphotographer?ref=narendravardi.com">@worthyphotographer</a>, many people ask me to recommend a drone. </p><p>I haven&apos;t used many drones, and only a single-digit number of people have a drone within my close circle. I want to tell them immediately that I am not an expert in this topic, but after some introspection, I thought I could guide people. </p><p>I am not a professional drone user, but I did a significant amount of research before I purchased the DJI Mini 3 Pro. I also viewed many YouTube videos and Instagram reels on various nitty-gritty details of drone usage. After all these learnings, I still feel that DJI Mini 3 Pro is the best drone I bought.</p><p>This is Part-I of the series of articles where I discuss why the DJI Mini3 Pro is the best beginner drone. </p><p>In this article, I discuss the features built into DJI Mini3 Pro that make it one of the safest and most secure drones to drive. </p><h3 id="tri-directional-obstacle-sensing">Tri-Directional Obstacle Sensing</h3><p>One of the significant challenges of beginner drone users is the high possibility of error while driving the drone. As I mentioned in <a href="https://www.narendravardi.com/flying-drone/">Learning to fly a drone and (three + one) dimensional space</a>, flying a drone is not easy and is not a computer game. In computer games, one can make mistakes and rectify them, but while flying a drone, some mistakes cause severe damage to the drone and in some rare cases, to birds, animals, and humans. </p><p>This is where <em>Tri-Directional Obstacle Sensing </em>helps the beginner. If the user moves a drone towards an object by mistake, the drone will sense the obstacle and avoids hitting that object. This is quite helpful for beginners because it eliminates all the tension and risks while starting to fly a drone. </p><div class="kg-card kg-callout-card kg-callout-card-red"><div class="kg-callout-emoji">&#x1F480;</div><div class="kg-callout-text">Be cautious; this obstacle sensing doesn&apos;t work when the drone moves sideways.</div></div><div class="kg-card kg-button-card kg-align-center"><a href="https://www.narendravardi.com/#/portal/signup/free" class="kg-btn kg-btn-accent">Subscribe to receive articles directly to your inbox</a></div><h3 id="return-to-home-rth">Return to Home (RTH)</h3><p>Another challenge for beginner drone users is difficulty navigating the drone back home. Imagine flying a drone to a faraway place in excitement and struggling to return it.</p><p>DJI Mini3 Pro makes it easy to return home with the <em>Return to Home </em>feature. </p><p>All you have to do is click on the RTH button when the drone is flying and notice the magic happen. </p><p>When you select RTH, the drone automatically flies back to the Home Point - the point at which the drone took off. </p><div class="kg-card kg-callout-card kg-callout-card-red"><div class="kg-callout-emoji">&#x1F480;</div><div class="kg-callout-text">Ensure that RTH altitude is configured correctly and that someone is at the Home Point location.</div></div><h3 id="low-battery-alerts">Low Battery Alerts</h3><p>Whenever the drone has less than a few minutes of flight time left, the drone controller (the device which is in the hands of the drone user) alerts the user to land immediately, and after one point, it will force the user to land the drone. This is very important, as tracking the battery left while filming drone videos is pretty tricky. </p><div class="kg-card kg-callout-card kg-callout-card-yellow"><div class="kg-callout-emoji">&#x1F480;</div><div class="kg-callout-text">You can force the controller to stop and not land the drone during low battery time. Why would you do that anyway?</div></div><p>Now I am sure you understand why DJI Mini3 Pro is one of the safest drones to fly. </p><p>In the upcoming articles, I will talk about the video capabilities and advanced features provided by it.</p><hr><p><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong>Share this article</strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></p><p>Copy and share this article: <a href="https://www.narendravardi.com/part1-djimini3pro/">www.narendravardi.com/part1-djimini3pro/</a></p><hr><p><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong>Recommendation</strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong>s</strong></strong></strong></strong></p><p>If you liked this article, you might also enjoy reading the following.</p><ul><li><a href="https://www.narendravardi.com/360-photo/">&#x1F525; Breath-taking 360&#xB0; photograph up in the air</a></li><li><a href="https://www.narendravardi.com/farm-patterns/">&#x1F4F7;Minimalist photographs of farm fields</a></li><li><a href="https://www.instagram.com/worthyphotographer?ref=narendravardi.com">Follow @worthyphotographer on Instagram</a></li></ul><hr><p>&#x2764;&#xFE0F;<strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong> Enjoyed this article?</strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></p><p>Forward to a friend and let them know where they can subscribe (hint: it&apos;s <a href="https://www.narendravardi.com/#/portal/signup/free">here</a>).<br><br>Anything else? Comment below to say hello, or drop an <a href="mailto:narendravardi1127@gmail.com?ref=narendra-vardi">email</a>!</p>]]></content:encoded></item><item><title><![CDATA[🚲If you have relocated to a new country, visit Expat meetups]]></title><description><![CDATA[Today I thought of talking about ex-pat meetups.]]></description><link>https://www.narendravardi.com/expat-meetups/</link><guid isPermaLink="false">63de1c1514a728003dad7502</guid><category><![CDATA[Travel]]></category><category><![CDATA[Eurotrip2022]]></category><category><![CDATA[2023]]></category><dc:creator><![CDATA[Narendra Vardi]]></dc:creator><pubDate>Sat, 25 Feb 2023 10:30:35 GMT</pubDate><media:content url="https://www.narendravardi.com/content/images/2023/03/WhatsApp-Image-2023-03-10-at-13.16.52-3.jpeg" medium="image"/><content:encoded><![CDATA[<img src="https://www.narendravardi.com/content/images/2023/03/WhatsApp-Image-2023-03-10-at-13.16.52-3.jpeg" alt="&#x1F6B2;If you have relocated to a new country, visit Expat meetups"><p><em>Hi! My name is Narendra Vardi, and I write about my learnings, observations and trends in the Software world. Besides software, I also talk about photography, travel stories, books and movies. If that&apos;s something that interests you, consider </em><a href="https://www.narendravardi.com/#/portal/signup/free"><em>subscribing</em></a><em>.</em></p><hr><p>If you have been following me for some time now, you will know I went on a solo trip to Europe. I have talked about my <a href="https://www.narendravardi.com/reaching-alone/">initial experience of visiting Paris</a> already. In this article, I thought of talking about a meetup that I visited in Amsterdam.</p><p>If you are new to the word, <em>ex-pat</em>, do not worry. I have written down the definition for you.</p><blockquote>Ex-pat is an individual living and/or working in a country other than their country of citizenship, often temporarily and for work reasons.</blockquote><p>For example, Indians will be considered ex-pats if they work outside India, from the other country point of view. </p><p>Now, let me talk about the <a href="https://www.meetup.com/?ref=narendravardi.com">meetups</a>. I have visited meetups since my first job as an intern at Amazon. That was back in 2016. It was a way for me to meet new people with similar interests. Like in Hyderabad, I used to visit technical meetups centred around Java and Scala, and once I was back in Bangalore, I became a member of the Toastmasters club. Though these meetups sound dull, they were worth a try. You never know which club will match your energy. </p><p>Coming to my Amsterdam visit, I stayed at my friend&apos;s place in Amsterdam, and he talked me into going for a meetup where ex-pats met. </p><p>All the guests at the meetup were from different parts of the world and were very inviting. Though I was not going to stay in Amsterdam for long, it was interesting to know the best experiences and challenges of the people who were present. </p><p>During one of the discussions, they talked about how mad St Patrick&apos;s day celebration will be. They were talking about going to movies and restaurants. Experienced ex-pats were guiding new ex-pats to accommodate well into the new country. It felt wonderful. I never thought such kind of support system existed.</p><p>Most of my NRI friends who are in different countries never talk about meetups, and there is a reason for it. They all relocated to a different country to do their higher studies. If you are studying, you already have students to support you. But, if you are an employee in India and have to relocate to a new country for a temporary purpose or a prolonged duration, these ex-pat meetups, in my opinion, are a great support system.</p><p>This is especially useful for folks who relocate alone. Having a support system is crucial for understanding and adjusting to the new country. </p><hr><p><strong><strong><strong><strong><strong><strong><strong><strong>Share this article</strong></strong></strong></strong></strong></strong></strong></strong></p><p>Copy and share this article: <a href="https://narendravardi.com/expat-meetups?ref=narendravardi.com">https://narendravardi.com/expat-meetups</a></p><hr><p><strong><strong><strong><strong><strong><strong><strong><strong>Recommendation</strong></strong></strong></strong></strong></strong>s</strong></strong></p><p>If you liked this article, you might also enjoy reading the following.</p><ul><li><a href="https://www.narendravardi.com/reaching-alone/">Travelling to Paris all alone</a></li><li><a href="https://www.narendravardi.com/soloeurotrip-interview/">&#x1F399;&#xFE0F;Solo Trip to Europe: Podcast interview</a></li><li><a href="https://www.narendravardi.com/how-to-apply-for-french-schengen-visa/">How to apply for Schengen Visa to France as an Indian</a></li></ul><hr><p>&#x2764;&#xFE0F;<strong><strong><strong><strong><strong><strong><strong><strong> Enjoyed this article?</strong></strong></strong></strong></strong></strong></strong></strong></p><p>Forward to a friend and let them know where they can subscribe (hint: it&apos;s <a href="https://www.narendravardi.com/#/portal/signup/free">here</a>).<br><br>Anything else? Comment below to say hello, or drop an <a href="mailto:narendravardi1127@gmail.com">email</a>!</p><hr>]]></content:encoded></item><item><title><![CDATA[🤔What does it mean if we can control an Air Conditioner (AC) using a mobile?]]></title><description><![CDATA[In this article, I talk about a fun yet scary use of technology.]]></description><link>https://www.narendravardi.com/ac-remote/</link><guid isPermaLink="false">63da8df394053d004d15a21d</guid><category><![CDATA[Thoughts]]></category><category><![CDATA[2023]]></category><category><![CDATA[Tech]]></category><dc:creator><![CDATA[Narendra Vardi]]></dc:creator><pubDate>Sat, 18 Feb 2023 10:30:15 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1621703455854-050a995b6d10?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwxMTc3M3wwfDF8c2VhcmNofDE3fHxyZW1vdGV8ZW58MHx8fHwxNjc1MjY3NjI3&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" medium="image"/><content:encoded><![CDATA[<img src="https://images.unsplash.com/photo-1621703455854-050a995b6d10?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwxMTc3M3wwfDF8c2VhcmNofDE3fHxyZW1vdGV8ZW58MHx8fHwxNjc1MjY3NjI3&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" alt="&#x1F914;What does it mean if we can control an Air Conditioner (AC) using a mobile?"><p><em>Hi! My name is Narendra Vardi, and I write about my learnings, observations and trends in the Software world. Besides software, I also talk about photography, travel stories, books and movies. If that&apos;s something that interests you, consider </em><a href="https://www.narendravardi.com/#/portal/signup/free"><em>subscribing</em></a><em>.</em></p><hr><p>I went to a restaurant in Bangalore a few years ago with two friends. We sat near the empty table, started chit-chatting, and finished ordering the food. </p><p>I could sense something was off while we were waiting at the table. After a few minutes, one of my friends complained that the temperature was too cold. Yeah! It was bone-biting cold. </p><p>A single air conditioner was in the hall, pushing cold air on our table. We requested the waiter to increase the temperature, but they grudgingly increased only a single point because it helped other tables stay comfortably cool. </p><p>After a few minutes, it was clear that we should switch tables, but none were empty. I understood why our table was open when we arrived, but it was too late. We had already placed our order, and the waiter was not very helpful with increasing the temperature. We thought of leaving the place, but we loved their food. So, we stayed back.</p><p>As we were getting drained in discomfort, arrived, our fourth friend for whom we were waiting. Looking at our faces, he knew something was off and asked about it. </p><div class="kg-card kg-button-card kg-align-center"><a href="https://www.narendravardi.com/#/portal/signup/free" class="kg-btn kg-btn-accent">Receive the articles delivered directly to your inbox </a></div><p>After listening to the problem, he gave a proud and cynical smile, opened his cell phone, told us to show normal behaviour and increased the air conditioner&apos;s temperature with his mobile phone&apos;s help. We were shocked but happy about the situation. We had our food and left the restaurant.</p><p>Later I learnt that his phone could control most of the TVs and ACs in the market. </p><p>From our point of view, it was a boon and a lot of fun.</p><p>But if we look from the restaurant&apos;s point of view. Someone who they don&apos;t know manipulated the AC is scary. What happens if someone can use the mobile to switch on the AC at night and keep the minimum temperature possible when no one is around?</p><p>What if someone can control your TV to have the maximum volume possible?</p><p>As more and more technological advancements happen, what should we keep in mind while building or using these new technologies?</p><hr><p><strong><strong><strong><strong><strong><strong><strong><strong>Share this article</strong></strong></strong></strong></strong></strong></strong></strong></p><p>Copy and share this article: <a href="https://www.narendravardi.com/ac-remote/">https://www.narendravardi.com/ac-remote/</a></p><hr><p><strong><strong><strong><strong><strong><strong><strong><strong>Recommendation</strong></strong></strong></strong></strong></strong>s</strong></strong></p><p>If you liked this article, you might also enjoy reading the following.</p><ul><li><a href="https://www.narendravardi.com/dall-e/">The magician who creates digital images from the text: DALL-E</a></li><li><a href="https://www.narendravardi.com/miserable-farewell/">Why was I so miserable during my farewell?</a></li><li><a href="https://www.narendravardi.com/boring-domain/">Why I chose a boring domain name</a></li></ul><hr><p>&#x2764;&#xFE0F;<strong><strong><strong><strong><strong><strong><strong><strong> Enjoyed this article?</strong></strong></strong></strong></strong></strong></strong></strong></p><p>Forward to a friend and let them know where they can subscribe (hint: it&apos;s <a href="https://www.narendravardi.com/#/portal/signup/free">here</a>).<br><br>Anything else? Comment below to say hello, or drop an <a href="mailto:narendravardi1127@gmail.com">email</a>!</p><hr>]]></content:encoded></item><item><title><![CDATA[🎨Let's talk about some of the famous paintings of the world]]></title><description><![CDATA[In this article, I share with you ten of my favorite paintings.]]></description><link>https://www.narendravardi.com/famous-paintings/</link><guid isPermaLink="false">63db5d3694053d004d15a33f</guid><category><![CDATA[Eurotrip2022]]></category><category><![CDATA[2023]]></category><category><![CDATA[Misc]]></category><dc:creator><![CDATA[Narendra Vardi]]></dc:creator><pubDate>Sat, 11 Feb 2023 10:30:58 GMT</pubDate><media:content url="https://www.narendravardi.com/content/images/2023/02/IMG_20220809_102408_927-1.jpg" medium="image"/><content:encoded><![CDATA[<img src="https://www.narendravardi.com/content/images/2023/02/IMG_20220809_102408_927-1.jpg" alt="&#x1F3A8;Let&apos;s talk about some of the famous paintings of the world"><p><em>Hi! My name is Narendra Vardi, and I write about my learnings, observations and trends in the Software world. Besides software, I also talk about photography, travel stories, books and movies. If that&apos;s something that interests you, consider </em><a href="https://www.narendravardi.com/#/portal/signup/free"><em>subscribing</em></a><em>.</em></p><hr><p>I have been learning a lot about the world&apos;s most famous paintings. This new hobby stemmed from my visit to <a href="https://en.wikipedia.org/wiki/Rijksmuseum?ref=narendravardi.com">Rijksmuseum</a>, Amsterdam.</p><blockquote>Rijksmuseum is the museum of the Netherlands in Amsterdam. 800 years of Dutch history, with the great Dutch masters as <strong>Rembrandt</strong>, <strong>Vermeer </strong>and <strong>Van Gogh</strong>.</blockquote><p><strong>Rembrandt</strong>, <strong>Vermeer </strong>and <strong>Van Gogh </strong>are some of the most famous Dutch painters. There is a high possibility that you might have seen one of their paintings. I didn&apos;t know about Rembrandt&apos;s and Vermeer&apos;s paintings until I visited Rijksmuseum. But I did know Van Gogh&apos;s <em>The Starry Night</em> painting. It was an incredible sensation a few years back on social media, and I believe it remains the same even today.</p><p>Below is image of how it looks:</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.narendravardi.com/content/images/2023/02/Van_Gogh_-_Starry_Night_-_Google_Art_Project.jpg" class="kg-image" alt="&#x1F3A8;Let&apos;s talk about some of the famous paintings of the world" loading="lazy" width="606" height="480" srcset="https://www.narendravardi.com/content/images/size/w600/2023/02/Van_Gogh_-_Starry_Night_-_Google_Art_Project.jpg 600w, https://www.narendravardi.com/content/images/2023/02/Van_Gogh_-_Starry_Night_-_Google_Art_Project.jpg 606w"><figcaption>The Starry Night by Vincent van Gogh</figcaption></figure><p>Unfortunately, I couldn&apos;t see the actual painting of &apos;The Starry Night&apos; since it&apos;s not available in the museums of Amsterdam. This painting is located in <em>The Museum of Modern Art</em>, an Art museum in New York City. </p><hr><p>But I did see various paintings by Dutch artists. Here are <em>five </em>paintings from Rijksmuseum which fascinated me. </p><h3 id="paintings-which-are-part-of-rijksmusuem">Paintings which are part of Rijksmusuem</h3><p><strong><u>Portrait of Pompejus Occo by Dirck Jacobsz</u></strong></p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.narendravardi.com/content/images/2023/02/608px-Dirck_Jacobsz_-_Pompeius_Occo.jpg" class="kg-image" alt="&#x1F3A8;Let&apos;s talk about some of the famous paintings of the world" loading="lazy" width="608" height="720" srcset="https://www.narendravardi.com/content/images/size/w600/2023/02/608px-Dirck_Jacobsz_-_Pompeius_Occo.jpg 600w, https://www.narendravardi.com/content/images/2023/02/608px-Dirck_Jacobsz_-_Pompeius_Occo.jpg 608w"><figcaption>Portrait with a skull that too in the 1500s?</figcaption></figure><p><strong>The Milkmaid by Johannes Vermeer</strong></p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.narendravardi.com/content/images/2023/02/642px-Johannes_Vermeer_-_Het_melkmeisje_-_Google_Art_Project.jpg" class="kg-image" alt="&#x1F3A8;Let&apos;s talk about some of the famous paintings of the world" loading="lazy" width="642" height="720" srcset="https://www.narendravardi.com/content/images/size/w600/2023/02/642px-Johannes_Vermeer_-_Het_melkmeisje_-_Google_Art_Project.jpg 600w, https://www.narendravardi.com/content/images/2023/02/642px-Johannes_Vermeer_-_Het_melkmeisje_-_Google_Art_Project.jpg 642w"><figcaption>Gold and Blue, what a clever use of colour. There is a calmness to this painting.</figcaption></figure><p><strong>The Little Street by Johannes Vermeer</strong></p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.narendravardi.com/content/images/2023/02/512px-Johannes_Vermeer_-_Gezicht_op_huizen_in_Delft-_bekend_als_-Het_straatje-_-_Google_Art_Project-1.jpg" class="kg-image" alt="&#x1F3A8;Let&apos;s talk about some of the famous paintings of the world" loading="lazy" width="512" height="634"><figcaption>Observe the details of the building. Is that a photograph?</figcaption></figure><p><strong>Still Life with a Silver Jug and a Porcelain Bowl by Willem Kalf</strong></p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.narendravardi.com/content/images/2023/02/644px-Willem_Kalf_-_Stilleven_met_zilveren_schenkkan_-_Google_Art_Project.jpg" class="kg-image" alt="&#x1F3A8;Let&apos;s talk about some of the famous paintings of the world" loading="lazy" width="644" height="720" srcset="https://www.narendravardi.com/content/images/size/w600/2023/02/644px-Willem_Kalf_-_Stilleven_met_zilveren_schenkkan_-_Google_Art_Project.jpg 600w, https://www.narendravardi.com/content/images/2023/02/644px-Willem_Kalf_-_Stilleven_met_zilveren_schenkkan_-_Google_Art_Project.jpg 644w"><figcaption>Details, details, details!</figcaption></figure><p><strong>The Night Watch by Rembrandt</strong></p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.narendravardi.com/content/images/2023/02/859px-The_Night_Watch_-_HD.jpg" class="kg-image" alt="&#x1F3A8;Let&apos;s talk about some of the famous paintings of the world" loading="lazy" width="859" height="720" srcset="https://www.narendravardi.com/content/images/size/w600/2023/02/859px-The_Night_Watch_-_HD.jpg 600w, https://www.narendravardi.com/content/images/2023/02/859px-The_Night_Watch_-_HD.jpg 859w" sizes="(min-width: 720px) 720px"><figcaption>This is quite a large painting. 12 by 14+1&#x2044;2 <u>feet</u></figcaption></figure><hr><p>Now that I have talked about some favourite paintings located in Rijksmuseum let me also talk about some paintings which are not part of Rijksmusuem. </p><div class="kg-card kg-button-card kg-align-center"><a href="https://www.narendravardi.com/#/portal/signup/free" class="kg-btn kg-btn-accent">Receive the articles delivered directly to your inbox </a></div><h3 id="paintings-which-are-not-part-of-rijksmusuem">Paintings which are not part of Rijksmusuem</h3><p><strong>The Starry Night by Vincent van Gogh</strong></p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.narendravardi.com/content/images/2023/02/Van_Gogh_-_Starry_Night_-_Google_Art_Project-1.jpg" class="kg-image" alt="&#x1F3A8;Let&apos;s talk about some of the famous paintings of the world" loading="lazy" width="606" height="480" srcset="https://www.narendravardi.com/content/images/size/w600/2023/02/Van_Gogh_-_Starry_Night_-_Google_Art_Project-1.jpg 600w, https://www.narendravardi.com/content/images/2023/02/Van_Gogh_-_Starry_Night_-_Google_Art_Project-1.jpg 606w"><figcaption>My personal favourite. Imagine asking people to see this painting after they are drunk :P&#xA0;</figcaption></figure><p><strong>The Scream by Edvard Munch</strong></p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.narendravardi.com/content/images/2023/02/580px-Edvard_Munch-_1893-_The_Scream-_oil-_tempera_and_pastel_on_cardboard-_91_x_73_cm-_National_Gallery_of_Norway.jpg" class="kg-image" alt="&#x1F3A8;Let&apos;s talk about some of the famous paintings of the world" loading="lazy" width="580" height="720"><figcaption>Notice the anxiety of the person screaming.&#xA0;</figcaption></figure><p><strong>Girl with a Pearl Earring by Johannes Vermeer</strong></p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.narendravardi.com/content/images/2023/02/608px-1665_Girl_with_a_Pearl_Earring.jpg" class="kg-image" alt="&#x1F3A8;Let&apos;s talk about some of the famous paintings of the world" loading="lazy" width="608" height="720" srcset="https://www.narendravardi.com/content/images/size/w600/2023/02/608px-1665_Girl_with_a_Pearl_Earring.jpg 600w, https://www.narendravardi.com/content/images/2023/02/608px-1665_Girl_with_a_Pearl_Earring.jpg 608w"><figcaption>I like this image because I like &apos;The Milkmaid&apos;. I love three of Johannes Vermeer&apos;s paintings.</figcaption></figure><p><strong>The Great Wave off Kanagawa by Katsushika Hokusai</strong></p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.narendravardi.com/content/images/2023/02/Tsunami_by_hokusai_19th_century.jpg" class="kg-image" alt="&#x1F3A8;Let&apos;s talk about some of the famous paintings of the world" loading="lazy" width="640" height="430" srcset="https://www.narendravardi.com/content/images/size/w600/2023/02/Tsunami_by_hokusai_19th_century.jpg 600w, https://www.narendravardi.com/content/images/2023/02/Tsunami_by_hokusai_19th_century.jpg 640w"><figcaption>The wave is mysterious. Did you notice boats in the ocean and claws to the wave?</figcaption></figure><p><strong>Nighthawks by Edward Hopper</strong></p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.narendravardi.com/content/images/2023/02/1280px-Nighthawks_by_Edward_Hopper_1942.jpg" class="kg-image" alt="&#x1F3A8;Let&apos;s talk about some of the famous paintings of the world" loading="lazy" width="1280" height="698" srcset="https://www.narendravardi.com/content/images/size/w600/2023/02/1280px-Nighthawks_by_Edward_Hopper_1942.jpg 600w, https://www.narendravardi.com/content/images/size/w1000/2023/02/1280px-Nighthawks_by_Edward_Hopper_1942.jpg 1000w, https://www.narendravardi.com/content/images/2023/02/1280px-Nighthawks_by_Edward_Hopper_1942.jpg 1280w" sizes="(min-width: 720px) 720px"><figcaption>I am not yet able to tell why I like this image. Is it because of the excellent use of light to bring your focus to the right side of the canvas?</figcaption></figure><blockquote>I am still a noob in understanding paintings. I felt &apos;Mona Lisa&apos; painting needs more time for me to understand. Hence, it&apos;s not on the list.</blockquote><hr><p><strong>Understanding Paintings</strong></p><p>Some of these paintings are pretty hard to interpret without knowing the history of why the artwork was created in the first place. </p><p>I came across the YouTube channel, which helped me understand many things about paintings. If you also found the paintings interesting, I would suggest you check out the YouTube channel at the link: <a href="https://www.youtube.com/@GreatArtExplained?ref=narendravardi.com">GreatArtExplained</a></p><hr><p><strong><strong><strong><strong><strong><strong><strong><strong>Share this article</strong></strong></strong></strong></strong></strong></strong></strong></p><p>Copy and share this article:</p><p><a href="https://www.narendravardi.com/famous-paintings/">https://www.narendravardi.com/famous-paintings</a></p><hr><p><strong><strong><strong><strong><strong><strong><strong><strong>Recommendation</strong></strong></strong></strong></strong></strong>s</strong></strong></p><p>If you liked this article, you might also like reading the following.</p><ul><li><a href="https://www.narendravardi.com/digital-artwork/">My Digital Art Work</a></li><li><a href="https://www.narendravardi.com/light-trails/">Capturing light trails of traffic in Bangalore</a></li><li><a href="https://www.narendravardi.com/dall-e/">The magician who creates digital images from the text: DALL-E</a></li></ul><hr><p>&#x2764;&#xFE0F;<strong><strong><strong><strong><strong><strong><strong><strong> Enjoyed this article?</strong></strong></strong></strong></strong></strong></strong></strong></p><p>Forward to a friend and let them know where they can subscribe (hint: it&apos;s <a href="https://www.narendravardi.com/#/portal/signup/free">here</a>).</p><p>Anything else? Comment below to say hello, or drop an <a href="mailto:narendravardi1127@gmail.com">email</a>!</p><p><br></p><p></p><p></p>]]></content:encoded></item><item><title><![CDATA[🔒It's Safer Internet Day! Two mechanisms to prevent account hacking]]></title><description><![CDATA[Two mechanisms to prevent account hacking. ]]></description><link>https://www.narendravardi.com/safer-internet/</link><guid isPermaLink="false">63e201ff14a728003dad755b</guid><category><![CDATA[Tools]]></category><category><![CDATA[2023]]></category><category><![CDATA[Tech]]></category><dc:creator><![CDATA[Narendra Vardi]]></dc:creator><pubDate>Tue, 07 Feb 2023 10:30:47 GMT</pubDate><media:content url="https://www.narendravardi.com/content/images/2023/03/WhatsApp-Image-2023-03-10-at-13.16.52-4.jpeg" medium="image"/><content:encoded><![CDATA[<img src="https://www.narendravardi.com/content/images/2023/03/WhatsApp-Image-2023-03-10-at-13.16.52-4.jpeg" alt="&#x1F512;It&apos;s Safer Internet Day! Two mechanisms to prevent account hacking"><p><em><em>Hi! My name is Narendra Vardi, and I write about my learnings, observations and trends in the Software world. Besides software, I also talk about photography, travel stories, books and movies. If that&apos;s something that interests you, consider </em></em><a href="https://www.narendravardi.com/#/portal/signup/free"><em><em>subscribing</em></em></a><em><em>.</em></em></p><hr><p>Recently a friend of mine called me. He mentioned that their Instagram account had been hacked and was being misused. He asked me if there was a way to retrieve the account. Unfortunately, I didn&apos;t have any helpful answers. </p><p>On the occasion of <code>Safer Internet Day</code>, I thought of discussing how you can prevent this situation on most websites. Some of you might have already used it knowingly or unknowingly.</p><p>This is a two-step process. </p><ol><li>Using Password Manager.</li><li>Using Two-factor authentication. </li></ol><h3 id="using-password-manager">Using Password Manager</h3><p>One of the simplest prevention forms is using a different password for different websites. Besides this, avoid using the most commonly used passwords. It should be difficult for hackers to guess the password. </p><p>This is common sense; I am sure you are already aware of this. But why do we not use different passwords? Because our memory has limitations. That&apos;s where Password Managers help us. They help us to generate a unique password for each website, and they also help us to fill in the password onto that website without memorising the password. </p><p><strong>Bonus: </strong>One of the bizarre passwords I have seen people with password manager use is <code>4PMf?,^t(Nr+V3tww9pn8&amp;uB&apos;zHsg=KFud/~/<code>E&quot;j&amp;tcP&quot;_y:</code>bhE5Wn9X+&amp;PuCnY*Ee.aaJ</code> &#x1F602;</p><p>The only problem is, if a password is compromised, which based on my password manager usage experience, is very rare, it can create a problem. In this case, we make use of two-factor authentication. </p><h3 id="enabling-two-factor-authentication">Enabling Two-factor authentication</h3><p>Have you ever received a text message like <code>Your security code to login is: XXXXXX</code></p><p>This mechanism is called two-factor (or sometimes multi-factor) authentication. </p><blockquote>Multi-factor authentication (MFA), sometimes called two-factor authentication (2FA), is a security enhancement that requires you to present two pieces of evidence when logging in to an account. Your credentials must come from two different categories to enhance security.</blockquote><p>The first category is your password, and the second category will be the code from two-factor authentication. </p><p>Here&apos;s the list of two-factor authentication mechanisms available:</p><ul><li><strong>Knowledge factors: </strong>Something you know; like a password, PIN, or security questions</li><li><strong>Ownership factors: </strong>Something you have; like a mobile device (text message), email account, or a USB security key (e.g., <a href="https://www.amazon.com/Yubico-YubiKey-USB-Authentication-Security/dp/B07HBD71HL?ref=narendravardi.com" rel>YubiKey</a>)</li><li><strong>Inherence factors: </strong>Something you are; biometrics; like your fingerprint, iris pattern, or facial features</li></ul><p>(The above list is taken from <a href="https://substack.com/profile/219237-danny-sheridan?ref=narendravardi.com">Danny Sheridan</a>&apos;s <a href="https://www.factoftheday1.com/p/november-30-types-of-multi-factor?ref=narendravardi.com">November 30: Types of Multi-factor Authentication</a> substack article)</p><p><strong>Best practice: </strong>Always enable more than one type of two-factor authentication mechanism and save the security codes or QR codes provided by the website while enabling the two-factor authentication.</p><hr><p><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong>Share this article</strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></p><p>Copy and share this article: <a href="https://www.narendravardi.com/safer-internet/">https://www.narendravardi.com/safer-internet/</a></p><hr><p><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong>Recommendation</strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong>s</strong></strong></strong></strong></strong></strong></strong></strong></p><p>If you liked this article, you might also like reading the following.</p><ul><li><a href="https://www.narendravardi.com/one-click/">Time-saving tricks for Google Docs</a></li><li><a href="https://www.narendravardi.com/sleep-page/">Do yourself a favour and visit No Sleep Page</a></li><li><a href="https://www.narendravardi.com/html-gmail/">Use HTML version of Gmail to quickly lookup OTPs</a></li></ul><hr><p>&#x2764;&#xFE0F;<strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong> Enjoyed this article?</strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></p><p>Forward to a friend and let them know where they can subscribe (hint: it&apos;s <a href="https://www.narendravardi.com/#/portal/signup/free">here</a>).</p><p>Anything else? Comment below to say hello, or drop an <a href="mailto:narendravardi1127@gmail.com">email</a>!</p><p><br></p><p><br></p><p><br></p><p></p><p></p>]]></content:encoded></item><item><title><![CDATA[🤖Automating the boring stuff: How I obtained the titles of all articles on my blog]]></title><description><![CDATA[In this article, I talk about how I automated the generation of an all-article list with the help of python programming language. ]]></description><link>https://www.narendravardi.com/list-automation/</link><guid isPermaLink="false">63dcecab94053d004d15a3f9</guid><category><![CDATA[Programming]]></category><category><![CDATA[2023]]></category><dc:creator><![CDATA[Narendra Vardi]]></dc:creator><pubDate>Sat, 04 Feb 2023 10:30:45 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1551269901-5c5e14c25df7?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwxMTc3M3wwfDF8c2VhcmNofDE0fHxtYWdpY3xlbnwwfHx8fDE2NzU0MjI5OTc&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" medium="image"/><content:encoded><![CDATA[<img src="https://images.unsplash.com/photo-1551269901-5c5e14c25df7?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwxMTc3M3wwfDF8c2VhcmNofDE0fHxtYWdpY3xlbnwwfHx8fDE2NzU0MjI5OTc&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" alt="&#x1F916;Automating the boring stuff: How I obtained the titles of all articles on my blog"><p><em>Hi! My name is Narendra Vardi, and I write about my learnings, observations and trends in the Software world. Besides software, I also talk about photography, travel stories, books and movies. If that&apos;s something that interests you, consider </em><a href="https://www.narendravardi.com/#/portal/signup/free"><em>subscribing</em></a><em>.</em></p><hr><p>I follow a lot of bloggers, and on their websites, most of them have an all-article list. It&apos;s a place on the website where the user can see all article titles on the website in the form of bullet points. </p><p>I love that idea, and I wanted to maintain a similar page. But it needed some coding. After tweaking for a couple of hours, the page is live. Check out the <a href="https://www.narendravardi.com/articles-list/">articles-list</a> page now. </p><p>In this article, I talk about how I automated the generation of an all-article list with the help of python programming language.</p><p>The format of the articles list looks like below:</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.narendravardi.com/content/images/2023/02/Screenshot-2023-02-03-224631.jpg" class="kg-image" alt="&#x1F916;Automating the boring stuff: How I obtained the titles of all articles on my blog" loading="lazy" width="849" height="192" srcset="https://www.narendravardi.com/content/images/size/w600/2023/02/Screenshot-2023-02-03-224631.jpg 600w, https://www.narendravardi.com/content/images/2023/02/Screenshot-2023-02-03-224631.jpg 849w" sizes="(min-width: 720px) 720px"><figcaption>The text of the link is the &apos;Title&apos; of the article, and it is linked to the article.&#xA0;</figcaption></figure><p>To create the list, I would need the following:</p><ol><li>Links to all articles are present on my website.</li><li>Title of each article</li></ol><p>Here&apos;s some dummy skeleton code for the same.</p><figure class="kg-card kg-code-card"><pre><code class="language-Python"># Dummy skeleton code.
def get_all_post_links():
    url_links = []
    # do the processing and get the append the links to `url_links`
    return url_links
    
def get_title_from_url_link(url):
    title = None
    # do the processing and set `title` field. 
	return title 
    

if __name__ == &apos;__main__&apos;:
    all_links = get_all_post_links()
    for link in all_links:
        # Printing as a markdown link.
        print(&apos;* [{}]({})&apos;.format(get_title_from_url_link(link), link))</code></pre><figcaption>Dummy skeleton code in Python</figcaption></figure><p>Now to populate the two methods, I can follow two approaches. </p><p><strong>Approach #1: Using APIs provided by <a href="https://ghost.org/?via=narendravardi&amp;ref=narendravardi.com">Ghost Pro</a> (which I use for hosting my website)</strong></p><p>This is the easiest one. Tweaking out some API responses from <a href="https://ghost.org/docs/content-api/?ref=narendravardi.com">Ghost Content API Documentation</a> would have been good enough. </p><p>To test API responses, I tried to create <a href="https://ghost.org/docs/content-api/?ref=narendravardi.com#key">API Key</a>. I was utterly disappointed that this API key generation capability was unavailable for my account plan. I need to upgrade my account to a different premium plan to support that feature. </p><p>Because of this, I was left with only Approach #2, web scraping. &#xA0;</p><p><strong>Approach #2: Do some Web Scraping on my very own blog. </strong></p><p>Initially, I thought of web scraping by visiting the home page of my account, which is <a href="https://www.narendravardi.com/">https://www.narendravardi.com</a>. But before that, I researched about the technical aspects of blogs and web scraping. During this research, I learnt about <em>sitemaps</em>. </p><p><strong>Sitemaps</strong></p><p>According to Google Search Central: </p><blockquote>A sitemap is a file where you provide information about the pages, videos, and other files on your site, and the relationships between them. Search engines like Google read this file to crawl your site more efficiently. A sitemap tells Google which pages and files you think are important in your site, and also provides valuable information about these files. For example, when the page was last updated and any alternate language versions of the page.</blockquote><p>The sitemap for my blog is an XML file available at the following location: <a href="https://www.narendravardi.com/sitemap.xml">https://www.narendravardi.com/sitemap.xml</a></p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.narendravardi.com/content/images/2023/02/Screenshot-2023-02-03-235733.jpg" class="kg-image" alt="&#x1F916;Automating the boring stuff: How I obtained the titles of all articles on my blog" loading="lazy" width="1225" height="421" srcset="https://www.narendravardi.com/content/images/size/w600/2023/02/Screenshot-2023-02-03-235733.jpg 600w, https://www.narendravardi.com/content/images/size/w1000/2023/02/Screenshot-2023-02-03-235733.jpg 1000w, https://www.narendravardi.com/content/images/2023/02/Screenshot-2023-02-03-235733.jpg 1225w" sizes="(min-width: 720px) 720px"><figcaption>XML Sitemap in a viewable format.</figcaption></figure><p>This root sitemap has separate XML mappings for pages, posts, authors and tags. </p><p><strong>Fetching all post links</strong></p><p>Since we need to get the links of posts, we can visit the sitemap only for <a href="https://www.narendravardi.com/sitemap-posts.xml">sitemap-posts</a>.</p><p>If we inspect the source of sitemap-posts, we will know that it&apos;s an XML file. Since it&apos;s an XML file, we can use python to extract the post links from that XML file. </p><p>Now we can make the following changes to the <code>get_all_post_links</code> function: </p><ol><li>Accept the URL path for sitemap-posts.</li><li>Get the XML </li><li>Parse XML</li><li>Append the links to <code>url_links</code>.</li></ol><figure class="kg-card kg-code-card"><pre><code class="language-Python">import requests
from bs4 import BeautifulSoup # read about how to parse XML file! :)

ghost_sitemap_posts_url = &apos;https://www.narendravardi.com/sitemap-posts.xml&apos;


def get_all_post_links(sitemap_posts_url):
	# 2. Get the XML
    xml_data = requests.get(sitemap_posts_url).content
    # 3. Parse XML
    soup = BeautifulSoup(xml_data, &apos;xml&apos;)
    url_sets = soup.find_all(&apos;loc&apos;)
    url_links = []
    # 4. Append the links
    for url_set in url_sets:
        url_set_text = url_set.text
        # site-posts also consists of image links. Ignoring them.
        if not &apos;image&apos; in url_set_text:
            url_links.append(url_set_text)
    return url_links


def get_title_from_url_link(url):
    title = None
    # do the processing and set `title` field. 
	return title     


if __name__ == &apos;__main__&apos;:
    # 1. Accept the URL path for sitemap-posts.
    all_links = get_all_post_links(ghost_sitemap_posts_url)
    for link in all_links:
        print(&apos;* [{}]({})&apos;.format(get_title_from_url_link(link), link))</code></pre><figcaption>Python code with fully functional &apos;get_all_post_links&apos; method</figcaption></figure><p><strong>Getting the title from the article link</strong></p><p>Now it&apos;s time to get the title from each post. This involves the following steps. </p><ol><li>Get the HTML page of the post. </li><li>Extract the title of the page and </li><li>Return the title. </li></ol><figure class="kg-card kg-code-card"><pre><code class="language-Python">import requests
from bs4 import BeautifulSoup # read about how to parse XML file! :)

ghost_sitemap_posts_url = &apos;https://www.narendravardi.com/sitemap-posts.xml&apos;


def get_all_post_links(sitemap_posts_url):
	# 2. Get the XML
    xml_data = requests.get(sitemap_posts_url).content
    # 3. Parse XML
    soup = BeautifulSoup(xml_data, &apos;xml&apos;)
    url_sets = soup.find_all(&apos;loc&apos;)
    url_links = []
    # 4. Append the links
    for url_set in url_sets:
        url_set_text = url_set.text
        # site-posts also consists of image links. Ignoring them.
        if not &apos;image&apos; in url_set_text:
            url_links.append(url_set_text)
    return url_links


def get_title_from_url_link(url):
	# 1. Get the HTML page of the post.
    reqs = requests.get(url)
    # 2. Extract the title of the page and 
    soup = BeautifulSoup(reqs.text, &apos;html.parser&apos;)
    # 3. Return the title. 
    for title in soup.find_all(&apos;title&apos;): # why use a for loop for title?
        return title.get_text()
   

if __name__ == &apos;__main__&apos;:
    # 1. Accept the URL path for sitemap-posts.
    all_links = get_all_post_links(ghost_sitemap_posts_url)
    for link in all_links:
        print(&apos;* [{}]({})&apos;.format(get_title_from_url_link(link), link))</code></pre><figcaption>Fully functional Python code</figcaption></figure><div class="kg-card kg-callout-card kg-callout-card-yellow"><div class="kg-callout-emoji">&#x1F480;</div><div class="kg-callout-text">For this code to function, you must install lxml, requests, beautifulsoup4 packages.</div></div><p>The output of the script looks as follows: </p><pre><code class="language-Markdown">* [&#x1F4F7;Minimalist photographs of farm fields](https://www.narendravardi.com/farm-patterns/)
* [&#x270D;&#xFE0F;Finding the Nth highest salary from an SQL table](https://www.narendravardi.com/nth-salary/)
* [&#x1F399;&#xFE0F;Solo Trip to Europe: Podcast interview](https://www.narendravardi.com/soloeurotrip-interview/)</code></pre><p>I can directly paste the above output into Ghost using the markdown feature.</p><p>Don&apos;t forget to visit the <a href="https://www.narendravardi.com/articles-list/">All Articles</a> page.</p><p>That&apos;s all for today! :)</p><hr><p><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong>Share this article</strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></p><p>Copy and share this article: <a href="https://www.narendravardi.com/list-automation/">https://www.narendravardi.com/list-automation</a></p><hr><p><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong>Recommendation</strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong>s</strong></strong></strong></strong></p><p>If you liked this article, you might also like reading the following.</p><ul><li><a href="https://www.narendravardi.com/interview-prep/">Future Software Engineers, read this article before and during your placements</a>.</li><li><a href="https://www.narendravardi.com/dall-e/">The magician who creates digital images from the text: DALL-E</a></li><li><a href="https://www.narendravardi.com/bus-factor/">&#x1F68C;Bus Factor in the IT World</a></li></ul><hr><p>&#x2764;&#xFE0F;<strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong> Enjoyed this article?</strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></p><p>Forward to a friend and let them know where they can subscribe (hint: it&apos;s <a href="https://www.narendravardi.com/#/portal/signup/free">here</a>).</p><p>Anything else? Comment below to say hello, or drop an <a href="mailto:narendravardi1127@gmail.com">email</a>!</p>]]></content:encoded></item><item><title><![CDATA[📷Minimalist photographs of farm fields]]></title><description><![CDATA[Sharing the Minimalist photographs of farm fields I’ve captured with the help of my drone.]]></description><link>https://www.narendravardi.com/farm-patterns/</link><guid isPermaLink="false">63d2657194053d004d15a009</guid><category><![CDATA[Photography]]></category><category><![CDATA[2023]]></category><dc:creator><![CDATA[Narendra Vardi]]></dc:creator><pubDate>Sat, 28 Jan 2023 10:30:42 GMT</pubDate><media:content url="https://www.narendravardi.com/content/images/2023/01/C48E02EB-5A97-4AEC-AE3E-3336DC9BBFF8.jpeg" medium="image"/><content:encoded><![CDATA[<img src="https://www.narendravardi.com/content/images/2023/01/C48E02EB-5A97-4AEC-AE3E-3336DC9BBFF8.jpeg" alt="&#x1F4F7;Minimalist photographs of farm fields"><p>Hello All&#x1F44B; </p><p>I&#x2019;m working on a couple of articles which I&#x2019;ve not finished writing yet. Meanwhile, I thought of sharing multiple photographs I&#x2019;ve captured with the help of drone. These are clearly some of my favourite photographs I&#x2019;ve taken and I&#x2019;m really happy that my photography perspective is getting better. </p><figure class="kg-card kg-gallery-card kg-width-wide"><div class="kg-gallery-container"><div class="kg-gallery-row"><div class="kg-gallery-image"><img src="https://www.narendravardi.com/content/images/2023/01/65952224-4B94-4DE9-8960-A1320E1579D1.jpeg" width="2000" height="1999" loading="lazy" alt="&#x1F4F7;Minimalist photographs of farm fields" srcset="https://www.narendravardi.com/content/images/size/w600/2023/01/65952224-4B94-4DE9-8960-A1320E1579D1.jpeg 600w, https://www.narendravardi.com/content/images/size/w1000/2023/01/65952224-4B94-4DE9-8960-A1320E1579D1.jpeg 1000w, https://www.narendravardi.com/content/images/size/w1600/2023/01/65952224-4B94-4DE9-8960-A1320E1579D1.jpeg 1600w, https://www.narendravardi.com/content/images/size/w2400/2023/01/65952224-4B94-4DE9-8960-A1320E1579D1.jpeg 2400w" sizes="(min-width: 720px) 720px"></div><div class="kg-gallery-image"><img src="https://www.narendravardi.com/content/images/2023/01/7BAAF392-78A4-42C6-99F7-E04703A7950B.jpeg" width="2000" height="1999" loading="lazy" alt="&#x1F4F7;Minimalist photographs of farm fields" srcset="https://www.narendravardi.com/content/images/size/w600/2023/01/7BAAF392-78A4-42C6-99F7-E04703A7950B.jpeg 600w, https://www.narendravardi.com/content/images/size/w1000/2023/01/7BAAF392-78A4-42C6-99F7-E04703A7950B.jpeg 1000w, https://www.narendravardi.com/content/images/size/w1600/2023/01/7BAAF392-78A4-42C6-99F7-E04703A7950B.jpeg 1600w, https://www.narendravardi.com/content/images/size/w2400/2023/01/7BAAF392-78A4-42C6-99F7-E04703A7950B.jpeg 2400w" sizes="(min-width: 720px) 720px"></div></div><div class="kg-gallery-row"><div class="kg-gallery-image"><img src="https://www.narendravardi.com/content/images/2023/01/147E250B-B4F1-4B20-8AE4-9971A166A96D.jpeg" width="2000" height="1999" loading="lazy" alt="&#x1F4F7;Minimalist photographs of farm fields" srcset="https://www.narendravardi.com/content/images/size/w600/2023/01/147E250B-B4F1-4B20-8AE4-9971A166A96D.jpeg 600w, https://www.narendravardi.com/content/images/size/w1000/2023/01/147E250B-B4F1-4B20-8AE4-9971A166A96D.jpeg 1000w, https://www.narendravardi.com/content/images/size/w1600/2023/01/147E250B-B4F1-4B20-8AE4-9971A166A96D.jpeg 1600w, https://www.narendravardi.com/content/images/size/w2400/2023/01/147E250B-B4F1-4B20-8AE4-9971A166A96D.jpeg 2400w" sizes="(min-width: 720px) 720px"></div><div class="kg-gallery-image"><img src="https://www.narendravardi.com/content/images/2023/01/18A1A709-950E-49FC-BE1F-E70F8B8EBCB8.jpeg" width="2000" height="2000" loading="lazy" alt="&#x1F4F7;Minimalist photographs of farm fields" srcset="https://www.narendravardi.com/content/images/size/w600/2023/01/18A1A709-950E-49FC-BE1F-E70F8B8EBCB8.jpeg 600w, https://www.narendravardi.com/content/images/size/w1000/2023/01/18A1A709-950E-49FC-BE1F-E70F8B8EBCB8.jpeg 1000w, https://www.narendravardi.com/content/images/size/w1600/2023/01/18A1A709-950E-49FC-BE1F-E70F8B8EBCB8.jpeg 1600w, https://www.narendravardi.com/content/images/size/w2400/2023/01/18A1A709-950E-49FC-BE1F-E70F8B8EBCB8.jpeg 2400w" sizes="(min-width: 720px) 720px"></div></div></div></figure><p>Which is your favourite photograph from the above?</p><p>Do &#xA0;you have any suggestions on what I &#xA0;should capture next on my drone? &#xA0;Let me know that in comments! :)</p><hr><p><strong><strong><strong><strong>Share this article</strong></strong></strong></strong></p><p>Copy and share this article: </p><p><a href="https://www.narendravardi.com/farm-patterns/">https://www.narendravardi.com/farm-patterns</a></p><hr><p><strong><strong><strong><strong>Recommendation</strong></strong></strong>s</strong></p><p>If you liked this article, you might also like reading the following.</p><ul><li><a href="https://www.narendravardi.com/light-trails/">Capturing light trails of traffic in Bangalore</a></li><li><a href="https://www.narendravardi.com/360-photo/">Breath-taking 360&#xB0; photograph up in the air</a></li><li><a href="https://www.narendravardi.com/dall-e/">The magician who creates digital images from the text: DALL-E</a></li></ul><hr><p>&#x2764;&#xFE0F;<strong><strong><strong><strong> Enjoyed this article?</strong></strong></strong></strong></p><p>Forward to a friend and let them know where they can subscribe (hint: it&apos;s <a href="https://www.narendravardi.com/#/portal/signup/free">here</a>).</p><p>Anything else? Comment below to say hello, or drop an <a href="mailto:narendravardi1127@gmail.com">email</a>!</p><p></p><p></p><p></p>]]></content:encoded></item></channel></rss>