• 4 years as shareholder of IDFC First Bank

    4 years ago I invested in IDFC First Bank after my thorough research (raj_king on MoneyControl.com forum told that IDFC Bank will become the next HDFC Bank. I am now hoping that HDFC Bank will rename itself to HDFC First Bank).

    Over these 4 years I invested only three times. For the majority of time, the worth of my investment has been less than the amount invested. It is only from Jan 2021 I have seen profit. And I don’t know how long will that sustain.

    Return

    Profit

    XIRR

    Category:
  • Accordion in Fluent UI / Office UI Fabric

    Fluent UI / Office UI Fabric does not provide any Accordion control. But you can create your Accordion using the Fluent UI controls itself. Below is the code for Accordion control that I have created in React. You can also see it action on CodeSandbox.

    import * as React from "react";
    import {
      DefaultPalette,
      AnimationClassNames
    } from "office-ui-fabric-react/lib/Styling";
    import {
      IconButton,
      initializeIcons,
      Stack,
      IStackItemStyles,
      IStackStyles
    } from "office-ui-fabric-react";
    
    initializeIcons();
    
    export class Accordion extends React.Component<IAccordionProps, {}> {
      private accordionHeader: IStackItemStyles = {
        root: {
          background: DefaultPalette.neutralLighter,
          padding: 5,
          cursor: "pointer"
        }
      };
      private accordion: IStackStyles = {
        root: {
          borderStyle: "solid",
          borderWidth: 1,
          borderColor: DefaultPalette.neutralTertiary
        }
      };
      private accordionConent: IStackStyles = {
        root: {
          padding: 10
        }
      };
    
      constructor(props: IAccordionProps, public state: any) {
        super(props);
    
        this.state = {
          content: false
        };
      }
    
      private showContent = (e) => {
        this.setState({
          content: !this.state.content
        });
      };
    
      public componentDidMount() {}
    
      public render(): React.ReactElement<IAccordionProps> {
        return (
          <>
            <Stack horizontal={false} styles={this.accordion}>
              <Stack.Item styles={this.accordionHeader}>
                <Stack horizontal={true} onClick={this.showContent}>
                  <Stack.Item>
                    <IconButton
                      iconProps={{
                        iconName: this.state.content
                          ? "ChevronDown"
                          : "ChevronRight"
                      }}
                    />
                  </Stack.Item>
                  <Stack.Item align="center">{this.props.header}</Stack.Item>
                </Stack>
              </Stack.Item>
              {this.state.content && (
                <Stack.Item
                  className={AnimationClassNames.slideDownIn20}
                  styles={this.accordionConent}
                >
                  {this.props.children}
                </Stack.Item>
              )}
            </Stack>
          </>
        );
      }
    }
    
    interface IAccordionProps {
      header: string;
    }

    You can use the control in your code with below sample code.

    <Accordion header="Lorem Ipsum">
          Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
          tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
          veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
          commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
          velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat
          cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id
          est laborum.
        </Accordion>
    Category: ,
  • 3 years with DSP Tax Saver Fund and L&T Tax Advantage Fund

    3 years ago I decided to start investing in an ELSS fund, apart from PPF, to save taxes. After a thorough research (eeny, meeny, miny, moe), I decided to go with DSP Tax Saver Fund and L&T Tax Advantage Fund. I went via the SIP route. My first couple of instalments were in Regular plan before realising that there is something called as Direct plan which has lower expense ratio (thank you Economic Times). Below are the key steps that I did over last three years.

    1. Started SIP in April 2018
    2. SIP frequency was monthly
    3. Increased SIP every year
      • DSP Tax Saver
        • Apr 2019: + 60%
        • Apr 2020: + 87.5%
      • L&T Tax Advantage
        • Apr 2019: + 20%
        • Apr 2020: + 16.7 %
    4. If I had surplus funds in a month, then I used to invest them in the fund as lumpsum. Being one of the lucky folks who did not lose his job due to pandemic (no increments though), I was able to invest surplus amount during the blood bath in stock markets of Mar-Jun 2020.

    I have plotted the SIP Return, Profit and XIRR of both these funds from April 2018 to Mar 2021.

    DSP Tax Saver Fund

    SIP Return Chart

    From Mar to Jul 2020, I was able to invest additional fund as lumpsum, that’s why the steps are not uniform as they were in previous two years. I continued investing lumpsum after wards also, albeit less frequent, as the market seemed to be very expensive.

    Profit Chart

    During the market crash from Mar to Jun 2020, two years worth of my investments went down by ~28%. But as of Mar 2021, I am looking at a profit of ~35%.

    XIRR Chart

    The market crash of Mar-Jun 2020 was so bad that the XIRR calculations went bonkers and resulted in 0% values for sometime during Mar-Jun 2020. From Mar 2020 to Mar 2021 the XIRR has gone from ~-30% to ~+30%.

    L&T Tax Advantage Fund

    SIP Return Chart

    Similar to DSP Tax Saver, from Mar to Jul 2020, I invested additional fund as lumpsum. But the returns in L&T Tax Advantage were always inferior to DSP Tax Saver. That resulted in me pouring more money in DSP Tax Saver.

    Profit Chart

    During the market crash of Mar-Jun 2020, two years worth of my investments went down by ~35%. But as of Mar 2021, I am looking at a profit of ~30%.

    XIRR Chart

    Similar to DSP Tax Saver, the market crash from Mar to Jun 2020 caused the XIRR calculations to go bonkers and resulted in 0% values for sometime. From Mar 2020 to Mar 2021 the XIRR has gone from ~-30% to ~+20%.

    Category:
  • Dependency confusion

    A simple loophole discovered by Alex Birsan and Justin Gardner

    Last year, security researcher Alex Birsan came across an idea when working with another researcher Justin Gardner.

    Gardner had shared with Birsan a manifest file, package.json, from an npm package used internally by PayPal.

    Birsan noticed some of the manifest file packages were not present on the public npm repository but were instead PayPal’s privately created npm packages, used and stored internally by the company.

    On seeing this, the researcher wondered, should a package by the same name exist in the public npm repository, in addition to a private NodeJS repository, which one would get priority?

    To test this hypothesis, Birsan began hunting for names of private internal packages that he could find in manifest files on GitHub repositories or in CDNs of prominent companies but did not exist in a public open-source repository.

    The researcher then started creating counterfeit projects using the same names on open-source repositories such as npm, PyPI, and RubyGems.

    Every package published by Birsan was done so under his real account and clearly had a disclaimer in place, stating “This package is meant for security research purposes and does not contain any useful code.”

    Researcher hacks over 35 tech firms in novel supply chain attack

    Now here’s the kicker

    Birsan soon realized, should a dependency package used by an application exist in both a public open-source repository and your private build, the public package would get priority and be pulled instead — without needing any action from the developer.

    Researcher hacks over 35 tech firms in novel supply chain attack

    Yikes!

    Category:
  • The Kierkegaard Conundrum

    The english version of “Shaadi ka laddoo jo na khaaye woh pachtaye, jo khaaye woh bhi pachtaaye

    If you marry, you will regret it; if you do not marry, you will also regret it; if you marry or if you do not marry, you will regret both; whether you marry or you do not marry, you will regret both. Laugh at the world’s follies, you will regret it; weep over them, you will also regret it; if you laugh at the world’s follies or if you weep over them, you will regret both; whether you laugh at the world’s follies or you weep over them, you will regret both. Believe a girl, you will regret it; if you do not believe her, you will also regret it; if you believe a girl or you do not believe her, you will regret both; whether you believe a girl or you do not believe her, you will regret both. If you hang yourself, you will regret it; if you do not hang yourself, you will regret it; if you hang yourself or you do not hang yourself, you will regret both; whether you hang yourself or you do not hang yourself, you will regret both. This, gentlemen, is the sum of all practical wisdom.

    Either/Or: Kierkegaard on Transcending the Tyranny of Binary Choice and Double Regret
    Category:
  • Create shortcut to call people from a list in iPhone

    I usually keep my family members as part of favourites on iPhone. But for work I need to call my work colleagues multiple times over the course of my day. I do not want them to be added to my favourites. But I do need a shortcut to be able to quickly call them when required. Well, Shortcuts to the rescue. I created a simple Shortcut that will show me a list of my work colleagues that I need to call and then call them looking up in the Contacts.

    Here’s how I did it.

    Download the Shortcuts app and open it. Create a new shortcut by tapping on the ‘+’ icon.

    Tap on ‘Add Action’ and search for ‘List’. Tap to add it.

    Once ‘List’ is added to you shortcut, add the names of people that you want to call. Make sure the name is same as they appear in your Contacts app. This is critical because if shortcut is not able to find the name in your Contacts, then it ends up showing Contacts search.

    Add another action by tapping on the ‘+’ button. Search for ‘List’ again, but this time select ‘Choose from List’ option.

    This will allow you to add a custom message to your prompt. Make sure the ‘Select Multiple’ option is turned off.

    Add another action by tapping on the ‘+’ button. Search for ‘Contacts’ and tap on ‘Find Contacts’.

    Configure the ‘Find Contacts’ action. Tap on ‘Add Filter’ to say ‘Name is Chosen item’. Limit the results to just one contact.

    Add another action by tapping on the ‘+’ button. Search for ‘Call’ and tap on ‘Call’.

    Once the action is added, your shortcut in done.

    Run this shortcut and you will be shown list of people. Tapping on any of them will call them.

    Category:
  • Anonymous corruption

    I recently watched the episode ‘Diamonds Aren’t Forever’ of Bad Billionaires: India on Netflix. This statement from James Crabtree stood out for me.

    There’s a very clear double standard in the way that we view corruption in the world. People look at countries like India and say, “these countries are corrupt”, but, actually, much of the worst corruption would not be possible without seemingly respectable international finance. Somebody like Nirav Modi needed international banks in order to funnel his money abroad. He needed international lawyers. He needed tax havens in order to host his shell companies. And so, the corruption, the grand corruption you see in countries like India works hand in glove with a different and much more anonymous form of corruption, which is entirely created in rich countries like Britain or Switzerland and America.

    Category:
  • Children give the first four years of your life back to you

    It’s also a history lesson. The first four years of your life. Do you remember them? What’s your earliest memory? It is fascinating watching your child claw their way up the developmental ladder from baby to toddler to child. All this stuff we take for granted, but your baby will painstakingly work their way through trial and error: eating, moving, walking, talking. Arms and legs, how the hell do they work? Turns out, we human beings are kind of amazing animals. There’s no better way to understand just how amazing humans are than the front row seat a child gives you to observe it all unfold from scratch each and every day, from literal square zero. Children give the first four years of your life back to you.

    On Parenthood

    A wonderful article for all the new parents and the ones who are on the fence about becoming a parent.

    Category: