Open In App

BlockStash Intelligence Interview Experience for SDE Intern

Last Updated : 08 Aug, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

So, it was another random summer night of me scrolling through my Twitter feed, when I realized that my friend had sent me a link to an internship opportunity. I had already applied to countless internship opportunities throughout the summer and faced rejections in all of them. I said to myself, “Another application, another rejection”, but still thought, “atleast pad to lo kahan pe hai”. I discovered that it was a Software Internship at a startup from IIT Kanpur. I always wanted to join IIT Kanpur during my JEE Preparation days, but I guess couldn’t prepare for it that much. I don’t know why I thought, “is this my chance?”. I again updated my Resume according to the role like updating relevant projects, skills, etc according to prerequisites. And then I applied. I got a reply in just 3 days, about getting shortlisted for Round 1.

Round 1(Assignment):

  • The first round comprised an assignment where we had to scrape the website: Chainabuse – View Reports.
  • We had to scrape the website to get relevant information about threats detected on malicious crypto reports like Name, type of threat, Cryptocurrency, timestamp of threat, hash, etc., and display that data in the form of a JSON.
  • I had zero knowledge about web scraping, so read a few articles here and there on GeeksforGeeks about Beautiful Soup in Python, Cheerio in JavaScript, etc. Tried to implement some of them but couldn’t really get great results. I was also out of practice in writing Python code for quite some time, so I wanted to stick to JavaScript.
  • Then I took some help from one of my very good friends (who had experience in Scraping Websites) about selecting a library. He suggested I use Puppeteer.
  • Thus, I started going through documentation and walkthrough videos. It took me about two days to write the code for the implementation required as I was also out of practice with pure JavaScript(trust me building websites and knowing JS are not the same). Cleaned my code, and added proper comments. Although, some optional data was also required to be scraped since the last date was approaching, I decided to submit it.

Tips: Have good practice with asynchronous JavaScript. Try to complete the optional stuff required in your application or assignment.
I am attaching my code for reference.

Javascript




const fs = require('fs');
const puppeteer = require('puppeteer');
  
async function run(){
  const browser = await puppeteer.launch();
  const page = await browser.newPage();
  await page.setDefaultNavigationTimeout(0);
  await page.goto('https://www.chainabuse.com/reports');
  
  
// Iterate over the reports and extract the data
    
  const reports = await page.evaluate(() => {
    const reportElements = Array.from(
      document.querySelectorAll('.create-ResultsSectionLayout__results .create-ScamReportCard')
    ); //since all the keys are present inside the above two divs we'll store their information in this array
    
    return reportElements.map((element) => {
      const hashSelector = '.create-ReportedSection .create-ResponsiveAddress__text';
      const tagSelector = '.create-ScamReportCard__content .create-ScamReportCard__category-section p';
      const descriptionSelector = '.create-ScamReportCard__content .create-ScamReportCard__body .create-ScamReportCard__preview-description-wrapper p';
      const timeSelector = '.create-ScamReportCard__body .create-ScamReportCard__submit-comments-info .create-ScamReportCard__submitted-info > span:nth-child(3)';
      //stores appropriate selectors for required key
  
      const hashElement = element.querySelector(hashSelector);
      const tagElement = element.querySelector(tagSelector);
      const descriptionElement = element.querySelector(descriptionSelector);
      const timeElement = element.querySelector(timeSelector);
      //elements created by querySelector to the appropriate selector
  
      let AddedInChainAbuse = '';
    if (timeElement) {
      const relativeTime = timeElement.innerText.trim();
      const [amount, unit] = relativeTime.split(' ');
      if (!isNaN(amount)) {
        const currentDate = new Date();
        if (unit.includes('minute')) {
          const minutesAgo = parseInt(amount, 10);
          currentDate.setMinutes(currentDate.getMinutes() - minutesAgo);
        } else if (unit.includes('hour')) {
          const hoursAgo = parseInt(amount, 10);
          currentDate.setHours(currentDate.getHours() - hoursAgo);
        } else if (unit.includes('second')) {
          const secondsAgo = parseInt(amount, 10);
          currentDate.setSeconds(currentDate.getSeconds() - secondsAgo);
        }
        AddedInChainAbuse = currentDate.toISOString();
      }
    }//to calculate time we'll subtract the no. of minutes to current time which can be found by Date() function
     const hash = hashElement ? hashElement.innerText.trim() : '';
     const type = hash ? 'BTC' : '';
     //when hash value is empty return empty type key else return BTC 
  
      return {
        "hash": hashElement ? hashElement.innerText.trim() : '',
        "AddedInChainAbuse": AddedInChainAbuse,
        "Description": descriptionElement ? descriptionElement.innerText.trim() : '',
        "Source": "ChainAbuse",
        "Tag": tagElement ? tagElement.innerText.trim() : '',
         "Type": type,
      };
    });
  });
    
  console.log(reports);
    
    
    
    
  //Save data to JSON file
  fs.writeFile('reports.json', JSON.stringify(reports), (err) => {
    if(err) throw err;
    console.log("File saved");
  });
  
  await browser.close();
}
  
