<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Jai dewani</title>
    <description>The latest articles on Forem by Jai dewani (@jai_dewani).</description>
    <link>https://forem.com/jai_dewani</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F393646%2F32764d32-3c99-4502-be76-83838b72d039.jpg</url>
      <title>Forem: Jai dewani</title>
      <link>https://forem.com/jai_dewani</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/jai_dewani"/>
    <language>en</language>
    <item>
      <title>Your one stop solution to sharing your resume with everyone using GitHub</title>
      <dc:creator>Jai dewani</dc:creator>
      <pubDate>Fri, 23 Jul 2021 16:40:24 +0000</pubDate>
      <link>https://forem.com/jai_dewani/your-one-stop-solution-to-sharing-your-resume-with-everyone-using-github-4o4n</link>
      <guid>https://forem.com/jai_dewani/your-one-stop-solution-to-sharing-your-resume-with-everyone-using-github-4o4n</guid>
      <description>&lt;p&gt;Things I am going to cover: &lt;/p&gt;

&lt;p&gt;→ Hosting your resume hassle-free&lt;br&gt;&lt;br&gt;
→ How to use your &lt;code&gt;github.io&lt;/code&gt; domain instead of random google drive links&lt;br&gt;&lt;br&gt;
→ Update your resume with easy commits without changing the URL &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You can checkout my &lt;a href="https://github.com/jai-dewani/resume" rel="noopener noreferrer"&gt;template repository&lt;/a&gt; and start using it with just one click&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1627054753408%2F9sJgXsuv6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1627054753408%2F9sJgXsuv6.png" alt="image.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;It has been a reoccurring problem in my life, where suppose I am filling a form where I have been asked to provide a URL pointing to my &lt;strong&gt;latest&lt;/strong&gt; resume (emphasis on the latest, cause most of these forms were to be shared with HRs and recruiters so you want all the latest achievements there), and everyone like I used Google Drive to easily share there resume by creating a sharable link.&lt;/p&gt;

&lt;p&gt;But most often than not my slow brain would think of that &lt;strong&gt;one&lt;/strong&gt; important thing I missed out on in my resume or say I got selected into a prestigious program just days after filling this forum. Now I need this information to be there on that resume accessible from the same URL, so what should I do? But now I think I have a way to solve this problem using GitHub and GitHub Actions&lt;/p&gt;
&lt;h2&gt;
  
  
  The Solution
&lt;/h2&gt;

&lt;p&gt;Before I explain my solution, let me preface that my resume is written in latex which I need to compile to generate my resume in PDF format so I have incorporated that step as well to save my 10 seconds which otherwise I would have wasted on compiling 😂 but you can skip that step if you don't use latex to generate your resume and directly push your pdf instead of latex files into master branch though you might need to remove all the latex compiling steps from the GitHub actions. Don't hesitate to reach out to me on Twitter &lt;a href="//www.twitter.com/jai_dewani"&gt;@jai_dewani&lt;/a&gt; if you need any help customizing this repository to your need.  &lt;/p&gt;

&lt;p&gt;Here is what my solution is: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a repository named &lt;code&gt;resume&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Commit all the required latex files into the main branch
&lt;/li&gt;
&lt;li&gt;Commit an &lt;code&gt;index.html&lt;/code&gt; which when hit should redirect you to your resume.
So theoretically you could just share the URL &lt;code&gt;&amp;lt;github-username&amp;gt;.github.io/resume&lt;/code&gt; and it will redirect the person to &lt;code&gt;&amp;lt;github-username&amp;gt;.github.io/resume/resume.pdf&lt;/code&gt;. Here is what that HTML looks like
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;charset=&lt;/span&gt;&lt;span class="s"&gt;"UTF-8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;http-equiv=&lt;/span&gt;&lt;span class="s"&gt;"X-UA-Compatible"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"IE=edge"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"viewport"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"width=device-width, initial-scale=1.0"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;Loading, wait....&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
    Loading, wait....
