<?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 Jinal on Medium]]></title>
        <description><![CDATA[Stories by Jinal on Medium]]></description>
        <link>https://medium.com/@jinal41?source=rss-7b54024b224b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*b8hxM4R7cE4atIGQv2khPw.jpeg</url>
            <title>Stories by Jinal on Medium</title>
            <link>https://medium.com/@jinal41?source=rss-7b54024b224b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 12:29:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jinal41/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[Google India Interview Experience]]></title>
            <link>https://medium.com/jinal-parikh/google-india-interview-experience-6589600ac4f8?source=rss-7b54024b224b------2</link>
            <guid isPermaLink="false">https://medium.com/p/6589600ac4f8</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[google]]></category>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[interview-experience]]></category>
            <category><![CDATA[google-interview]]></category>
            <dc:creator><![CDATA[Jinal]]></dc:creator>
            <pubDate>Sat, 08 May 2021 20:14:13 GMT</pubDate>
            <atom:updated>2021-05-09T07:07:49.866Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*cefmG5nMryckZvBXfO3RDQ.gif" /></figure><p>This post is a continuation to the I<a href="https://medium.com/jinal-parikh/preparing-for-the-google-swe-interview-11c719ede482">nterview Preparation post</a> I’ve written.<br>It is focused on various rounds and the process at Google. The entire process took around 5 months.<br>Note: I wouldn’t be able to disclose exact questions because of NDA.</p><p>I had applied for a <strong>SWE backend role</strong> in Bangalore, through a referral in October 2020. Within 2 days of applying, a recruiter reached out to me. She asked me briefly about work with my current employer, and what kind of work I was looking for. Then she briefed me about the various rounds and that first would be a phone screen. She wanted to know how prepared I was in terms of DSA (I had completed ~100 problems in Leetcode by then) and told my prep was enough to start. Since I wasn’t confident, I asked to schedule the interview after 2 weeks.</p><h3>Phone Screen</h3><p><em>2 easy LeetCode based questions</em>. Out of these, one was on Binary Trees(not BST) and other on Array (related to mountain arrays).<br>I came up with the most optimized solution, and after discussing it, had to write error free code in 45 mins for both of them. Before jumping to coding, he asked me to come up with edge cases for both. I had missed handling it in one of them so corrected it. The interviewer was friendly.</p><p>Since this was my first round, I was quite nervous and worried about the time. Around a week and a half later, recruiter informed me that I had cleared phone screening. She also gave a detailed feedback about each aspect. The main points were — not covering edge cases, writing code in hurry and very silent while coding. I decided to work on all of these and let the fear go (mentioned in the Prep post).</p><p>Recruiter mentioned I’d have <strong>4 onsite coding rounds + 1 behavioral.</strong> And she would schedule them as 3+2 (basically if the first 3 are cleared, then I’ll move further). Because of corona, all rounds were hosted virtually on Meet. <br>My recruiter made sure I was confident by boosting my morale, and being flexible with interview scheduling.</p><p>Around this time a lot of employees were going to be on year-end holidays so there were some delays (since I’d asked for a month’s prep time). Eventually my 5 rounds happened as 2+3 and I was given a month gap between them.</p><h3>Round 1</h3><p><em>1 Hard question</em>. I couldn’t find the question on Leetcode anywhere.</p><p>It was on Graphs, the problem was complex so I took 20 mins to understand and come up with the most optimized solution (DFS based). Entire interview passed in this question itself.<br>Later, I got to know that interviewer wanted to ask a follow-up too. So he pointed out speed as an issue, rest all was rated positive.</p><h3>Round 2</h3><p><em>1 Hard question</em>. The interviewer was a Red coder on Codeforces and asked a super interesting yet hard question. He made it clear that he’s going to ask just 1 question.</p><p>The question was an open ended one and used a variety of concepts like matrix, DP, Math.</p><p>I had fun discussing the problem with the interviewer because I learnt a lot, but this round didn’t go well.</p><h3>Round 3</h3><p><em>1 medium and follow-up on the same question</em>. The question was related to ranking and the solution expected was BST related. <br>I gave him multiple solutions, discussed the trade-offs, was able to solve the problem in an optimized way and coded the follow-up part too. The interviewer seemed impressed with the solutions. This round went very well.</p><h3>Round 4</h3><p><em>1 medium (Graph, Tree) and its follow-up question</em>.</p><p>I discussed several solutions, and finally coded one of them based on time complexity. I was asked possible edge cases, and had to actually walk through the code to verify all of them are covered. The follow-up was easy too. This round went great.</p><h3>Round 5 (Googleyness Round)</h3><p>This interview was a lot of fun because the interviewer asked really interesting questions and not the standard ones like describe an instance of your leadership, etc. Basically situations were given and how did/would I handle them.<br>In 40 mins, he asked a lot of questions and heard each one of them with interest!</p><p>After 2 weeks in March, my recruiter called to give me the good news that I was selected! There were some ups and downs in the process, and we were very happy that I made it. Since I was in a hurry because of other offers, after some negotiation we closed the offer on same day.</p><p>It was a great experience interviewing with Google because — all the interviewers were very friendly and it seemed like a conversation and not a test. The experience was very different from others. Even the recruiter was so warm and friendly that after few conversations, she didn’t feel like an HR anymore. There were regular calls between us and all the communication happened on calls, never on mails. Also, the entire scheduling was handled by a different team and was super flexible and smooth.</p><h4>Few important points</h4><ul><li>Each interview has a specific format — first 5 mins for introduction and last 5 mins for questions. Rest <strong>35 mins</strong> are for the core coding questions. <br>The interviewer explains the problem, then you have to discuss various solutions and <strong>describe trade-offs</strong>. <strong>Ask clarifying questions</strong> regarding data types, sorted/unsorted data, etc. After interviewer has agreed with the solution, start coding. <strong>Explain what you’re writing while coding</strong>. After you’re done, they’ll point out at mistakes/pose questions in the code. You have to <strong>walk through the code with some edge cases and verify that the code covers all of them</strong>. This is very important.<br>Then talk about the time and space complexity.</li><li>It is very important to <strong>write fully functional, error-free code</strong>. They actually expect the code to compile correctly. Practice on notepad/Google doc, etc.</li><li>Behavioral round is very important. Normally, the recruiter explains the expectations of this round very clearly by giving a lot of examples. You can read about the <strong>STAR(Situation, Task, Action and Result) method</strong> and various other resources online. Spend sometime and organize your experiences into STAR format.</li><li>The interviewers are really friendly so keep calm.</li><li>Your recruiter is your friend here. After my second round went bad, my recruiter took the call and cancelled the 3rd one, gave me sometime to prepare Hard questions for further rounds and then moved ahead.</li></ul><p>Best of luck, and happy to help if you’ve any questions!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6589600ac4f8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/jinal-parikh/google-india-interview-experience-6589600ac4f8">Google India Interview Experience</a> was originally published in <a href="https://medium.com/jinal-parikh">Jinal Parikh</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Preparing for the Google SWE Interview]]></title>
            <link>https://medium.com/jinal-parikh/preparing-for-the-google-swe-interview-11c719ede482?source=rss-7b54024b224b------2</link>
            <guid isPermaLink="false">https://medium.com/p/11c719ede482</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[google-interview]]></category>
            <category><![CDATA[interview-preparation]]></category>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[google]]></category>
            <dc:creator><![CDATA[Jinal]]></dc:creator>
            <pubDate>Sat, 08 May 2021 13:57:53 GMT</pubDate>
            <atom:updated>2021-05-08T20:28:50.155Z</atom:updated>
            <content:encoded><![CDATA[<p>Recently, I interviewed for a few top companies like Amazon, LinkedIn, Adobe, Google- and finally accepted an offer from Google India. Interview experiences and personalized preparation plans was something that had helped me while preparing, hence I decided to share my journey.</p><p>This interview guide contains notes that apply to any product based company and specifics for my Google interview process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xlZx_WDV2-i-_2HHU8wdrg.png" /></figure><h3>Before you start</h3><p>Preparing for interviews is often a stressful, exciting and rewarding experience. There are two basic things — <strong>Preparing the mind</strong> and then <strong>technical skills</strong>. <br>Before starting, a lot of people feel overwhelmed, doubting whether they’ll be able to crack the interviews or if they deserve it.<br>First thing- <strong>let go of these doubts.</strong> Tell yourself everyday, “I am good enough to work at XYZ”. Moreover, believe it when you say it!<br>Remember it’s just a job and passing an interview doesn’t determine your worth. But I also believe that if you want to achieve something, then <strong>believe in it and give your best. </strong>Hence, remaining confident throughout the process is very important.</p><p>Irrespective of the outcome, consider the preparation as a learning process. Time and efforts invested never goes waste. For me, seeing how my DSA skills got improved in 4–5 months was amazing! That was my takeaway.</p><h3>The Plan</h3><p>Next step is to setup timelines for the prep — timelines of how much and what all you’ll practice, when you’ll start applying, where you’ll apply, etc.<br>Be a bit organized. I’ve seen some people fail because of haphazard preparation (giving interviews without being enough prepared).</p><p>Decide which companies you want to interview for. Understand its process in detail by reading articles, talking to employees/friends working there- this will help in creating detailed plan. I only interviewed with the companies I wanted to work for, which is risky. Another strategy is to start interviewing from your lowest priority companies to the dream ones so that you get enough practice, confidence and multiple offers too!</p><p>I prepared a timeline of 5 months- like I drew out a list something like this-</p><ul><li>Start in July- read important data structure and algorithms (quick review) for a week</li><li>Practice on leetcode (detailed list of which tracks and how many)</li><li>Start applying in October- start from easier ones and startups</li></ul><p>Creating a plan also depends on how much you already know. A fresh college grad might require much lesser time whereas an experienced person who has lost touch might require much more. Personalize according to your knowledge and grasp. Also, some people apply and then prepare because it enforces a timeline. You can choose what works best for you.<br>Disclaimer: I was already working full-time plus preparing, so I managed to take out ~5 hours on weekdays — this also affects the timeline.</p><h3>Programming Preparation</h3><p>Let’s discuss the important things first:</p><ul><li><strong>Timing</strong>: Standard Google/Facebook interview involves 2 medium/1 hard coding questions in <strong>45 min</strong> time frame. The time limit is pretty strict (none of mine lasted longer). So, your thinking and coding speed should be such that each question takes around ~15–20 minutes, along with communication. <br>This can be acquired through practice. <em>I used a timer plugin (</em><a href="https://chrome.google.com/webstore/detail/leetplug/mcpaohflldejneeahigainahjenkgmef"><em>LeetPlug</em></a><em>), which made me time conscious and was a big contributor.</em></li><li><strong>Whiteboard coding: </strong>I’m sure everyone is aware of this practice. For virtual interviews, you’re supposed to code on a Google Doc. So whichever language you choose, remember the syntax well. <br>In my case, I was already well versed with Java syntax and used to code on notepad initially for few days. Again, practicing is the key.</li><li><strong>Talk while coding:</strong> While giving the interview, it’s not just about coding in a black box. What you’re suggesting also needs to be agreed by the interviewer. Each person has a different style of coding, so what you’re writing needs to be explained. <br>After giving my phone screen, my communication skills were tagged baseline- to which I was surprised. HR advised that it is expected to explain your code while writing. I practiced this by giving mocks to a friend. Since mocks are limited, I also started talking to myself while coding as if I were explaining to someone 😛</li></ul><h4>Where and What I used to practice</h4><p>I used <strong>Leetcode </strong>throughout. I would advise you to buy a premium subscription since the company specific tracks, mock interviews are worth it. <br>I started with Google tagged questions (sorted by frequency), and my initial target was ~100 — where I solved a mix of 15% easy, 80% medium and rest hard. This was before I started applying. In total, I solved around ~300 problems on Leetcode.<br>For onsite, I solved problems topic-wise — picking up 4–5 from each topic (this depends on the time you have), some from the Google track and gave mocks (I had significant breaks between onsite rounds). Towards the end, I also participated in Weekly Leetcode contests, its quite helpful.</p><p>Also, <a href="https://www.interviewbit.com/"><strong>InterviewBit</strong></a><strong> </strong>was helpful while practicing topic-wise. I used it as a reference to make sure I did some problems from each bucket.<br>What I observed after my prep was that, even though I focused on Google tagged problems, other company’s interviews seemed easy/doable to me without any special prep.</p><h4><strong>General tips</strong></h4><ul><li>DO NOT get demotivated when you start and can’t solve even medium problems. This happened with me too, but it’s all a matter of time and practice. <strong>Write notes</strong> (or make mental notes) when you can’t solve something. I made a lot of notes summarizing what I learnt from each problem so that it gets registered in the brain.</li><li>If you couldn’t solve a problem, <strong>mark it </strong>(leetcode feature)so that you can revisit it later. Doing it multiple times helps a lot. The key is not to memorize, but start observing which pattern the question falls into.</li><li><strong>Observing patterns </strong>in the question<strong> </strong>is a super important skill needed here. Patterns means identifying the category the problem falls into. <br>For eg: <em>given a start word and a list of valid words in dictionary, and a target word — find if there exists valid transformation sequence to convert start word into target word by changing a letter at a time.<br></em>This one seems like a string problem, but it can be solved by BFS, considering each letter as node and letter transformation as edges.<br>Solving multiple problems of a type helped me to identify patterns instantly!</li><li>Go through this list of patterns: <a href="https://leetcode.com/discuss/general-discussion/665604/important-and-useful-links-from-all-over-the-Leetcode">Important links from all over Leetcode</a>. It’s by far the best source of knowledge and problems to solve for your preparation. I did <a href="https://leetcode.com/problems/minimum-window-substring/discuss/26808/Here-is-a-10-line-template-that-can-solve-most-&#39;substring&#39;-problems">this</a> for sliding window patterns, and <a href="https://leetcode.com/discuss/general-discussion/458695/dynamic-programming-patterns#distinct-ways">this </a>for DP.</li><li>Even after doing 100 problems, I didn’t feel confident enough to apply anywhere. Still I applied, and kept preparing parallelly. From my phone screening round, I received a detailed feedback on my coding, timing and communication. So for later rounds, I built up on them by giving max 30 mins to medium problems (speed was an issue), giving mocks to friends and leetcode mocks.</li><li>Distribution of questions I practiced was mostly <strong>medium </strong>level, and very few hard. But then my first two onsite rounds had hard questions, so I started focusing heavily on hard level thereafter.</li><li>I felt quite demotivated after my first two rounds, but it also helped me miraculously — my fear of giving interviews vanished! I’d seen my worst; I became comfortable with the process.<br>I started making conscious efforts by doing meditation, and having full belief that I’ll be able to crack it.<strong> Trust yourself.</strong></li><li>Overcome your interview fear by giving multiple mocks and working on feedbacks. <a href="http://pramp.com/">Pramp</a> is a good site for peer interviews. Time management is important and it can be learnt with enough practice. Communication skills are as important as technical skills.</li></ul><p>That was all for DSA, which is the most important skill required in Google interviews. The other part is System Design.</p><h3>System Design preparation</h3><p>Google takes 1 round of system design for senior experienced positions. In my case, I had 4 rounds of DSA and no System design round- so I focused mostly on DSA. Barring Google, all other companies had 1/2 rounds of System Design.</p><p>System Design round is a very open ended one, so there’s no fixed set of practice here. But a deep knowledge of the core concepts, reading example systems and giving mocks to friends helps a lot.</p><p>I gave around 2 weeks of prep time for this. These are the resources I used:</p><ul><li><a href="https://www.educative.io/courses/grokking-the-system-design-interview">Grokking the System Design Interview Course</a></li><li>Designing Data Intensive Applications book</li><li>Videos from Gaurav Sen’s Youtube channel</li></ul><h3>Google Interview Experience</h3><p>You can read about the detailed interview experience <a href="https://medium.com/jinal-parikh/google-india-interview-experience-6589600ac4f8">here </a>(keeping in mind the length of this post).</p><h3>Application Process</h3><p>The application process becomes important since I kept waiting for 2-3 months after applying and realized a few things:</p><ul><li><strong>Referrals work better</strong>. I tried applying to companies from LinkedIn and didn’t manage to get a call, whereas referrals landed me interview calls in 2 days!</li><li>Sometimes, reaching out to recruiters on LinkedIn and talking about what you’re looking for helps too. I managed to find few good recruiters who redirected my profile to right audience in the company.</li><li>To find referrals, in case you don’t know someone directly in target company — type the company, search for People in LinkedIn. And try to look for common links with people like college alumni, past company, friends of friends, etc. Reach out to them, explain your interest and some might be willing to give referral.</li></ul><h3>Conclusion</h3><p>So, give your best with a clear vision of what you want from the search(it’s not the brand, it’s the experience and learning you’ll get from there)!<br>Please remember that there are a lot of factors that ultimately influence the final outcome of an interview; so don’t make “getting the FAANG offer” your ultimate goal.</p><blockquote>Luck is what happens when preparation meets opportunity.</blockquote><p>Getting an offer is not the end of the journey. It might be possible that even after you reach your target company and you work there for some years, you might look for new challenges.</p><p>Regardless of the outcome, enjoy the experience!<br>Good luck and feel free to contact me via <a href="https://www.linkedin.com/in/jinal-parikh/">LinkedIn</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=11c719ede482" width="1" height="1" alt=""><hr><p><a href="https://medium.com/jinal-parikh/preparing-for-the-google-swe-interview-11c719ede482">Preparing for the Google SWE Interview</a> was originally published in <a href="https://medium.com/jinal-parikh">Jinal Parikh</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The five people you meet in Heaven: Reflections]]></title>
            <link>https://medium.com/jinal-parikh/the-five-people-you-meet-in-heaven-reflections-d5aaf393fc3?source=rss-7b54024b224b------2</link>
            <guid isPermaLink="false">https://medium.com/p/d5aaf393fc3</guid>
            <category><![CDATA[book-recommendations]]></category>
            <category><![CDATA[books]]></category>
            <category><![CDATA[sentimental]]></category>
            <category><![CDATA[lessons-learned]]></category>
            <category><![CDATA[mitch-albom]]></category>
            <dc:creator><![CDATA[Jinal]]></dc:creator>
            <pubDate>Mon, 23 Mar 2020 19:23:19 GMT</pubDate>
            <atom:updated>2020-03-23T19:23:19.465Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/599/1*7viGMmBvBgtVekwfQ20byg.png" /></figure><p>Normally, I write about my experiences and technical lessons learnt. This is my first post dedicated to a simple yet powerful book I read. This book is “<strong>The five people you meet in Heaven</strong>” by Mitch Albom.<br>Having read a few books by this author, knowing he writes sentimental and short (~ 200 pages) books and given how lazy I am in <em>completing</em> a book, I was excited to finish this one!</p><p>This post is not a summary or a review, but my insights on some deeper meanings that the book subtly touched upon. <br>If you like classic story-telling, simple, short and insightful- do read this book. We can share a perspective or two 😉</p><p><em>83-year-old Eddie, the head maintenance person at an Amusement Park, dies in a tragic accident. After he dies, he finds heaven is not a paradise garden as he had expected, but a place where a succession of five people are waiting to show him the true meaning and value of his life; how each person’s life (and death) was woven into Eddie’s own, in ways he never suspected. He is reminded that we all live in a vast web of interconnection with other lives. Each soul has a story to<br>tell, a secret to reveal, and a lesson to share. Through them Eddie understands the purpose of his own life even as his arrival brings closure to theirs.</em></p><p>I write this article to appreciate how effortlessly, this book reminds us of what really matters here on Earth. I’d like to share a few really good Aha! moments that apply to our life.</p><h3>The Concept of Heaven</h3><blockquote>“People think of heaven as a paradise garden, a place where they can float on clouds and laze in rivers and mountains. But scenery without solace is meaningless. This is the greatest gift God can give you: To understand what happened in your life. To have it explained.”</blockquote><p>Kudos to the imagination! Everyone has an idea of heaven. To understand why what happened, what purpose you served- would actually be great. We all have certain questions about our life that we seek answers to — why did <em>this </em>happen to me? why couldn’t I get <em>this </em>even after trying my best? why did he/she do <em>this </em>to me? If someone could answer this to us, we can actually rest in peace.<br>I also think of it as- <strong>why wait till death to find the answers?</strong> If the people here on Earth are going to answer, why not do it here? It is <em>your duty to ask</em> and have that level of communication, and <em>other people’s duty to understand that they themselves will seek it and provide the answers rather than holding it back.</em></p><p>Also, in the book, the five people he meets teaches him five lessons. And these are not too preachy, but important details to make Eddie understand his life. The sheer beauty of these five lessons was that, had Eddie known them while being alive, he would have led a much happier and satisfied life.</p><h3>Find Peace while you’re here</h3><blockquote>“Ain’t you supposed to have peace when you die?”, Eddie asked.<br>“You have peace,” the old woman said, “when you make it with yourself.”</blockquote><p>So true! Peace is not something for which you’ve to look outside, but look inside. Search it within you. Even if the circumstances are not favorable- <strong>accept them or work hard to change them. Accept yourself.</strong> Remember to <em>live in peace</em>, rather than hoping to die in peace.</p><h3>We are all connected</h3><blockquote>“That there are no random acts. That we are all connected. That you can no more separate one life from another than you can separate a breeze from the wind. <br>Did you ever wonder? Why people gather when others die? Why people feel they should? <br>It is because the human spirit knows, deep down, that all lives intersect. That death doesn’t just take someone, it misses someone else, and in the small distance between being taken and being missed, lives are changed. It happens every day. When lightning strikes a minute after you are gone, or an airplane crashes that you might have been on. When your colleague falls ill and you do not. We think such things are random. But there is a balance to it all. One withers, another grows. Birth and death are part of a whole.”</blockquote><p>This sounds philosophical, but it is so true. Remember- <strong>you’re the protagonist of the story of your life, but a background artist in others’</strong>. We are so engrossed in our lives, that we forget the bigger picture. When something bad happens with you, remember the balance. The book illustrates this message perfectly.</p><h3>Sacrifice is a part of life</h3><blockquote>“SACRIFICE,” the Captain said. “You made one. I made one. We all make them.<br>That’s the thing. Sometimes when you sacrifice something precious, you’re not losing it. You’re just passing it on to someone else.”</blockquote><p>The way I interpret it is when you lose a contest(or anything), someone else just won it! It’s just the happiness which you’d have felt, will be felt by that person. This doesn’t mean you don’t try to win- Try, but if you lose, remember there was a face who smiled your smile!<br>Acts of sacrifice seemingly small or fruitless do affect others;It’s beautiful.</p><h3>Free Yourself from Anger</h3><blockquote>“Holding anger is a poison. It eats you from inside. <br>No one is born with anger. And when we die, the soul is freed of it. But now, here, in order to move on, you must understand why you felt what you did, and why you no longer need to feel it.”</blockquote><p>Eddie hates his father, and in heaven, he’s shown the story from his father’s side. As discussed above, every person has his own situation, we don’t know it all the time. Rather than hating someone(which is the most obvious instinct), communicate and try to understand him/her. <br>And when you do, <strong>let it go</strong>.<em> </em><strong>Forgive.</strong> Even if you do not figure out the reason, remember there must be a reason, let it go. No point holding it inside you.</p><h3>You have a purpose. Everyone has</h3><p>This is the central theme of the novel. Eddie was the kind of guy everybody, including Eddie himself, tended to write off as one of life’s minor characters, a gruff bit of background color. In heaven, he comes to appreciate his 83 years of mortal life; making a point that apparently <strong>insignificant lives do indeed have their own special kind of significance. <br></strong>The rag pickers, vendors, guards, drivers- each and every one is serving a purpose even they don’t know of. It’s an interconnected universe.</p><h3>Do not keep the words unspoken</h3><p>As I read through, I made an observation. Being toughened by life’s circumstances, Eddie grows silent, as most men do. After dying, he realizes these are the last moments he has with his loved ones. All he wanted was time- more and more time and then he spoke of everything he wished to speak about.<br>Again, <strong>why not communicate your heart out with the people you love, while you still have time? Do not wait. <br></strong><em>Gather ye rosebuds while ye may!</em></p><h3>Conclusion</h3><p>The five people you meet in Heaven is a small, pure, and a simple book. <br>It poses this beautiful question in front of us:</p><blockquote>Which was worse when left unexplained: A life, or a death?</blockquote><p>And while you’re wondering, remember- we are all connected. Live a life full of compassion. Towards yourself, your loved ones and strangers.<br>Let the below words sink in.</p><blockquote>That each affects the other and the other affects the next, and the world is full of stories, but the stories are all one.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d5aaf393fc3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/jinal-parikh/the-five-people-you-meet-in-heaven-reflections-d5aaf393fc3">The five people you meet in Heaven: Reflections</a> was originally published in <a href="https://medium.com/jinal-parikh">Jinal Parikh</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Eight months at Morgan Stanley- Things I learnt in my Internship]]></title>
            <link>https://medium.com/jinal-parikh/eight-months-at-morgan-stanley-things-i-learnt-in-my-internship-ad8143baede5?source=rss-7b54024b224b------2</link>
            <guid isPermaLink="false">https://medium.com/p/ad8143baede5</guid>
            <category><![CDATA[lessons-learned]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[tips]]></category>
            <category><![CDATA[internships]]></category>
            <category><![CDATA[morgan-stanley]]></category>
            <dc:creator><![CDATA[Jinal]]></dc:creator>
            <pubDate>Sun, 17 Feb 2019 14:07:54 GMT</pubDate>
            <atom:updated>2019-02-17T14:22:17.408Z</atom:updated>
            <content:encoded><![CDATA[<p>Wait, what ? You might be thinking which internship lasts for eight months during college. Yes you’re right — none of them does! <br>I did both my <strong>Summer and Spring internship here</strong> (my friends might call it my mad love for MS!). Coming right away from college and transitioning into a young professional came with its own challenges and lessons. If I dive into the details of my entire experience of joining, orientation, the 4 core values (yes :p), project onboarding, full-time conversion interview, and everything else — I might end up writing a superrr long article(such enriching the experience has been, with its happy and unhappy paths!).</p><h3>First things first — Selection Process at Morgan Stanley</h3><p>Morgan Stanley hires freshers for Summer and Spring internships in these ways:</p><ul><li>On-campus college recruitment</li><li>Morgan Stanley Campus Codeathon held once every year</li><li>LinkedIn job posting</li><li>Grace Hopper Conference resume database(<strong>only for women</strong>)</li></ul><p>Interviews involve questions on DS, Algo, System Design, Operating System- normally asked in every interview.</p><p>So this post is more about what I learnt and experienced over my internships at MS, from a college student’s perspective. Things mentioned here focus on how to make the best of it in a fintech like Morgan Stanley, but applies to any other firm as well.</p><h3>Everyday is an opportunity for growth</h3><p>Starting from the first day, right from the orientation session, project assignment to the last day of project fair -I got to learn something new about the firm, team, technology or me! After meeting so many senior folks from various teams, you get to pick up something(both personal and professional) from each one of them. It’s important that you keep your mind open and take <em>everything </em>around you as a learning opportunity right from <em>the first day till the last one</em>.</p><h3><strong>Building relations is as important as building code</strong></h3><p>I have always believed that developing relations with people around you is crucial, and at Morgan Stanley it is extremely important. Coding a solution is much more about understanding a problem and figuring out the right design, than sitting at a corner and coding. Hence <strong>communication skills is a must here. </strong><br>Apart from that, building relations is like building your own support network! I realized there were so many knowledgeable and experienced people out there- that I would want in my network, and guess what — they were very approachable too. That’s the best thing I find at Morgan- people are awesome and you never know how you can help each other. So <strong>meet and greet everyone you meet, anywhere in the building — be it corridor, canteen or even elevators!</strong></p><h3>Be far and wide</h3><p>This is a continuation of the point above. <strong>Try to know people from outside your team, get a bit out of your comfort zone and never be hesitant to talk to new people or ask them anything.</strong> As a new joinee, you might not be able to realize the benefits but over time it helps to have contacts- both professionally and personally. <br>You might ask, “How can I know people outside of my team when all day the people I be with, is them?” First, Morgan has many events which give you the opportunity to network with people in the firm. Secondly, talk and reach out to people in case of issues instead of mailing and waiting for their replies. Also, talk with friends of your friends (your friends will be in different teams and strike up a conversation with their teammates when you encounter them). I didn’t have to go out and network with people, but I have this habit of pinging the concerned people and talking it out with them personally if they’re free. So I was working on front-end, and was facing an issue with an internal Morgan library. I mailed the concerned team, but someone advised me that a particular guy in that team was an expert and I should reach out to him. I booked a time with him, visited his desk and was able to get a solution very fast. This way, we got to know each other and what we work on! (network++)<br>There are many such interesting instances.</p><h3>We are a service-based company, not product-based</h3><p>Morgan Stanley is a financial services company which provides financial services, offering solutions to the world’s most important corporations, governments and institutions in more than 100 countries. They use software tools to conduct their businesses. So it’s not a product company.<br>How does that matter to us? Being service-based, at the end — serving the clients and making money for the firm is our primary focus. Hence, <strong>understanding the business problem is very important</strong>.</p><h3>We build, fail, learn and repeat- Together!</h3><p>There were many instances during the internship which made me realize that it was not about pushing my code and getting done but <strong>functioning together as a team</strong>. At the end of the day, it’s all about serving our customers through improving our product and service, through serving each other.<br>There were weekly sprint meetings, discussions on production issues faced during the week so others could learn from it and knowledge-share meetings where everyone talks ideas about the tools they think could help them to perform more efficiently or infra improvements on existing projects. I still remember there was production outage once, and the entire team remained glued to their seats, skipping meals until it was solved. <br>Over time, I learned that at Morgan, we were hungry for different perspectives, different opinions, and different ways to do things.</p><h3>I was mentored, not managed</h3><p>Though everyone is assigned a manager here, I never felt like being managed. Instead I felt, I had a mentor constantly helping me grow. Our 1-on-1s were meetings about me, meetings set to empower me to perform better and grow. I talked about problems I encountered and seek advice and feedback from him. <br>My team valued new ideas and I was given the freedom to design things my way (after proper discussion). During my internship, I was working on UI and I experimented with the UI features and how it should look and everyone — starting from my ED to my manager would listen and discuss it with me.</p><h3>Ask and you shall receive</h3><p>As I have mentioned at several places, <strong>communication is the key</strong>. Morgan Stanley has a flat hierarchy, which means you can simply approach anyone in case of advice/assistance. <br>In terms of work, just talk to your manager and ask for the kind of work you want and they’ll make sure you have it. The ownership that I’ve got for my work was overwhelming yet gleeful. I developed a web app from scratch during the Spring Internship and it came to be known as ‘Jinal’s product’!<br>So, be frank to talk about what you want and display your potential by talking confidently about it.</p><h3>Software engineering is much more than coding</h3><p>Once given the problem statement, rushing to code is so not the right thing to do. There are a few things which need to be done before actually coding the final implementation. <br>First is to figure out the right approach you should pursue. You might need to discuss your idea with some seniors and refactor the code before proceeding. <br><strong>Coding is much like building something with lego blocks.</strong> Putting pieces together isn’t hard. The hard part is coming up with the right design blueprint.</p><h3>Think, think, think… before you code!</h3><p>As discussed above, design your approach, think it out in your head before actually starting to code. Ask the right questions before coming to an approach — why are you doing this? how is that going to benefit the end users? Sometimes you realize what you’re trying to do is just a nice-to-have but not a necessity.<br>Once you have confidence in your approach and have a clear idea about what code should go where, only then sit down and code. Rushing into coding does more harm than good. Just DON’T do that.</p><h3>Come prepared(always). Do your homework!</h3><p>Always be prepared before coming to a meeting or presentation. As a new joinee you would only be speaking at a few meetings like — sprint calls, expectation setting, project design discussions and finally demo of your product. It looks very unprofessional if you start babbling a few things here and there when asked to speak at your own meeting.<br>Meetings are expensive. <strong>It saves everyone’s time when you do your homework ahead of time.</strong></p><h3>And for the perks..</h3><p>Enough of talking tech and professional communication! Apart from work, we had table tennis and foosball tables to chill. Also there are a lot of clubs here like Readers club(for the love of books!), Toastmasters(for debating), Yoga club, WIT(Women in Technology) and activities like volunteering as a part of GVM(Global Volunteering Month), fireside chats and leadership sessions with senior executives. So find your interests and I’m sure you’ll have fun.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Unm4yxedujJS63ag38a0sQ.jpeg" /></figure><h3>Final Thoughts</h3><p>Be it a pure tech firm or a fintech, I believe there exist ample learning opportunities everywhere as long as you’re inquisitive. We gotta remember this:</p><blockquote>The world is full of people who all want the same thing, and you have to do a little something extra to make them remember you.</blockquote><p>What I realized after my first 2 months was that people and culture matters a lot. I was lucky enough to have found some of the best people as my teammates, who made me grow and turn up with a smile and enthusiasm each day at work :)<br>The above lessons are written from the perspective of a girl taking her first steps into corporate culture, and attempts at making the best out of it. <br>Internship at Morgan Stanley, Mumbai was my first time away from home and I had come with new dreams to a new place. Everything was no longer a fantasy, it was real. <br><em>And I knew I wasn’t searching for something or somebody here. I was searching for me, who I was and who I wanted to be. Finding my voice wasn’t easy, but it sure was fun!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ad8143baede5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/jinal-parikh/eight-months-at-morgan-stanley-things-i-learnt-in-my-internship-ad8143baede5">Eight months at Morgan Stanley- Things I learnt in my Internship</a> was originally published in <a href="https://medium.com/jinal-parikh">Jinal Parikh</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My Experience with Mentoring]]></title>
            <link>https://medium.com/learn-it-girl/my-experience-with-mentoring-13322881c076?source=rss-7b54024b224b------2</link>
            <guid isPermaLink="false">https://medium.com/p/13322881c076</guid>
            <category><![CDATA[women-in-technology]]></category>
            <category><![CDATA[experience]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[mentorship]]></category>
            <category><![CDATA[learnitgirl]]></category>
            <dc:creator><![CDATA[Jinal]]></dc:creator>
            <pubDate>Thu, 31 Jan 2019 21:58:19 GMT</pubDate>
            <atom:updated>2019-02-04T21:39:52.780Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>“ The key to being a good mentor is to help people become more of who they already are — not to make them more like you.” — Suze Orman.</blockquote><p>We all have the experience of teaching our friends during our college days, but we never consider that as mentorship. And that is why being an official ‘mentor’ to someone seems daunting. I had a wonderful experience with mentoring at <a href="http://www.learnitgirl.com/">Learn IT, Girl</a> and hence, decided to blog it out.</p><p><a href="http://www.learnitgirl.com/">Learn IT, Girl</a> is a volunteer initiative that aims to help women learn a programming language while doing an awesome project with the guidance of a mentor.</p><p>A few months after receiving the Google WTM scholarship, I was looking out for something interesting to get engaged with. <br>I came across LITG and applied as a mentor for <strong>Android </strong>- not sure of getting selected. I was kinda scared because this was a totally new role for me!</p><p>When I received the confirmation mail from LITG, I was extremely excited for what might come next. Yay! I was gonna be a mentor to some passionate girl like me 💃</p><h3>Introduction Phase</h3><p>After a few days, I was allotted a mentee named <a href="https://medium.com/@mehak5051">Mehak Mittal</a>, who turned out to be really awesome!<br>We spent the first few meetings (virtual, of course 😅) in <em>knowing each other</em>. Coming up with the time slot suitable to both is very important since that is supposed to be followed for the rest of the meetings. I made sure we did good enough <em>relation building</em> so that we get comfortable with each other.</p><h3>Project Kickstart</h3><p>Next step was deciding the project. This was really cool because mentee gets to decide what she wants to create.<br>We brainstormed several ideas on what to make. Mehak had an idea which I heard, and then discussed the pros and cons of its implementation. I suggested some of the apps I had built and that kinda gave her an idea to build a <strong>movie app</strong>. We discussed roughly what all features it might have, and she was very excited just by the thought of it since the theme was very open-ended — one could come up with a lot of features!</p><h3>Planning the Timeline</h3><p>Next, we had to set up weekly tasks for the entire duration of the program. We decided to set granular tasks for the first 2 weeks and give a high level idea of the rest. This was what I did from my side:</p><ul><li>Provided Mehak with ample resources to learn Android. Some video lessons on Android and practising a small app helped her to get started.</li><li>She sent me the tasks and I broke them down into little tasks. It helps a lot to have <em>granular tasks </em>since they’re easily achievable and testable.</li><li>Going slowly in terms of project unfolding and not all at once, helps. I kept encouraging her constantly so that she wouldn’t feel overwhelmed with the project.</li><li>We kept regular meetings every week. This was to discuss the progress during the week and lay out next week’s plan. Communication is crucial for both the mentor and mentee, otherwise, the project can get stuck.</li><li>We all know app development leads to errors, and whenever she would get stuck with a bug, we would both sit and solve it together. If I wasn’t available immediately, then I would point her in the right direction where she could look further.</li></ul><p>For me, this was the hardest part — being the <em>mentor</em> to help her solve the errors. Even in the workplace if something would break, I would go to my manager for help. Realizing that, ‘This is on you now, you gotta help fix it!’ , was hard. And that’s why one needs sufficient experience with the language.</p><blockquote>Remember, you can mentor someone on something, only when you’re very comfortable with it</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hUO_8TtnehSqpj_NPESE8Q.jpeg" /></figure><h3>Challenges</h3><p>As mentioned, solving the errors that came during development and that too virtually, was hard. But luckily, my mentee was smart and quick at grasping things; so she got the hints fast. <br>During the end of the program, I had my own Spring internship, so managing the time became tough for me. I had to work in the office, and then schedule calls with her in the night. But she being regular and proactive, didn’t require constant intervention.</p><p>Not only did we make it through the program successfully, but Mehak added more features to the app than we had decided! :D<br>Also, our project got featured in the edition’s best projects. I couldn’t describe my happiness enough when I received the certificate :)</p><h3>Final words for the future mentees</h3><ul><li><strong>Clarify your goals:</strong> Explain to your mentor what you want from this program.</li><li><strong>Come prepared:</strong> Set up an agenda ahead of meetings and give your mentor enough time in advance to review your work.</li><li><strong>Keep communicating: </strong>You don’t want your mentor saying, “I haven’t heard from you”.</li></ul><h3>Final words for the future mentors</h3><ul><li><strong>Try to be a good listener: </strong>The more you understand your mentee, the better you’ll be to offer support in a way that makes sense to them.</li><li>You’re there to further the mentee’s development, so don’t avoid giving critical feedback.</li><li><strong>Redirect the mentee instead of giving solutions</strong>: You don’t just want to be a solution provider, otherwise you will always be needed.</li></ul><p>Learn IT, Girl is a really awesome program for women. Overall, it was an enriching experience to be a mentor as it’s easy to code yourself but tougher to make someone develop it. Also, I got a chance to connect with Mehak and we nailed it :p<br>So girls and guys, if you know any language and want to help someone learn it- you all can be mentors. Go for it!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=13322881c076" width="1" height="1" alt=""><hr><p><a href="https://medium.com/learn-it-girl/my-experience-with-mentoring-13322881c076">My Experience with Mentoring</a> was originally published in <a href="https://medium.com/learn-it-girl">Learn IT, Girl</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Display XML data on HTML page and highlight the search text]]></title>
            <link>https://codeburst.io/display-xml-data-on-html-page-and-highlight-the-search-text-cc1ce34c4147?source=rss-7b54024b224b------2</link>
            <guid isPermaLink="false">https://medium.com/p/cc1ce34c4147</guid>
            <category><![CDATA[prettyprint-xml]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[display-xml-in-html-div]]></category>
            <category><![CDATA[find-string]]></category>
            <category><![CDATA[highlight-text]]></category>
            <dc:creator><![CDATA[Jinal]]></dc:creator>
            <pubDate>Wed, 01 Aug 2018 06:12:35 GMT</pubDate>
            <atom:updated>2020-04-27T02:11:16.583Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x-KRwEhUo9YKwkGs0um5EA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@hishahadat?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Shahadat Rahman</a> on <a href="https://unsplash.com/s/photos/web-development?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>This is the second article in the series I’ve been writing to discuss interesting issues that I faced during my internship.</p><p>This post covers</p><ul><li><strong>Displaying indented XML data in an HTML </strong><strong>div <em>without any library</em></strong></li><li><strong>Adding ‘Find’ functionality and highlighting the searched text</strong></li></ul><p>And if you’re trying to achieve something similar and struggling with it, you’re at the right place! Let’s jump right into the FUN!</p><h3>The Problem</h3><p><strong>Requirement 1:</strong> <br>Let’s say we want to display the below XML as it is, in some UI component (modal, grid, div, etc.) and you’re receiving this XML from a REST back-end service (mine was in <strong>Java</strong>). This requirement is quite common in firms working with huge XML data and mine was one. We’ll do this <strong>without using any <em>pretty print </em>library on front-end side.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/435/1*LAXOGf6M-27hfUtYJnsf-w.png" /></figure><p>You might find this too easy and <em>it</em> <em>is — </em>there are many posts available on stackoverflow. But there’s a twist! I had an additional requirement which didn’t simply work with this (I’ll discuss about it in a while).<br>Since I’ve used <strong>Java</strong>, I’ll discuss back-end in Java but you can easily find similar classes in your server-side language as well.</p><h3>The Solution</h3><p>In order to simply display this XML in our UI, we can:</p><ul><li>Send formatted XML data as a string from Java service. I pretty-printed the XML string using <strong>XMLOutputter </strong>class in Java.</li><li>Let’s say you have XML data stored in a Document object. If you’ve it as a String, create a <strong>Document</strong>first using <strong>SAXBuilder</strong>. Below is the code snippet where we create formatted XML string to be sent as JSON to the UI, from raw XML string by first building a Documentobject :</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/659/1*q2qhzaAGncxNTnEekctMnQ.png" /><figcaption>Creating <strong>Document </strong>from XML string and then formatting it</figcaption></figure><ul><li>In our Angular code, we create a service which makes requests directly to the server using Angular’s Http module. In this service, we write a function getXml() which makes a call as this.http.get() and will return an Observable that wraps our XML string.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/789/1*npzJWzFA-vwkVUWhRCt_ag.png" /><figcaption>app.service.ts</figcaption></figure><ul><li>Next, in the corresponding Angular component, we need to call subscribe() on the observable returned by this.service.getXml() method. We inject an AppService instance into this component.<br>(I know this is all basic, but it doesn’t harm in discussing detailed steps) 🙈</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/490/1*ee_TICYdSnMotW7CH3g3hQ.png" /><figcaption>app.component.ts</figcaption></figure><ul><li>In the corresponding HTML file, I’ve created a div (you can have it as per your use-case) and in the CSS styles- add white-space: pre to the div along with other styles. <strong>This is must. </strong>See below:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/453/1*7dlN2ww_N9eyZXAysNFTig.png" /><figcaption>HTML template and CSS styles</figcaption></figure><p>And voila! We have it working!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/517/1*SPwfd21v4VBqYiJv_t2SsA.png" /><figcaption>Displaying indented XML data in webapp</figcaption></figure><p>So far so good. But here comes the <strong>twist</strong>!</p><h3>Problem Extended</h3><p><strong>Requirement 2:<br></strong>Apart from displaying the XML in a modal, my requirement was to provide a <strong>‘Find’ functionality</strong> where user searched for any string and it should be <strong>highlighted on the screen</strong>(a very common use-case again). <br>This can be done using <strong><em>Angular pipes.</em></strong></p><blockquote>Angular pipes take in data as input, transform it to a desired output and shows it to users. They can be used in any template(HTML).</blockquote><p>As before, there are many <a href="https://stackoverflow.com/questions/44961759/highlight-the-search-text-angular-2">posts available</a> online but I had to combine these two requirements into my project — display prettified XML and enable pattern searching for the same.<br>Before discussing the solution, one important thing- Highlighting the searched text means searching for the input string in the XML string and changing its background to be yellow(or anything else) in corresponding HTML. <strong>We intend to modify the HTML of the </strong><strong>div containing the XML and thus, simply doing </strong><strong>&lt;div&gt;{{xmlString}}&lt;/div&gt; won’t work. Because even if we surrounded searched string in </strong><strong>xmlString with </strong><strong>&lt;mark&gt;tags, the modified string would be rendered as it is with HTML tags in it. And thus we require </strong><strong>innerHTML property of the </strong><strong>div!</strong></p><p>Let’s try. We add ‘find’ feature as follows:</p><ul><li>Create a <strong>HighlightSearch pipe</strong> where we perform Regex search and replace matched strings with &lt;mark&gt; tags around them. Here is the HighlightSearch pipe:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/769/1*drJcoZhpKK8VQW9hE4DRCg.png" /><figcaption>highlightSearch.ts</figcaption></figure><ul><li>Apply this pipe to the xmlString in the component’s template. We take searchQuery string as input from the user and bind it two-way using ngModel. Don’t forget to initialize searchQuery to an empty string.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/741/1*JzH5r7PYjZjUje3KWHETmg.png" /><figcaption>app.component.ts</figcaption></figure><p>Let’s view the output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*0yncqL-qHAqMn0QaKKJPDQ.png" /><figcaption>Demo of search and highlight feature</figcaption></figure><p>Weird, isn’t it? 😞<br>Where are the XML tags? All we see are the values inside them.<br>And when we type in the search query, some of the original XML which might have this pattern is highlighted(which is again, weird!)</p><h3>Why is this happening?</h3><p>Notice the Console output in the Developer Tools.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*6hpSdyRAT25njGNZ9J6Wjw.png" /><figcaption>Angular’s way of preventing cross-site scripting (XSS)</figcaption></figure><p>We can’t see XML data because <strong>Angular recognizes it as malicious code injected into DOM</strong>. Read more about Angular’s built-in protections against <strong>cross-site scripting (XSS)</strong> <a href="https://angular.io/guide/security#xss">here</a>.<br>If you search about this warning, many posts suggest to use DomSanitizer to bypass security. And I tried that too.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/729/1*HervV_iR7uOfQ57AaSf8BQ.png" /><figcaption>Using DomSanitizer in highlightSearch.ts</figcaption></figure><p>Here is the result:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*d85e6DXEHv2PAnGmc2CDrg.png" /></figure><p>Didn’t work! 😞 <br>XML data is shown correctly when it loads, but on searching it shows weird behavior again. Trust me, I played <strong><em>a lot</em></strong> and tried everything I could but nothing seemed to work.<br>After a lot of efforts, I came across a way out which satisfied both of my requirements (displaying proper XML &amp; using innerHTML) !</p><h3>Best of Both Worlds!</h3><p>Now, there’s no way Angular lets us bypass security and display correct XML when passed in innerHTML attribute. And without innerHTML, we can’t modify the HTML of the div(as explained above)based on search results.<br><strong>If somehow we could pass the string containing hidden XML to </strong><strong>innerHTML attribute such that Angular wouldn’t know it has markup, </strong>then we’re done!</p><p>This can be achieved by <strong>escaping XML characters in the String. </strong>So we pass escaped xmlString to the div,browser recognizes it as XML characters and displays it correctly. This can be done in either front-end or back-end and can be done in various ways. Here are a few ways it is done at server-side:</p><ul><li>Straight up Java (replacing each XML character)</li><li>Google Guava XMLEscapers</li><li>Apache Commons StringEscapeUtils</li></ul><p>I used <strong>Apache Commons StringEscapeUtils class. </strong>Super easy it is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/657/1*G3BaiHTTwXkBSRyS69UgMA.png" /><figcaption>Using <strong>StringEscapeUtils </strong>to escape XML</figcaption></figure><p>And here it is! Working just the way we want it to be😄</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/423/1*_SOJQtFmPA3gl16qal8QOQ.png" /><figcaption>It works!!</figcaption></figure><p>Wohoo! One more problem solved. <br>Development can be both frustrating and fun at times. <strong>The secret is to Never Quit and get it done!<br></strong>Hope this helped :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cc1ce34c4147" width="1" height="1" alt=""><hr><p><a href="https://codeburst.io/display-xml-data-on-html-page-and-highlight-the-search-text-cc1ce34c4147">Display XML data on HTML page and highlight the search text</a> was originally published in <a href="https://codeburst.io/">codeburst</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lost “this”? Bind it in JavaScript!]]></title>
            <link>https://codeburst.io/lost-this-bind-it-in-javascript-6052e282fcde?source=rss-7b54024b224b------2</link>
            <guid isPermaLink="false">https://medium.com/p/6052e282fcde</guid>
            <category><![CDATA[undefined]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[cannot-read-property]]></category>
            <category><![CDATA[context-binding]]></category>
            <dc:creator><![CDATA[Jinal]]></dc:creator>
            <pubDate>Fri, 20 Jul 2018 13:09:38 GMT</pubDate>
            <atom:updated>2020-04-27T02:11:24.187Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*820daPdIGJQYgy_wE2QWWg.jpeg" /></figure><p>We use <em>this</em> keyword a lot in our JS code, yet it remains one of the most misunderstood concepts of JavaScript. We tend to forget what scope we’re in and what we have access to. Ever found the error “<strong>Cannot read property ‘x’ of undefined</strong>” and kept wondering why so, in spite of initializing all variables (if not, do that first :p) properly? In this article, we will discuss how to prevent this error using the <strong>bind function</strong>.</p><p>As a part of my internship recently, I worked heavily on Angular 5 and TypeScript (hence JavaScript) and came across various issues. Being a newbie to JavaScript, battling my way through them, and finding colleagues encounter similar issues quite often, I decided to write this series so as to help you save your time if you’re facing similar errors :)</p><h3>The Problem</h3><p>We use Closures almost anywhere in our code. <br>Let’s say we have an array of objects containing products- each having name and price. Now we want to log each product using a forEachloop as shown.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*AK1PyYNdCnNzyEQtk39CZA.png" /></figure><p>Of course, you might want to do much complex stuff with each entry of the array, or even define a custom Comparator for the sort function; rather than merely logging the entries. Inside the callback function of forEach, if we try to access any of the properties of Component class(which seems absolutely normal), this is what happens:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/514/1*1xlURW_5tFCRqf43tm4mbQ.png" /></figure><p>That’s because the<em>this</em>in theforEachcallback is not pointing to the <em>AppComponent</em> scope but to a newly created scope.</p><h3>The Solution</h3><p>Here’s the trick!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/747/1*_AilCNLPZo-abf3t0jBDBg.png" /><figcaption>Using function.<strong><em>bind</em></strong>( )</figcaption></figure><p>Notice the binding at the end of the closure’s definition. We need to pass the required value of thethisparameter to the target anonymous callback function. This is where<strong>bind()</strong>method comes in picture.</p><p>The<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_objects/Function/bind"><strong>bind(</strong></a><strong>)</strong>method creates a new <strong>bound </strong>function that, when called, has itsthiskeyword set to the provided value.</p><pre><em>function</em>.bind(thisArg[, arg1[, arg2[, ...]]])</pre><p><strong>thisArg</strong>is the value to be passed as thethisparameter to the target <em>function </em>when the bound function is called.<br> <strong>arg1, arg2, …</strong>are the arguments to prepend to arguments provided to the bound function when invoking the target function. These arguments (if any) are then inserted at the start of the arguments passed to the target function, followed by the arguments passed to the bound function.<br>Confused? Let’s start from the basics.</p><h3>Diving Deep</h3><ul><li><strong>Scope: </strong>Scope determines the accessibility (visibility) of variables. JavaScript has function scope: Each function creates a new scope.</li><li><a href="https://developer.mozilla.org/en/docs/Web/JavaScript/Closures"><strong>Closure</strong></a><strong>: </strong>A closure is the combination of a function bundled together (enclosed) with references to its surrounding state (the lexical environment). It is an inner function that has access to the outer function’s variables.</li></ul><p>I have used JavaScript in an Angular app, so this refers to the scope of the AppComponent (unlikewindowobject in a pure JS application). <br>If we runconsole.log(this)anywhere inside the above Component (constructor,ngOnInit,etc.), it logs the AppComponent object.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/384/1*GJ2PBx-cOglCtENu7IVJUw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/667/1*a5VbuF0auH2RHO4ftAQbBA.png" /><figcaption>Output on doing<strong> console.log(this)</strong> inside the constructor of AppComponent</figcaption></figure><p>Now if we run the same inside the callback function inforEachloop, thisrefers to the newly created scope (which is undefined).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*mMnw6ILacYE-_K7e3a4UMA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/726/1*0Z2t1Eb-YABejnGEkHGv4w.png" /><figcaption>Output on doing<strong> console.log(this)</strong> inside the closure</figcaption></figure><p>Thus, when we do<em>function</em>.bind(this), we bind the required context to the target function so that it can be used inside it. We need to do <strong>context binding </strong>only when we require access to component’s variables (in case of Angular app) inside closures.</p><h3>Alternatives</h3><p>This use-case is quite common and there are various ways to make <em>this</em>work!</p><ol><li><strong>Setting value of </strong><strong><em>this </em>outside the closure<br></strong>We can set the variable this in any variable outside the anonymous callback function and then use it inside.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*BHibKAYT1IAnYpiG1q_QmA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/459/1*LTCjqcgMq2kTHkFcwMQJAg.png" /><figcaption>And this works!</figcaption></figure><p>But it gets messy and fills the code with needless definitions of variables like <em>self</em> or <em>that</em>.</p><p>2. <strong>Arrow Functions<br></strong>Instead of using <a href="https://gist.github.com/ericelliott/414be9be82128443f6df">anonymous lambda function</a>, we can use an <a href="https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Functions/Arrow_functions">arrow function</a>. An <strong>arrow function expression</strong> does not have its own this. Two factors influenced the introduction of arrow functions: shorter functions and non-binding of this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/749/1*VlkIaG2K2FuWIxWQ6dbdKA.png" /><figcaption>Using arrow function instead</figcaption></figure><p>Wohoo! Now you have the bug understood and solved.</p><p>Hope this helped you! If yes, smile and pass it on! :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6052e282fcde" width="1" height="1" alt=""><hr><p><a href="https://codeburst.io/lost-this-bind-it-in-javascript-6052e282fcde">Lost “this”? Bind it in JavaScript!</a> was originally published in <a href="https://codeburst.io/">codeburst</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My Google APAC Women Techmakers Scholarship Experience]]></title>
            <link>https://medium.com/jinal-parikh/my-google-apac-women-techmakers-scholarship-experience-52ab156474f5?source=rss-7b54024b224b------2</link>
            <guid isPermaLink="false">https://medium.com/p/52ab156474f5</guid>
            <category><![CDATA[google]]></category>
            <category><![CDATA[women-in-tech]]></category>
            <category><![CDATA[women-techmakers]]></category>
            <category><![CDATA[scholarship]]></category>
            <dc:creator><![CDATA[Jinal]]></dc:creator>
            <pubDate>Sat, 23 Sep 2017 11:39:28 GMT</pubDate>
            <atom:updated>2017-09-23T13:56:23.075Z</atom:updated>
            <content:encoded><![CDATA[<p>Many people have been asking me about my Google WTM retreat event experience, which motivated me to complete this blog post. I hope this post inspires every woman who reads this to apply for this awesome opportunity and become role models for other women in tech.</p><h3>What is it about ?</h3><p>Through the Women Techmakers Scholars Program — formerly the Google Anita Borg Memorial Scholarship Program — Google is furthering Dr. Anita Borg’s vision of creating gender equality in the field of computer science by encouraging women to excel in computing and technology and become active leaders and role models in the field. This program consists of 3 elements: An academic <strong>scholarship</strong> awarded based on academic performance and leadership skills, the <strong>retreat</strong> (yayy! :D) and a <strong>Community </strong>which promises to support the global community of women in tech and collaborate on projects to make continued impact.</p><h3>How did I apply?</h3><p>The first question is: how did I come across this opportunity?</p><p>Two years back when one of my seniors had received this scholarship and I had seen her really tempting retreat pictures at Google office, that was when I made up my mind to apply for it! I realized I needed a stronger resume and more outreach activities to be done in order to display my leadership skills and passion. Keeping this dream alive (yes, of visiting the Google office :p), I worked in the planned direction for the next 2 years, utilizing every opportunity that came my way.</p><p>And, this summer (May 2017), I received a mail from Google Tech University Relations about applications being opened for this scholarship program. Application process involves answering some essay questions. These aim at showing your passion in computer science, difficulties you faced as a woman and things you have done so far to promote women in tech. I was too caught up with my Summer Internship (since it was the first week) and managed to take some time out in the nights to prepare the essays; finally submitted it! After that I almost forgot about it all.</p><p>Later, in July, I received an email saying I’ve been shortlisted for the interviews, scheduled a week later. I was so much involved in preparing for my conversion interview at my Internship, that it took me a while to figure out what exactly this was for. The first thing I did was to scream out with joy sitting at my work desk (my teammate staring at me obviously!) and call my mother giving her the news!</p><h3>The Interview</h3><p>I did some preparation a day before the interview since I didn’t have much time. I talked with my senior friend to know more about the interview process and she was super helpful. So, I re-read the essay answers that I had submitted, prepared a small talk on my outreach ideas, went through my resume and each project in detail. Also, I recollected the challenges faced with each of my projects, internships and team activities done and noted them down. Having a clear idea of what you’re going to say in the interview always helps, instead of saying random things in a haphazard manner.</p><p>The interview turned out to be quite different than what I had thought of. First I was asked about my technical projects, focusing more on how I had handled them, then about the outreach activities I had done to encourage more women in technology and finally about my ideas on the current representation of women in tech, and why is it so. The only trick to rock it is to <strong>be genuine</strong>. Since it is <em>you </em>who has done it, explaining it shouldn’t be much of a problem. It was more of a discussion and took around 45 minutes.</p><h3>Retreat @ Google Seoul Office, South Korea !!</h3><p>It was the night of 18th July when I received an email from the WTM Scholars Program Team, congratulating me for the selection. I rushed to my parents, bustling with joy and told them that I was one of the recipients of this scholarship from all over Asia-Pacific, and would get to go Seoul !!(my first foreign trip, all alone :D)</p><p>Our retreat was around August end, 2017. Google had made great arrangements for us and I was really impressed by the team’s organisational skills. First there was the allure of Seoul and then, our stay at the Grand Intercontinental Seoul Parnas, both were charismatic. Since we were assigned roommate from a different country, my roomie was from Japan.</p><p>The retreat kicked off with the welcome dinner on 29th August. We had delicious food (though, vegetarians got only salads), first of the chats with co-scholars and then the awesome karaoke! My table and I performed the classic “My Heart will go on” and we had lots of fun. :D</p><p>Next 3 days were packed with different kinds of sessions and we (the Googlers and us) followed a pre-planned agenda (with not even a minute of delay). Each day started with the breakfast at Google office and the Energiser, where we were taught some amazing K-pop moves. There were sessions on Open House discussions (where scholars shared their stories of success and tales of fails), bias busting, CS Unplugged (my fav one), former scholars panel, making outreach plans, learning about Google APAC projects and culture, Building Your Brand workshop, CodeJam Kickstart, Interview &amp; Resume workshop and the last one — Seoul Searching, in which we did a scavenger hunt all around the Seoul! So, we had sessions planned in a way that brought us closer to the scholars and Googlers in our team.</p><p>It all ended with the closing talk by Dan, which was so inspirational and moving that it brought some of us to tears. I still remember his last words: “I am selfish and we want all of you back, some day!”</p><h3>What I brought back</h3><p>I had the best 3 days of my life! The retreat event provided me with a clearer road map for my future endeavors to empower more women in computing. For me, it was not about <em>what I did there, </em>it was more about <em>whom I met there.</em></p><p>I bring back — tons of memories, inspiration, the joy of knowing these awesome people, new friends..and not to forget, “Google” goodies and I feel a lot more powerful ! This event gave me an opportunity to meet fellow scholars from different parts of the world — each with their own struggles, different technological backgrounds (it was overwhelming to meet women in research), impostor syndrome, yet united by the vision of fighting gender biases to help others realize their dreams. It was a privilege meeting a lot of Googlers from different offices, talking closely about their life journeys and learning from them.</p><p>Today I have my own support network consisting of enthusiastic Google engineers, mentors, inspiring co-scholars working in CS and former scholars from all over the world who constantly make me realize- that I’ve still a long way to go and a lot to learn and do, to succeed in my initiatives.</p><h3>Final Thoughts</h3><p>It’s not about getting a chance, it’s about taking a chance! So, if you’re a passionate woman with Anita Borg’s vision of including more women in tech and if you have your story of persistence, then go ahead and apply for this once in a lifetime opportunity :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*763skaO2rm-Q7SIZ3S9iLA.jpeg" /><figcaption>The swags !!</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*utuiqAaTppWxaq0MyCnU9A.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ovdW-nx5tqIVEQfKqWfLlA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*xhBz_2Sgpuo0QVimai8R8g.jpeg" /><figcaption>The one with Google!</figcaption></figure><p>P.S : I know that all we scholars are gonna say “Kimchi” instead of “Cheese” while posing for a pic, in memory of the time spent at Soulful Seoul ❤️</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=52ab156474f5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/jinal-parikh/my-google-apac-women-techmakers-scholarship-experience-52ab156474f5">My Google APAC Women Techmakers Scholarship Experience</a> was originally published in <a href="https://medium.com/jinal-parikh">Jinal Parikh</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>