<?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 Ing on Medium]]></title>
        <description><![CDATA[Stories by Ing on Medium]]></description>
        <link>https://medium.com/@ryuing?source=rss-10f4e7816da5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*qchz8VlGOVNk-fhSSZgEMA@2x.jpeg</url>
            <title>Stories by Ing on Medium</title>
            <link>https://medium.com/@ryuing?source=rss-10f4e7816da5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 00:17:00 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ryuing/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[I Am a New Engineer in Silicon Valley]]></title>
            <link>https://ryuing.medium.com/i-am-a-new-engineer-in-silicon-valley-99853454ca70?source=rss-10f4e7816da5------2</link>
            <guid isPermaLink="false">https://medium.com/p/99853454ca70</guid>
            <category><![CDATA[essay]]></category>
            <category><![CDATA[engineer]]></category>
            <category><![CDATA[silicon-valley]]></category>
            <category><![CDATA[software-engineer]]></category>
            <dc:creator><![CDATA[Ing]]></dc:creator>
            <pubDate>Tue, 21 May 2024 03:56:41 GMT</pubDate>
            <atom:updated>2024-05-21T03:56:41.029Z</atom:updated>
            <content:encoded><![CDATA[<h3>When Will I Get Used to All These New Things?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WnjdeHyG2ALTFXBSBG5ghw.jpeg" /></figure><p>After working for six years as a developer at major corporation N, a startup with about 20 employees, and game company K in Korea, I suddenly found myself moving to the United States. Arriving with dreams of the American Dream, I quickly realized that the US was a cold place. I submitted over 180 resumes but only 15 companies showed any interest in me, and I received an offer from just one. Finding a job within three months is considered a success in the US, given the current market situation. My turbulent time as an unemployed developer in the US finally ended when, after five months, I became a developer at a Silicon Valley company.</p><p>I expected to enjoy a leisurely last bit of free time before starting at my dream company, but it was shorter than I thought. After completing a background check, visiting Korea, and thanking those who helped me, I had only two weeks left before starting my new job. I hurriedly entered the address to receive my laptop and welcome kit (called swag), and finally received them the Friday before starting. I was more excited about the swag than the laptop but was amazed by the high-spec laptop I had never received in Korea. However, the swag was pretty ordinary. The onboarding guide and company values booklet included were interesting. I had expected company-logoed T-shirts and such but perhaps I have to buy those myself.</p><p>This company is fully remote, so I don’t need to move alone to San Francisco, away from my family and home in Colorado. However, I still wanted to visit the main office, get my employee badge, and prove I am part of the company with pride. When I asked the recruiter if orientation was at the office, they said, “No, just join the online orientation from home on your first day!” If I want to visit the office, it’s on my own dime. Also, there’s no employee badge!</p><p>Remote onboarding is more challenging than I thought. Although I experienced full remote work during the height of COVID, this is my first time onboarding remotely. I like to bond with my teammates over meals and chats during onboarding, but it’s hard to do that online. I usually pick up on what others are doing by observing and eavesdropping, but I can’t use my senses and intuition here. Most importantly, it doesn’t feel like I’m actually going to work. The first day at a new office is supposed to be an exciting event, but it was just waking up earlier and turning on the company-provided laptop.</p><p>I hadn’t worked for five months, living a routine of studying and sleeping whenever I wanted. I became so accustomed to this unemployed (though I prefer to say job-seeking) routine that sitting at a desk for eight hours, five days a week, felt strange. Despite my six years of work routine, I became a novice in just five months. On the other hand, having an end to my workday is delightful. While job hunting, there was constant pressure to keep doing something, but now I can rest fully during non-working hours. I don’t know how long this life with a clear end to the workday will last, but I enjoy it.</p><p>The company offers many training programs. Although I worked at a large corporation in Korea, I never experienced official company-wide orientations since I wasn’t hired through a public recruitment process. There are many diverse sessions, even on technologies I’m not directly involved with. Some sessions are well-prepared, while others are not. Some presenters handle large groups well, while others sound nervous. Seeing even seasoned speakers get nervous and unprepared makes me feel it’s okay if I stumble a bit too.</p><p>The company does a lot of 1:1 meetings. It seems many Silicon Valley companies do this, especially since we work remotely. My team manager assigned me a buddy, and we have 1:1s twice a week for 30 minutes. I also have a weekly 1:1 with my manager. Other team members’ calendars are filled with regular 1:1s, both within the team and with other departments. These 1:1s are very helpful for onboarding, allowing me to ask questions freely. Having designated time to ask questions makes it easier to address even minor concerns.</p><p>My first task was to have 1:1s with team members. The first week was busy with training and adaptation, so I didn’t schedule with anyone besides my buddy and manager. By the second week, I started feeling more comfortable and began scheduling 1:1s with other team members, despite my hesitation due to language barriers. Speaking casually in English is challenging, as I want to make a good impression and lead the conversation well. I realized preparing topics in advance made subsequent 1:1s smoother.</p><p>Using English at work is different from interviews. I struggle with listening because I’m unfamiliar with the company’s terminology. I hope it gets easier as I become more familiar with the terms. There are non-native English speakers in the team, so the overall pace and difficulty of English aren’t too bad. Reading is manageable, though I use translation tools more often to ensure accuracy. Casual writing styles of team members are also unfamiliar. I noticed many skip articles like ‘a’ or ‘the’. Forming questions is harder than I expected. Americans often ask questions indirectly, but my English isn’t fluent enough for that. While speaking quickly, my word order often gets jumbled. I need to study English more diligently.</p><p>I set a goal to ask many questions in the first two weeks, not only to my buddy and manager but also to other team members and those from other teams. I wanted to show that I was actively engaged in onboarding. Asking questions also helps understand the team’s history. When new members join my team, I always ask them to spot errors or inconveniences with fresh eyes. I believe in leveraging the initial period of fresh perspective for improvement. Hence, I reported a UI error in a service channel and created my first bug ticket in the first week. I also spotted buggy code in PRs and left my first comments. In the second week, I continued leaving PR comments and shared improvement ideas with my manager. Hearing about a new member joining next month, I suggested documenting my gathered information for them. My manager appreciated this, and we decided to organize onboarding notes together for future newcomers. I have my first personal project now.</p><p>Team members advise asking many questions during onboarding and not stressing about work yet. However, I feel impatient to take on tasks and prove my abilities quickly. I worry my imperfect English might make me seem unprofessional. Showing my skills through coding would be more impactful. Fortunately, I received a small task and am eager to start coding to demonstrate my skills. I want to join more projects to learn quickly. While American companies are said to be more relaxed than Asian ones, my mind is still accustomed to a hardworking culture. Completing even one task might ease my anxiety. Next week, I hope to gain confidence through my task, get used to working eight-hour days, and continue speaking English despite any embarrassment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=99853454ca70" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[An Unemployed Immigrant Developer in US — 01.19.24 Merry-go-round]]></title>
            <link>https://ryuing.medium.com/an-unemployed-immigrant-developer-in-us-01-19-24-merry-go-round-45178b321c1d?source=rss-10f4e7816da5------2</link>
            <guid isPermaLink="false">https://medium.com/p/45178b321c1d</guid>
            <category><![CDATA[software-engineer]]></category>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[immigrants]]></category>
            <category><![CDATA[essay]]></category>
            <category><![CDATA[careers]]></category>
            <dc:creator><![CDATA[Ing]]></dc:creator>
            <pubDate>Sat, 20 Jan 2024 07:02:33 GMT</pubDate>
            <atom:updated>2024-01-20T07:02:33.513Z</atom:updated>
            <content:encoded><![CDATA[<h3>An Unemployed Immigrant Developer in US — 01.19.24 Merry-go-round</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tXipEdzPfU3-AO4U1wImyQ.jpeg" /><figcaption>I was kicked out from Google meet</figcaption></figure><p>Today’s entry is less about my usual diary musings and more about logging events, perhaps even a retrospective:</p><p>#1<br>During the cold weekend, I’ve been reading a book on system design interviews and it’s surprisingly fun. It covers things I used to use at work, like Load Balancers, Master-Slave DBs, RDB &amp; NoSQL, CDNs, Data Centers, etc. It’s enjoyable to follow step-by-step and think, “Ah, so that’s how it works.” It also reminds me of what I studied in school — OS, Architecture, Network, etc.</p><p>#2<br>I’ve been consistently solving algorithm problems. I try to do at least one or two a day. Looking at people around me who have found jobs, they seem to have solved way more than I thought. As a former job-seeker, I need to solve more. <br>2.1. Leetcode has improved a lot compared to the old days when I first prepared for interviews. Now I don’t have to wander around looking for good problems. They’ve gathered all the good ones for me!</p><p>#3<br>I had a phone screening. I didn’t realize it was going to be a screening; I thought it was just a casual coffee chat based on the email saying, Nope. It seemed my interviewer was tired from work, neither friendly nor pressuring, just no reaction. Maybe because of the recruiter’s stiffness or the unexpected serious questions, my responses weren’t quite satisfactory.</p><p>3.1. For the record, here are some questions I was asked: <br>3.1.1. Why did you apply? <br>3.1.2. Can you tell me about your recent career? — I thought they only meant my last job, but they wanted my entire career history. <br>3.1.3. Can you talk about a significant impact you’ve made? <br>3.1.4. What are your future career goals? — This seems the hardest.</p><p>3.2. And some other questions that came up — Do you need visa support? What’s your status? Are you okay with working in the office five days a week?</p><p>#4<br>The day after the phone screening, I received an apologetic response. The recruiter had sent me a LinkedIn connect request after the interview, but I guess it didn’t matter. I had asked if “startups usually find visa support burdensome,” but I guess they won’t answer that.</p><p>#5<br>The phone screening made me realize I need to prepare more. I’m usually play it in ears, so preparing scripts makes me stutter more. I hadn’t prepared expected answers for behavior questions before, but now I think I need to. I wrote down expected answers in Korean, translated them into English using GPT, and practiced with QuickTime Player like an interview role-play. But it was harder to respond when I prepared. Now, I’m writing expected answers in English myself and practicing speaking in a way that feels natural to me. And above all, I need to get more comfortable with English interviews.</p><p>*<br>It feels like I’m just writing my usual diary, even though I’m numbering these points.</p><p>#6<br>I sent my available times for a phone interview with Company A, but they were fully booked, so it got postponed by a week. Thankfully. It seems like the phone interview will also be a behavioral question interview. Now I have some time to practice.</p><p>#7<br>I had an online coffee chat with someone who contacted me through LinkedIn. They had started studying programming after taking a break from work in the US and found a job, but sadly, their whole team was laid off. They gave me a lot of encouragement, saying there are many opportunities here. I also cheered them on, saying they will surely find another good opportunity since they’ve already made the first step. I feel like I received more than I gave… If they happen to read this, I want to say that with their courage, they can do anything.</p><p>#8<br>I also had an offline coffee chat with someone I contacted. In my area, Asians are rare, but I happened to find a Korean, a peer, a developer, and someone working at Company A, which I applied to. I reached out to make a developer friend in the neighborhood, and they happily accepted my request for an offline coffee chat. We talked about everything — from our neighborhood to a Sundae Guk-bab restaurant far away, and about the local A office. I also heard about layoffs. Although not directly affected, they’ve been unable to settle down due to the ongoing layoff atmosphere since last year. Hearing these layoff stories makes me realize I’m really in the US. <br>8.1. Interestingly, they were surprised by my proactive approach to contact people. I had been thinking, “I’ll beat it when I go!” even before coming to the US and hoped it might attract some attention. I’m a bit less assertive than I planned, but I’ll keep it up since everyone says I’m doing well. <br>8.2. Before coming to the US, I thought about sliding my resume under company doors, attaching my phone number to utility poles for people to take, and even uploading my journey on YouTube. I gave up the first two ideas after getting lukewarm responses when I asked a few people, and I’m still just thinking about YouTube. It requires more time than I expected, and I haven’t had the mental space yet.</p><p>#9<br>Ah! I received a referral. I applied for several positions at Company M but didn’t seem to be getting any attention, so I decided to seek a referral. I remembered an M company engineer who had sent me a connect request after reading my post. It was my first time asking for a referral, so I just sent a message. I got a reply on Martin Luther King Jr. Day, and they happily agreed to refer me. Yay! I’m really happy it worked out so easily. I’m glad I’m writing this job diary. It’s a referral milestone!</p><p>#10<br>I had another phone screening yesterday, but the recruiter stood me up. After the Tuesday screening, I went in with determination and nerves, hoping to apply what I had practiced, but the recruiter never showed up for the 30-minute meeting. I learned that if the host doesn’t join within about 15 minutes, Google Meet kicks you out. Fortunately, a few hours later, I received an email from the recruiter apologizing and saying it was an extraordinary situation and not typical. I said I understood, but who’s going to compensate for my chilled heart? Well, I found and connected with a Korean working at that company on LinkedIn. It’s okay. (Honestly, I thought maybe the recruiter got laid off or the position was canceled. Thankfully, that wasn’t the case.)</p><p>#11<br>I’ve been applying for new jobs daily, but there’s almost nowhere new to apply. It’s inevitable. So far, I’ve been applying to accumulated positions, and now that the year-end and new year have passed, it’s time for fewer new postings. But my heart is still anxious. Since last week, I haven’t started any new interview processes. I wish I’d at least get emails saying I was rejected; it’s almost like everything has stopped. I know it’s not true, but I worry if the opportunities I have now are all I have left. What if I fail in all of them? Will new chances arise? I tend to mess up more when I’m desperate, so I hope I don’t become more desperate. Days without updates bring back trauma. Moments when I was too desperate, tried too hard, got nervous, and my mind went blank. It’s been less than a month, but it feels weak to be saying this, yet I wish any job would just fall to me.</p><p>#12<br>I have a mock interview with a Korean engineer from Company I, which I applied to, in a little while. With people like this willing to help me, I need to keep going. And I will. More opportunities will come. The time will come. <br>12.1. I just finished the mock interview. I heard many helpful things, the most empowering being that they recognized my challenge. <br>12.2. Every day is a new failure. Honestly, I’m not used to failing in resumes or interviews. What should I do first? Wasn’t everything supposed to just work out? I’m not sure where to start. <br>12.3. I really left everything behind. A good university, a good career, a good network. I was prepared, but it’s really not easy. <br>12.4. It may sound weak, but to me, it’s a real challenge. And there are people who recognize that.</p><p>#0<br>Back to zero, I’ll do well. I’ll overcome. When I do, I’ll be a truly amazing person. And then, I’ll give courage to others.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=45178b321c1d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[An Unemployed Immigrant Developer in US — Enjoy it]]></title>
            <link>https://ryuing.medium.com/an-unemployed-immigrant-developer-in-us-enjoy-it-446f5e97bea6?source=rss-10f4e7816da5------2</link>
            <guid isPermaLink="false">https://medium.com/p/446f5e97bea6</guid>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[careers]]></category>
            <category><![CDATA[software-engineer]]></category>
            <category><![CDATA[essay]]></category>
            <category><![CDATA[immigrants]]></category>
            <dc:creator><![CDATA[Ing]]></dc:creator>
            <pubDate>Sat, 20 Jan 2024 06:17:47 GMT</pubDate>
            <atom:updated>2024-01-20T06:19:49.625Z</atom:updated>
            <content:encoded><![CDATA[<h3>An Unemployed Immigrant Developer in US — 01.15.24 Enjoy it anyway</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CcNNGysb_8EGHto4bQKGJg.jpeg" /></figure><p>It’s 11 PM now, and the temperature outside is 0°F. For the past few days, we’ve been experiencing a sudden cold, with temperatures dropping to as low as -11°F. The place where I live is in a high-altitude area at 1 mile above sea level, which probably explains the unusual weather. It’s an interesting place where the temperature, cold until Tuesday, suddenly rises to a high of 10°C. Yesterday, it snowed all night, making it look like a winter wonderland.</p><p>I want to talk about where I live, but since my last diary entry on Thursday, so many things have happened, I’ll have to postpone talking about my area for another time. And happily so.</p><p>On Thursday, I actually overturned the resume I had bragged about in my last diary entry. I had the chance to receive resume feedback from someone I respect. Contrary to my self-confidence, the feedback was that it wasn’t clear what work I had done or what skills I possessed. So, I decided to rewrite my resume and looked up resumes of other Silicon Valley developers on LinkedIn. Unlike the ‘clean-looking resume’ I aimed for last time using a Figma template, other developers’ resumes were packed to the brim, almost eliminating margins on the pages.</p><p>Watching a YouTube video by Keeyong Han on resume writing, he said, “First, you need to pass the screening test. Put everything in.” Wondering if this was why my applications were often rejected, I added a skills section to my new resume and filled it generously, like adding search tags to a merchandise.</p><p>With the help of the purchased GPT-4, I was able to rewrite my resume relatively quickly and continued my daily job applications. — GPT-4, which I didn’t use when my previous company offered to pay for it, now seems incredibly smart and a bit slow, maybe because it’s so intelligent…</p><p>The first company I applied to with the new resume was Company-I, and I immediately received an email to take an online test. Maybe the new resume is working? Starting with Company-I, I received interview invitations from two promising startups on the 12th. Although both were places where I had submitted the old version of my resume, I was really happy that more companies showed interest in my profile in just two short days. Through a connection I made during my job search in the US, I also got a referral to another company, and the experience of sending a direct email to the hiring manager was thrilling. It’s embarrassing how worried I was about not getting any responses, as I’m now reaping more than I expected. Although I haven’t secured a final offer yet, I’m even contemplating which company to choose among those that contacted me. I’ll enjoy this happiness for now.</p><p>There were other interesting events besides good news. On Friday the 12th, I had my first on-site coffee chat in English. It was with a company I had applied to while in Korea, which had then responded to proceed with the interview process. However, they couldn’t proceed at the time as they urgently needed someone for the position. After arriving in the US, I sent a New Year’s greeting and asked, “I’m finally in the US! Are you still hiring?” They responded that they were hiring one more person for that position and suggested a coffee chat if I was interested. Even as a self-proclaimed coffee chat expert, I was worried about an hour-long chat in English and used my former company’s English lesson benefit, Ringle, to get tips from American friends.</p><p>As the coffee chat approached, I wrote self-introductions in English, muttered what I wanted to say in English, but my stomach ached from growing nervousness. The lack of floor heating in American houses meant my hands and feet grew cold even with the heater on. To calm my nerves, I talked to myself: “How many coffee chats have you done? Right? You had three or four meetings a day during your last job change, mixing on-site, phone, and Zoom meetings! Think of the variety of people you’ve met, from recruiters and developers to CEOs! You know you can do in coffee chats!!” — I’ve written a toned-down version here…</p><p>With trembling heart, I watched So-ra Lee’s EO video on YouTube. I thought to myself, “I will go, show off, and come back. What’s the big deal with English!” I headed to the office fully charged. Although the office was not far from my home, unfortunately, the poor public transportation in this area meant I had to take a bus that runs only once an hour, so I arrived 40 minutes early for my appointment. It turned out to be a blessing in disguise. Rushing around, I hardly had time to be nervous before meeting my coffee chat partner.</p><p>We greeted each other and were led to a small room in a co-working space. The company, a startup setting up a product team in this area with its headquarters elsewhere, had me meeting with L, the Product Engineering Lead. As soon as I sat down, L asked me to start with any questions I had. …So suddenly. I was a bit taken aback as coffee chats I’ve experienced usually started with the other person talking first, but I asked what I was genuinely curious about. After responding to my questions, L began asking me. Some questions were on topics I had a lot to say about, so my answers were lengthy.</p><p>Even though I had a lot to say and kept talking, I noticed my speech slowing down at times, being aware of using the wrong tense or singular/plural, and doubting my word choice, but I continued with what I wanted to say. L listened attentively, making eye contact and reactions like “You’re right,” “Understand,” which helped me speak comfortably. After an hour of full conversation, I asked L my last question: “I’ve had many coffee chats in Korea, but this is my first in English. How was this chat, and what impression did I make?” L said he understood everything I said, and he shared what he could understand about me and what was still unclear from this chat.</p><p>Rushing to catch the hourly bus back home, I felt so good. I really did it. I talked non-stop for an hour. I felt proud of completing my first work-related English experience. Language barrier was my biggest worry coming to the US, but it turned out to be less of an issue than I thought. Of course, there’s room for improvement, but we had a serious conversation, and it was sufficiently professional.</p><p>Along with pride in myself, I felt grateful to L for gently guiding the coffee chat. Ah, I should react and wait like that when talking to someone. And it would be great if I could give calm feedback. It was a time to understand the company and the work, and to build expectations about working with manager L. I hope the interview process goes well.</p><p>On Saturday, I met for coffee for the first time with an American friend I had met at a ballet class, who minored in Korean. We talked about the difficulties of Korean and English and promised to have lunch next time. This friend introduced me to their Korean tutor, and after exchanging texts, we arranged to meet the week after next. Today, I was introduced by a former colleague to a CS major student who came to a local university as an exchange student. I’m becoming a bit of a senior here too.</p><p>I also had coffee chats with Korean entrepreneurs who started businesses in the US. It’s hard enough for me to find employment in a foreign country, let alone starting a business in the US — it’s a whole different level. I’m grateful to be able to talk to these brave people. I listen to their stories and share mine, finding common ground. Talking with someone who genuinely loves their work is always enjoyable. (That’s why I like coffee chats.)</p><p>Next week, thankfully, I have many appointments. More than the first week, more than the second, the schedule keeps filling up. My circle of friends is slowly growing. Ironically, now that I have some free time, I realize this period of unemployment is a great time to do things I couldn’t while working. When else could I talk to a Korean who started a business in the US, meet a local development lead and ask why they joined a startup, or confidently write on LinkedIn publicly? I should enjoy it while I can.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=446f5e97bea6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[An Unemployed Immigrant Developer in US — Do it anyway]]></title>
            <link>https://ryuing.medium.com/an-unemployed-immigrant-developer-in-us-do-it-anyway-9a4e7a9bbf0d?source=rss-10f4e7816da5------2</link>
            <guid isPermaLink="false">https://medium.com/p/9a4e7a9bbf0d</guid>
            <category><![CDATA[software-engineer]]></category>
            <category><![CDATA[immigrants]]></category>
            <category><![CDATA[careers]]></category>
            <dc:creator><![CDATA[Ing]]></dc:creator>
            <pubDate>Sat, 20 Jan 2024 05:43:11 GMT</pubDate>
            <atom:updated>2024-01-20T06:18:54.508Z</atom:updated>
            <content:encoded><![CDATA[<h3>An Unemployed Immigrant Developer in US — 01.11.24 Do it anyway</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S0dZJ6eqqd7xXw4_JQWDXQ.jpeg" /></figure><p>I posted a diary last Sunday and received more responses than my previous ones. In fact, since then, I’ve been pondering until today, Thursday, about what kind of diary I should write next. I wondered what story to tell… what people would like to hear… Then I realized that thinking this way was a mistake. I simply wrote a diary about getting a job in the United States, and people happened to like it. But I shouldn’t start writing fake essays pretending to know things just because I got a bit of attention. So, I decided to open up about my thoughts and commit to writing a real diary today as well.</p><p>Last Wednesday, I received an email from Company A asking me to submit an online assignment. As I mentioned in my last diary, it was the first email I got that wasn’t a rejection. The email said to submit the assignment within the next week, so I planned to start the test the following Wednesday.</p><p>After receiving the email, I immediately did some research. I looked up what kind of questions they ask, and found that some people get algorithm problems, while others say if it’s for a frontend role, you might have to implement a UI. I also saw a site mentioning questions about what Closure is. In a bit of a panic, I rushed over to LinkedIn and found a Korean working at Company A as a frontend engineer. I sent them a message without hesitation.</p><p>I hurriedly sent messages to three people. I was curious about their experiences with the interview process and, even though I found good search results, I wanted to hear advice directly applicable to me. This was my first time taking such an initiative, so I was quite nervous, constantly checking my phone. To my surprise, one of them responded right away! When asked what I was curious about, I brushed aside my clouded worries and organized my thoughts to ask what I really wanted to know. Just getting a response to such a blunt message made me feel like my application process was already going well. By the next morning, I had received replies from all three individuals.</p><p>With the advice and encouragement of people working at the company (though most hadn’t taken an online assignment), I diligently prepared. Fortunately (or unfortunately?), I didn’t have any other interviews or assignments with different companies, so I was able to prepare relatively leisurely. Even though it was the Christmas holidays, my first self-purchased MacBook arrived early, which also played a role in my preparation.</p><p>My weekly routine — Wake up in the morning, rest or look at LinkedIn notifications, roll around with my cats, eat lunch, and then start solving algorithm problems — I solved problems on Leetcode and Hackerrank; Leetcode is good for well-organized algorithm questions, while Hackerrank has some messier problem-solving ones and is used by companies, including Company A, so I think it’s good to use both — Then I prepared for behavioral questions, reading about the company values like a law book and preparing answers suitable for my situation. Also, since frontend-specific questions might come up, I revisited the basics of JavaScript and CSS.</p><p>This was my fourth time preparing for a coding test, and I was completely bad for the first two. I have bad memories of coding tests and algorithm problems, so I’ve always wanted to avoid them when switching jobs. (I’ll have to talk more about coding tests another time.) But the third time, I did somewhat better, and this time, it felt like I was really getting it…! I solved over 150 problems on Leetcode in the past, and the experience from various tests I had taken before seemed to have not been in vain.</p><p>Preparing for JavaScript and CSS questions was harder than I thought. If someone asked me about Closures or Promises, I could explain in Korean starting from JS features to why they were created, etc., but the thought of answering in English was daunting. I’ve always approached technical interviews by explaining my computer-based understanding rather than memorizing textbook answers, but doing so in English finely seemed impossible. So this time, I decided to study formally again, asking ChatGPT and learning along the way.</p><p>Just when I was thinking that answering JavaScript and CSS questions textbook-style was impossible, I suddenly doubted the meaning of ‘in the next week’ mentioned in the assignment email. Was it really next week? Or within the next seven days…? After searching with my husband, we realized it meant to submit within 7 days, not by next Sunday…!</p><p>I had to completely revise my plan and took the test on the seventh day, Tuesday afternoon. Surprisingly, the test didn’t involve algorithm problems or JavaScript questions. The two problems I received were both about implementing UI requirements in HTML, CSS, and JS in a web-based IDE, passing UI test codes. I was expecting something like implementing React components, but the sudden Vanilla JS caught me off guard.</p><p>Luckily, it wasn’t my first time encountering such an assignment. Around last Sunday, I indiscriminately applied to companies, and one of them sent a Hackerrank coding test link, saying they would contact me if the results were good. I thought I’d give it a try, and it turned out to be a problem about implementing UI in HTML, CSS, and JS. If I hadn’t experienced that assignment, I would have struggled from finding HTML elements in the document to attaching events — it would have been a complete mess at the first time. I didn’t expect my random attempt would be so helpful for Company A’s online test. Maybe it’s true that when in doubt, just go for it?</p><p>After submitting the test, I started preparing dinner. When I checked my phone, there was an email from Company A: “We’d like to invite you for an interview!” I passed!! It turns out the email was sent almost immediately after I submitted the test.</p><p>Now I’m preparing for my first phone interview. Again, I’m not sure what to prepare. But at least this time, I have the recruiter’s email, so I don’t have to act blindly. (Of course, recruiters don’t reply as quickly as in Korea… so frustrating…)</p><p>Every day is filled with unexpected support, meetings, and offers. It’s amazing that it’s only been 10 days since I started job hunting in earnest. Rejections are becoming more familiar, but the encouragement from strangers never gets old. I’m not sure how to express my gratitude, so I continue to work hard and share my journey. I hope there will be a day when I succeed and can give back.</p><p>*This article is translated to English by GPT4 and checked by myself. The original article is here(<a href="https://brunch.co.kr/@ryuing/24">https://brunch.co.kr/@ryuing/24</a>)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9a4e7a9bbf0d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[An Unemployed Immigrant Developer - In the Land of New Opportunities]]></title>
            <link>https://ryuing.medium.com/an-unemployed-immigrant-developer-in-the-land-of-new-opportunities-2368c99b2bba?source=rss-10f4e7816da5------2</link>
            <guid isPermaLink="false">https://medium.com/p/2368c99b2bba</guid>
            <category><![CDATA[immigrants]]></category>
            <category><![CDATA[careers]]></category>
            <category><![CDATA[software-engineer]]></category>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[essay]]></category>
            <dc:creator><![CDATA[Ing]]></dc:creator>
            <pubDate>Tue, 16 Jan 2024 21:28:51 GMT</pubDate>
            <atom:updated>2024-01-16T21:28:51.462Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dkriTwQO0ZzOZBpKpvkJLg.png" /></figure><p>In the last week of December, I carefully prepared my resume, and from the first day of the new year, I applied to numerous positions. I wanted to apply before the American holiday season ended on January 1, so that I could get in before they closed the positions when they returned to work on January 2. If I remember correctly, I applied to about 35 positions in just one day.</p><p>When looking at job descriptions, they often detail what you’ll be doing in the first week, month, and three months. The idea of having tea with GitHub developers, directly improving a part of Notion, and seeing Airbnb’s data in person was exhilarating! Being in the US and legally able to work felt almost unbelievable. If it weren’t for my husband’s situation, which allowed me to get a visa, I might never have even dreamed of this opportunity.</p><p>After posting on LinkedIn about moving to the US, two people DM’d me asking how I managed to get a visa for employment in the US. I could only reply that it wasn’t something I achieved on my own, but rather a stroke of good fortune. I felt a bit embarrassed since it wasn’t an opportunity I had earned by myself, but it made me realize how fortunate I was.</p><p>In the week that followed, I applied to over 20 more positions and got rejected from about eight jobs. Nearly every day, I received two or three rejection emails. One thing I want to mention is that these job process-related emails in the US don’t make their content immediately clear, especially since they are in English, which is not I’m native at, and the language is often vague. They start with compliments about my resume and skills but eventually lead to, “Unfortunately, we have decided to proceed with another candidate.” Now, I look for words like ‘Unfortunately’ or ‘other candidate’ first when I open these emails.</p><p>However, there was some good news too. A big company invited me to take an online test. This was on January 3rd, a day when I had already received two rejection emails. I braced myself for more disappointment, but the invitation to the online test was a surprise. Could it be that my application was finally moving forward? (It’s still unclear if everyone was invited for the test or if my application passed.)</p><p>This week was like a roller coaster with high amplitude and very short cycles. January 3rd was a high point. Every day, my mood swung wildly. When coding test preparation went well, I felt optimistic and imagined a triumphant return to Korea after succeeding in the US. But when I encountered tough problems in mock tests, I felt down again. Starting to study JavaScript again for technical interviews, I worried about how to express my knowledge accurately in English.</p><p>During this time, a personal post I shared on LinkedIn received a lot of attention. I hesitated for two days before sharing it, worried about how it might be perceived. Would it seem presumptuous, as if I was bragging about my opportunity to work in the US? Would it come across as annoying to complain about job hunting now? But contrary to my worries, I received a lot of encouragement. Strangers left supportive comments, and I even received connection requests from Koreans working in the US. I’m grateful for this and feel that regardless of the outcome, this journey will be a meaningful experience.</p><p>As I wrap up my first week of job hunting, my mood is a bit negative. It’s the weekend when companies don’t work, so there are no emails about acceptance or rejection, making me wish for the weekdays to come sooner. I’m anxious about the online test and want to just get it over with. But writing in my diary helps me gather my thoughts. I remind myself not to spend this opportunity trembling with anxiety and worry. I was prepared. Through this chance, I aim to be recognized as an irreplaceable individual in a different culture and a larger market, not just for my companies, but for my name itself.</p><p>*This article is translated to English by GPT4 and checked by myself. The original article is here (<a href="https://brunch.co.kr/@ryuing/23">https://brunch.co.kr/@ryuing/23</a>)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2368c99b2bba" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[An Unemployed Immigrant Developer — I’m an Unemployed Developer in the US]]></title>
            <link>https://ryuing.medium.com/im-an-unemployed-developer-in-the-u-s-1b07548f755a?source=rss-10f4e7816da5------2</link>
            <guid isPermaLink="false">https://medium.com/p/1b07548f755a</guid>
            <category><![CDATA[immigration]]></category>
            <category><![CDATA[software-engineer]]></category>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[careers]]></category>
            <category><![CDATA[job-hunting]]></category>
            <dc:creator><![CDATA[Ing]]></dc:creator>
            <pubDate>Sun, 07 Jan 2024 06:16:03 GMT</pubDate>
            <atom:updated>2024-01-16T21:29:18.727Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X_cdtDEUyg10mUCP_wgybw.jpeg" /></figure><p>After a year, I became unemployed again. A lot has happened in the meantime, and there have been many changes.</p><p>In 2024, I became a 6-year experienced developer, leaving behind many cherished colleagues, friends, and family in Korea to be in the United States. Somehow, I ended up residing in the U.S., obtaining the necessary permits to work.</p><p>When I first came to the U.S., as an MBTI-N personality type, my super imagination kicked in. I envisioned myself joining a thriving company in America, earning recognition, learning a lot, sharing knowledge, becoming famous, and returning to Korea triumphant. Being someone who loves daydreaming, every time I saw high-paying job postings from great companies, I indulged in countless fantasies.</p><p>If I were to join a company like OpenAI (the ChatGPT company) and had to commute to the Silicon Valley office, what would I do? New move-in? Or should I take domestic flights every weekend?</p><p>When I spoke about going to the U.S. to my coworkers, I may have exaggerated a bit.</p><p>“I’ll succeed in the U.S., give lectures, write books, become famous, appear on the TV shows and then get scouted to move to a great place!”</p><p>Before departing for the U.S., I oscillated between extremes. I worried about what if things didn’t turn out as well as I thought. I made big claims, but returning without achieving anything left me anxious.</p><p>Honestly, finding employment in Korea wasn’t that challenging. It might sound arrogant, but my school’s name was quite helpful in my initial job placement, and subsequently, both my school and the first company I worked for carried weight.</p><p>Thinking about finding a job in the U.S. feels daunting. Even with the same resume, it was easily filled by school or company names before, but now, explanations are necessary. What kind of school is this? What about this company? What was this project about? Explaining in detail became a struggle.</p><p>Can I get into a good company without relying on school or company names? Without those names, how do I prove myself? It feels like only I, myself, remain at this point.</p><p>During the last week of December, during the Christmas holidays in the U.S., I crafted a new resume. Writing a resume that conveys who I am, what contributions I made in projects, without relying on company names, was challenging. Looking back, my previous resume was a mess.</p><p>Now, only I remain. Of course, my achievements won’t completely disappear. I still have a bunch on LinkedIn, and fellow Koreans with similar backgrounds are receiving great evaluations at global companies, which could help me in anyway.</p><p>But with this incident, I want to focus more on ‘myself’. Stripping away those names, I want to see if I can market myself well. It’s time to fight with no regards of rank.</p><p>Good clothes exude a feeling even when touched. I hope the time spent in the U.S. becomes an excellent opportunity to strengthen my core.</p><p>I don’t know what the future holds, but I’m determined to achieve something on this unfamiliar ground.</p><p>*This blog article is translated version of my original Korean article <a href="https://brunch.co.kr/@ryuing/20">https://brunch.co.kr/@ryuing/20</a> supported by ChatGPT</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1b07548f755a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Nextjs+typescipt project from scratch]]></title>
            <link>https://ryuing.medium.com/nextjs-typescipt-project-from-scratch-e20c2e546a0b?source=rss-10f4e7816da5------2</link>
            <guid isPermaLink="false">https://medium.com/p/e20c2e546a0b</guid>
            <dc:creator><![CDATA[Ing]]></dc:creator>
            <pubDate>Tue, 13 Dec 2022 04:40:55 GMT</pubDate>
            <atom:updated>2022-12-13T04:40:55.185Z</atom:updated>
            <content:encoded><![CDATA[<h3>Nextjs+typescipt project setting from scratch</h3><h4>1. start from Nextjs manual setting</h4><p><a href="https://nextjs.org/docs/getting-started#manual-setup">Getting Started | Next.js</a></p><h4>2. typescript setting</h4><p><a href="https://nextjs.org/docs/getting-started#manual-setup">Getting Started | Next.js</a></p><ol><li><strong>touch tsconfig.json</strong> and create empty tsconfig</li><li>npm run dev and you can get default <strong>tsconfig.json </strong>created by Next.js</li><li>also follow the result of <strong>npm run dev</strong> (= <strong>next run</strong>) that guides the dependencies needed from Next.js, downloads…</li><li>.js .jsx -&gt; .ts .tsx</li></ol><h4>3. eslint &amp; prettier setting</h4><p>Next.js has default eslint settings, so you don’t need to set eslint from scratch. But if you need additional eslint settings, you can create .eslintrc.json and fill inside.</p><p>You can check what settings Next.js use here -&gt; <a href="https://github.com/vercel/next.js/blob/canary/.eslintrc.json">https://github.com/vercel/next.js/blob/canary/.eslintrc.json</a></p><p>Also, you can get the real config applied use this command, and it depends on the file extension. ./node_modules/.bin/eslint — print-config *.ts</p><p>For additional eslint settings, run npm lint and create .eslintrc.json .<br><strong>typescript-eslint </strong>plugin is inside of the nextjs’ eslintrc, so you don’t need to set it in your own <strong>eslintrc.<br></strong><a href="https://github.com/vercel/next.js/blob/be90c0b909b300fa9d9a109d2c700fd663f6e75b/.eslintrc.json#L45-L56">next.js/.eslintrc.json at be90c0b909b300fa9d9a109d2c700fd663f6e75b · vercel/next.js</a></p><p>If you want use prettier with eslint, then you have to extend prettier plugin on your own <strong>eslintrc config</strong>. Here is the guide from Next.js. <a href="https://nextjs.org/docs/basic-features/eslint#prettier">https://nextjs.org/docs/basic-features/eslint#prettier</a><br>The result eslintrc.json will be like below.</p><pre>{<br>   &quot;extends&quot;: [<br>     &quot;next&quot;,    // 혹은 &quot;next/core-web-vitals&quot;, eslint 설정시 선택에 따라 다름<br>     &quot;prettier&quot;<br>  ]<br>}</pre><p>Finally, run npm lint and check it works.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e20c2e546a0b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[react-query] useQuery, useMutation 실행함수 Type 분석]]></title>
            <link>https://ryuing.medium.com/react-query-usequery-usemutation-%EC%8B%A4%ED%96%89%ED%95%A8%EC%88%98-type-%EB%B6%84%EC%84%9D-4a01029fe9ec?source=rss-10f4e7816da5------2</link>
            <guid isPermaLink="false">https://medium.com/p/4a01029fe9ec</guid>
            <category><![CDATA[react-hook]]></category>
            <category><![CDATA[react-query]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Ing]]></dc:creator>
            <pubDate>Mon, 28 Nov 2022 01:47:41 GMT</pubDate>
            <atom:updated>2022-11-28T01:47:41.266Z</atom:updated>
            <content:encoded><![CDATA[<p>react-query + openapi-generator 환경에서 custom hook으로 각 query나 mutation들을 분리하면서 각각의 실행함수를 어떻게 넣어줘야 하는지 고민이 생겼다. useMuation 의 경우, mutate 호출시 실행할 함수를 정의하면 추후 variable을 외부에서 넘겨줄 수 있는 구조라고 이해했다. 하지만 useQuery의 실행함수는 달랐다. 각각의 역할과 type 정의를 살펴보며 어떤 형태로 써야 할지 살펴보자.</p><h4>useQuery, useMutation에서 받는 function은 어떤 차이가 있을까?</h4><p>useMutation은 인자로 받는 function이 (variables) =&gt; funcReturnPromise(variables) 의 형식인데, useQuery에 넣어주는 function이 (context) =&gt; funcReturnPromise(context) 의 형식이다</p><p>그러면 useQuery에서는 실행시 변수를 fetch function 내에 넣지 못하는걸까?</p><h4>useQuery type</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0d8dd12fe453e0d7d5acc9cb673a34c8/href">https://medium.com/media/0d8dd12fe453e0d7d5acc9cb673a34c8/href</a></iframe><p>useQuery의 인자로 받는 queryFn은 QueryFunction으로, TQueryFnData 을 generic 으로 받는다.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fc7581a4ca3abf017b842ee789c9f597/href">https://medium.com/media/fc7581a4ca3abf017b842ee789c9f597/href</a></iframe><p>QueryResult는 TData를 generic으로 받는다. 그리고 타입 선언에 의하면, TData = TQueryFnData 이다. Promise를 return하는 경우, Promise&lt;T&gt; 로 여기서 T는 useQuery 정의에 따르면 TQueryFnData이며, queryResult에 사용되는 TData 이다.</p><p>QueryFunction 타입을 보면, context를 받아 실행한다. context는 뭘까? 실행시 넣어주는 외부의 변수가 아닌것일까?</p><h4>useMutation type</h4><p>useMutation의 함수 mutationFn은 참고로 아래 타입을 가진다.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/60354c24cd1a60774ff0acd3b12509bb/href">https://medium.com/media/60354c24cd1a60774ff0acd3b12509bb/href</a></iframe><p>mutationFn은 MutationFunction type으로 variables을 받아Promise&lt;TData&gt;를 반환한다.</p><h4>queryFn, mutationFn 비교</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3cfe6de4ecda4b252e34bffe2662da74/href">https://medium.com/media/3cfe6de4ecda4b252e34bffe2662da74/href</a></iframe><p>mutationFunction 은 외부에서 변수를 주입해 줄 수 있지만, queryFunction은 context라는 것만 받을 수 있다.<br>useMutation은 mutate 작동시킬때 variables 를 넣어줄 수 있는데, 이 variables는 mutationFunction의 params로 들어간다.</p><p>const { mutate } = useMutation(mutationFn) <br>-&gt; mutate(variables) <br>-&gt; mutationFn(variables)</p><p>useQuery는 context를 어디서 넣어줄까?</p><h4>useQuery queryFn 의 context</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cee697354c5f57fed007ef2a0e64aa7c/href">https://medium.com/media/cee697354c5f57fed007ef2a0e64aa7c/href</a></iframe><p>queryFn 의 인자가 되는 context는 QueryFunctionContext type으로, <strong>queryKey</strong>, <strong>signal</strong>, <strong>pageParam</strong>, <strong>meta</strong> 로 이루어진다.</p><ul><li><strong>queryKey</strong>: useQuery 호출시 넣어준 query 의 key 값으로, array 형태이다.</li><li><strong>signal</strong>: react-query가 넣어주는 값으로, query 취소시 해당 상태를 받기 위해 쓰인다.</li><li><strong>pageParam</strong>: infinite scroll 구현을 위한 Infinite Queries 에만 쓰인다. Page data 정보를 가진다.</li><li><strong>meta</strong>: query 정보를 저장하기 위해 쓰인다.</li></ul><h4>그러면 useQuery는 외부에서 variable을 주입 못해주는 것인가?</h4><p>mutation과 다르게, query는 실행하는 함수에 react query 내부의 값(context)을 넣어준다. mutation과 달리, query의 실행함수는 <em>외부 인자로부터 변경되면 안되는</em> 특성이 있다.</p><p>특정 key에 실행할 함수를 bind 하고, 항상 그 key에 대해 실행할 함수를 정해놓은건데, 만약 이게 아니라고하면 useQuery 입장에서 어떤 key에 대해 서버 상태가 바뀌지 않을 때 <strong>항상 같은 값</strong>을 갖고오리라는 <strong>보장</strong>이 생기지 않는다.</p><p>따라서, useQuery의 queryFunction은 useQuery 생성시 고정되어야 한다. 그리고 context라고 정의한 react-query 내부에서 실행시 주입해주는 값들에만 한해 영향 받아야한다.</p><p>만약 useQuery 선언시, queryFunction에 넣어주고 싶은 변수가 있다면…?</p><p>(context) =&gt; fetchFunction(variables, context) 와 같이 받도록 fetchFunction을 선언하고, 해당 scope 안에 있는 variables를 가져다 쓸 수 있도록 선언해주면 된다. 그리고 그 variable에 의해 값이 바뀐다면, useQuery의 key에도 포함시켜 주어야 할 것이다. — react hook의 deps 의 개념과 비슷하다.</p><h4>useQuery custom hook example</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9f92b6fff2495e56bf7154a544fe84f5/href">https://medium.com/media/9f92b6fff2495e56bf7154a544fe84f5/href</a></iframe><h4>useMutation custom hook example</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e7f639fce7d6cdd8783314ab9cf0a177/href">https://medium.com/media/e7f639fce7d6cdd8783314ab9cf0a177/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4a01029fe9ec" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Next.js의 hydration error란? & Wagmi client 연동 문제]]></title>
            <link>https://ryuing.medium.com/next-js%EC%9D%98-hydration-error%EB%9E%80-wagmi-client-%EC%97%B0%EB%8F%99-%EB%AC%B8%EC%A0%9C-696b520ffa73?source=rss-10f4e7816da5------2</link>
            <guid isPermaLink="false">https://medium.com/p/696b520ffa73</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[web3]]></category>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[wagmi]]></category>
            <dc:creator><![CDATA[Ing]]></dc:creator>
            <pubDate>Thu, 17 Nov 2022 04:17:25 GMT</pubDate>
            <atom:updated>2022-11-17T04:17:25.437Z</atom:updated>
            <content:encoded><![CDATA[<h3>배경</h3><p>현재 작업중인 frontend 에서 특정 페이지에서만 hydration failed 에러가 발생한다는 리포트 접수</p><p><em>Error: Hydration failed because the initial UI does not match what was rendered on the server</em></p><p>위 에러메세지로, Nextjs에서 SSR 하는 경우에, server rendered 결과물과 client에서 그리게 된 initial 다를 때 발생하는 것으로 판단.</p><p>또한 wagmi client의 hook을 사용한 곳에서만 발생해 wagmi client와 Nextjs 사이 문제를 위주로 파악해보게 됨.</p><h3>Nextjs Hydration error란?</h3><p><a href="https://nextjs.org/docs/messages/react-hydration-error">https://nextjs.org/docs/messages/react-hydration-error</a></p><p>공식홈페이지의 정의에 따르면 SSR 혹은 SSG에 의해 pre-render된 React와 Browser에 의해 처음 render된 React tree 결과물이 다를 때 발생하는 에러. 이 first render를 React에서는 Hydration이라 부른다.</p><p>보통 이 에러는 page render에 사용된 특정 코드나 library가 browser에서만 의존을 가지고 있는 피쳐에 의존하고 있어 생기며, window에 접근해서 사용하는 경우를 한 예로 들 수 있다. (node에서는 window가 없기 때문이다)</p><p>해결하기위해서는, pre-render와 browser render 결과물을 같도록 해야 하는데, browser render시 변경될 값을 useEffect에 의해 변경되게 해 한 타이밍 미루면 가능하다.</p><p><strong>useEffect는 hydration에서 불리기 때문이다.</strong></p><h3>에러 발생 이유</h3><pre>export function Component() {<br>  const { isConnecting, isDisconnected } = useAccount()<br>  if (isDisconnected) {<br>    return (<br>      &lt;div&gt;<br>        disconnected<br>      &lt;/div&gt;<br>    )<br>  }<br>  if (isConnecting) {<br>    return &lt;div&gt;Connecting...&lt;/div&gt;<br>  }<br>  return (<br>   &lt;div&gt;page render&lt;/div&gt;<br>  )<br>}</pre><p>위 코드를 보면 useAccount() 라는 wagmi client에 의해 셋팅된 hook을 사용하고, 그 return값에 의해 dynamic render를 하고 있다. isConnecting, isDisconnected 값들을 로그 찍어보면 server(node)에서는 <strong>false, true</strong>이고, browser에서 처음 찍히는 값은 <strong>false, false</strong>임을 볼 수 있다.</p><p>즉, server에서 pre-render한 결과물은 <strong>disconnected</strong> 이지만, browser의 initial UI 결과물은 <strong>마지막 return</strong>의 page가 된다.</p><p>이는 Nextjs가 의도한 결과가 아니다. 모르는 곳에서 의도하지 않은 render에 영향주는 부분이 생겨버린 것이기 때문이다. 아마 wagmi 내부에서 window 등 browser에서만 있는 feature에 접근했기 때문일 것으로 보인다.</p><p>그리고 우리 프로젝트는 wagmi client의 autoConnect를 true로 셋팅해 쓰고 있었다.</p><p>→ 찾아보니, autoConnect: true로 client를 셋팅한 경우, window.localStorage에 접근해 가져오는 코드가 있다. <br><a href="https://github.com/wagmi-dev/wagmi/blob/cabba6a6fd68a25bdfcaf47a19b4b34ffb4d83bb/packages/core/src/client.ts#L79-L82">https://github.com/wagmi-dev/wagmi/blob/cabba6a6fd68a25bdfcaf47a19b4b34ffb4d83bb/packages/core/src/client.ts#L79-L82</a></p><h3>결론</h3><p>두 가지 방법이 있다. autoConnect: false로 설정하기 혹은 wagmi hook의 값으로 render에 영향주는 경우 state와 useEffect로 감싸서 render 결과물 통일하기</p><h4>현재 autoConnect: false로 하지 않는 이유는?</h4><ul><li>wagmi에서 autoConnect는 default false인데, true로 넣어서 쓰고 있다.</li><li>autoConnect 설정 안하면 개발환경에서 매번 지갑 접근할때마다 새로 로그인 해야해서 번거로워서 true 셋팅 해줬다.</li><li>그러나 추후 구글 로그인에 지갑을 연동하는 경우, 지금처럼 지갑을 자주 요청할 일이 거의 없을 것 같다. 따라서 추후에 로그인 방식 바꾸면 autoConnect 빼고 문제 해결하는게 좋아보인다.</li></ul><h4>state로 감싸서 사용하는 방법은 번거롭다.</h4><ul><li>굳이 매번 wagmi 호출 할 때마다 이렇게 사용하는 패턴이 좋아보이지는 않으니, 일단 로그인 도입 전까지는 현재 frontend 내에서 사용한 방식 (ssr: false, state 감싸기 등) 사용하는 것으로 유지하자</li><li>그리고 위에서 말했듯이, 로그인 방식 변경시 autoConnect 제외하고 state 감싸는 패턴, ssr:false 등도 제외하고 문제 해결하는게 깔끔할 것으로 보인다.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=696b520ffa73" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Next.js 에서 Layout 잘 쓰기]]></title>
            <link>https://ryuing.medium.com/next-js-%EC%97%90%EC%84%9C-layout-%EC%9E%98-%EC%93%B0%EA%B8%B0-15f683ccb62f?source=rss-10f4e7816da5------2</link>
            <guid isPermaLink="false">https://medium.com/p/15f683ccb62f</guid>
            <dc:creator><![CDATA[Ing]]></dc:creator>
            <pubDate>Fri, 11 Nov 2022 09:17:52 GMT</pubDate>
            <atom:updated>2022-11-11T09:19:29.992Z</atom:updated>
            <content:encoded><![CDATA[<h3>Next.js 공식문서 보기</h3><p><a href="https://nextjs.org/docs/basic-features/layouts">https://nextjs.org/docs/basic-features/layouts</a></p><p>페이지 혹은 페이지들의 공통 Layout을 미리 정의해서 불러올 수 있도록 할 수 있다.</p><h4>Single Shared Layout</h4><p>만약 Layout이 하나밖에 없다면 <strong>_app.js </strong>파일에 직접 만든 Layout component를 상위에 주입하여 component를 감싸 렌더링 하도록 할 수 있다.</p><pre>// pages/_app.js<br>import Layout from &#39;../components/layout&#39;<br><br>export default function MyApp({ Component, pageProps }) {<br>  return (<br>    &lt;Layout&gt;<br>      &lt;Component {...pageProps} /&gt;<br>    &lt;/Layout&gt;<br>  )<br>}</pre><p>이 경우, 페이지 이동시 Component만 바꾸기 때문에 Layout component는 재사용되므로 내부 state는 변경되지 않는다.</p><h4>Per-Page Layouts</h4><p>Layout이 여러개가 있고 페이지에 따라 다른 레이아웃을 적용하고 싶을 때, 각 페이지 Component 의 <strong>getLayout </strong>property를 추가하여 이용할 수 있다. 이 경우, 페이지별로 따로 layout을 지정해줘야 한다.</p><p>대신 <strong>getLayout</strong>은 함수이므로, 원하는 경우 nested layout 등을 선언할 수도 있다.</p><pre>// pages/index.js<br><br>import Layout from &#39;../components/layout&#39;<br>import NestedLayout from &#39;../components/nested-layout&#39;<br>export default function Page() {<br>  return {<br>    /** Your content */<br>  }<br>}<br>Page.getLayout = function getLayout(page) {<br>  return (<br>    &lt;Layout&gt;<br>      &lt;NestedLayout&gt;{page}&lt;/NestedLayout&gt;<br>    &lt;/Layout&gt;<br>  )<br>}<br>-----<br>// pages/_app.js<br>export default function MyApp({ Component, pageProps }) {<br>  // Use the layout defined at the page level, if available<br>  const getLayout = Component.getLayout || ((page) =&gt; page)<br>  return getLayout(&lt;Component {...pageProps} /&gt;)<br>}</pre><p>왜 함수여야 할까? 검색해보니 아래와 같은 아티클을 찾을 수 있었다. (tailwindCSS 만든 분이 작성하신 글)</p><h3>Persistent Layout Patterns in Next.js</h3><p><a href="https://adamwathan.me/2019/10/17/persistent-layout-patterns-in-nextjs/">https://adamwathan.me/2019/10/17/persistent-layout-patterns-in-nextjs/</a></p><p>SPA의 개념을 생각해보면, 어플리케이션 내에서 페이지 이동시에도 scroll 위치 등이 바뀌지 않아야 하는 것이 당연하다고 느껴질 것이다. 왜냐면 페이지를 새로 받아와 렌더링 하는 것이 아니기 때문이다.</p><p>그러나 실제로 Nextjs나 Getsby를 사용해보면 Link를 통해 페이지 이동시 전체 UI를 새로 그리는 것이 기본 동작임을 경험할 수 있을것이다. 페이지 이동에도 변하지 않던 UI 경험이 버려지고 이전에 하던 대로 scroll 위치를 따로 기록한다거나 계산하는 등의 작업이 필요한 것인가?!</p><p>Next.js 에서 Persistent UI layout이 가능하게 하는 네가지 패턴을 알아보자</p><h4>일반적인 동작에서</h4><p>만약 모든 페이지들이 동일한 Layout component 를 가장 상위에 두고, 그 아래에 특정 페이지들은 다른 레이아웃을 두고 있다고 하자.</p><p>이 경우 스크롤 유지가 되지 않는 것을 볼 수 있다. 분명 같은 component tree를 갖고 있는데 말이다.</p><p>이러한 방법에서, 사실 각 페이지의 가장 상의 component는 우리가 보고 있는 그 Layout component가 아니다. 바로 Page component 그 자체이다. 페이지 이동시 Page component가 바뀌므로(가장 최상위 component가 바뀌므로) React는 모든 children을 버리고 처음부터 다시 그리게 된다. 그 말은 즉, 새롭게 그리게 된 Layout component는 이전 페이지에서 존재하던 것과는 다른 copy인 것이다.</p><p>이 방법으로는, Nextjs에서 이런식으로 짜면 우리는 과거의 그 서버에서 하나하나 받아오던 그 UI를 겪게 된다.</p><h4>Option 1: 단일한 하나의 공유되는 App component 만들기</h4><p>“지속가능한” layout component를 만들기 위한 한가지 방법은, 우리만의 custom App component를 생성하는 것이다. 이 <strong>_app.js</strong>로 이름지어진 component는 Nextjs에서 항상 불리는 component로, 여기에 Layout을 render 할 때 넣는 방법이 있다. 그렇게 한다면 항상 이 Layout component는 모든 page의 component tree에서 동일하게 위치해 유지되므로, 우리는 SPA의 경험을 유지할 수 있다!</p><p>하지만 일부 페이지에서 공유하는 추가적인 Layout이 있다면? 예를들어 Account setting 페이지의 tab bar에 가로 스크롤이 있고, tab bar를 포함한 AccountSettingLayout이 있다고 하자. 이 AccountSettingLayout은 App component에 포함되어있지 않기 때문에 우리는 이 tab bar의 scroll 위치를 기억할 수 없게된다.</p><h4>Option 2: App component 내에 현재 URL에 따라 다른 Layout 그리기</h4><p>공통으로 사용하는 상위 Layout을 페이지별로 다르게 하여 state들이 날아가지 않게 하고 싶다면, 우리는 App component에서 조작하여 페이지별로 다른 Layout component를 쓰도록 할 수 있다.</p><pre>class MyApp extends App {<br>  render() {<br>    const { Component, pageProps, router } = this.props<br>    if (router.pathname.startsWith(&#39;/account-settings/&#39;)) {<br>      return (<br>        &lt;SiteLayout&gt;<br>          &lt;AccountSettingsLayout&gt;<br>            &lt;Component {...pageProps}&gt;&lt;/Component&gt;<br>          &lt;/AccountSettingsLayout&gt;<br>        &lt;/SiteLayout&gt;<br>      )<br>    }<br>    return (<br>      &lt;SiteLayout&gt;<br>        &lt;Component {...pageProps}&gt;&lt;/Component&gt;<br>      &lt;/SiteLayout&gt;<br>    )<br>  }<br>}</pre><p>이 경우, /account-settings/ 아래 페이지들은 같은 layout component tree 를 공유할 수 있고 따라서 SiteLayout 뿐 아니라 AccountSettingsLayout 역시 re-use 되어 페이지 이동을 하더라도 그 state를 유지할 수 있다,</p><p>하지만 이 방법의 문제점은 URL 분류와 Layout 분류가 동일하지 않거나 (예를들어 account-settings/delete 경로에서는 AccountSettingsLayout을 사용하지 않는) route path가 바뀌었는데 코드가 제대로 바뀌지 않는 등의 어려움이 생길 수 있고, 또한 각 페이지 component 별로 어떤 Layout을 사용하는지 Page component 파일만 봐서는 알기 어려운 문제점도 있다.</p><h4>Option 3: 각 Page component에 ‘layout’ property 추가하기</h4><p>각 Page component에서 어떤 Layout을 쓰는지 명시적으로 알 수 있게 하려면 어떻게 해야할까?</p><p>각 Page Component가 export 하는 page component 객체에 ‘layout’ 이라는 property를 추가하고 그 property에 Layout으로 쓸 Component를 지정해주면 된다.</p><p>대신 Layout component를 중첩해 선언할 수는 없기 때문에, 이 경우 중첩된 Layout을 담는 하나의 새로운 Layout이 필요하다.</p><pre>// /pages/account-settings/basic-information.js<br>import AccountSettingsLayout from &#39;../../components/AccountSettingsLayout&#39;<br><br>const AccountSettingsBasicInformation = () =&gt; &lt;div&gt;{/* ... */}&lt;/div&gt;<br>AccountSettingsBasicInformation.layout = AccountSettingsLayout<br>export default AccountSettingsBasicInformation</pre><pre>// /components/AccountSettingsLayout.jsx<br>const AccountSettingsLayout = () =&gt; &lt;SiteLayout&gt;{/* ... */}&lt;/SiteLayout&gt;<br><br>export default  AccountSettingsLayout</pre><pre>// /pages/_app_.js<br>import React from &#39;react&#39;<br>import App from &#39;next/app&#39;<br><br>class MyApp extends App {<br>  render() {<br>    const { Component, pageProps } = this.props<br>    const Layout = Component.layout || (children =&gt; &lt;&gt;{children}&lt;/&gt;)<br>    return (<br>      &lt;Layout&gt;<br>        &lt;Component {...pageProps}&gt;&lt;/Component&gt;<br>      &lt;/Layout&gt;<br>    )<br>  }<br>}<br>export default MyApp</pre><p>하지만 이 경우 SiteLayout 의 state는 보존되지 않는다. SiteLayout을 layout으로 쓰는 페이지에서 AccountSettingsLayout 을 layout으로 쓰는 페이지로 이동할 경우, react 관점에서 최상의 component가 바뀌는 것이므로 새롭게 SiteLayout instance를 생성하기 때문이다.</p><p>그럼 어떻게 해야할까?</p><h4>Option 4: 각 Page component에 ‘getLayout’ function 추가하기</h4><p>이 문제는 property를 쓰지 않고 function을 사용하면 해결된다. getLayout과 같은 function을 Page component property로 추가해, 복잡한 layout tree를 반환하면 된다.</p><pre>// /pages/account-settings/basic-information.js<br>import SiteLayout from &#39;../../components/SiteLayout&#39;<br>import AccountSettingsLayout from &#39;../../components/AccountSettingsLayout&#39;<br><br>const AccountSettingsBasicInformation = () =&gt; &lt;div&gt;{/* ... */}&lt;/div&gt;<br>AccountSettingsBasicInformation.getLayout = page =&gt; (<br>  &lt;SiteLayout&gt;<br>    &lt;AccountSettingsLayout&gt;{page}&lt;/AccountSettingsLayout&gt;<br>  &lt;/SiteLayout&gt;<br>)<br>export default AccountSettingsBasicInformation</pre><pre>// /pages/_app.js<br>import React from &#39;react&#39;<br>import App from &#39;next/app&#39;<br><br>class MyApp extends App {<br>  render() {<br>    const { Component, pageProps, router } = this.props<br>    const getLayout = Component.getLayout || (page =&gt; page)<br>    return getLayout(&lt;Component {...pageProps}&gt;&lt;/Component&gt;)<br>  }<br>}<br>export default MyApp</pre><p>App에서는 Component의 getLayout 함수를 호출하면, 각 페이지 render 때 마다 component tree를 그릴 때 layout 구조를 유지할 수 있게 되고, 따라서 페이지 이동 시에 같은 layout component를 유지할 수 있게 된다.</p><h3>결론</h3><ul><li>페이지 전체에서 공통으로 사용하는 Layout이 있다면 App에 Component를 wrapping 해서 써라 —<a href="https://nextjs.org/docs/basic-features/layouts#single-shared-layout-with-custom-app"> Single Shared Layout</a></li><li>페이지별로 사용하는 Layout이 다르다면 각 Page component에서 getLayout 과 같은 function을 넣어 Layout을 선언하라 —<a href="https://nextjs.org/docs/basic-features/layouts#per-page-layouts"> Per-Page Layouts</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=15f683ccb62f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>