<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Prikshit chawla on Medium]]></title>
        <description><![CDATA[Stories by Prikshit chawla on Medium]]></description>
        <link>https://medium.com/@prikshit8?source=rss-432fa578188e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*fv7qk6jEOVuoNZWQPypr_w.jpeg</url>
            <title>Stories by Prikshit chawla on Medium</title>
            <link>https://medium.com/@prikshit8?source=rss-432fa578188e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 05:37:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@prikshit8/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Improving Web Performance]]></title>
            <link>https://medium.com/@prikshit8/improving-web-performance-4955f9c691f0?source=rss-432fa578188e------2</link>
            <guid isPermaLink="false">https://medium.com/p/4955f9c691f0</guid>
            <dc:creator><![CDATA[Prikshit chawla]]></dc:creator>
            <pubDate>Sat, 22 Feb 2025 14:19:17 GMT</pubDate>
            <atom:updated>2025-02-24T03:52:08.267Z</atom:updated>
            <content:encoded><![CDATA[<p>Focus on the easiest fixes for your worst metric from real user data.</p><blockquote><strong>TTFB — Time To First Byte</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YbvYPDOFYNncrPisiJ8nKw.jpeg" /></figure><p><strong>1. Compress HTTP Response — reduce the size of plain text HTML, CSS<br> &amp; JS. We can use Gzip and Brotli</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HKZ_PfZAiN6aMXmyyl8_1Q.jpeg" /></figure><p><strong>2. efficient protocols — HTTP/1.2, HTTP/2</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VBZZ18tWVRF6YDAVafppuQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*--8fQ2bSLpb0LPKxodcxQw.jpeg" /></figure><p>http3 is almost similar to http2 instead of TCP it uses QUIC (UDP protocol)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B-20pc2HqtJnr96S1SQjXQ.jpeg" /></figure><p>TCP has extra steps of ack which is not there in UDP, in theory it seems TCP is ideal but in real world UDP is way faster as compared to TCP.</p><p>But HTTP3 has lot of drawbacks as it is new — cURL is not there for HTTP3</p><p><strong>3. Host Capacity — Right-size your host for you workload</strong></p><p><strong>4. Put your hosts close to your users [CDN] — CDN is the ability to put hosts all over the world in regional network &amp; those hosts make a copy of your original host. For the first call CDN takes same time to get files from original host to CDN and then serve it to user but eventually it is fasts.</strong></p><blockquote><strong>FCP — First Contentful Paint</strong></blockquote><p>How fast our site visibly loads, <em>something like anything</em> doesn’t matter what it is. It can be anything on screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GyPQlLIZzfIRiswDxHFyhA.jpeg" /></figure><ol><li><strong>Remove sequence chains</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*04x-hTEj9vL8RV1bVv-KkQ.jpeg" /></figure><p><em>CSS &amp; fonts are </em><strong><em>RENDER BLOCKING — </em></strong><em>they prevent the page from rendering until complete.</em></p><p><em>once all of the fonts, css is finished downloading then only FCP will happen.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/690/1*VipGxq3SGzWUiQgXVg7lpA.jpeg" /><figcaption>chain of imports</figcaption></figure><p><em>so by removing/collapsing these chains, FCP will happen soon</em></p><p><strong><em>So how do we remove this?</em></strong><br><em>We will use bundlers (Webpack, Rollup &amp; Vite), rather than letting the browser execute these dependency between the files at run time, we can pre-package files at build time using a bundler.</em></p><p><strong>2. Preload Resources</strong></p><p><em>Get </em><strong><em>critical path</em></strong><em> resources as soon as possible.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GSj3W0n4-Zneo38ZOnWXQA.jpeg" /><figcaption>Google fonts are blocking CRP here</figcaption></figure><pre>&lt;link rel=&quot;preconnect&quot; href=&quot;font_url&quot;&gt;</pre><p>link pre-connect is instructing the browser to go ahead and try and startup a connection to those APIs or those domain before you know we need them. (DNS lookup and setting up the connection and figuring out the protocols for communication)</p><p><strong><em>This solves a part of the problem like startup a connection but doesn’t tell to go get the file.</em></strong></p><pre>&lt;link rel=&quot;preload&quot; as=&quot;font&quot; href=&quot;font_name_cdn&quot;&gt;</pre><p>using preload allows you to instruct the browser to fetch something earlier than it knows about it otherwise.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PRLdR7VzAd9wFQ_Ipznogg.jpeg" /></figure><p><em>What else we can preload?</em></p><ol><li><em>style</em></li><li><em>script</em></li><li><em>image</em></li><li><em>font</em></li><li><em>fetch</em></li></ol><p><strong><em>We need to add crossorigin as attribute </em></strong>(CORS Cross-Origin Resource Sharing)<strong><em> for font &amp; fetch. font &amp; api supports your ability to load these things from your website.</em></strong></p><p>instead of targeting <strong>font_name_cdn </strong>in your link as the file name can change any time. So you should host them locally by copying it from the file and pre-load it from there.</p><p><strong>3. Lazy Loading — Remove resources that aren’t required for critical rendering path</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XTgOff_0ngv0TGT5jH9b0A.jpeg" /><figcaption>there seems a big gap. huh! (yellow — js, pink — css)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zI6hrCRcWAX_5ltPoKVugg.jpeg" /></figure><p>At the end of script file, file has to be evaluated, compiled and executed synchronously as soon as it’s downloaded. So it can stop rendering from happening.</p><p><strong><em>JS is parse blocking, when the browser encounters a script tag, it immediately starts downloading it and as soon as it’s done downloading, it stops what it is doing and executes it right then and there and it prevents parsing further. Downloading of css continues but further parsing stops as per the above image.</em></strong></p><p><strong>Do we really need to execute the JS <em>immediately?</em></strong></p><pre>&lt;script defer src=&quot;./index.js&quot;&gt;&lt;/script&gt;<br>&lt;script async src=&quot;./index.js&quot;&gt;&lt;/script&gt;</pre><p>What’s ASYNC and DEFER exactly and how it fixes our problem?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2ojHYxoRoHMweKTqqON8kA.jpeg" /><figcaption>Script in the head of the page</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nIO1m9TNc3wt67Nu3-UvaA.jpeg" /><figcaption>Script in the head of the page with async attribute</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jM-qOQVvnP6axKqZLrvxxQ.jpeg" /><figcaption>with async attribute we have started a race between css file and js file</figcaption></figure><p><strong><em>if css file wins — everything worked perfect, rendering didn’t get blocked.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CR1SDRCvwhjStVclRy9fZg.jpeg" /><figcaption>JS still blocks parsing</figcaption></figure><p><strong><em>if JS file wins- JS file returns faster than css file and JS will block the parsing [same issue again]</em></strong></p><p><strong><em>DEFER</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MpLoO-X2iNu2VVoWOX0Evw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G0ppL_hyRqw1SL9U9rzTng.jpeg" /></figure><p><strong><em>using defer attribute won’t block parsing</em></strong></p><ol><li>you almost never want <strong><em>async.</em></strong></li><li>multiple deferred scripts will execute in order they appear.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8OKwD4b_ExkESvOFgiiJPw.jpeg" /></figure><p>type=“module” will make file automatically deferred one.</p><p><strong>Q. Where should we put our script tag? &lt;body /&gt; or &lt;head /&gt;?</strong></p><p><em>it probably doesn’t matter anymore. ** forces the order you start fetching scripts instead of letting the browsers do it** just use defer.</em></p><blockquote><strong>LCP — Largest Contentful Paint — Core- important for SEO</strong></blockquote><p><em>how fast your site visible loads the most important/ largest element.</em></p><p>improving TTFB &amp; FCP we made LCP better automatically.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kbL-zvDFWWzxk_xl2T2--Q.jpeg" /></figure><p>LCP is mostly image.</p><p><strong>Resource Delay</strong> — <em>how long the delay before we can start downloading the image.</em></p><p><strong>Resource duration</strong> —<em> Time taken to download the resource.</em></p><p><strong>Render delay</strong> — <em>Main thread blocked so we get render delay.</em></p><ol><li><strong>Lazy Loading</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3LjNIDXBiTDfirhpSSvGmw.png" /><figcaption>We have bunch of images that are dowloading before LCP image.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6MWLEmLm1hVAERd9gqFnZg.png" /><figcaption>Resource delay and resource duration</figcaption></figure><pre>&lt;img loading=&quot;lazy&quot; /&gt;<br>&lt;iframe loading=&quot;lazy&quot; /&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dk8wYkBu_Pf6Mhd9RX1XYA.png" /><figcaption>by lazy loading low priority images we are minimizing resource delay.</figcaption></figure><p><strong>2. Eager Loading</strong></p><pre>&lt;img rel=&quot;preload&quot; as=&quot;image&quot; ref=&quot;/assets/img/hero-desktop.png&quot; /&gt;</pre><p>When we use rel=“preload” we have to add reference at 2 places in html.</p><p>which is not ergonomic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QDeYZ9ziYcKp58z6oFkanA.png" /><figcaption>Opposite of lazy loading, **no firefox support**</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-AqPPJLGVfbaRJ-ooMQQbg.png" /><figcaption>after doing both eager loading as well as fetchPriority=”high”</figcaption></figure><p><strong>3. Optimising Images</strong></p><p>Didn’t we already add http compressions? Because http compression works great on text but doesn’t help much in images.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yucRGhdL-RuOtmQcPczmwA.png" /><figcaption>this is the exact same image in different format</figcaption></figure><p><strong><em>JPG — this is worst</em></strong></p><p><strong><em>PNG- image was natively</em></strong></p><p><strong><em>WebP- brotli supported web delivery mechanishm</em></strong></p><p><strong><em>AVIF — newer, less supported.</em></strong></p><blockquote>So we prefer WebP &amp; AVIF</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GyEcyc-cXMNF0kYxdWUf_w.png" /><figcaption>JPG is better at compressing high detailed images</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DY6ubHgYI1IymKSFg7obog.png" /><figcaption>We always don’t need WebP, we can optimise PNG using <a href="https://tinypng.com/">tinypng</a></figcaption></figure><p>B. Responsive images</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RumayJQZ5dQljcKcK2l13w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oJ5Lga4uPugQtc4JVmB8IQ.png" /></figure><p>If browser doesn’t know what to do, it will go ahead and download default.</p><p><strong>&lt;source</strong> is used to set rules, download img for specific width. <strong>srcset </strong>is used to subsequently set more rules based on width only.</p><p><strong>Image optimisations</strong></p><ol><li>using <strong><em>jimp</em></strong> to generate images for all the widths.</li><li>using <strong><em>imagemin</em></strong> to compress all the png images</li><li>using <strong><em>imagemin</em></strong> to convert all the png images to WebP</li></ol><p><strong><em>using the above steps we compressed a 1.5 mb image to 60kb.</em></strong></p><pre>/assests/img/(.*).png<br><br>/assets/img/webp/$1.webp</pre><p><em>the above replacement will replace all the png images to webp ones</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nPGZMF0f-Dync1lmc99rGQ.png" /><figcaption>this is not the best way</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*0vvCyIQ0q0oWOoL9JxjKgg.png" /><figcaption>we are instructing browser to download images based on width.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4YhX52SJkAgmcAXdyie5_A.png" /><figcaption>We can’t download them because now we are downloading on the basis of screen size and we don’t know the screen size.</figcaption></figure><p>SVG are internally xml only so http can optimise it by by-degfault.</p><p>still if you wish to optimise it further you can use <a href="https://jakearchibald.github.io/svgomg/"><strong><em>svgomg</em></strong></a></p><blockquote><strong>Improving Return User Experience</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-FwSJ6XTiBqxqAOLUzsnXA.png" /><figcaption>Server caching</figcaption></figure><p>Browser response caching</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hBwyz-NYIl_FoP_w3QTEfQ.png" /><figcaption>bunch of work involved in getting asset</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sWzcGSYmAjrle4-WxZvmeg.png" /><figcaption>cdn will tell when this asset was last modified</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z_cBnRaiHSMuBQzsUFyqcg.png" /><figcaption>next time client will share last modified and etag to cdn and http will tell that this was not modified</figcaption></figure><p>Still we had to wait for the response from CDN of <strong><em>Not Modified.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*63A5-RLdc0_IVkX6eJK8yA.png" /><figcaption>instead of telling last modified now cdn will tell when this will expire so there’s no need of client to get the asset from CDN till the expire date.</figcaption></figure><p>This will cache even JS files, so if you wish to change the JS files you gotta change the name of that file or the user will continue to use the same old file for ever, that’s why every bundler adds some random strings in the name of js file to break this caching.</p><blockquote><strong>Improving CLS — Cumulative Layout Shift — Core Web Vital — important for SEO</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MYm0Pz3F3Gso-S2kxcttog.png" /></figure><ol><li>Layout size hints — only way you can fix your CLS</li></ol><p>We can fix this by adding height and widths to the <strong>images</strong></p><pre>&lt;img width=&quot;500&quot; height=&quot;500&quot; /&gt;</pre><p>just put number in height and width of images for aspect ratios of image. don’t put px.</p><p><strong><em>Async content loaded or promotional banner on client.</em></strong></p><p><strong><em>We can solve this using shimmer but this won’t grab the attention so we can use a hack by increasing z-index so it won’t shift actual content.</em></strong></p><blockquote><strong>Improving INP — Interation to Next Paint — Web Core Vital</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FWa9rbsxmpu207Xw5Vzo-g.png" /></figure><ol><li>Yield the main thread</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I1xqeamh8SspjE8P8VvKAg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IGyETH6Wlx8wX7GUiKhCWQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cBBjfhjNTmlFd4PthB7Z0g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zRMnKzgI6dpzkn7RWs4GVg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1wn3w4K5WsDVX1X5tETWGQ.png" /><figcaption>update analytics won’t block the main thread now</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DB8QbNPjB8p_dIrREFMsTw.png" /><figcaption>this improves INP</figcaption></figure><p><strong>Disclaimer</strong>: These notes are my personal summaries and insights from the Web Performance Fundamentals, v2 on Frontend Masters . For the full course materials, please visit <a href="https://frontendmasters.com/courses/web-perf-v2/">Frontend Masters.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4955f9c691f0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[D.E shaw Senior Member Technical Staff — Frontend interview experience]]></title>
            <link>https://medium.com/@prikshit8/d-e-shaw-senior-member-technical-staff-frontend-interview-experience-221177f9ae06?source=rss-432fa578188e------2</link>
            <guid isPermaLink="false">https://medium.com/p/221177f9ae06</guid>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Prikshit chawla]]></dc:creator>
            <pubDate>Wed, 14 Aug 2024 15:46:29 GMT</pubDate>
            <atom:updated>2024-08-14T15:46:29.651Z</atom:updated>
            <content:encoded><![CDATA[<h3>D.E shaw Senior Member Technical Staff — Frontend interview experience</h3><p><strong>1st round —<br>1st question — </strong>infinite scroll and useThrottle hook implementations<br><strong>2nd question — </strong>promise polyfill</p><p><strong>2nd round<br>1st question — </strong>optimise api calls on search input box.<br><strong>2nd question — </strong>useDebounce hook.</p><p><strong>3rd round<br>1st question — </strong>folder structure / reddit nested comments</p><p><strong>4th round<br>1st question — </strong>promise.all polyfill<br><strong>2nd question — </strong>Maximum of minimum for every window size<br><strong>3rd question — </strong>how will you optimise any react app.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=221177f9ae06" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cars24 SDE-2 Frontend Interview Experience]]></title>
            <link>https://medium.com/@prikshit8/cars24-sde-2-frontend-interview-experience-916345aeef3d?source=rss-432fa578188e------2</link>
            <guid isPermaLink="false">https://medium.com/p/916345aeef3d</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[frontend-interviews]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Prikshit chawla]]></dc:creator>
            <pubDate>Sat, 18 May 2024 07:35:03 GMT</pubDate>
            <atom:updated>2024-06-20T04:41:57.758Z</atom:updated>
            <content:encoded><![CDATA[<p>I reached out to recruiter on LinkedIn</p><h3><strong>Round 1— JS</strong></h3><p><strong>question 1</strong> — what is closure explain with example.</p><pre>function closure() {<br>    let count = 0;<br>    return function test() {<br>        count++;<br>        return count;<br>    }<br>}<br><br>const closuredTest = closure();<br><br>console.log(closuredTest());<br>console.log(closuredTest());<br>console.log(closuredTest());</pre><p><strong>question 2</strong>- what is curry and make a curried version of given function</p><pre>function sum(a, b, c){<br>  return a + b + c; <br>}</pre><pre>function curry(fn){<br>  return function curriedFn(...params){<br>    if(params.length &gt;= fn.length){<br>      return fn(...params);<br>    }<br>    else{<br>      return function(...next){<br>        return curriedFn(...params,...next);<br>      }<br>    }<br>  }<br>}<br><br>let curriedSum = curry(sum);<br><br>console.log(curriedSum(1, 2, 3));   // 6, still callable normally<br>console.log(curriedSum(1)(2,3));    // 6, currying of 1st arg<br>console.log(curriedSum(1)(2)(3));   // 6, full currying</pre><p><strong>question 3 </strong>- explain Task Queue &amp; event loop.<br>first I explained verbally then wrote a code snippet</p><pre>console.log(&#39;start&#39;);<br><br>setTimeout(() =&gt; {<br>    console.log(&#39;mid&#39;);<br>}, 0);<br><br>for (let i = 0; i &lt; 100000; i++) {<br>    console.log(&#39;thread blocking code&#39;);<br>}<br>console.log(&#39;end&#39;);</pre><p><strong>question4 </strong>— output based question</p><pre>async function async1() {<br>    console.log(&quot;async1 start&quot;);<br>    const data = await async2();<br>    console.log(data);<br>    console.log(&quot;async1 end&quot;);<br>}<br><br>async function async2() {<br>    console.log(&quot;async2&quot;);<br>    return &quot;async2 completed&quot;;<br>}<br><br>console.log(&quot;script start&quot;);<br><br>setTimeout(function () {<br>    console.log(&quot;setTimeout&quot;);<br>}, 0);<br><br>async1();<br><br>new Promise(function (resolve) {<br>    console.log(&quot;promise1&quot;);<br>    resolve();<br>}).then(function () {<br>    console.log(&quot;promise2&quot;);<br>});<br><br>console.log(&quot;script end&quot;);</pre><p><strong>question 5 — </strong>explain this keyword and how can we change it forcefully</p><pre>let obj = {<br>    name: &#39;prikshit&#39;,<br>    myName(city, birthPlace) {<br>        console.log(this.name + &#39; i live in &#39; + city + &#39; my birthplace is &#39; + birthPlace);<br>    }<br>}<br><br>let obj2 = {<br>    name: &#39;sohail&#39;,<br>}<br><br>// obj.myName.call(obj2,&#39;blr&#39;);<br>// obj.myName.apply(obj2,[&#39;blr&#39;]);<br><br>const bindedFn = obj.myName.bind(obj2);<br><br>bindedFn(&#39;blr&#39;, &#39;delhi&#39;);<br><br>obj.myName(); // this keyword here is obj</pre><h3><strong>Round 2— Machine Coding</strong></h3><p><strong>1st question</strong> — make a custom hook which shows online / offline status <a href="https://github.com/prikshit8/CustomHooks/blob/main/useOnlineStatus.js">(solution)</a></p><p><strong>2nd question </strong>— make a grid lights (favorite question of Uber interviewers)<br><a href="https://www.geeksforgeeks.org/how-to-create-grid-lights-using-react/">(problem)</a></p><h3><strong>Round 3— Techno Managerial Round</strong></h3><p>In this round interviewer asked me to make e — commerce filter component</p><p>connect with me — <a href="https://topmate.io/prikshit8">https://topmate.io/prikshit8</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=916345aeef3d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[NinjaCart SDE 2 frontend Interview experience]]></title>
            <link>https://medium.com/@prikshit8/ninjacart-sde-2-frontend-interview-exp-d84801a02e5c?source=rss-432fa578188e------2</link>
            <guid isPermaLink="false">https://medium.com/p/d84801a02e5c</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[interview]]></category>
            <dc:creator><![CDATA[Prikshit chawla]]></dc:creator>
            <pubDate>Sat, 18 May 2024 06:43:02 GMT</pubDate>
            <atom:updated>2024-09-05T06:05:25.001Z</atom:updated>
            <content:encoded><![CDATA[<p>I got NinjaCart recuiter’s number from a friend</p><h3><strong>Round 1 — Basic JS understanding</strong></h3><p><strong>1st question</strong> — based on debouncing &amp; throttling. Difference between these 2 techniques &amp; practical application.</p><p><strong>2nd question</strong> — output based question on promise and setTimeout</p><pre>console.log(1);<br><br>setTimeout(function () {<br>    console.log(2);<br>}, 0);<br><br>Promise.resolve()<br>    .then(function () {<br>        console.log(3);<br>    })<br>    .then(function () {<br>        console.log(4);<br>    });</pre><p><strong>3rd question</strong> — output based question on closures and setTimeout</p><pre>for (var index = 1; index &lt;= 3; index++) {<br>    setTimeout(function () {<br>        console.log(&#39;after &#39; + index + &#39; second(s):&#39; + index);<br>    }, index * 1000);<br>}</pre><p><strong>4th Question</strong> — write a function which flattens a nested array (<a href="https://leetcode.com/problems/flatten-deeply-nested-array/">ques link</a>)<strong><br></strong><a href="https://gist.github.com/prikshit8/af07af361d05fb2487f1eba1da7ef498">(solution)</a></p><p><strong>5th question </strong>— was based on useEffect and useMemo</p><h3><strong>Round 2— Machine coding &amp; problem solving</strong></h3><p><strong>1st question </strong>— Make a custom <a href="https://ant.design/components/tabs">React Tab component</a><br><a href="https://github.com/prikshit8/ninja-cart-machine-coding">solution</a></p><p><strong>2nd question</strong> — make a function which retries promise if it fails <a href="https://bigfrontend.dev/problem/retry-promise-on-rejection">(ques link)</a></p><h3><strong>Round 3 — Hiring Manager Round</strong></h3><p>manager was from haryana so we just had a normal conversation (felt like talking with my father’s friend 😂)</p><p>connect with me — <a href="https://topmate.io/prikshit8">https://topmate.io/prikshit8</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d84801a02e5c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SE 1 Frontend Interview experience at Tekion Corp]]></title>
            <link>https://medium.com/@prikshit8/se-1-frontend-interview-exp-at-tekion-corp-fe1c4a49f884?source=rss-432fa578188e------2</link>
            <guid isPermaLink="false">https://medium.com/p/fe1c4a49f884</guid>
            <category><![CDATA[frontend-interviews]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Prikshit chawla]]></dc:creator>
            <pubDate>Sat, 18 May 2024 06:05:45 GMT</pubDate>
            <atom:updated>2024-09-05T06:05:40.365Z</atom:updated>
            <content:encoded><![CDATA[<p>so I got Tekion corp recruiter’s number from my friend.</p><h3><strong>Round 1 — problem solving and machine coding</strong></h3><p><strong>1st question</strong> — It was a string DSA question, <a href="https://www.geeksforgeeks.org/check-if-the-given-string-is-shuffled-substring-of-another-string">question link</a><br><strong>2nd question</strong> — Make 3 x 3 TicTacToe in react.</p><h3><strong>Round 2 — Machine coding</strong></h3><p><strong>question</strong> — make a count down timer. (<a href="https://overreacted.io/making-setinterval-declarative-with-react-hooks/">this problem is very common as people are not aware of closure concept which is formed when we use useEffect and useState</a>)</p><h3><strong>Round 3 — Techno Managerial</strong></h3><p><strong>1st question</strong> — a general discussion of functional understanding of project at Walmart.</p><p><strong>2nd question</strong> — Implement a function which execute array of promises in series as .all, .any execute promises in parallel. <a href="https://gist.github.com/prikshit8/8e12e5a094ab273b59aeca8080f7bee7">my solution</a></p><p>connect with me — <a href="https://topmate.io/prikshit8">https://topmate.io/prikshit8</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fe1c4a49f884" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SDE -2 Frontend Interview Exp — MMT]]></title>
            <link>https://medium.com/@prikshit8/sde-2-frontend-interview-exp-mmt-001828ab6dc5?source=rss-432fa578188e------2</link>
            <guid isPermaLink="false">https://medium.com/p/001828ab6dc5</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[interview-experience]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[interview]]></category>
            <dc:creator><![CDATA[Prikshit chawla]]></dc:creator>
            <pubDate>Tue, 23 Apr 2024 03:20:08 GMT</pubDate>
            <atom:updated>2024-09-05T06:05:57.278Z</atom:updated>
            <content:encoded><![CDATA[<h3>SDE -2 Frontend Interview experience — MMT</h3><p>So I got call from recruiter via instahyre</p><h3><strong>Round 1 — Problem Solving</strong></h3><p><strong>1st question </strong>— was based on objects in JS. I found the same question on BFE. <a href="https://bigfrontend.dev/problem/implement-deep-equal-isEqual">Question link</a> I was able to solve this question.</p><p><strong>2nd question</strong> - was to make a higher order component which shows loading for some time and then loads the component. It was sort of React.Suspence polyfill. <a href="https://gist.github.com/prikshit8/9a123affb0f5d08d447ca1322c955b57">My solution</a></p><p><strong>3rd question </strong>— was based on web optimization. If we load 100 components in a web page and all are fetching some data from server how can we optimize the page. So I told him we can lazy load components. He asked how, so here I got stuck. so he helped me with new concept that I didn’t know. We have to use intersection observer here.</p><h3><strong>Round 2 — Conceptual Round</strong></h3><p><strong>1st question</strong> — was based on prototypical inheritance. Questions revolving around proto chaining. Difference between Object.create and new Object().</p><p><strong>2nd question</strong> — was based on Promises. I had to explain how we are able to chain infinite .then with a promise &amp; why a single catch is sufficient for error handling.</p><p><strong>3rd Question</strong> — was based on what’s the difference between onclick in vanilla js and onClick in react.</p><p><strong>4th question</strong> — was based on useRef hook.</p><p><strong>5th question</strong> — was based on what’s react fibre.</p><h3><strong>Round 3 — Techno managerial Round</strong></h3><p><strong>1st question</strong> — about my work at walmart &amp; challenging things I did at walmart and how I delivered things when time constraints are there.</p><p><strong>2nd question</strong> — it was based on this keyword &amp; closures concept. I had to make a calc function in which we can chain multiple methods like add, subtract. I found the exact question on leetcode <a href="https://leetcode.com/problems/calculator-with-method-chaining">question link</a></p><p><strong>3rd question</strong> — was to rate limit function execution. It was slight modification of debounce function. In debounce we cancel function calls here I had to queue them. Couldn’t find the question on web.</p><p><strong>4th question</strong> — what are web vitals and why they are required.</p><p><strong>5th question</strong> — How can we write js in html in react. So I explained babel loader, webpack and jsx.</p><p>connect with me — <a href="https://topmate.io/prikshit8">https://topmate.io/prikshit8</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=001828ab6dc5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>