run();


Luckily, after 1 week I got a mail and a call for getting shortlisted for the next round which was an online Interview.

Round-2 (Technical Interview Round)

  • The interviewers asked me introduce myself, which I confidently did.
  • They then asked my tech stack, I replied that I primarily am a Frontend Developer, but I’ve also recently built some projects on Full Stack Development too. They asked the databases I use, I replied MongoDB and Postgres. They then asked me about the framework I use for frontend development, I said React.
  • The instant counter-question was why React? Luckily I had recently watched a video of the JSConf 2013 when React was introduced to the world. So, the words of Jordan Walke were echoing in my head at that time. I said using plain Javascript requires us to write a lot of code targetting the HTML elements, manipulating the DOM to render, etc. React provides an architecture to manipulate HTML inside our Javascript code. Also, React helps to segregate the entire UI into various components thus all the Javascript code can be seperated into various files for various components, thus making an easier environment to code for the developer.
  • Then they asked me to show my projects. I showed my Pic-Trigger Project which is a full stack application which uses OpenAI API to display images generated by AI based on prompts. Though my communication skills are not that good but my presentation of my project was pretty great. I was able to answer all the counter questions. The interviewers seemed to be quite impressed with my project.
  • Then, they asked me to show some other project. And that was the death knell as the login feature somehow broke in it. I went completely blank at that point. I couldn’t answer series of questions that followed like how do I ensure if a user has logged in then the url which is displayed at that point is authorised for that system only. I was blank and couldn’t answer it. I panicked a lot. I was asked about Context API to which I said something like prop drilling but couldn’t explain the term. The last question was about JWT. I couldn’t recall about it at that time as I panicked again.
  • At the end I did asked the interviewers about what could I improve to which they said that learn in depth about React. Thus, the very first opportunity in front of me seemed to go away.
  • But luckily(again XD), I got a call from the recruiters to visit IIT Kanpur the following day. After talking briefly about my availability and stipend negotiations, I finally landed my first internship. I also got the flexibility to work both remote/onsite.

Suggestions- Always ensure that all your projects are working properly before uploading them on your CV or before your interviews. Don’t panic if at some point you mess up during the interview. We are humans and are bound to do mistakes. Lastly having good friends and connections helps. You never know when you’ll need them.

So, that was the story of me landing my internship at BlockStash Intelligence. It was really a rollercoaster ride. Some people may say that I don’t work for a very big organization (like FAANGM) or that I don’t have a very lucrative stipend. Some may also say that I was lucky to have a great developer friend, or that it was pure luck to go through all the rounds, or me having friends to give me the link to opportunity in the first place. But trust me, they don’t account for the countless sleepless nights I had spent during the summers having self-doubt for not landing any opportunities. And even if it’s luck then it doesn’t mean that it would be my side all the time and I don’t have to work hard again. Thus, this internship is extremely special to me. I would try to give my best to all the tasks provided to me during this time. If you had the patience to read through all this, then go create a story about your own, “Jao kaam karo jaake”.



Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads