<?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 Chris Oh on Medium]]></title>
        <description><![CDATA[Stories by Chris Oh on Medium]]></description>
        <link>https://medium.com/@5tigerjelly?source=rss-aa857556561b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ckaAQI4FBA5mHNy1Y2OCRw.jpeg</url>
            <title>Stories by Chris Oh on Medium</title>
            <link>https://medium.com/@5tigerjelly?source=rss-aa857556561b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 17:16:12 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@5tigerjelly/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[Reflection Revisited]]></title>
            <link>https://medium.com/@5tigerjelly/reflection-revisited-41e7df1746ea?source=rss-aa857556561b------2</link>
            <guid isPermaLink="false">https://medium.com/p/41e7df1746ea</guid>
            <category><![CDATA[careers]]></category>
            <category><![CDATA[meta]]></category>
            <category><![CDATA[bay-area]]></category>
            <category><![CDATA[google]]></category>
            <category><![CDATA[new-york]]></category>
            <dc:creator><![CDATA[Chris Oh]]></dc:creator>
            <pubDate>Sun, 17 Nov 2024 21:22:22 GMT</pubDate>
            <atom:updated>2024-11-17T21:22:22.793Z</atom:updated>
            <content:encoded><![CDATA[<p>It has been exactly 7 years since I wrote <a href="https://medium.com/@5tigerjelly/a-reflection-7e2c4e2821e9">A Reflection</a>. That post marked the moment I received my first full-time job offer out of college. Some aspects of my life have changed significantly, while others have stayed the same.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4rHIENhgWNK09Cz3q_pN5A.jpeg" /><figcaption>Team picture during 2024 Swarm Week San Bruno, California</figcaption></figure><p>I always challenge myself to be proud of the choices I make in my life. During my time living and working in New York, I motivated myself to meet new people and grow in my career. I joined the YouTube Music team, which was the most intelligent and social group of people I’ve worked with during my career.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z-RHCZMHdhzrxUZs8ExDPg.png" /></figure><p>The team was spread across multiple time zones and worked tirelessly to launch new features. There were countless document reviews, followed by even more pull requests. I had the chance to travel to different countries, meeting and collaborating with amazing Googlers worldwide. It was exciting to see the projects I worked on being shared on social media — even the bugs I created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WHGJcLjaqjl9eUNzb22-pA.png" /><figcaption>The tooltip isn’t supposed to be on the top left, but on the Podcast tab button 🤦</figcaption></figure><p>Beyond the work itself, I participated in an Employee Resource Group (ERG) called Asians@YouTube. I volunteered to host events and later even served as a board member for the New York chapter. Through this, I met so many people working on different parts of the YouTube ecosystem and in various roles. We also hosted cross-company events, where we collaborated with employees from Amazon, Spotify, Sony, and Nike.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xxKHxhWzoM8cE9zCMTnXaw.jpeg" /><figcaption>I am at the first row on the right</figcaption></figure><p>As a person on a work visa, like many foreign workers in the U.S., I had been working towards my permanent residency since graduating college. Thankfully, Google’s immigration team was extremely supportive throughout the process. However, in January 2023, the massive layoffs reminded me that my immigration status wasn’t guaranteed and could be terminated at any time.</p><p>In March 2023, I received a call from my immigration lawyer informing me that my permanent residency application had been rejected. It wasn’t a request for additional documents — it was a plain rejection. The lawyer didn’t have much information to share, other than noting she had never seen anything like this in her career. A reconsideration request was filed, but there wasn’t much hope. My manager was incredibly supportive when I shared the news, assuring me not to worry.</p><p>I, on the other hand, accepted it as fate. My work visa was set to expire the following year, so I started exploring open roles at Google’s Korea office and potential rental apartments near the office. Two months later, out of nowhere, I received an email from my immigration lawyer saying my application had been reconsidered and approved. I still don’t understand what happened, but I am simply thankful that it worked out.</p><p>Throughout that year, I unfortunately suffered from burnout and depression. The causes were a combination of overstimulation from city life, social media, layoffs, immigration stress, and work pressure. I decided it was best to take time off from both work and the city. Initially, I took a two-month leave, which I later extended by another two months. During my leave, I visited Korea, traveled around Europe, and explored Los Angeles. This decision turned out to be one of the best I’ve made, as it gave me the space to distance myself from everything happening in my life and reevaluate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pIx6GyD9RTzCmPcO_Zr6iA.jpeg" /><figcaption><a href="https://en.wikipedia.org/wiki/Raphael">Raphael</a>’s, <a href="https://en.wikipedia.org/wiki/School_of_Athens"><em>School of Athens</em></a>, Apostolic Palace, Vatican</figcaption></figure><p>I also began a social media detox during my leave, so most of my friends weren’t even aware I was traveling. This change had a profound impact on me. Without sharing or viewing updates, I stopped comparing myself to others and worrying about how I presented myself. This was one of the most liberating parts of my leave — I could enjoy moments as they were. The downside, however, was the hit to my social circle. Without the convenience of social media, people forgot my existence, didn’t reach out, or couldn’t when they wanted to — and vice versa. Yet, scarcity breeds clarity. I learned which friends I had strong connections with and was able to strengthen those bonds even more.</p><p>So, what came out of all this reflection? I developed a strong desire to move back to the West Coast. New York City is a fun and vibrant place to live and work, but looking five years into the future, it’s hard to picture myself settling down there. I considered several locations, including Seattle, San Francisco, and Los Angeles. Since I had already spent most of my time in the U.S. in Seattle, I wanted something new. SF and LA were great candidates, but LA’s tech job opportunities were limited.</p><p>I also made the tough decision to leave Google, as switching teams internally would have delayed my career trajectory by several years. With all that said, I am excited to share that <strong>I will be joining Meta in Menlo Park, California!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zsCQb6SprhXp0g_MJ8GMaw.jpeg" /><figcaption>Goodbye YouTube!</figcaption></figure><p>Looking back, these seven years have been filled with challenges and growth. I’ve faced burnout, immigration setbacks, and difficult decisions, but I’ve always kept trying, and that’s what has carried me forward. I would like to thank my friends and family who have supported me during my ups and downs. I’ll keep going, and if you ever need someone to talk to or advice, <strong><em>don’t hesitate to reach out</em></strong>. We’re all figuring things out, and I’d be happy to help.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=41e7df1746ea" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating a Chrome Extension with React and Vite (Boilerplate provided)]]></title>
            <link>https://medium.com/@5tigerjelly/creating-a-chrome-extension-with-react-and-vite-boilerplate-provided-db3d14473bf6?source=rss-aa857556561b------2</link>
            <guid isPermaLink="false">https://medium.com/p/db3d14473bf6</guid>
            <category><![CDATA[chrome-extension]]></category>
            <category><![CDATA[vitejs]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[reactjs]]></category>
            <dc:creator><![CDATA[Chris Oh]]></dc:creator>
            <pubDate>Sun, 07 Jul 2024 04:42:41 GMT</pubDate>
            <atom:updated>2024-07-07T04:55:25.167Z</atom:updated>
            <content:encoded><![CDATA[<h4>Creating a Chrome Extension shouldn’t be this complicated</h4><p><em>TLDR: Boilerplate here </em><a href="https://github.com/5tigerjelly/chrome-extension-react-template"><em>https://github.com/5tigerjelly/chrome-extension-react-template</em></a></p><p>In this post, I’ll share my experience creating a Chrome extension, from using vanilla HTML, JS, and CSS to eventually migrating to React and using Vite for compilation. This journey was filled with challenges, lessons learned, and eventually a solution that I hope will help others in similar situations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*KivWD08FQu5qM7mb" /><figcaption>Photo by <a href="https://unsplash.com/@orissahumes?utm_source=medium&amp;utm_medium=referral">Orissa Humes</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>Getting Started with Vanilla HTML, JS, and CSS</h4><p>When I first started, I followed the official Google documentation, which provided examples in vanilla HTML, JS, and CSS. This approach worked well for getting basic functionalities up and running. The documentation was clear and helped me understand the basics of Chrome extensions. I was able to create a simple extension that performed the tasks I wanted. However, as I delved deeper into more advanced features, I realized that working with vanilla HTML, JS, and CSS had its limitations, especially in terms of maintainability and scalability.</p><p>One significant challenge was managing the manifest file, especially with the recent migration from <strong>manifest version 2 to version 3</strong>. The manifest file is crucial for defining the permissions, background scripts, and other configurations for the Chrome extension. The transition to version 3 introduced several changes that were not backward-compatible, which meant that many blogs and Stack Overflow answers referenced the older version, making it difficult to find relevant solutions. I spent a considerable amount of time updating my manifest file and ensuring that it met the new requirements. Despite these hurdles, I managed to handle most cases and move forward with the project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*acyXHPm671CfMpGY" /><figcaption>Photo by <a href="https://unsplash.com/@scottwebb?utm_source=medium&amp;utm_medium=referral">Scott Webb</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>Adding 3rd Party Tools for Authentication and Storage</h4><p>I needed to implement authentication, and initially, I considered using <a href="https://supabase.com/">Supabase</a>. Supabase is a great tool for quickly adding authentication and other backend services to a project. However, some use cases I needed were not supported, and the pricing wasn’t in my favor. For example, I required more fine-grained access controls and file storage that were too costly with Supabase. This led me to explore other options. I will cover my experience with Supabase in more detail in another post, as it was a valuable learning experience that might benefit others looking into it.</p><p>Given my familiarity with Firebase from past projects, I decided to implement authentication using Firebase’s web SDK. Firebase offers a robust suite of tools for authentication, database management, and more. However, this decision led to unexpected issues. The Firebase web SDK does not support vanilla JS well, and combined with Chrome extensions’ strict limitations on content script loading, I faced problems I couldn’t solve. The primary issue was with the way Firebase initializes and authenticates users, which clashed with the content security policies enforced by Chrome extensions. I tried various approaches, including downloading the Firebase library locally and running it, but nothing worked. This was a significant setback and a frustrating experience.</p><h4>Fine, I will use React</h4><p>After spending an entire day troubleshooting, I decided to migrate my project to React. React is a powerful library for building user interfaces, and I had used it successfully in other projects. Using ChatGPT, I translated my vanilla JS code to React. This transition introduced its own set of challenges, particularly in building and running the app. I had to refactor a lot of code to fit React’s component-based architecture, and there were issues related to state management and lifecycle methods that took some time to resolve. Once I fixed these issues, I used Webpack to compile the React app for Chrome. Unfortunately, I encountered persistent compilation problems that were difficult to debug.</p><blockquote>There is nothing like spending a weekend migrating your own side project</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V_qnJ4IR6GeCAwj1ZDrxLw.png" /><figcaption>I never heard of Vite until today</figcaption></figure><h4>Vite to the rescue</h4><p>Through my research, I discovered that many developers faced similar issues with Webpack when compiling for Chrome extensions. The complexity and configuration overhead of Webpack made it challenging to get everything working seamlessly. That’s when I found <a href="https://vitejs.dev/">Vite</a>. Vite is a next-generation frontend tool that offers faster builds and a more straightforward configuration compared to Webpack. Vite solved all my issues and worked out of the box. I followed the directions on their website, and within minutes, I had everything up and running. The setup was incredibly smooth, and I was able to focus on developing features rather than wrestling with build tools. ChatGPT assisted me in generating the minimal code needed to run the app as a Chrome extension, making the process even easier.</p><p><strong>Create a new Vite project</strong></p><pre>npm create vite@latest my-chrome-extension --template react-ts<br>cd my-chrome-extension<br>npm install vite-plugin-static-copy</pre><p><strong>Create a manifest.json file. Place the file in the ‘public’ folder</strong></p><pre>{<br>  &quot;manifest_version&quot;: 3,<br>  &quot;name&quot;: &quot;React Chrome Extension&quot;,<br>  &quot;version&quot;: &quot;1.0.0&quot;,<br>  &quot;description&quot;: &quot;A simple React app as a Chrome extension&quot;,<br>  &quot;action&quot;: {<br>    &quot;default_popup&quot;: &quot;index.html&quot;<br>  },<br>  &quot;permissions&quot;: []<br>}</pre><p><strong>Create a vite.config.ts file</strong></p><pre>import { defineConfig } from &#39;vite&#39;<br>import react from &#39;@vitejs/plugin-react&#39;<br>import { viteStaticCopy } from &#39;vite-plugin-static-copy&#39;;<br><br>export default defineConfig({<br>  plugins: [<br>    react(),<br>    viteStaticCopy({<br>      targets: [<br>        {<br>          src: &#39;public/manifest.json&#39;,<br>          dest: &#39;.&#39;,<br>        }<br>      ],<br>    }),<br>  ],<br>  build: {<br>    outDir: &#39;build&#39;,<br>    rollupOptions: {<br>      input: {<br>        main: &#39;./index.html&#39;,<br>      },<br>    },<br>  },<br>});</pre><p><strong>Build the react app with Vite</strong></p><pre>npm run build</pre><p>You will see a new directory created called build/ which contains the necessary files to create a chrome extension app. Once the build succeeds, head over to chrome://extensions/ , enable ‘Developer mode’ and ‘Load unpacked’ by selecting the build directory that was just created!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oZAhp3ZMA2PM7YGvAT9YzQ.png" /><figcaption>Vite + React working as it should :)</figcaption></figure><h4>Conclusion</h4><p>To help future developers avoid the same pitfalls, I created a <a href="https://github.com/5tigerjelly/chrome-extension-react-template">template repository</a> that anyone can fork and build projects on top of. The template includes a basic setup for a Chrome extension using React and Vite, with all the necessary configurations and scripts. By providing this template, I hope to save others the time and frustration I experienced. The repository is well-documented and includes step-by-step instructions for getting started. I hope this blog post helps those in need.</p><p>Happy coding :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=db3d14473bf6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Google Photos Isn’t Free Anymore]]></title>
            <link>https://medium.com/@5tigerjelly/google-photos-isnt-free-anymore-f1026bdc44bb?source=rss-aa857556561b------2</link>
            <guid isPermaLink="false">https://medium.com/p/f1026bdc44bb</guid>
            <category><![CDATA[synology]]></category>
            <category><![CDATA[google-photos]]></category>
            <category><![CDATA[hard-drive]]></category>
            <category><![CDATA[nas]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Chris Oh]]></dc:creator>
            <pubDate>Mon, 16 Nov 2020 00:16:01 GMT</pubDate>
            <atom:updated>2020-11-16T00:16:01.915Z</atom:updated>
            <content:encoded><![CDATA[<h4>What are our options?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2HxhaiNxBpLO43qU" /><figcaption>Photo by <a href="https://unsplash.com/@sarandywestfall_photo?utm_source=medium&amp;utm_medium=referral">sarandy westfall</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Google took the world by surprise this week by announcing that it will no longer provide storage for free. When Google Photos first launched it provided two options ‘Original’ option and a ‘High Quality’ option. The ‘High Quality’ option was a compressed image that would use up less space but has good enough quality for the average user. The image size is kept the same as the original but uses Google’s compression algorithm to reduce the overall memory used. This option is popular since Google did not count ‘High Quality’ images towards the account storage and is hence free.</p><blockquote>On June 1, 2021 Google Photo will stop giving free ‘High Quality’ image upload and count it towards your Google account storage.</blockquote><p>Maybe this was Google’s plan before it launched. In this article, I will discuss different options from opting for Google Photos to setting up person Clouds. I will also provide a 5 point rating for each option based on cost, privacy, ease-of-use and data redundancy.</p><h4>Option 1. Just Give In</h4><ul><li>Cost : ★★★★★</li><li>Privacy : ★☆☆☆☆</li><li>Ease-of-Use : ★★★★★</li><li>Data Redundancy : ★★★★★</li></ul><p>This is the option Google wants you to take, just stay with Google and pay their Google One monthly fee. Unfortunately, this is the option I would suggest to most non-technical people. You wouldn’t have to change the app you already store your pictures, you can keep uploading how you always have. With a small price tag of $2~$3, you get enough to store for a couple of years.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4zNlo7mSwIf2bGCfScHoWQ.png" /><figcaption>Google One Price Chart</figcaption></figure><p>Google’s servers are located everywhere in the world, providing super fast upload and download speeds over the internet. Unless Google’s servers completely go down, it is most unlikely to loose any data.</p><p>However, in terms of privacy, you are feeding Google not just your pictures but the metadata of your location, time, and who you’ve been with. I have not read the Terms of Service, but I wouldn’t be surprised if I start getting targeted ads based on the pictures I take.</p><h4>Option 2. Good Old Fashion External Hard Drive</h4><ul><li>Cost : ★★★★☆</li><li>Privacy : ★★★★★</li><li>Ease-of-Use : ★★★★☆</li><li>Data Redundancy : ★☆☆☆☆</li></ul><p>This option will give nostalgia for most. Simply purchase a large hard-drive and save your pictures and video there.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kpYfqeovc9adUekdWEmCjQ.png" /><figcaption>An external hard drive costs under $100 for 2TB</figcaption></figure><p>Hard drive prices have dropped exponentially over the last decade. This is a cost-effective way to keep your data safe. Also, since it is not require internet connectivity, data transfer speed is the best. You can keep you hard drive connected to your computer and periodically backup your photos and videos.</p><p>The main concern I have using external hard drives is the potential to lose the physical device or damage while carrying it. This unfortunate event happened to me a couple of times in the past, where I would drop the hard drive by accident losing all data. Even if you keep your hard drive at a fixed location, there is the possibility of hard drive failure which does occasionally occur.</p><h4>Option 3. Use their Cloud</h4><ul><li>Cost : ★★★★★</li><li>Privacy : ★★★★☆</li><li>Ease-of-Use : ★☆☆☆☆</li><li>Data Redundancy : ★★★★★</li></ul><p>If AWS and GCP doesn’t ring a bell for you, this option isn’t for you. Amazon Web Service and Google Cloud Platform are examples of the cloud computing service Amazon and Google provide. Their business is to sell compute resources to you and charge you, unlike other Google services which their business is to mine your data and sell you ads. AWS has a service called S3 and GCP called Cloud Storage. This makes a great option to store your data on the cloud without having to worry about cloud services extracting any metadata.</p><p>Similar to option 1, AWS and GCP both has a service level agreement(SLA) of 99.9% availability. They also provide data replication to multiple data servers in the background. If one server goes down, your data is still accessible through another data server location without you even knowing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jlhXacU6640amkLFlmPwug.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*5zsLCWXSAGwd5dp-viRtfw.png" /></figure><p>If you use up all 100GB, the prices come out to around $2 per month. I was a bit impressed by this number since Google One provides the service at no cost and charges cost on the storage. Although it was listed on their homepage, I found extra pricing for more storage. $99.99 per month: 10 TB, $199.99 per month: 20 TB, $299.99 per month: 30 TB. Privacy and cost wise it is a great option but the easy-of-use is not the best. For example AWS S3 doesn’t let you preview your files until you have downloaded the entire file on your machine. There isn’t an easy way to upload and download your photos and video from your phone either.</p><p>If managing your data directly on AWS or GCP too cumbersome, try Dropbox. Dropbox is a file hosting service with an easy to use user interface. Dropbox uses AWS to store your data in the background, so you get the benefits of a fast download/upload speeds, while paying for the same price of Google One. Same as AWS and GCP, Dropbox monetize from the paid users, not by selling advertisements.</p><h4>Option 4. Setup Your Own Cloud</h4><ul><li>Cost : ★★☆☆☆</li><li>Privacy : ★★★★★</li><li>Ease-of-Use : ★★★☆☆</li><li>Data Redundancy : ★★★☆☆</li></ul><p>The Bring Your Own Cloud option is a rising trend. Instead of relying on cloud providers, you create your cloud at home. It combines option 2 with network connectivity. It is called a Network Attached Storage (NAS). Simply, it is an external hard drive that is connected to the internet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P5gfjK9w9PrHe1l7G-aExA.png" /><figcaption>Synology 4 Bay NAS</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HCuUc0XzmnxjssqM5TOesQ.png" /><figcaption>Western Digital 4TB Red</figcaption></figure><p>This is the option I am currently using. But I must warn, this is an expensive investment. I purchased a Synology 4 bay NAS with 4 Western Digital 4TB hard drive.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vCdJyIi610juMUv_6_Iz4A.png" /><figcaption>My Synology NAS usage of 2.8TB</figcaption></figure><p>The initial investment was around $800. You might think this is insane, but let me walk you through my use case. As of this writing, I currently have 2.8TB of data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/698/1*oggZngwNiO8qmtOGGmIrXQ.png" /><figcaption>Google One 10TB @ $99.99/month vs Personal NAS @ $800 upfront</figcaption></figure><p>I have a ton of pictures, videos, and project files from editing my YouTube videos. I save my MacBook Pro’s backups daily to my NAS as well. If I opted to go with Google One as my storage option, I would need to choose the 10TB option at $99.99 a month. Plotting a simple graph shows that in 8 months I would have spent the same amount of money to store 10TB. Strictly speaking, my NAS gives me 15.7TB in total, so I get that extra 5TB of storage while breaking even in 8 months.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*asB6HbmFDJA17WTduPOtKQ.png" /></figure><p>But for other users who are under 2TB, it would look something like this. I have adjusted the NAS model to the following WD 4TB NAS with 2 hard drives. This configuration comes out to a total of $300, a little less than half of my current setup.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/690/1*KAaEz4ETH4mzNqCqj-KNww.png" /><figcaption>Google One 2TB @ $99.99/year vs Personal NAS @ $300 upfront</figcaption></figure><p>The equivalent Google One price would be $9.99 per month or $99.99 per year if you pay yearly. In 3 years the personal NAS will break even with Google One.</p><p>NAS is a great option for home entertainment as well. If you have movies on your NAS, you can stream that directly to your TV is supported. You can even host websites, email servers, git servers, database servers, and wiki websites. A NAS is much more than just a storage option, it is a full-fledged server.</p><p>However, it does come with the hassle of setting up the physical device. Since it is a network-attached, you won’t need to ever carry it around at all. But download and upload speeds can vary depending on your home’s internet speed. Data redundancy is also an issue since hard drives can fail. A way NAS combats this is by introducing data mirroring. This is called Redundant Array of Independent Disks (RAID), by allocating certain number of hard drives to act as a backup drive with copies of data in case any other hard drive fails. I currently allocate one 6TB hard drive for redundancy, therefore I have a total capacity of 15.7TB instead of 24TB.</p><h4>Conclusion</h4><p>There is no right answer to what is the best option. There are pros and cons for each, and personal preference on which aspect is more important to them. But, now is a great time to revisit your options and re-evaluate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HtjF63Y9W4NZfWFlUqgU-Q.png" /></figure><p>I encourage my technical friends to opt for a personal NAS. It is a great long term solution for personal data storage with privacy in mind. But it comes with the challenges of a hefty upfront cost and maintenance for many years. Google One is a great option if you don’t want to worry about managing a personal cloud and have it just work like today.</p><p>Try to apply your use case and weigh your options which option works the best for you. Depending on your current data usage, the total amount you are willing to spend, and the amount of time/effort you are willing to invest, different options will make better sense.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f1026bdc44bb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating a Work Visa Search Engine]]></title>
            <link>https://medium.com/@5tigerjelly/creating-a-work-visa-search-engine-f274b1eaa105?source=rss-aa857556561b------2</link>
            <guid isPermaLink="false">https://medium.com/p/f274b1eaa105</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[dynamodb]]></category>
            <category><![CDATA[work-visa]]></category>
            <dc:creator><![CDATA[Chris Oh]]></dc:creator>
            <pubDate>Sun, 23 Feb 2020 08:23:32 GMT</pubDate>
            <atom:updated>2020-02-23T08:23:32.505Z</atom:updated>
            <content:encoded><![CDATA[<h4>The Tech Stack Behind Visatopia</h4><p>Visatopia is a simple search engine to find millions of past work visa history in the US.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PKHlAKphwVW__LzcgcVtMA.png" /></figure><p>Visatopia was made out of frustration with companies not sharing if they could hire international candidates. Large companies usually can hire, but small-mid size companies it isn’t clear. I found a couple of websites that share this kind of data, but it would just list lines of a candidate’s salary and their application date. The hundreds of rows were just that, raw data, and it was missing any useful information.</p><blockquote>Visatopia was made out of frustration of companies not sharing if they could hire international candidates.</blockquote><h3>Search for Data</h3><p>Now with some ideas, the search was on. To create a useful website with meaningful information, I needed to find the same raw data as other websites. It turns out this was the easiest part. USCIS publishes their work visa application history on their <a href="https://www.foreignlaborcert.doleta.gov/performancedata.cfm#dis">website</a>!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*67ejH5iBe1Vm2WZ3FcB32w.png" /><figcaption>H-1B History by year on USCIS</figcaption></figure><p>However, soon after I realized that the data set was not uniform at all, their naming convention differed depending on the year, salary will be reported in hourly, weekly, monthly, yearly. There needed to be some time spent just on data cleaning. This took me almost 3 months in total.</p><h3>NoSQL Data Storage with DynamoDB</h3><p>When I was envisioning the use cases of Visatopia, I realized most of the calls to the database would be read-intensive. There wouldn’t be any writing to the database unless I am updating the records myself.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/518/1*yho7_AGYirU4b0MzAdps-A.png" /></figure><p>Initially, I normalized the data into separate tables and reduced as much duplicate information as possible. This is great storing large datasets in a fraction of their original size. However, the problem was because the data was separated, any query for a company will require massive joins on multiple tables each time. That can cause massive delays in reading requests when there is a large number of clients trying to query data. One way to combat this is to have read-replicas of the master database. You can have as many read-replicas as you want and load balance, reducing stress to any particular database. I did not choose this option simply because the cost to maintain multiple instances is just too costly for my use case.</p><p>Then it became clear my goal was to reduce database joins, which lead me to the decision of choosing NoSQL. There are a couple of NoSQL database choices such as Firebase from Google, Atlas from MongoDB, but it was obvious to use DynamoDB from Amazon since I was on the AWS stack anyways.</p><p><strong>Note</strong>. I knew about some of the limitations on DynamoDB, but some became a blocker. The main issue was the 400kb limit on a single record. Some companies would have thousands of data records that it would not fit as a single record. So I ended up breaking up one company record into four smaller chunks.</p><h3>Search Auto Suggestions</h3><p>Auto suggestion is a feature that is taken for granted these days. Google, Facebook, Amazon anywhere you go suggestion feature is there. However, the complexity of implementing is sometimes not worth the effort.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ClledOZi5PO9rlBet_KlAA.png" /></figure><p>At first, I tried to utilize external services like Algolia, Search as a Service, to host the company names and Algolia handle all the complex data storage and recommendation. However, the free tier only allows up to 10k records, which is far less than the 200k company names I needed to store. The price on the paid version, $50~$100 per month was far too expensive.</p><p>Luckily, I found some <a href="https://aws.amazon.com/blogs/database/creating-a-simple-autocompletion-service-with-redis-part-one-of-two/">simple implementation from AWS</a> using Elasticache. Elasticache is not intended for search suggestions, but it worked pretty well for me. Elasticache was made to store short term data for caching data to reduce hitting the actual server multiple times.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*mZO4xnB4TvDgStRAjryyLg.png" /><figcaption>AWS Elasticache</figcaption></figure><p>I created an Elasticache node and stored all company names in it. Then I created a Lambda to query from the Elasticache node and return the results. Note if you are doing something similar, Elasticache cannot be made public by nature, therefore the Lambda or EC2 instance trying to connect must be in the same VPC and subnet groups as the Elasticache node.</p><h3>AWS Chalice To Deploy in 20 Seconds</h3><p>I am always <a href="https://medium.com/@5tigerjelly/the-ultimate-scala-serverless-lambda-deployment-using-travis-ci-18ddc681769f">talking about serverless</a>. AWS Lambdas are a great example of that. The pricing on these is insane. The first 1 million calls are free, and the next <strong>1 million will cost me $0.20</strong>. On top of that, a serverless framework will expedite your development time. Chalice is a framework by AWS built for Lambdas. Creating a function attached to an API Gateway will take you 20 seconds to code out and deploy.</p><p>I took the extra mile on this step. I decide to host all of my HTML on the lambda. Meaning the site will be server-side generated. The main reason I took this approach is for Search Engine Optimization(SEO). Google’s indexing bots will not wait for javascript to load content on your page, meaning it will only index the empty page and move on. By having server-side rendered webpages, indexing bots will be able to store all the content found.</p><h3>Serve Static Files Over CloudFront CDN</h3><p>However, I chose not to store every single file to AWS Lambdas. If every page load requires 5~10 javascript, CSS files, I will consume the 1 million calls in 5times the speed. There are multiple files you need to create on top of CSS and JS files, such as sitemap.xml and robots.txt.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/423/1*jB4d4IWGFHIknxQNsK2wag.png" /></figure><p>The most simple way is to serve static files is to host them in an S3 bucket. However, public S3 objects are not secure and may cause issues if your webpage is served over HTTPS. CloudFront is a great solution to this. CloudFront is a Content Delivery Network(CDN). It caches your static files to edge locations all over the world. This allows global customers to load your static files much faster compared to having a single location serving your files. CloudFront also allows you to add a certificate on the endpoint which will serve your static files over HTTPS.</p><p><strong>Note</strong>. Having files cached at edge locations come at a cost, if you make a small update to your CSS file, users won’t be able to see the changes since CloudFront returns an older version. You can invalidate a file and force CloudFront to fetch the updated version. However, this will cost you. An alternative approach is to, instead of invalidating your outdated file, add versioning to the file name. For example, index.css can be named index-1.0.0.css. Any future changes can be saved to index-1.0.1.css, the only problem is the webpage must now keep track of the version to fetch.</p><h3>Let’s Move onto the Cloud</h3><p>Now lets connect all the different services. I was uploaded all the company JSON data to DynamoDB with a Lambda. A Elasticache Redis node with all the company names. As noted, Elasticache is under a VPC and subnet groups, so the Lambda also needs to be under the same VPC and subnet groups. All static files were hosted in S3 and served via CloudFront.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/446/1*oQp6ZyJuJr7f8TvS0WGFCw.png" /></figure><p>Generally speaking you can’t really go wrong with AWS. There are other options such as Google Cloud Platform, but I have not had the chance to do any serious development just yet. With tools like Chalice, development becomes much simpler.</p><h3>Route 53 For Custom Domain Names</h3><p>Having multiple endpoints become a problem in the long run. CloudFront generates a custom URL and Lambdas generate a custom URL. These URLs are very lengthy and impossible to remember. Hardcoding them all over the place is a bad idea since a future lambda will have its URL as well.</p><p>All custom URLs can be masked using subdomain names. For Visatopia, I created a cdn.visatopia.fyi endpoint for CloudFront and api.visatopia.fyi for Lambdas. This allows me to hardcode the endpoints without having to worry about any future changes.</p><p>Also I have multiple Lambdas behind the same api.visatopia.fyi endpoint which can be routed depending on the path. /search will call the suggestion lambda, where /company will query the company data.</p><h3>Adding an Open API</h3><p>After publishing the website, I started to wonder how I can make the data set more useful and accessible to more users. I decided to create an Open API to anyone who wants to query and build different websites on top. You can see <a href="https://documenter.getpostman.com/view/5307942/SzKTwyw6">more details on API here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lwwhPzPOW_wknTjiYTGohA.png" /></figure><p>I was able to create the API documents page easily by exporting the API definition on API Gateway page. For the open API, I added authentication using API Keys to prevent anyone from calling the endpoint. API Keys also allow throttling TPS and limits total calls per month per key.</p><h3>Conclusion</h3><p>In this post, I went over my development journey of going from an idea of developing a workable website. I used AWS to host my data and serve webpages. I used a serverless framework called Chalice to develop and deploy Lambda functions. After the website was public, I made an Open API for anyone to utilize the data I collected and cleaned.</p><p>The overall experience was really fun. Data cleaning took most of the time, but after that, I was able to get up and running within a couple of days. I was able to iterate on all the feedback I received continuously. Having the USCIS data at the core of the project, decision making was rather quick and was able to prioritize my tasks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f274b1eaa105" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Manage Multiple Lambdas behind a Single API Gateway]]></title>
            <link>https://medium.com/@5tigerjelly/manage-multiple-lambdas-behind-a-single-api-gateway-ed829f1465ba?source=rss-aa857556561b------2</link>
            <guid isPermaLink="false">https://medium.com/p/ed829f1465ba</guid>
            <category><![CDATA[lambda]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[travis-ci]]></category>
            <category><![CDATA[scala]]></category>
            <category><![CDATA[api-gateway]]></category>
            <dc:creator><![CDATA[Chris Oh]]></dc:creator>
            <pubDate>Wed, 20 Feb 2019 04:26:07 GMT</pubDate>
            <atom:updated>2019-02-21T12:52:42.723Z</atom:updated>
            <content:encoded><![CDATA[<p><em>In this post, we will deploy multiple serverless lambda functions with independent deployment pipelines, using the same APIGateway endpoint.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AoBS3VsuNIf5N1jyDgjcGQ.png" /><figcaption>Multiple lambdas can sit behind a single API Gateway endpoint</figcaption></figure><p>Lambda functions are amazing, but to scale and add more functionality, the physical file size of packages become a limit. <a href="https://docs.aws.amazon.com/lambda/latest/dg/limits.html">AWS states these package sizes as the limit</a>. It makes sense to break down different parts of the program which can be independent as a separate serverless function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zqNIEKrxsHRb5gm8iUICdQ.png" /></figure><p>However, there is still the problem that, if every serverless lambda deploys with its own APIGateway endpoint, you will end up with multiple different URL endpoints. Keeping track of the different endpoints and also updating multiple different clients will become a massive hassle.</p><p>The amazing predecessors already thought of <a href="https://forum.serverless.com/t/multiple-services-behind-a-single-api-gateway/191/12">this back in 2016</a>. The forum started having conversations about this, and it wasn’t until 2017 when it was <a href="https://github.com/serverless/serverless/issues/3078">officially opened for code implementation and review</a>. On January 6th, 2019, <a href="https://github.com/serverless/serverless/pull/4247">PR #4247 was finally merged</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*F7iuLfTVQwfMkbqn" /><figcaption>Photo by <a href="https://unsplash.com/@samuelzeller?utm_source=medium&amp;utm_medium=referral">Samuel Zeller</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Create Repos from Boilerplate</h3><p><a href="https://medium.com/@5tigerjelly/the-ultimate-scala-serverless-lambda-deployment-using-travis-ci-18ddc681769f">The Ultimate Scala Serverless Lambda Deployment using Travis CI</a></p><p>In the previous post, I went over creating Scala serverless lambda deployment pipelines using Travis CI. We will continue to build upon the <a href="https://github.com/5tigerjelly/aws-scala-travis-boiler-plate">boilerplate we made from the last post</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BAA6q1k7vCBUc-xLod49Uw.png" /></figure><p>Let’s create two repositories. Go to Import repositories and paste the link. Let’s call one lambda-account-service and the other lambda-payment-service .</p><pre><a href="https://github.com/5tigerjelly/aws-scala-travis-boiler-plate">https://github.com/5tigerjelly/aws-scala-travis-boiler-plate</a></pre><p>Once importing is complete, Github will send you a notification.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1Z1lecib6nCKPyhd5VrV1w.png" /></figure><p>We should be able to see the two repositories we just made.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2XesaJXUuyRPA-yDz6tveA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rFq6xPXCuWngVMY0" /><figcaption>Photo by <a href="https://unsplash.com/@mohammedlak?utm_source=medium&amp;utm_medium=referral">Mohammed lak</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Create an API Gateway</h3><p>In the previous post, we did not go into the AWS console to create a new API gateway. The serverless framework auto defines the cloud formation template and creates the needed resources. However, as we need to get more fine-grained, I find it easier to manually create the endpoint.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FsEpqwSLF7JYd_eTOj63vA.png" /></figure><p>In the AWS console -&gt; Services -&gt; API Gateway -&gt; Create. Select the REST protocol, New API and give it a cool name. Endpoint Type matters if you want it served over the CloudFront (AWS’s CDN). Once you have created the API Endpoint, keep a note of the API’s ID and the API’s root resource ID.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FsKUeFIGtX2nuTw4qjbZKg.png" /></figure><p>The ID next to the API name is the API ID(jte3ap5vzd). The ID right of the ‘Resource’ is the root resource ID(63l279u23l).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*w2JcKfzQOdNxijC_" /><figcaption>Photo by <a href="https://unsplash.com/@diomari?utm_source=medium&amp;utm_medium=referral">Diomari Madulara</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Add Config to Serverless.yml</h3><p>First clone the two repos we created to your machine. Head to <a href="https://travis-ci.org/">Travis</a> and enable the two repos. Then, run the travis cli command to add the AWS keys securely.</p><pre>#install travis, you will need to have ruby<br>gem install travis</pre><pre>#inside your repo add your keys from the csv file<br>travis encrypt AWS_ACCESS_KEY_ID=&quot;&lt;your key here&gt;&quot; --add<br>travis encrypt AWS_SECRET_ACCESS_KEY=&quot;&lt;your key here&gt;&quot; --add</pre><p>When you are done adding the two keys on both repos, inside the serverless.yml update the service name to reflect the repo names. Otherwise, we will be very confused when we go into the AWS console to check if both services got deployed correctly. <em>Another meat of this post.</em> Under provider add apiGateway, restApiId, restApiRootResourceId. Fill in the details from what we got from AWS. Last, update the path under events. The path will be the first route after the root path.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IVo77r2WwiueZPxjrXWRQQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bcVCWnJEQe0rHG1L" /><figcaption>Photo by <a href="https://unsplash.com/@mattiaswolsson?utm_source=medium&amp;utm_medium=referral">Mattias Olsson</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Time for some Action</h3><p>Let’s deploy one service at a time. First, we will deploy the lambda-account-service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U4kXhPCodxdqFM6W18epVQ.png" /><figcaption>So far so good</figcaption></figure><p><em>side note : sbt compiling takes a very long time… average 2min 30 just for the sbt assembly part…. please be patient...</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JjQAQrLJyitjSWaa2Jiruw.png" /></figure><p>If the deployment worked, you should be able to see the /accounts route is created. We are now able to ping the API + /accounts and be able to see the results. Now let’s deploy the lambda-payment-service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JCJ8W7iL8wq5B6vwJsDx-Q.png" /><figcaption>Travis build for payment service</figcaption></figure><p>If the deploy worked, check out the API gateway page! You shouldn’t see any other API endpoints other than the one we created earlier in the post. And under the root resource, we will now see the newly added /payments.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QhSmpl17xWynJaEGBeht2g.png" /></figure><p>Just to double check, everything worked, let’s also check the lambda functions. You can observe that the two repos created the corresponding functions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a1_AtdP3DELZ3k0321ZxgA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1hQ3q9WouwioOI5x" /><figcaption>Photo by <a href="https://unsplash.com/@alvaroserrano?utm_source=medium&amp;utm_medium=referral">Álvaro Serrano</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Summary</h3><p>In this post, we created two services using the <a href="https://github.com/5tigerjelly/aws-scala-travis-boiler-plate">boilerplate</a>. Then we manually created an AWS API Gateway endpoint to retrieve the ID and root resource ID. Next, we added the two IDs to the service’s serverless.ymlfile. Once we deployed the two services, we saw that both services were created under the API Gateway we defined, not creating separate endpoints.</p><p>Happy coding! :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ed829f1465ba" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Ultimate Scala Serverless Lambda Deployment using Travis CI]]></title>
            <link>https://medium.com/@5tigerjelly/the-ultimate-scala-serverless-lambda-deployment-using-travis-ci-18ddc681769f?source=rss-aa857556561b------2</link>
            <guid isPermaLink="false">https://medium.com/p/18ddc681769f</guid>
            <category><![CDATA[scala]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[travis-ci]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[lambda]]></category>
            <dc:creator><![CDATA[Chris Oh]]></dc:creator>
            <pubDate>Sun, 17 Feb 2019 20:31:57 GMT</pubDate>
            <atom:updated>2019-02-20T02:22:47.549Z</atom:updated>
            <content:encoded><![CDATA[<h3>Deploying Scala Serverless Lambda using Travis CI</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E5LNHv5KaXCrx8hDlAEj_A.png" /><figcaption>Left to right: Scala, Travis CI, AWS Lambda, Serverless Framework</figcaption></figure><p>I have spent the last week learning about the best way to deploy a Scala serverless lambda function into AWS using Travis CI. I have hit so many roadblocks on the way that no one should go through what I did. The code in this <a href="https://github.com/5tigerjelly/aws-scala-travis-ci-guide">post is here</a>.</p><h4>Prerequisite</h4><p>I will assume you already know and have an Amazon Web Service (AWS) account. If you don’t, please go make one. You will also need a GitHub account.</p><h4>High-Level Picture</h4><ol><li>We will create a lambda function using the serverless framework.</li><li>We will create an IAM role on AWS and provide it to Travis CI</li><li>We will use Travis CI to auto-deploy to AWS every time we commit</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*D7_ShMRn-8L11wOx" /><figcaption>Photo by <a href="https://unsplash.com/@the_roaming_platypus?utm_source=medium&amp;utm_medium=referral">The Roaming Platypus</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Serverless Framework</h3><p>The Serverless Framework is an open source tool to generate lambda function templates. It will generate the boilerplate needed to serve a basic lambda function. It can connect to any provider, such as Google Cloud Platform, Microsoft Azure, IBM OpenWhisk and so on. In this example, I will be deploying to AWS.</p><p>First, you will need to install the serverless cli on your machine by running</p><pre># Installing the serverless cli<br>npm install -g serverless</pre><p>Once you have installed the framework, let’s create the aws-scala boilerplate! If you are interested in another language or different provider, check the <a href="https://github.com/serverless/serverless/tree/master/lib/plugins/create/templates">list of templates here</a>.</p><pre># Create a new Serverless Service/Project<br>serverless create --template aws-scala-sbt --path my-service</pre><pre># Change into the newly created directory<br>cd my-service</pre><p>You can already see the magic template appear once you open it in an editor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3SA-XXZtHIpj9Reu6L_v-w.png" /></figure><p>Now the basic code it there, head over to the serverless.yml file. We need to slightly edit the configuration.</p><p>Let’s change the service name to my-scala-lambda just for the heck of it, under function-&gt;hello-&gt;handler change the hello.Handler to hello.ApiGatewayHandler. Also, let&#39;s add an events so the serverless framework will also generate an API gateway for us to ping.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/370ff7f277ac523a4c0c59a44d98ed1a/href">https://medium.com/media/370ff7f277ac523a4c0c59a44d98ed1a/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bzp7a89G2PbD44Bh" /><figcaption>Photo by <a href="https://unsplash.com/@marvelous?utm_source=medium&amp;utm_medium=referral">Marvin Meyer</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>GitHub</h3><p><em>TLDR : If you are a GitHub guru, git initialize this repo and push it to GitHub.</em></p><p>Let’s initialize this folder into a git repository and push it, so your peers can appreciate this fine code you wrote. I like to create the repo first in GitHub, so let’s do that. Create a <strong>public</strong> GitHub repo, and <strong>DO NOT Initialize this repository with a README.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*udlff94n5P-x0_uMMhvMNg.png" /><figcaption>The repo must be public and not with a README for the free tier</figcaption></figure><p>After creating follow the script under <strong>…or create a new repository on the command line. </strong>But add all files, not just the README.md.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_ZvzMqDprDTRMI__zHRngw.png" /></figure><p>For me, it would be</p><pre>echo &quot;# aws-scala-travis-ci-guide&quot; &gt;&gt; README.md<br>git init<br>git add .<br>git commit -m &quot;first commit&quot;<br>git remote add origin git@github.com:5tigerjelly/aws-scala-travis-ci-guide.git<br>git push -u origin master</pre><p>Now refresh the GitHub repo website!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kNDtrJhKsEGCuUwkxsSUQA.png" /></figure><p>You will see all the lambda code pushed to GitHub!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*g3tqkyWiuK2zgOmq" /><figcaption>Photo by <a href="https://unsplash.com/@freeche?utm_source=medium&amp;utm_medium=referral">Thomas Kvistholt</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Amazon Web Service</h3><h4>Create an IAM role</h4><p>We will need to create an IAM role for Travis so it will be able to create AWS resources and deploy our lambda code there. Let’s head to the AWS console. Go to Services -&gt; IAM -&gt; Users. Add a new user, set an appropriate name, like travis-ci and check <strong>Programmatic access</strong>. Click on <strong>next: Permissions.</strong></p><h4>Create Policy</h4><p>In the <strong>Attach existing policies directly</strong> tab, create a policy and paste the JSON below.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/553c441f8312277a79f36ec80bc670f0/href">https://medium.com/media/553c441f8312277a79f36ec80bc670f0/href</a></iframe><p>After creating this policy go back to the user creation, refresh the policies and select the one we just created. Skip tags, and create the user!</p><h4>Download access key and secret access key</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KDOAz5McYunbmpM_nT3MsA.png" /></figure><p>This page will <strong>never be shown to you ever again</strong>, so just download the CSV file. Once you have downloaded the key, we don’t need to do anything with AWS. We will come back later to check up on the status, but that will be it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*IpgFRdeBwo3ZDReD" /><figcaption>Photo by <a href="https://unsplash.com/@cmventi20?utm_source=medium&amp;utm_medium=referral">Cameron Venti</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Travis CI</h3><p>Head over to <a href="http://travis-ci.org/">travis-ci.org</a>, there you can deploy opensource projects for free. If you would like to deploy private projects, you will need to pay the upgraded version.</p><p>Sign in with GitHub, head to your settings, sync account and toggle the repo we created!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HHl7b80AKyG3ORxMWFe_sA.png" /><figcaption>Toggle the repo we created</figcaption></figure><p>Now, when we push this repo to GitHub, Travis-CI will look for a .travis.yml file, which contains the configuration we want. A virtual machine will boot up and run the commands needed.</p><h4>Create .travis.yml file</h4><p>Head back to the code editor, and on the root level of the folder structure, create a new file titled</p><pre>.travis.yml</pre><p>Then you will need to paste this code.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/05be5c4708578b7c0370fb4a45543e5e/href">https://medium.com/media/05be5c4708578b7c0370fb4a45543e5e/href</a></iframe><p>I think this is the real take away of this post. I spent quite some time coming up with this. There are many versions of this file, but this is the one that really worked for me.</p><h4>Add access keys</h4><p>Now we need to add our AWS access key and secret access key. There are two different ways you can do it.</p><ol><li>Encrypt the key and add it to .travis.yml this will be public on GitHub, but no one is able to decode it.</li><li>Set the environment variable in the Travis-ci website under settings.</li></ol><p>This really depends on your personal taste. I tried both and prefer the first method. If I am collaborating with someone else on this project, and a new IAM needed to be created, the other person will have to be given permission to edit on Travis, if you start having larger teams, this becomes a hassle. There might be a team management tool in Travis, but it means I have to do the overhead. So its easier to stick the encoded variables right in Travis. You can find more details about <a href="https://docs.travis-ci.com/user/encryption-keys/">Travis encryption here</a>.</p><pre>#install travis, you will need to have ruby<br>gem install travis</pre><pre>#inside your repo add your keys from the csv file<br>travis encrypt AWS_ACCESS_KEY_ID=&quot;&lt;your key here&gt;&quot; --add<br>travis encrypt AWS_SECRET_ACCESS_KEY=&quot;&lt;your key here&gt;&quot; --add</pre><p>Once you run the code, look back at your .travis.yml a long string of cryptic text is added. This is your access key and secret access key. To be honest, it is okay to leave the access key as is, and only encrypt the secret access key, but what could be so bad about being extra careful.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-VVC6YF-8F9DGP15CwV7dA.png" /></figure><p>Once the two keys are added, no one can even tell that the global variables set are AWS related.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NF0wmzs0WijkOQzj" /><figcaption>Photo by <a href="https://unsplash.com/@jakobowens1?utm_source=medium&amp;utm_medium=referral">Jakob Owens</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Lights, Camera, Action!</h3><p>Let&#39;s see if all this time spent was actually worth it!</p><pre>git add .<br>git commit -m &quot;adding travis.yml and secure keys&quot;<br>git push</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*94Y6wrcex0lfTv0FhVmfwQ.png" /></figure><p>You will see the Travis come to life. It will spit out a lot of things. It will run sbt assemly and create the target jar file, packaging everything. Then the serverless framework will take that jar, head over to AWS and deploy a cloud formation template to create all the resources needed. The jar file is uploaded into an S3 bucket, also auto-generated. It will create a lambda function and attach the API gateway.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fE1kWfNKZe79M9AegyhnbQ.png" /></figure><p>This is what you will see if all the stars aligned. Go to the endpoint printed in the output. Make sure to grab the endpoints link, not the ServiceEndpoint link. We didn’t define anything for the root directory so you will get an error.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OZnWTrBb8U5yTOynZpl1Ig.png" /><figcaption>It works!</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Jy4-oNwDiwOAYE8_" /><figcaption>Photo by <a href="https://unsplash.com/@aaronburden?utm_source=medium&amp;utm_medium=referral">Aaron Burden</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Summary</h3><p>In this post, we covered a wide range of tools and frameworks. First, we created the lambda function code using the serverless framework. Next, we created a GitHub repo to host our code. Then, we created an AWS IAM role and gave the credentials to travis.yml. Last, we committed our code and saw the AWS resources getting created and outputting the endpoint we can use.</p><p>All the code in this post can be <a href="https://github.com/5tigerjelly/aws-scala-travis-ci-guide">found here</a>. <em>Happy coding!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=18ddc681769f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Post-Cryptoapocalypse]]></title>
            <link>https://medium.com/@5tigerjelly/post-cryptoapocalypse-573ad418b3e2?source=rss-aa857556561b------2</link>
            <guid isPermaLink="false">https://medium.com/p/573ad418b3e2</guid>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Chris Oh]]></dc:creator>
            <pubDate>Tue, 16 Jan 2018 20:52:40 GMT</pubDate>
            <atom:updated>2018-01-16T23:08:26.123Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Fuck bitcoin hit two dollars a coin.</blockquote><p>Finally, it happened, the entire crypto market has hit the ground. In the world where bots do most of the trading, price fluctuation of buying and selling happens at a fraction of a second. No one knows why the bots buy, no one knows why the bots sell. In the matter of a few minutes while you were at the bathroom, now all that crypto is just ambiguous meaningless bytes somewhere in the cloud.</p><p>People been hearing about the news of a cryptocurrency crash approaching for the last few months, but actually it didn’t seem like it was happening. So what would actually happen after the bitcoin crash?</p><p>Besides the fact there will be hundreds of thousands of miserable people who invested late in the market, now we are left with these enormous infrastructures that used to mine cryptocurrency, suddenly becoming obsolete. Now something truly interesting happens.</p><p>The entire world now has an abundance of graphic cards in the market. Miners will try to get rid of the now useless power sucking graphic cards. AWS and other cloud computing companies would probably be very interested in acquiring these graphic cards at a cheap cost. Some mining companies might even change and become its own cloud computing company after all.</p><p>Suddenly, with super cheap graphic card prices everywhere, no one is interested in new graphic cards. You can just purchase 3,4 Nvidia 1080s and connect them to your desktop still cheaper and stronger than the new cards. AMD and Nvidia stock prices will drop soon after.</p><p>But with super cheap graphic cards, interesting markets will start to flourish. Similar example is when storage became very cheap, dropbox like services made online storage possible, google provides near unlimited storages, and the world shared petabytes of video on youtube everyday without a cost.</p><p>I think that is when better graphic intense gaming, applications will start developing on a serious level. It could be the beginning of a true virtual reality and augmented reality world. Computer vision will be in the hands of millions of companies making something unimaginable at a scale of magnitudes of what it is now.</p><p><em>*This is a fictional story based on Chris’ imanginations.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=573ad418b3e2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Reflection]]></title>
            <link>https://medium.com/@5tigerjelly/a-reflection-7e2c4e2821e9?source=rss-aa857556561b------2</link>
            <guid isPermaLink="false">https://medium.com/p/7e2c4e2821e9</guid>
            <category><![CDATA[college]]></category>
            <dc:creator><![CDATA[Chris Oh]]></dc:creator>
            <pubDate>Tue, 07 Nov 2017 10:04:07 GMT</pubDate>
            <atom:updated>2017-11-07T18:32:25.969Z</atom:updated>
            <content:encoded><![CDATA[<p>In life there are those choices that make a dent in your life, sometimes called cornerstones in life. It becomes what defines you, you become it. We are also a collection of all the choices that we made up until this moment in life. And you only get one shot at life, therefore you cannot ask someone to make a decision for you or blame others for a bad one.</p><p>When I chose to pursue Informatics over Computer Science in freshmen year, none of my friends even knew about that major. I didn’t care how famous a major was, I really enjoyed what I learned in the class and I chose it, definitely another cornerstone in my life.</p><p>One story that I will share with you that I didn’t share with many of my friends is that in 2015 right after my military I was actually trying to transfer to a different school. Same major, but in a school on the east coast. This decision was heavily influenced by my dad, which I guess wasn’t too happy with where I was. I wasn’t too inline with this opinion, but I was convinced that it was worth a try. The transfer required me to take physics and more math classes which was the worst quarter of my entire UW life. At the end I got rejected, I was really upset because I let my dad down, and wasted a complete quarter on unnecessary courses. But this was a choice that I made and I couldn’t blame my dad for it. So from there onward, I decided to go all in on INFO, another reason why I am still a senior with only 9 VLPA credits, LOL.</p><p>I went through the toughest class in Informatics, INFO 344 with CK Wang, which I will be TAing in the Winter, and got an internship. After that, I got to meet Prof. Jevin West and join the Viziometrics Project. I learned about research and gained interest in Computer Vision. I presented at the Undergraduate Symposium for two projects at the same time, and those two projects grew to become a Capstone project of itself, which one even got the ‘Best in Class’ award.</p><p>Mist of going through that crazy pile of research, I was a webmaster for the ASUW and also became a TA for Prof. West’s ‘Calling Bullshit’ class, which I am also TAing this quarter. I also became the ‘Director of Academics’ for IUGA and founded a new group within the iSchool called ‘SUDO’. I also met Younpyo Hong and formed a coding study group, which he still runs. Then I managed to get an internship that Summer. I met my mentor Doochan and Mike, who really made my experience their much more than what it could have been, also maybe because Doochan and I bonded as Koreans, lol. The joy of finally having this opportunity was amazing and learned so much.</p><p>It was definitely a hack of a ride. Now that I am done with most of my heavy coursework, I think the dust has settled a bit down. I am still very active on IUGA and SUDO, but I have some more time to think about things now.</p><p>Today I made a choice that is a bit more important than my usual choices of picking what to eat for dinner. It was a choice that took me weeks to think about and debate with my family and friends. We are merely just making the best choice at the moment of decision. <strong>I am excited to share that I will be joining HBC Digital as a full time Software Engineer!</strong></p><p>I would like to thank everyone who helped me get to where I am today. When I graduated high school in 2012, I would have never thought I would achieve so much in college. I was very lucky to meet the people I met on the way and learn from them. I would like to thank Dean for helping me navigate and close on the offer. I thank my family for financially and morally supporting me. And of course to all my peers who supported me, especially Sally.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7e2c4e2821e9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Coding interviews. Yuck.]]></title>
            <link>https://medium.com/@5tigerjelly/coding-interviews-yuck-ea5fd9fc069c?source=rss-aa857556561b------2</link>
            <guid isPermaLink="false">https://medium.com/p/ea5fd9fc069c</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[interview]]></category>
            <dc:creator><![CDATA[Chris Oh]]></dc:creator>
            <pubDate>Wed, 01 Mar 2017 20:27:36 GMT</pubDate>
            <atom:updated>2017-03-02T00:02:44.115Z</atom:updated>
            <content:encoded><![CDATA[<p>But what can you say? It’s become the standard for almost every company you will want to work for.</p><p>Let’s do a run down. First, choose your language. It doesn’t matter most of the time which language you choose if it is one of the major languages. However, you can be safe by choosing Java. Personally, I love Python. I learned Python in a week, and now I do all my interviews in Python. If you don’t know which language might be easier or better to use during a coding interview, go with one you learned first or feel most comfortable with. It takes time to learn a new language, so if you are in a hurry, just stick with one you are familiar with for now and learn a new language when you have time. If you don’t know any language, then I recommend Python, it is simple and clean.</p><p>Next, if you just finished a intro to programming course on Java, Python, C++, C# or anything else, please learn Data Structures and Algorithms (DSA)! DSA are the fundamental knowledge expected during coding interviews. Please actually take the time to read the textbooks from your course. I recommend the book, <a href="http://amzn.to/2mFYyn8">“Introduction to Algorithms”</a>. There are numerous concepts that I learn from the textbooks that ends up in coding interviews.</p><p>Then, once you have the basic knowledge of how programs work and how to code them, great! This is an important step, go to Amazon and purchase the book, <a href="http://amzn.to/2lUCvKX">“Cracking the Coding Interview”</a>. This book is considered the Bible in the programming world. If this is your first time hearing about this book, it’s okay! I only found out about it during my internship, which was after one full year in the Informatics program. The book is really thick, which might intimidate you at first. But, the actual book itself is only 1/3 of the entire book and the rest are explanations on the questions.</p><p>Also, there are hundreds if not thousands of online resources which has coding questions for you to practice on. I will share a few of the online resources I use the most. The most popular websites that I know of is <a href="https://goo.gl/a1xZ3R">Leetcode</a> and <a href="https://goo.gl/AhHa1X">HackerRank</a>. I used these two the most when preparing for interviews. Go to these websites and practice the hell out of them. There is no better way to explain. Allocate a few hours of your time every week to sit down and solve questions from there. From my experience, a good question usually take about 30 minutes to solve. Also for the sake of practice, try to solve it on a whiteboard and talk through it on what you will be doing. This will be exactly what is expected during interviews. You will most likely be interviewed by someone who will take note of your thought process, and not just your code alone.</p><p>Object Oriented Programing (OOP) and Design. This is another huge topic that should be in it’s separate post. But, I will touch on it a little. When you need to write a small program, a few lines might get the job done. However, when the size of the project grows, you will be creating multiple classes and defining objects. These so-called objects have fields and methods which you can create and then use. A famous question you might have heard of is the ‘parking lot’ question. I also heard about this for the first time not so long ago. I was really confused by what the question was aiming at and how this ties to the OOP design. Well, the question is asking can you modulate those objects and give those objects a functionality. For example, in a parking lot, there can a parking space. A floor will have multiple parking spaces. The parking lot will have multiple floors. These will be considered the fields of the ‘parking lot’ object. Then you can think of methods such as is the parking lot full? which could return a true or false value. There are usually endless amounts of possibilities to designing a object. So if you are given a OOP design question, you just have to try your best to show that you know and can think about all the possible cases and functionality.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ea5fd9fc069c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Learning out of Desperation]]></title>
            <link>https://medium.com/@5tigerjelly/learning-out-of-desperation-752e7ada53f4?source=rss-aa857556561b------2</link>
            <guid isPermaLink="false">https://medium.com/p/752e7ada53f4</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[tech]]></category>
            <dc:creator><![CDATA[Chris Oh]]></dc:creator>
            <pubDate>Tue, 28 Feb 2017 08:04:43 GMT</pubDate>
            <atom:updated>2017-03-01T23:58:03.995Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://goo.gl/lHHfrl">Back in my post on the journey on getting an internship</a>, there was a period of time when I was done applying for jobs. But time kept passing as I was waiting to hear back. There seemed to me nothing happening beyond that. I hated it. There was nothing I could do to get a response asking for an interview.</p><p>Out of frustration, I started to look at reasons why I wasn’t getting any interviews. There are so many possible reasons, but a huge factor is that most companies do not know what Informatics is, in the first place. Also, even those who do know about the major tend to prefer Computer Science students for stronger software development skills. I totally understand why recruiters might think that. However, there are numerous iSchool students who are well equipped with the software background to work as a full-time software developer. There is where I started to look for ways to show that on my resume. The answer I found to improve my chances was to take the Oracle Certified Associates(OCA) exam.</p><p>The OCA is an exam made by Oracle which is also the company in charge of Java. I say in charge because Sun Microsystems made Java, but then got acquired by Oracle. Because the exam is made by the creators of the language, it covers everything a software developer needs to know.</p><p><strong>Honestly, I don’t believe certificates can help much or even at all</strong>. However, there are different aspects to this so hear me out. First, when your resume is screened and filtered, it’s usually HR people who collect them and sort them. Of course, resumes that match job descriptions are the best, but having the OCA listed on your resume can’t hurt you at all. There is the pure learning part about taking this exam. As I bought an exam practice book, I learned so much about Java. I was surprised that the materials covered in CSE 142 and CSE 143 doesn’t cover many important concepts which can be useful in the work environment.</p><p>I started studying for the exam in the beginning of January and took the exam today, which is almost the end of February. It took me about two full months. I tried to spend at least 3 hours a week minimum to keep up the pace and cover all the material front to back. The practice problems were really challenging. The problems on the book are actually harder in order to help you and to make the actual exam feel easier. On the final week before the exam, I started to write summary notes to user for final reviewing. The weekend before the exam, I spent about 8 hours each day reviewing my final notes. Unfortunately, the closest testing center is at North Seattle Community College. So. I had to take the bus up there in the middle of the day and take the exam.</p><p>A few minutes after the exam, I was sent an email from Oracle with my results. The entire process is web-based, so it’s a really quick process. I was a bit worried, but the numerous hours of studying payed off. I passed the test. I came back to campus and updated my resume with the new certificate on it. I am happy that I finished this exam. Next, I want to try to obtain the Oracle Certified Programmer (OCP), which is the same certificate but for more professional developers with some years of experience.</p><p><a href="https://goo.gl/mp6iSp">You can view my certificate here.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=752e7ada53f4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>