&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt; 
&lt;span class="nx"&gt;location&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;href&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://jai-dewani.github.io/resume/resume.pdf&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Create a GitHub workflow that would move this file to the &lt;code&gt;gh-pages&lt;/code&gt; with the &lt;code&gt;index.html&lt;/code&gt; file as well cause this is the file responsible for redirecting the user from &lt;code&gt;&amp;lt;github-username&amp;gt;.github.io/resume&lt;/code&gt; to &lt;code&gt;&amp;lt;github-username&amp;gt;.github.io/resume/resume.pdf&lt;/code&gt;. After testing various ways to do the same thing, I have settled on this workflow which compiles all the latex, creates a build folder and moves everything necessary to it, and pushed the build folder to &lt;code&gt;gh-pages&lt;/code&gt; branch
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Compile and upload résumé PDF&lt;/span&gt;
&lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;push&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;branches&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
            &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;main"&lt;/span&gt;
        &lt;span class="na"&gt;paths&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
            &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;resume.tex"&lt;/span&gt;
            &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;index.html"&lt;/span&gt;
            &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;.github/workflows/**"&lt;/span&gt;
    &lt;span class="na"&gt;pull_request&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;branches&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
            &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;main"&lt;/span&gt;
        &lt;span class="na"&gt;paths&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
            &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;resume.tex"&lt;/span&gt;
            &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;index.html"&lt;/span&gt;
            &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;.github/workflows/**"&lt;/span&gt;

&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;build_latex&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-latest&lt;/span&gt;
        &lt;span class="na"&gt;container&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;danteev/texlive:latest&lt;/span&gt;
        &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
            &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Checkout&lt;/span&gt;
              &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/checkout@v2&lt;/span&gt;
              &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
                  &lt;span class="na"&gt;persist-credentials&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;

            &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Compile LaTeX document&lt;/span&gt;
              &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;xu-cheng/latex-action@v2&lt;/span&gt;
              &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
                  &lt;span class="na"&gt;root_file&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;resume.tex&lt;/span&gt;

            &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Post Processing&lt;/span&gt;
              &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
                  &lt;span class="s"&gt;mkdir build &lt;/span&gt;
                  &lt;span class="s"&gt;cp *.pdf build/ &lt;/span&gt;
                  &lt;span class="s"&gt;cp index.html build/&lt;/span&gt;

            &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Git add&lt;/span&gt;
              &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;git add resume.pdf&lt;/span&gt;

            &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Deploy to GitHub Pages&lt;/span&gt;
              &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;JamesIves/github-pages-deploy-action@4.1.4&lt;/span&gt;
              &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
                  &lt;span class="na"&gt;BRANCH&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;gh-pages&lt;/span&gt;
                  &lt;span class="na"&gt;FOLDER&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;build&lt;/span&gt;
                  &lt;span class="na"&gt;CLEAN&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Enable GitHub pages for &lt;code&gt;gh-pages&lt;/code&gt; to host all the files in that branch on your &lt;code&gt;&amp;lt;github-username&amp;gt;.github.io/resume&lt;/code&gt; URL.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now when you share the URL to the repo &lt;code&gt;&amp;lt;github-username&amp;gt;.github.io/resume&lt;/code&gt; and it will redirect the person to your resume &lt;code&gt;&amp;lt;github-username&amp;gt;.github.io/resume/Resume-&amp;lt;name&amp;gt;.pdf&lt;/code&gt; or you could share the pdf link directly, totally an aesthetic choice. &lt;/p&gt;

&lt;p&gt;Some advantages of this are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Since you are using a GitHub repository, it should be easy to override the PDF resume, make a commit, push on main branch and the GitHub action would make all the changes required and push them to the &lt;code&gt;gh-pages&lt;/code&gt; branch&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The URL that you would share for resume will have your GitHub username as well so it would help create a different identity of you compared to most resume links which are just long-ass Google Drive links. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I think I now have a permanent solution to this problem which I personally like will use till I find something even better xD&lt;/p&gt;

&lt;p&gt;PS: You even connect the main branch of your repo to overleaf after connecting your GitHub to overleaf to update the latex file from overleaf only which provides you an almost live rendered version of your latex and push from there to your repo which would then compile the latex file and push the PDF into &lt;code&gt;gh-pages&lt;/code&gt; branch. &lt;/p&gt;

&lt;p&gt;Did I just spend 4 hours solving a problem that takes 10 mins manually? Yes. &lt;br&gt;
and I would do that again if required, every time 😂&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;PS: You can check out my resume at &lt;a href="https://jai-dewani.github.io/resume" rel="noopener noreferrer"&gt;https://jai-dewani.github.io/resume&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  Update
&lt;/h2&gt;

&lt;p&gt;I am now using iframe to render the pdf on the &lt;code&gt;&amp;lt;github-username&amp;gt;.github.io/resume&lt;/code&gt; page only, instead of redirecting to the full pdf URL, this was I can skip that ugly redirecting page and the URL looks clean as well. So the new &lt;code&gt;index.html&lt;/code&gt; looks like&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;charset=&lt;/span&gt;&lt;span class="s"&gt;"UTF-8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;http-equiv=&lt;/span&gt;&lt;span class="s"&gt;"X-UA-Compatible"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"IE=edge"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"viewport"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"width=device-width, initial-scale=1.0"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;Resume - Jai Kumar Dewani&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;style&amp;gt;&lt;/span&gt;
        &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/style&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;style=&lt;/span&gt;&lt;span class="s"&gt;"height: 100vh;"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;iframe&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"https://jai-dewani.github.io/resume/resume.pdf"&lt;/span&gt; &lt;span class="na"&gt;width=&lt;/span&gt;&lt;span class="s"&gt;"100%"&lt;/span&gt; &lt;span class="na"&gt;height=&lt;/span&gt;&lt;span class="s"&gt;"100%"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For the people who might be thinking why I haven't used PDF.js yet is because I think people feel comfortable in whatever PDF engine their browser is using cause, they are used to it by now and I don't want to introduce javascript to this solution unless it's really necessary.&lt;/p&gt;

&lt;p&gt;Do let me know if there is anything I missed out on that we can do to make this workflow more seamless cause the base idea was mine but a lot of small things that you see here were suggested to me by other people&lt;/p&gt;

&lt;p&gt;Credits: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Thanks to &lt;a href="https://github.com/ronaksakhuja" rel="noopener noreferrer"&gt;@ronaksakhuja&lt;/a&gt; and &lt;a href="https://github.com/rajivnayanc" rel="noopener noreferrer"&gt;@rajivnayanc&lt;/a&gt; for sharing their &lt;a href="https://github.com/ronaksakhuja/resume" rel="noopener noreferrer"&gt;@ronaksakhuja/resume&lt;/a&gt; and &amp;lt;private&amp;gt; repositories for giving me an idea, how I can create an action for compiling the latex file to generate the PDF on the fly on every update (makes my life so easy)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/imabp/" rel="noopener noreferrer"&gt;@imabp&lt;/a&gt; gave me the idea to make this a template repository, check out his &lt;a href="https://github.com/imabp/resume" rel="noopener noreferrer"&gt;version&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Thanks to &lt;a href="https://github.com/harshkapadia2/" rel="noopener noreferrer"&gt;@harshkapadia2&lt;/a&gt; for sharing his &lt;a href="https://github.com/harshkapadia2/resume" rel="noopener noreferrer"&gt;@harshkapadia2/resume&lt;/a&gt; repository and giving me some ideas on how I can improve my action file and also pointing out that &lt;a href="https://github.com/himanshusharma89/" rel="noopener noreferrer"&gt;@himanshusharma89&lt;/a&gt; is using some sort of method to embed his PDF in the HTML view so the mobile users don't need to download the file just for viewing. CHeckout this repo here &lt;a href="https://github.com/himanshusharma89/resume/" rel="noopener noreferrer"&gt;@himanshusharma89/resume&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;This blog was originally posted at &lt;a href="https://jai-dewani.github.io/blogs" rel="noopener noreferrer"&gt;Blogs by JaiD&lt;/a&gt;, you can read more blogs written by me there as well&lt;/p&gt;
&lt;/blockquote&gt;

</description>
    </item>
    <item>
      <title>Create Your Own Whatsapp Spambot in 5 Minutes</title>
      <dc:creator>Jai dewani</dc:creator>
      <pubDate>Tue, 22 Dec 2020 06:15:27 +0000</pubDate>
      <link>https://forem.com/jai_dewani/create-your-own-whatsapp-spambot-in-5-minutes-3ga</link>
      <guid>https://forem.com/jai_dewani/create-your-own-whatsapp-spambot-in-5-minutes-3ga</guid>
      <description>&lt;p&gt;Do your friends constantly spam you just to get your attention, wanna give this pain back? Don't worry. Then this JS script got you covered. &lt;/p&gt;

&lt;p&gt;Let's get over what we are going to do, We are going to use Developer Console to inject some script into WhatsApp Web. &lt;/p&gt;

&lt;h3&gt;
  
  
  🕸 WhatsApp Web
&lt;/h3&gt;

&lt;p&gt;Open WhatsApp web and make sure the chat which your bot is supposed to spam is opened on the center-right screen &lt;/p&gt;

&lt;h3&gt;
  
  
  💻 Developer Console
&lt;/h3&gt;

&lt;p&gt;Either search for &lt;strong&gt;Developer Tools&lt;/strong&gt; in the drop-down menu in any browser or use the shortcut &lt;code&gt;Ctrl + Shift + I&lt;/code&gt; to move to the &lt;strong&gt;Console tab&lt;/strong&gt; where we can write Javascript and interact with the DOM (Document Object Model).&lt;/p&gt;

&lt;h3&gt;
  
  
  ✍️ Enter some text in the message box
&lt;/h3&gt;

&lt;p&gt;We are going to use CSS selectors to select a specific section of the web page and then use &lt;code&gt;document.querySelector()&lt;/code&gt; to get the DOM object of that section. Let's select the input area object and store it in the &lt;code&gt;textbox&lt;/code&gt; variable&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;textpath&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#main &amp;gt; footer &amp;gt; div._3SvgF._1mHgA.copyable-area &amp;gt; div.DuUXI &amp;gt; div &amp;gt; div._1awRl.copyable-text.selectable-text&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;textbox&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;textpath&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now type something directly in the message box, and enter &lt;code&gt;textbox.textContent&lt;/code&gt; into the console and it should return the same text, let's try setting some text via the Developer Console instead of directly typing it in&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;textbox.textContent = "Some Text"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The same text must be updated in the WhatsApp web GUI. Yaay, we hare halfway done    &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--spxBlfmF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/jai-dewani/blogs/blob/master/content/blog/automate-whatsapp/images/message.jpeg%3Fraw%3Dtrue" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--spxBlfmF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/jai-dewani/blogs/blob/master/content/blog/automate-whatsapp/images/message.jpeg%3Fraw%3Dtrue" alt=""&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;p&gt;but there is a problem, we have the record button where the send button is supposed to be. That's because we have changed the state of the message box internally but the input needs to know that something has been typed on it to update the mic button to the send button. Let's do this by&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;window.InputEvent = window.Event || window.InputEvent
var event = new InputEvent('input', {bubbles: true});
textbox.dispatchEvent(event);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now the send button is visible  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0UWsQV6W--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/jai-dewani/blogs/blob/master/content/blog/automate-whatsapp/images/message1.jpeg%3Fraw%3Dtrue" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0UWsQV6W--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/jai-dewani/blogs/blob/master/content/blog/automate-whatsapp/images/message1.jpeg%3Fraw%3Dtrue" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  ⏩ Send the message
&lt;/h3&gt;

&lt;p&gt;All that is left is to select the send button and send a click signal to let it know the message is read to be sent. Let's do this by first selecting the send button and then by calling the click method.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var buttonpath = '#main &amp;gt; footer &amp;gt; div._3SvgF._1mHgA.copyable-area &amp;gt; div:nth-child(3) &amp;gt; button';
var b = document.querySelectorAll(buttonpath)[0]
b.click();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  🎉 Congratulations, You have now automated the process of sending one message. Let's try to send more
&lt;/h3&gt;

&lt;p&gt;One easy way is to just run this whole code in a loop.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var i = 0;
for(i=0;i&amp;lt;10;i++){
    var textpath = '#main &amp;gt; footer &amp;gt; div._3SvgF._1mHgA.copyable-area &amp;gt; div.DuUXI &amp;gt; div &amp;gt; div._1awRl.copyable-text.selectable-text';
    var textbox = document.querySelector(textpath);
    textbox.textContent = "Some Text";

    window.InputEvent = window.Event || window.InputEvent;
    var event = new InputEvent('input', {bubbles: true});
    textbox.dispatchEvent(event);

    var buttonpath = '#main &amp;gt; footer &amp;gt; div._3SvgF._1mHgA.copyable-area &amp;gt; div:nth-child(3) &amp;gt; button';
    var b = document.querySelectorAll(buttonpath)[0]
    b.click();
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is all great but let's make this code bit more general by allowing the user to select the text and number of repetitions at runtime. This can be done by taking input from the user using a prompt similar to an alert box. In the end, the code should look something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var message = prompt("Enter the message");
var count = prompt("Enter the Number of times"); // Change the Number to change 
var looper = 0;
for(looper=0;looper&amp;lt;count;looper++)
{
    window.InputEvent = window.Event || window.InputEvent;
    var d = new Date();
    var event = new InputEvent('input', {bubbles: true});
    var textbox= document.querySelector('#main &amp;gt; footer &amp;gt; div._3SvgF._1mHgA.copyable-area &amp;gt; div.DuUXI &amp;gt; div &amp;gt; div._1awRl.copyable-text.selectable-text');

    textbox.textContent = message;
    textbox.dispatchEvent(event);
    var b = document.querySelectorAll('#main &amp;gt; footer &amp;gt; div._3SvgF._1mHgA.copyable-area &amp;gt; div:nth-child(3) &amp;gt; button')[0]
    b.click();
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now the user can enter the message the loop count in alert boxes and the result should look something like this   &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--l7L8j6Oz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/jai-dewani/blogs/blob/master/content/blog/automate-whatsapp/images/repeat.JPG%3Fraw%3Dtrue" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--l7L8j6Oz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/jai-dewani/blogs/blob/master/content/blog/automate-whatsapp/images/repeat.JPG%3Fraw%3Dtrue" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  🐾 Extra bit
&lt;/h3&gt;

&lt;p&gt;This is just the starting, you can customize this script in several ways to do different tasks like how I change a few things so now this script takes in a message and sends each word as a separate message, just because I hate when people do this to me. Why can't you people send the whole message together? -_-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var message = prompt("Enter the message");
var message = message.split(' ');
var looper = 0;
for(looper=0;looper&amp;lt;message.length;looper++)
{
    window.InputEvent = window.Event || window.InputEvent;
    var d = new Date();
    var event = new InputEvent('input', {bubbles: true});
    var textbox= document.querySelector('#main &amp;gt; footer &amp;gt; div._3SvgF._1mHgA.copyable-area &amp;gt; div.DuUXI &amp;gt; div &amp;gt; div._1awRl.copyable-text.selectable-text');

    textbox.textContent = message[looper];
    textbox.dispatchEvent(event);
    var b = document.querySelectorAll('#main &amp;gt; footer &amp;gt; div._3SvgF._1mHgA.copyable-area &amp;gt; div:nth-child(3) &amp;gt; button')[0]
    b.click();
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Try entering the lyrics of Rap God and watch your WhatsApp send 1560 words to your friend in separate messages 😂😂 Do try out different things and let me know what all you did with this on &lt;a href="https://twitter.com/jai_dewani"&gt;Twitter&lt;/a&gt; or &lt;a href="https://www.linkedin.com/in/jai-dewani"&gt;Linkedin&lt;/a&gt; 🤩  &lt;/p&gt;

&lt;p&gt;PS: The original script was created by &lt;a href="https://www.linkedin.com/in/anurag-sahu-93ba27143/"&gt;Anurag Sahu&lt;/a&gt; and edited by me. Link to the &lt;a href="https://github.com/jai-dewani/SendWhatsppTextByJavaScript"&gt;repository&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Like my content? Consider subscribing to my &lt;a href="https://buttondown.email/jai_dewani"&gt;Newsletter&lt;/a&gt;. This article was originally written on &lt;a href="https://blogs.jaid.tech/"&gt;Blogs by JaiD&lt;/a&gt;, check it out &lt;a href="https://blogs.jaid.tech/automate-whatsapp/"&gt;here&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>javascript</category>
      <category>showdev</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Extracting Images, Audio and Videos from Microsoft Office files</title>
      <dc:creator>Jai dewani</dc:creator>
      <pubDate>Thu, 17 Dec 2020 18:34:00 +0000</pubDate>
      <link>https://forem.com/jai_dewani/extracting-images-audio-videos-from-microsoft-office-files-1pml</link>
      <guid>https://forem.com/jai_dewani/extracting-images-audio-videos-from-microsoft-office-files-1pml</guid>
      <description>&lt;p&gt;Around 2007, Microsoft switched from their proprietary binary format DOC, PPT, XLS, etc to an open format which stores data as a collection of XML files all zipped together with everything from media to template information to how the text is to be formated. These new formats came with new extensions DOC*&lt;em&gt;X&lt;/em&gt;&lt;em&gt;, PPT&lt;/em&gt;&lt;em&gt;X&lt;/em&gt;&lt;em&gt;, XLS&lt;/em&gt;&lt;em&gt;X&lt;/em&gt;&lt;em&gt;, etc where **X&lt;/em&gt;* stands for XML and allows this format to be more open and accessible, allowing this format to be parsed and understood by any other software that wishes to parse it and with this DOCX is the most used and popular standard. The same goes for other Microsoft formats. &lt;/p&gt;

&lt;p&gt;Since all Microsoft formats are ZIP files that contain everything in XML format, all blob elements like Images, Videos and Audio are stored as it is in the &lt;code&gt;/media&lt;/code&gt; folder. &lt;/p&gt;

&lt;p&gt;Extensions are just a fancy codeword for your operating system to help him understand how to handle a file, to open it in MS Word or MS Powerpoint. The actual file type is determined by the Signature of files (magic number) which is a sequence of bytes present in the header which is unique for each file type &lt;a href="https://en.wikipedia.org/wiki/List_of_file_signatures"&gt;List of file signatures&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Talk is cheap, Show me the code&lt;/strong&gt; - Linus Torvalds  &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SE9rXKiB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://blogs.jaid.tech/c21e98c31e297fd7ddc966c35084abf9/good-stuff.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SE9rXKiB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://blogs.jaid.tech/c21e98c31e297fd7ddc966c35084abf9/good-stuff.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  See it for yourself
&lt;/h2&gt;

&lt;p&gt;Open your Docx, Pptx, or any MS Office file in a text editor which should display it in hexadecimal format. Look up the first 4 bytes (8 characters) which should be &lt;code&gt;504b 0304&lt;/code&gt; and lookup the &lt;a href="https://filesignatures.net/index.php?page=search&amp;amp;search=ZIP&amp;amp;mode=EXT"&gt;Signature of Zip files&lt;/a&gt;. &lt;strong&gt;They both match!&lt;/strong&gt; Hence internally both the files are the same, the only difference is caused by the OS assigning different software to open a file depending on the extension at the end of the filename. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--op7XGMOu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/jai-dewani/blogs/blob/master/content/blog/extracting-data-from-microsoft-office/images/text-file.JPG%3Fraw%3Dtrue" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--op7XGMOu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/jai-dewani/blogs/blob/master/content/blog/extracting-data-from-microsoft-office/images/text-file.JPG%3Fraw%3Dtrue" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Enough analyzing, let's get inside this mess!&lt;/p&gt;

&lt;h2&gt;
  
  
  Let's Hack Microsoft Office files!
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MfzX6Jjs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://blogs.jaid.tech/505ddb5e0b0e8c3e96b66e1469ef47c1/hacking.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MfzX6Jjs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://blogs.jaid.tech/505ddb5e0b0e8c3e96b66e1469ef47c1/hacking.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Open any Zip Programs like 7-Zip or WinZip and select an MS Office file and choose &lt;code&gt;Extract to&lt;/code&gt; and select the location where you want to unzip the file. &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0itmwQET--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/jai-dewani/blogs/blob/master/content/blog/extracting-data-from-microsoft-office/images/unzip.JPG%3Fraw%3Dtrue" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0itmwQET--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/jai-dewani/blogs/blob/master/content/blog/extracting-data-from-microsoft-office/images/unzip.JPG%3Fraw%3Dtrue" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  How Media is stored in MS Office files
&lt;/h3&gt;

&lt;p&gt;What makes this new format open is that the images, videos, and anything media are stored as it is in the media folder as visible in the folder structure below. &lt;/p&gt;

&lt;p&gt;What makes this even better is that all the text and meta-information is stored in XML format which can be ready openly and parsed easily after understanding the format of XML which is universal for each MS Office file. &lt;strong&gt;Just copy and paste all the media and your work is done!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5EuY6mN9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/jai-dewani/blogs/blob/master/content/blog/extracting-data-from-microsoft-office/images/folder.JPG%3Fraw%3Dtrue" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5EuY6mN9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/jai-dewani/blogs/blob/master/content/blog/extracting-data-from-microsoft-office/images/folder.JPG%3Fraw%3Dtrue" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Extra bits
&lt;/h2&gt;

&lt;p&gt;There are a lot of files that use the same technique of hiding their data behind a zipped file with extensions to let the OS know how to handle the file in execution like&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;aar, apk - Android application archive files, create when App Installer files are generated.&lt;/li&gt;
&lt;li&gt;epub - An ebook file format &lt;/li&gt;
&lt;li&gt;ipa - It is an iOS application archive file, used to distribute installable apps &lt;/li&gt;
&lt;li&gt;jar - An archive of Java class files and metadata into one package for easy distribution&lt;/li&gt;
&lt;li&gt;kmz - Used for expressing geographic annotation and visualization within two-dimensional maps and three-dimensional Earth browsers&lt;/li&gt;
&lt;li&gt;maff - Mozilla Archive format, used to store all the contents of a webpage in a ZIP file for ease of management&lt;/li&gt;
&lt;li&gt;odp, ods, odt - Used by office suites like OpenOffice and LibreOffice. Text documents (. odt), as well as spreadsheets (. ods) and also presentations (. odp).&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Like my content? Consider subscribing to my &lt;a href="https://buttondown.email/jai_dewani"&gt;Newsletter&lt;/a&gt;. This article was originally written on &lt;a href="//blogs.jaid.tech"&gt;Blogs by JaiD&lt;/a&gt;, check it out &lt;a href="https://blogs.jaid.tech/extracting-data-from-microsoft-office/"&gt;here&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>microsoft</category>
      <category>extracting</category>
      <category>files</category>
      <category>office</category>
    </item>
    <item>
      <title>Using funmark to benchmark python function and plot results</title>
      <dc:creator>Jai dewani</dc:creator>
      <pubDate>Wed, 25 Nov 2020 07:08:38 +0000</pubDate>
      <link>https://forem.com/jai_dewani/using-funmark-to-benchmark-python-function-and-plot-results-434l</link>
      <guid>https://forem.com/jai_dewani/using-funmark-to-benchmark-python-function-and-plot-results-434l</guid>
      <description>&lt;p&gt;Before starting the blog I wanted to say that this is my first PyPI package and it is still in the development phase so if anyone finds it interesting, make sure to checkout funmark in &lt;a href="https://github.com/jai-dewani/fun-mark"&gt;GitHub&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Funmark is a python package that can be used for function benchmarking and then to analyze/compare their runtime and memory consumption using graph plots. &lt;/p&gt;

&lt;p&gt;In this blog I will be using my funmark package to benchmark sorting functions, mainly&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;QuickSort&lt;/li&gt;
&lt;li&gt;MergeSort&lt;/li&gt;
&lt;li&gt;TimSort&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's Start by first importing funmark and random.randint() for creating random arrays&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import funmark
from random import randint
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's create functions for each sorting method &lt;/p&gt;

&lt;h2&gt;
  
  
  QuickSort
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def partition(arr,low,high): 
    i = ( low-1 )         # index of smaller element 
    pivot = arr[high]     # pivot 
    for j in range(low , high): 
        if   arr[j] &amp;lt; pivot: 
            i = i+1 
            arr[i],arr[j] = arr[j],arr[i] 

    arr[i+1],arr[high] = arr[high],arr[i+1] 
    return ( i+1 ) 

def quickSort(argv): 
    arr = argv[0]
    low = argv[1]
    high = argv[2]
    if low &amp;lt; high: 
        pi = partition(arr,low,high) 
        quickSort([arr, low, pi-1]) 
        quickSort([arr, pi+1, high]) 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  MergeSort
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def mergeList(arr, l, m, r): 
    n1 = m - l + 1
    n2 = r- m 
    L = [0] * (n1) 
    R = [0] * (n2) 
    for i in range(0 , n1): 
        L[i] = arr[l + i] 
    for j in range(0 , n2): 
        R[j] = arr[m + 1 + j] 
    i = 0     
    j = 0 
    k = l     
    while i &amp;lt; n1 and j &amp;lt; n2 : 
        if L[i] &amp;lt;= R[j]: 
            arr[k] = L[i] 
            i += 1
        else: 
            arr[k] = R[j] 
            j += 1
        k += 1
    while i &amp;lt; n1: 
        arr[k] = L[i] 
        i += 1
        k += 1
    while j &amp;lt; n2: 
        arr[k] = R[j] 
        j += 1
        k += 1

def mergeSort(argv):
    arr = argv[0]
    l = argv[1]
    r = argv[2]
    if l &amp;lt; r: 
        m = (l+(r-1))//2 
        mergeSort([arr, l, m]) 
        mergeSort([arr, m+1, r]) 
        mergeList(arr, l, m, r) 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  TimSort
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def timSort(argv):
    ar = argv[0]
    ar.sort()
    return ar
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  BenchMarking the above functions
&lt;/h2&gt;

&lt;p&gt;Lets create funmark.Benchmark() objects for each functions&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;merge = funmark.Benchmark()
quick = funmark.Benchmark()
tim = funmark.Benchmark()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now lets create random arrays of sizes ranging from&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;listSize = 10
maxSize = 10**6
while listSize &amp;lt; maxSize:
    ar = [randint(1,10**5) for listSize in range(listSize)]

    time, memory = merge.run(quickSort, ar, 0, len(ar)-1)
    merge.add(len(ar), time, memory)

    time, memory= quick.run(mergeSort, ar, 0, len(ar)-1)
    quick.add(len(ar), time, memory)

    time, memory = tim.run(timSort, ar)
    tim.add(len(ar), time, memory)

    listSize = int(2*listSize)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For each function, I am running .run(function Name, parameter) to get their runtime and memory usage, and then I am saving them to their respective objects using .add(size, time, memory)&lt;br&gt;
At the last line of while loop and increasing the size of listSize so that we can get these values for different sizes of the list&lt;/p&gt;
&lt;h2&gt;
  
  
  Plotting comparison graphs
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;merge.compareTime("Length", "Time", "Compression between Sorting Algorithms", quick, tim)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Here I am plotting the graph of time with &lt;em&gt;merge&lt;/em&gt; and passing &lt;em&gt;quick&lt;/em&gt; and &lt;em&gt;tim&lt;/em&gt; to plot all of them together, here is the result of this line&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qbPPw73b--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blogs.jaid.tech/static/8be848e3a8b78882aee8c41ab0743d57/6af66/time.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qbPPw73b--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blogs.jaid.tech/static/8be848e3a8b78882aee8c41ab0743d57/6af66/time.png" alt="Image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see QuickSort even though has bigger worst case time complexity that MergeSort, its average case is much better due to &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Auxiliary Space: Quicksort is an in-place sorting algorithm.  Merge sort on the other hand requires a temporary array to merge the sorted arrays and hence it is not in-place.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Worst case: The worst case of quicksort O(n^2) can be avoided by using randomized quicksort. It can be easily avoided with high probability by choosing the right pivot.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Locality of reference: Quicksort in particular exhibits good cache locality and this makes it faster than merge sort in many cases like in a virtual memory environment.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Tail recursion: QuickSort is tail recursive while Merge sort is not. A tail recursive function is a function where a recursive call is the last thing executed by the function. They are considered better than non tail recursive functions as they can be optimized by the compiler before execution.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And Tim Sort performs exceptionally better than both as expected, hence it's better to use python's in-build .sort() method as long as your need is plain sorting.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;merge.compareMemory("Length", "Time", "Compression between Sorting Algorithms", quick, tim)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here I am plotting the graph of memory with &lt;em&gt;mergeSort&lt;/em&gt; and passing &lt;em&gt;quickSort&lt;/em&gt; and &lt;em&gt;timSort&lt;/em&gt; to plot all of them together, here is the result of this line&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sE1l7TlM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blogs.jaid.tech/static/1decbf7e2ddee7bd9904eb94ace21dd2/6af66/memory.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sE1l7TlM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blogs.jaid.tech/static/1decbf7e2ddee7bd9904eb94ace21dd2/6af66/memory.png" alt="Image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The plot for QuickSort is just below the TimSort plot hence it isn't clearly visible in this plot but from this we can understand that MergeSort requires extra space whereas QuickSort and TimSort don't!&lt;/p&gt;

&lt;p&gt;This was just a simple analysis of Sorting Algorithms but funmark can be used to do benchmark and analysis for any python code as long as it can be written in a function.&lt;/p&gt;

&lt;p&gt;If you liked what this library can do then check it out on &lt;a href="https://github.com/jai-dewani/fun-mark"&gt;github&lt;/a&gt; and drop a star and look into the issue tab if you want to contribute!&lt;/p&gt;

</description>
      <category>time</category>
      <category>python</category>
      <category>benchmarking</category>
      <category>performance</category>
    </item>
    <item>
      <title>CTC Inflation, What? Why? How? </title>
      <dc:creator>Jai dewani</dc:creator>
      <pubDate>Sat, 21 Nov 2020 15:02:10 +0000</pubDate>
      <link>https://forem.com/jai_dewani/ctc-inflation-what-why-how-cd9</link>
      <guid>https://forem.com/jai_dewani/ctc-inflation-what-why-how-cd9</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mBe05RTk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/auxm4nk0wdb4gbyj5ug1.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mBe05RTk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/auxm4nk0wdb4gbyj5ug1.jpg" alt="Money"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Photo by &lt;a href="https://unsplash.com/@igalness?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Igal Ness&lt;/a&gt; on &lt;a href="https://unsplash.com/s/photos/money?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Ever saw CTC of around 40-50 Lakhs with a base of 12-15 Lakhs and wondered where are the rest of 30-35 Lakhs? Yeah, me too. &lt;/p&gt;

&lt;p&gt;And yes, these numbers are from an actual company that exists on this earth! So here I will try my best to uncover what all goes to boost a 12-15 Lakh base to 40-50 Lakh CTC.&lt;/p&gt;

&lt;p&gt;Everyone looking for colleges, especially for Computer Science focuses a lot on placement stats. What were the average packages provided, the companies which visited, and the highest packages provided? Not often but we would see these huge packages of 50 LPA and instantly start dividing it by 12 and thinking 4 Lakhs per month....daaam 😍 We all did this, didn't we? 😓&lt;/p&gt;

&lt;p&gt;First, let's understand what is CTC. It means Cost to Company, so basically, the amount of company is going to spend on you, which can be in various ways like &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Health Care&lt;/li&gt;
&lt;li&gt;Life Insurance&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Food expenses&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Company Shares &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Travel Cost &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Bonus (usually a year-end bonus, may depend on your performance)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Joining bonus (mostly one time) &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Relocation Bonus (mostly one time) &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;And the amount that will be actually sent to your bank account. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now there are a lot of fine print when it comes to the total CTC, some recurring ones are&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Bonus:&lt;/strong&gt; In simple terms bonus incudes the extra money you will get at the year-end. There is various way of mentioning this in CTC, some of the most common ones are: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Direct Bonus: This directly mentions the bonus you'll get at the year-end&lt;/li&gt;
&lt;li&gt;Performance-Based Bonus: A minimum bonus will be mentioned but you can get more than this if you perform well. A lot of companies are using this strategy to hype their employees to perform well. In my opinion, this is a good measure to keep employees from slacking off&lt;/li&gt;
&lt;li&gt;X Bonux Vested in 4 years: This means the bonus will be divided into 4 years and X/4 amount will be given to you at the end of each year, mentioning the bonus of 4 years and adding it to CTC which is supposed to represent the cost of one year isn't a good practice in my opinion.
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Company Shares:&lt;/strong&gt; Companies have started providing their shares to employees to make them feel responsible and take initiative. Shares can be provided in two forms &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Exact amount: Say 1000 shares, so the company will give you 1000 of there shares&lt;/li&gt;
&lt;li&gt;Amount of shares: The company will give you there shares that are worth that much amount at this point in time&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The amount of shares written in CTC is usually the combined worth of 4 years, which will be provided to you equally say 25% per year but companies tend to divide the share in an un-even fashion (like &lt;em&gt;10%, 15%, 25%, 50%&lt;/em&gt;) to force employes to stay for at least 4 years allowing there shares mature. Aside from the uneven division what needs to be focused on is that the total amount of 4 years worth of shares is included in CTC which is supposed to represent the cost of each year. &lt;/p&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A lot of Big Engineering companies are following these methods of hyping up the CTC even if it doesn't represent the actual amount you will receive in a year which has lead the small startups/companies to do the same because in the end not a lot of people look behind the CTC in the first view which has become the main attraction point for attracting new Developers.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Joining Bonus and Relocation Bonus:&lt;/strong&gt; You will usually get this amount just once when you join the company and will not be present in your second year so technically your gross salary will decrease in the second year. How great is that, right? &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In the end, what we need to realize is that the CTC we all see and crave is the entire story. I am including a very informative answer by &lt;a href="https://www.linkedin.com/in/kaustav-mukherjee-17547751/?originalSubdomain=in"&gt;Kaustav Mukherjee&lt;/a&gt; who works at Microsoft on quora about &lt;a href="https://qr.ae/pNWkzn"&gt;CTC Breakdown of Microsft and more.&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>New .URL powered shortcuts to access the web quickly</title>
      <dc:creator>Jai dewani</dc:creator>
      <pubDate>Mon, 28 Sep 2020 21:29:49 +0000</pubDate>
      <link>https://forem.com/jai_dewani/new-url-powered-shortcuts-to-access-the-web-quickly-5006</link>
      <guid>https://forem.com/jai_dewani/new-url-powered-shortcuts-to-access-the-web-quickly-5006</guid>
      <description>&lt;p&gt;The .new domain was first noticed when google allowed people to quickly open a new doc by typing &lt;a href="http://doc.new"&gt;doc.new&lt;/a&gt; after which they started the process of opening its .new-powered shortcuts to other companies.&lt;/p&gt;

&lt;p&gt;You must have heard about these two cool URLs, &lt;a href="http://repo.new"&gt;repo.new&lt;/a&gt;, and &lt;a href="http://gist.new"&gt;gist.new&lt;/a&gt; to quickly create a new GitHub repository and GitHub gist. It's a cool little trick to do in front of your friend and even helpful if you are the kind of person who creates repositories and gists left and right every day but it turns out that there a lot more of these which might actually be helpful at times and I have created a list of them&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://repo.new"&gt;repo.new&lt;/a&gt;: Create a new GitHub repository
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://gist.new"&gt;gist.new&lt;/a&gt;: Create a new GitHub gist
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://cal.new"&gt;cal.new&lt;/a&gt;: Create a new Calendar event
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://link.new"&gt;link.new&lt;/a&gt;: Create a new Bitly link
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://story.new"&gt;story.new&lt;/a&gt;: Create a new Medium story &lt;/li&gt;
&lt;li&gt;
&lt;a href="http://docs.new"&gt;docs.new&lt;/a&gt;: Create a new Google doc
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://sheets.new"&gt;sheets.new&lt;/a&gt;: Create a new Goole spreadsheet
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://slides.new"&gt;slides.new&lt;/a&gt;: Create a new Google slide presentation
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://forms.new"&gt;forms.new&lt;/a&gt;: Create a new  Google form &lt;/li&gt;
&lt;li&gt;
&lt;a href="http://react.new"&gt;react.new&lt;/a&gt;: Create a new  React codesandbox
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://vue.new"&gt;vue.new&lt;/a&gt;: Create a new  Vue codesandbox &lt;/li&gt;
&lt;li&gt;
&lt;a href="http://ng.new"&gt;ng.new&lt;/a&gt;: Create a new Angular codesandbox &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Hopefully, more of these will popup and I will try my best to keep this up to date :)&lt;/p&gt;

&lt;p&gt;PS: Found some more even before putting this blog up, wow :p &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://playlist.new"&gt;playlist.new&lt;/a&gt;: Create a new Spotify playlist &lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://canva.new"&gt;canva.new&lt;/a&gt;: Create a new Canva design&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://word.new"&gt;word.new&lt;/a&gt;: Open Online Microsoft office&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://webex.new"&gt;webex.new&lt;/a&gt;: Create a new Personal Meeting room &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://api.new"&gt;api.new&lt;/a&gt;: Prototype your ideas for new Node.js API endpoints with RunKit&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="//http:coda.new"&gt;coda.new&lt;/a&gt;: Create a doc that combines documents and spreadsheets into a single canvas&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Some more,&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://invoice.new"&gt;invoice.new&lt;/a&gt;: Create Invoices with Stripe dashboard&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://sell.new"&gt;sell.new&lt;/a&gt;: Help people get exactly what they want through eBay.&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://reservation.new"&gt;Reservation.new&lt;/a&gt;: Make an OpenTable reservation at the best restaurant near you. (Might not work well for all countries)&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>Interview experience of EDA/CFR Capabilities American Express On-Campus</title>
      <dc:creator>Jai dewani</dc:creator>
      <pubDate>Sun, 20 Sep 2020 21:40:56 +0000</pubDate>
      <link>https://forem.com/jai_dewani/interview-experience-of-eda-cfr-capabilities-american-express-on-campus-37gn</link>
      <guid>https://forem.com/jai_dewani/interview-experience-of-eda-cfr-capabilities-american-express-on-campus-37gn</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fqe7b8phlx6tj1bu1bxdq.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fqe7b8phlx6tj1bu1bxdq.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Photo by &lt;a href="https://unsplash.com/@punttim?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Tim Gouw&lt;/a&gt; on &lt;a href="https://unsplash.com/s/photos/frustrated?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;American Express came to our campus in the second-third week of September for the following job roles &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Data Analysis &amp;amp; Stewardship&lt;/li&gt;
&lt;li&gt;Product Management &amp;amp; Development&lt;/li&gt;
&lt;li&gt;Business Insights &amp;amp; Analytics&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We were asked to provide our order of preference, mine was 2,1,3 because I wanted an SDE centric role and also I am the last person you should come for business Insights.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;First Round: Resume Shortlisting&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;25 of us got into the next round. Don't ask me why? how? Like they every tell :p&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Second Round: Coding + Aptitude Test&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;It was a 45+30 minute test on mettl with full screen on but no camera, 30 minutes for 2 coding questions which were mostly easy based on string or arrays. Didn't even need to write the best optimal solution O(nlogn), instead, O(n^2) worked in one of the questions. The Aptitude section required a very fast solving and response rate, 60 questions in 45 minutes with +1 and -0.25 (throwback to JEE)! Out of 60, around 40 were general aptitude whereas the last 20 were related to theoretical computer science, the output of C, Java programs. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note:&lt;/em&gt; We could have attempted both (coding + aptitude) of the section in any other, but couldn't skip from one to another and expect to go back.  &lt;/p&gt;

&lt;p&gt;So I went first with the coding section, solved both of them in 15 minutes, stretched my hands for the next 5 minutes (it was going to be one hell of a ride)! Some questions were just made long out just to waste our time, so I skipped anything which has a long question statement or I wasn't comfortable with the topic. &lt;/p&gt;

&lt;p&gt;Hopefully, I solved around 50-55 of them (don't know how many were right :p) and got selected for the next round. &lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Third Round: Pre-Placement Round&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Now you must ask me, shouldn't pre-placement happen before any selection round takes place? Also pre-placement ROUND? Shouldn't it just be a webinar?&lt;br&gt;&lt;br&gt;
Yes, I was here just a week ago. They got all the selected students from 6 colleges and put into a webinar expecting us to interact and answer questions and ask our doubts and somehow they will select the next round of student.....pretty new for me too!  &lt;/p&gt;

&lt;p&gt;Legend has that no one knows how they did it, but I got selected so little did I cared at that moment? :D&lt;/p&gt;
&lt;h1&gt;
  
  
  &lt;strong&gt;Fourth Round: Interviews&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;There were 3 interviews, I only got till the 2nd one, and here is my experience &amp;amp; views after discussing with other members&lt;/p&gt;
&lt;h2&gt;
  
  
  Round one: Technical Interview
&lt;/h2&gt;

&lt;p&gt;A panel of two took my interview asking me technical questions in the following order, &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;About yourself: Told them about what I have done in the past 3 years, things I have learned, and my work experience&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Projects: Spent a lot of time discussing my projects listed in my resume, they told me to talk about the project so I told them about a Competitive-programming platform I build, had some good discussion about it, and my other projects.&lt;br&gt;&lt;br&gt;
In Short: They care about your motive as much as they do about the tech, keep a good story about why you build a project, could touch upon a need you faced or some problem you noticed in day to day life and not &lt;em&gt;I find this tech cool, hence I build it&lt;/em&gt;. Having a good project is as important as a good story around it and good presentation skills!&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Puzzles: They asked me a puzzle on probability, my brain goes brrrrrrrrrrr....&lt;em&gt;dead&lt;/em&gt;. RIP. Then asked an easy problem out of pity&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Puzzle 1:&lt;/em&gt; A man has 53 socks in his drawer: 21 identical blue, 15 identical black, and 17 identical red. The lights are fused and he is completely in the dark. How many socks must he take out to make 100 percent certain he has a pair of black socks?&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Puzzle 2:&lt;/em&gt; A car travels the first half of a motorway journey at an average speed of 40 mph, and the second half of the journey at an average speed of 60 mph. What is the average speed for the entire journey?&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Coding: Asked me if I know about the Fibonacci series and then asked me to code it&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def fib(n):
    fib_arr = [0,1] 
    for i in range(n-2): 
        temp = fib_arr[-1] + fib_arr[-2]
        fib_arr.append(temp)
    return fib_arr
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;If you look closely, it will return [0,1] for n=1 which is wrong, so I corrected it after it was pointed out to me by adding&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    if n==1:
        return [0]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then I was asked what all languages are you comfortable with other than Python, I said C and JavaScript. They asked me if I write this function in C what problem will you face? I was supposed to answer that integers in C can face Overflow problems with big numbers but my mind was already going brrrrrrrrrrrrrrr.......&lt;em&gt;dead&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;After this, they asked me to do the same without using an array which I easily did. Then I was asked how good I was in python and then questions on python syntax:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What are Decorators, generators, yield, pass, and continue?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After which I was taken into the DSA section with the following questions&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Difference between Binary Tree and Binary Search Tree? &lt;/li&gt;
&lt;li&gt;Do you know any self-balancing tree? How do they self balance themselves? &lt;/li&gt;
&lt;li&gt;You have a sorted link list you need to find a specific number in the list in an optimal way, you are given a function which can return value at any index. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then I was asked what all subjects I have studied during my college, I replied some of them are OS, DBMS, and &lt;strong&gt;Big Data&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
Even after my strong emphasis on &lt;em&gt;Big Data&lt;/em&gt; I was asked questions on OS.....oh my darn luck!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Difference between multitasking, multithreading, multiprocessing? &lt;/li&gt;
&lt;li&gt;Mutex and Semaphore&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then some question based on Amex &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What Amex does? &lt;/li&gt;
&lt;li&gt;How credit cards work and how Amex earns money? &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And thus my first interview ended, 6 out 8 of us got into the next round&lt;/p&gt;

&lt;h2&gt;
  
  
  Round two: Tech + HR
&lt;/h2&gt;

&lt;p&gt;In this interview We mostly discussed my resume, work experience, and two of my four projects in my resume, I assumed certain things while explaining my first one which must have had its negative impact. &lt;/p&gt;

&lt;p&gt;Other than this I was asked a SQL question where there is some data in table A and a subset of it in table B with additional information in other columns that aren't in table A. How will you print all the data from both tables A &amp;amp; B? &lt;br&gt;
Ans: Left Join &lt;/p&gt;

&lt;p&gt;And the regular, &lt;em&gt;Why Amex?&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Round three: Missed it :\
&lt;/h2&gt;

&lt;p&gt;Couldn't qualify for this round. PS: This was the last round. &lt;/p&gt;

&lt;p&gt;Original Article &lt;a href="https://blogs.jaid.tech/amex-experience/" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;

</description>
      <category>career</category>
      <category>internship</category>
      <category>american</category>
      <category>express</category>
    </item>
    <item>
      <title>Add me to search!</title>
      <dc:creator>Jai dewani</dc:creator>
      <pubDate>Thu, 13 Aug 2020 00:08:34 +0000</pubDate>
      <link>https://forem.com/jai_dewani/add-me-to-search-3ljm</link>
      <guid>https://forem.com/jai_dewani/add-me-to-search-3ljm</guid>
      <description>&lt;p&gt;Google recently launched this new feature on 11th August for Indian users which allows users to create a People Card on their own. This could be used as a single place to easily search for people and get a short description with tons of ways to connect to them just a search away. I see this no different than a card which comes up when you search a famous personality, but this time it is available for everyone to use and the content matter is filled by the user which solves a lot of problems if they would have gone with an automated system with not enough data for each person from google's point of view.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Personal opinions coming up&lt;/em&gt; &lt;br&gt;
This might have been a very calculated move from google's side to improve their position in the field of providing a search engine for searching people the way we used social media to contact people and what better way to allow a single point of view to get all the information about a person from a card created by that person himself linking to his other social media accounts. &lt;br&gt;
As to why this is launched in India only, some speculate this is maybe due to some sort of A/B testing Google is doing on this feature and what better place to choose than a crowed nation like India which could provide enough data for whatever testing phase this feature is going through.&lt;br&gt;
&lt;em&gt;Personal opinions end&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Steps to create your own Card
&lt;/h2&gt;

&lt;p&gt;It would be better to use your phone 📱 for this process due to the below-mentioned issue faced in desktop but if you are feeling adventurous, go ahead use your desktop/laptop 💻 with mobile view. That's what I did :P&lt;br&gt;
&lt;/p&gt;
&lt;blockquote class="ltag__twitter-tweet"&gt;

  &lt;div class="ltag__twitter-tweet__main"&gt;
    &lt;div class="ltag__twitter-tweet__header"&gt;
      &lt;img class="ltag__twitter-tweet__profile-image" src="https://res.cloudinary.com/practicaldev/image/fetch/s--D_PV4QL2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://pbs.twimg.com/profile_images/1287133049432358912/2hGtBhVI_normal.jpg" alt="Jai dewani profile image"&gt;
      &lt;div class="ltag__twitter-tweet__full-name"&gt;
        Jai dewani
      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__username"&gt;
        &lt;a class="comment-mentioned-user" href="https://dev.to/jai_dewani"&gt;@jai_dewani&lt;/a&gt;

      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__twitter-logo"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--P4t6ys1m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/twitter-f95605061196010f91e64806688390eb1a4dbc9e913682e043eb8b1e06ca484f.svg" alt="twitter logo"&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__body"&gt;
      A tip for the people googling "Add me to search" in desktop and unable to view the option to set up their card, try changing your to mobile view from the desktop using the developer console and refresh the google search page! &lt;br&gt;Hope this works for you!&lt;br&gt;&lt;br&gt;&lt;a href="https://twitter.com/hashtag/100DaysOfCode"&gt;#100DaysOfCode&lt;/a&gt; &lt;a href="https://twitter.com/hashtag/TechTips"&gt;#TechTips&lt;/a&gt;
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__date"&gt;
      23:06 PM - 12 Aug 2020
    &lt;/div&gt;


    &lt;div class="ltag__twitter-tweet__actions"&gt;
      &lt;a href="https://twitter.com/intent/tweet?in_reply_to=1293685193144807429" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="https://practicaldev-herokuapp-com.freetls.fastly.net/assets/twitter-reply-action.svg" alt="Twitter reply action"&gt;
      &lt;/a&gt;
      &lt;a href="https://twitter.com/intent/retweet?tweet_id=1293685193144807429" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="https://practicaldev-herokuapp-com.freetls.fastly.net/assets/twitter-retweet-action.svg" alt="Twitter retweet action"&gt;
      &lt;/a&gt;
      2
      &lt;a href="https://twitter.com/intent/like?tweet_id=1293685193144807429" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="https://practicaldev-herokuapp-com.freetls.fastly.net/assets/twitter-like-action.svg" alt="Twitter like action"&gt;
      &lt;/a&gt;
      1
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/blockquote&gt;


&lt;ol&gt;
&lt;li&gt;Login in to your google account &lt;/li&gt;
&lt;li&gt;Search "Add me to search" in google or just type in your name
You should see something like this, if not maybe leave a comment with your problem
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OvspSqXJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/1wys21q7fhijx3v8ryt1.PNG" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;li&gt;Click on "Get Started" star&lt;/li&gt;
&lt;li&gt;Google will ask you to verify your  &lt;strong&gt;phone number&lt;/strong&gt;🤙 for the next steps, this is necessary to create your card. So make sure you do that and your phone number won't be displayed publically unless if you choose so. This is done mostly for &lt;strong&gt;security purpose&lt;/strong&gt; so that impersonation problems can be dealt with as each card is tied up with a google account and a phone number.&lt;/li&gt;
&lt;li&gt;Fill in all the information you wish to display, make sure to add a crisp bio and a bunch of social media profiles (gotta get 'em all 🦋)&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Preview&lt;/strong&gt; to get a view of how your card will look like after being complete&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Save&lt;/strong&gt;✅. Yes, you can come back later to edit any piece of information.&lt;/li&gt;
&lt;li&gt;Your card should be discoverable in a few hours 🕓&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Congrats you have created your own people card 🎉🎉 get ready to receive tons of enquires with this much traction :P&lt;/p&gt;

&lt;p&gt;This is how my card looks, for now, maybe search for it to see I ever update my temporary bio 😜&lt;br&gt;
&lt;/p&gt;
&lt;blockquote class="ltag__twitter-tweet"&gt;
      &lt;div class="ltag__twitter-tweet__media"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mYvwtunM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://pbs.twimg.com/media/EfQXyFRVoAUvNPd.png" alt="unknown tweet media content"&gt;
      &lt;/div&gt;

  &lt;div class="ltag__twitter-tweet__main"&gt;
    &lt;div class="ltag__twitter-tweet__header"&gt;
      &lt;img class="ltag__twitter-tweet__profile-image" src="https://res.cloudinary.com/practicaldev/image/fetch/s--D_PV4QL2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://pbs.twimg.com/profile_images/1287133049432358912/2hGtBhVI_normal.jpg" alt="Jai dewani profile image"&gt;
      &lt;div class="ltag__twitter-tweet__full-name"&gt;
        Jai dewani
      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__username"&gt;
        &lt;a class="comment-mentioned-user" href="https://dev.to/jai_dewani"&gt;@jai_dewani&lt;/a&gt;

      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__twitter-logo"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--P4t6ys1m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/twitter-f95605061196010f91e64806688390eb1a4dbc9e913682e043eb8b1e06ca484f.svg" alt="twitter logo"&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__body"&gt;
      Woooh! 👀 
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__date"&gt;
      23:06 PM - 12 Aug 2020
    &lt;/div&gt;


    &lt;div class="ltag__twitter-tweet__actions"&gt;
      &lt;a href="https://twitter.com/intent/tweet?in_reply_to=1293685195955027971" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="https://practicaldev-herokuapp-com.freetls.fastly.net/assets/twitter-reply-action.svg" alt="Twitter reply action"&gt;
      &lt;/a&gt;
      &lt;a href="https://twitter.com/intent/retweet?tweet_id=1293685195955027971" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="https://practicaldev-herokuapp-com.freetls.fastly.net/assets/twitter-retweet-action.svg" alt="Twitter retweet action"&gt;
      &lt;/a&gt;
      0
      &lt;a href="https://twitter.com/intent/like?tweet_id=1293685195955027971" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="https://practicaldev-herokuapp-com.freetls.fastly.net/assets/twitter-like-action.svg" alt="Twitter like action"&gt;
      &lt;/a&gt;
      0
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/blockquote&gt;


</description>
    </item>
    <item>
      <title>Bash script for regular CodeForces participants</title>
      <dc:creator>Jai dewani</dc:creator>
      <pubDate>Sat, 25 Jul 2020 13:25:09 +0000</pubDate>
      <link>https://forem.com/jai_dewani/bash-script-for-regular-codeforces-participants-4bda</link>
      <guid>https://forem.com/jai_dewani/bash-script-for-regular-codeforces-participants-4bda</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--c4653G9p--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/5n54sp4kn1tr9w4s6o4c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--c4653G9p--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/5n54sp4kn1tr9w4s6o4c.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Soon after I started regularly participating in CF rounds, I noticed I was creating a folder with files named A, B, C and typing the same python template before each contest.&lt;/p&gt;

&lt;p&gt;So I decided to automate this process, created the bash script takes the round name as input and creates a folder with that same name, create 3 files (A.py, B.py, C.py) and copies a fixed template to each one of them and opens this folder in VSCode. Sure you can change anything to everything in this script, add your C++ script or open the folder with your prefered editor!&lt;/p&gt;

&lt;p&gt;Find my bash script &lt;a href="https://gist.github.com/jai-dewani/bfad17e728bf90ba75ab0d6246ac1cf5"&gt;here&lt;/a&gt;. There are so many more things that can be done, so I am sharing this with everyone and hoping to see your own versions of it too :)&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
