Open In App

BlockStash Intelligence Interview Experience for SDE Intern

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):

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.






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)

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


Article Tags :