Category: Technology

  • There’s a new mistake-maker in town

    An insightful article by Bruce Schneier on how humans have built guardrails to manage mistakes made by humans. But we are not equipped to manage the weird mistakes made by AI.

    Humanity is now rapidly integrating a wholly different kind of mistake-maker into society: AI. Technologies like large language models (LLMs) can perform many cognitive tasks traditionally fulfilled by humans, but they make plenty of mistakes. It seems ridiculous when chatbots tell you to eat rocks or add glue to pizza. But it’s not the frequency or severity of AI systems’ mistakes that differentiates them from human mistakes. It’s their weirdness. AI systems do not make mistakes in the same ways that humans do.

    Much of the friction—and risk—associated with our use of AI arise from that difference. We need to invent new security systems that adapt to these differences and prevent harm from AI mistakes.

  • Agentic AI

    Gary Marcus on AI Agents

    I do genuinely think we will all have our own AI agents, and companies will have armies of them. And they will be worth trillions, since eventually (no time soon) they will do a huge fraction of all human knowledge work, and maybe physical labor too. 

    But not this year (or next, or the one after that, and probably not this decade, except in narrow use cases). All that we will have this year are demos.

    Funny.

    And I am hoping it plays out the way Gary is describing it. I get to keep my job a little longer. And build a retirement corpus.

  • Convert current time to other time zones using Apple Shortcut

    In my work, I often need to remind my globally distributed team about meetings scheduled in different timezones. However, I sometimes struggle to accurately list all the time values, so I created an Apple Shortcut to convert the current time into different time zones and copy the formatted text to my clipboard for easy sharing.

    (more…)
  • iPhone shortcut to alert on percentage increase/decrease in stock prices

    There are several tools available that can send alerts for stock price or percentage movements, but most high-quality ones come with a cost. To address this, I created an iPhone shortcut that polls the Yahoo Finance API to monitor price changes compared to the previous day’s closing price. This shortcut alerts users when the price changes by more than 3%, 5%, or 10% in either direction.

    (more…)
  • Setup reminders for email in Apple Mail

    I use Apple Mail to manage emails from multiple accounts because of it no-frills UI which follows the macOS design language to the letter. But then the app is so bare bones that it does not even have a simple reminder option for email to follow up—at least not in a very intuitive way.

    To add a reminder on your email you need to use the Reminders app from Apple. See how Apple tries to hook you up in their ecosystem. Follow the below steps.

    1. In your Apple Mail app select the subject of your email and right click. This is a key step so that the reminder opens up the email that you want to follow up on. Click on Share > Reminders. On iOS you follow the same steps—select the Subject, tap on Share and select the Reminders app.

    2. You will get a dialog similar the one below where you can set the date and time for reminder. Note the Mail icon being shown in the dialog. Click on the Add button.

    3. The reminder should be added in the Reminders app with the Mail icon. Tapping on it will redirect you to the email.

  • 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>
  • 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.

  • Using Emmet in VS Code to boost your productivity

    A bit ashamed of myself that I come know about this feature so late. Here is the official documentation for Emmet in VS Code. This 7 minute video should give you a glimpse of its power.