<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>All blog posts on Ye Joo Park's Blog</title><link>https://park.is/blog_posts/</link><description>Recent content in All blog posts on Ye Joo Park's Blog</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Thu, 17 Apr 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://park.is/blog_posts/index.xml" rel="self" type="application/rss+xml"/><item><title>Web Workers in Next.js 15 with Comlink</title><link>https://park.is/blog_posts/20250417_nextjs_comlink_examples/</link><pubDate>Thu, 17 Apr 2025 00:00:00 +0000</pubDate><guid>https://park.is/blog_posts/20250417_nextjs_comlink_examples/</guid><description>&lt;p&gt;Running heavy computations or background tasks directly on the main thread can lead to a sluggish user interface 🐌. Web Workers offer a solution by allowing you to run scripts in background threads, keeping your UI responsive. However, communicating with Web Workers traditionally involves a lot of boilerplate code using &lt;code&gt;postMessage&lt;/code&gt; and event listeners.&lt;/p&gt;&#10;&lt;p&gt;&lt;a href="https://github.com/GoogleChromeLabs/comlink"&gt;Comlink&lt;/a&gt; is a tiny library by the Google Chrome team that simplifies Web Worker communication, making it feel like you&amp;rsquo;re interacting with local objects or functions.&lt;/p&gt;</description></item><item><title>Market Dynamics of the Big Three Cloud Providers</title><link>https://park.is/blog_posts/20250218_market_dynamics_of_big_three_cloud_providers/</link><pubDate>Tue, 18 Feb 2025 00:00:00 +0000</pubDate><guid>https://park.is/blog_posts/20250218_market_dynamics_of_big_three_cloud_providers/</guid><description>&lt;img src="https://r2cdn.perplexity.ai/pplx-full-logo-primary-dark%402x.png" class="logo" width="120"/&gt;&#10;&lt;p&gt;✒️ I&amp;rsquo;ve used &lt;a href="https://perplexity.ai"&gt;Perplexity&lt;/a&gt;&amp;rsquo;s newly-released &lt;a href="https://www.perplexity.ai/hub/blog/introducing-perplexity-deep-research"&gt;Deep Research&lt;/a&gt; to draft this post.&lt;/p&gt;&#10;&lt;p&gt;The cloud computing industry has undergone transformative growth over the past decade, with Amazon Web Services (AWS), Microsoft Azure, and Google Cloud Platform (GCP) collectively dominating the market. This report synthesizes historical market share trends, current competitive dynamics, and future projections for these three hyperscalers, contextualized by technological advancements, regional developments, and strategic investments.&lt;/p&gt;&#10;&lt;h2 id="-historical-market-share-evolution"&gt;📊 Historical Market Share Evolution&lt;/h2&gt;&#10;&lt;h3 id="aws-the-early-dominator"&gt;AWS: The Early Dominator&lt;/h3&gt;&#10;&lt;img src="https://upload.wikimedia.org/wikipedia/commons/thumb/9/93/Amazon_Web_Services_Logo.svg/320px-Amazon_Web_Services_Logo.svg.png" alt="AWS Logo" height="60" style="margin-bottom: 20px" /&gt;&#10;&lt;p&gt;AWS pioneered the cloud infrastructure market in the mid-2000s, leveraging Amazon&amp;rsquo;s e-commerce infrastructure to establish a first-mover advantage. By 2017, AWS commanded approximately 33% of the global cloud market, a figure that has since stabilized around 31–32% despite intensified competition&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt;. Key to its early success were competitive pricing, a vast service catalog, and rapid scalability. However, AWS&amp;rsquo;s growth rate has decelerated in recent years, dropping from 27% year-over-year (YoY) in Q1 2023 to 12% by Q4 2024&lt;sup id="fnref:3"&gt;&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref"&gt;3&lt;/a&gt;&lt;/sup&gt;&lt;sup id="fnref:4"&gt;&lt;a href="#fn:4" class="footnote-ref" role="doc-noteref"&gt;4&lt;/a&gt;&lt;/sup&gt;. This slowdown reflects both market saturation in core offerings and rising competition in emerging sectors like AI.&lt;/p&gt;</description></item><item><title>Unexpected Behaviors of the R Programming Language</title><link>https://park.is/blog_posts/20250118_unexpected_behaviors_in_r/</link><pubDate>Sat, 18 Jan 2025 00:00:00 +0000</pubDate><guid>https://park.is/blog_posts/20250118_unexpected_behaviors_in_r/</guid><description>&lt;p&gt;Consider this R code where it creates an R vector.&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-R" data-lang="R"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# create a vector&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#111"&gt;v&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;-&lt;/span&gt; &lt;span style="color:#75af00"&gt;c&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;2&lt;/span&gt;&lt;span style="color:#111"&gt;,&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;3&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here is a seemingly simple task - how do you get the container type of the vector &lt;code&gt;v&lt;/code&gt;?&lt;/p&gt;&#10;&lt;p&gt;I&amp;rsquo;m looking for a straightforward function that would return &amp;ldquo;vector&amp;rdquo; if I pass &lt;code&gt;v&lt;/code&gt; as an argument.&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#272822;background-color:#fafafa;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-R" data-lang="R"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75af00"&gt;some_function&lt;/span&gt;&lt;span style="color:#111"&gt;(&lt;/span&gt;&lt;span style="color:#111"&gt;v&lt;/span&gt;&lt;span style="color:#111"&gt;)&lt;/span&gt; &lt;span style="color:#75715e"&gt;# should return &amp;#34;vector&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;My first intuition is to use the commonly used functions to inspect objects - &lt;code&gt;typeof()&lt;/code&gt;, &lt;code&gt;class()&lt;/code&gt; and &lt;code&gt;mode()&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>How to Replace GPU Cooling Fans without Disassmbling the Entire Card</title><link>https://park.is/blog_posts/20240820_replace_zotac_rtx_fans/</link><pubDate>Tue, 20 Aug 2024 00:00:00 +0000</pubDate><guid>https://park.is/blog_posts/20240820_replace_zotac_rtx_fans/</guid><description>&lt;p&gt;I&amp;rsquo;ve been using a Zotac RTX 2060 Super to power four 2K monitors. After five years of almost non-stop usage in a high-dust environment, the GPU&amp;rsquo;s cooling performance started to degrade due to the fans slowing down. So I decided to replace the cooling fans.&lt;/p&gt;&#10;&lt;p&gt;Replacing the cooling fans on GPUs can be a hassle, especially if you separate the PCB and heatsink. Once you take the heatsink off from the PCB, you can&amp;rsquo;t reuse the thermal pads. You have no option but to measure the depth and purchase new ones online. Nearly every tutorial you find on the internet will first guide you to completely disassemble the graphics card.&lt;/p&gt;</description></item><item><title>Extract Timestamp from UUID v7 using Javascript</title><link>https://park.is/blog_posts/20240803_extracting_timestamp_from_uuid_v7/</link><pubDate>Sat, 03 Aug 2024 00:00:00 +0000</pubDate><guid>https://park.is/blog_posts/20240803_extracting_timestamp_from_uuid_v7/</guid><description>&lt;h2 id="time-based-uuids"&gt;Time-based UUIDs&lt;/h2&gt;&#10;&lt;p&gt;A UUID (Universally Unique Identifier) is a 128-bit number used to uniquely identify records or information.&lt;/p&gt;&#10;&lt;p&gt;Time-based UUIDs are a category of UUIDs that incorporate the current timestamp into their structure, allowing for chronological ordering of the generated UUIDs. They are particularly useful in distributed systems where unique identifiers that are sortable by creation time are beneficial. There are several versions of time-based UUIDs, including UUID v1, UUID v6, and UUID v7, each with different methods of encoding the timestamp and other components.&lt;/p&gt;</description></item><item><title>Run MOSS Plagiarism Checker on Jupyter Notebooks</title><link>https://park.is/blog_posts/20230420_running_moss_plagiarism_checker/</link><pubDate>Thu, 20 Apr 2023 00:00:00 +0000</pubDate><guid>https://park.is/blog_posts/20230420_running_moss_plagiarism_checker/</guid><description>&lt;h2 id="moss"&gt;MOSS&lt;/h2&gt;&#10;&lt;p&gt;&lt;a href="https://theory.stanford.edu/~aiken/moss/"&gt;MOSS&lt;/a&gt; (Measure of Software Similarity) is a system to to determine the similarity of programs. It&amp;rsquo;s most commonly used to detect plagiarism in programming classes. It was developed in 1994 by David A. Aiken, Robert Sedgewick, and Andrew W. Appel at Stanford University.&lt;/p&gt;&#10;&lt;h3 id="moss-for-plagiarism-detection"&gt;MOSS for Plagiarism Detection&lt;/h3&gt;&#10;&lt;p&gt;&lt;a href="https://theory.stanford.edu/~aiken/moss/"&gt;MOSS&lt;/a&gt; (Measure of Software Similarity) is a great tool for catching plagiarism because it can identify even small similarities that may not be obvious to the human eye. MOSS works by comparing the source code of two or more files. It does this by breaking the code down into tokens, which are the smallest meaningful units of code. A token could be a variable name, a function name, or a keyword. MOSS then compares the tokens in each file to see how many of them are the same.&lt;/p&gt;</description></item><item><title>Duplicating a Supabase Postgres Schema to a New Project</title><link>https://park.is/blog_posts/20211104_duplicate_a_supabase_database/</link><pubDate>Thu, 04 Nov 2021 00:00:00 +0000</pubDate><guid>https://park.is/blog_posts/20211104_duplicate_a_supabase_database/</guid><description>&lt;p&gt;Looking to duplicate a Postgres database in a Supabase project to another project? Using &lt;code&gt;pg_dump&lt;/code&gt; and &lt;code&gt;pg_restore&lt;/code&gt; won&amp;rsquo;t work because you only have superuser access through the Supabase dashboard. Here&amp;rsquo;s a workflow of duplicating a Supabase Postgres schema using pgAdmin and the Supabase dashboard.&lt;/p&gt;&#10;&lt;h2 id="exporting-schema"&gt;Exporting Schema&lt;/h2&gt;&#10;&lt;p&gt;You can use the &lt;code&gt;pg_dump&lt;/code&gt; in a CLI as well.&lt;/p&gt;&#10;&lt;h3 id="right-click-on-pgadmins-public-schema-and-click-backup"&gt;Right-click on pgAdmin&amp;rsquo;s public schema and click Backup&lt;/h3&gt;&#10;&lt;p&gt;&lt;img src="https://user-images.githubusercontent.com/1064036/140382400-0792e227-4d7b-48e1-bfc1-bba413f1038e.png" alt="image"&gt;&lt;/p&gt;&#10;&lt;h3 id="enter-a-filename-and-choose-plain-format"&gt;Enter a filename and choose Plain format&lt;/h3&gt;&#10;&lt;p&gt;&lt;img src="https://user-images.githubusercontent.com/1064036/140382436-ca1b821f-0f44-4d58-a537-863569f3ad5b.png" alt="image"&gt;&lt;/p&gt;</description></item><item><title>Two useful Firebase Hacks</title><link>https://park.is/blog_posts/20211028_firebase_useful_functions/</link><pubDate>Thu, 28 Oct 2021 00:00:00 +0000</pubDate><guid>https://park.is/blog_posts/20211028_firebase_useful_functions/</guid><description>&lt;p&gt;I was once an avid user of &lt;a href="https://firebase.google.com/"&gt;Firebase&lt;/a&gt;. But over time, I gradually became fond of PostgreSQL-backed open-source alternatives like &lt;a href="https://hasura.io/"&gt;Hasura&lt;/a&gt; or &lt;a href="https://supabase.io/"&gt;Supabase&lt;/a&gt; and moved on. The two things that I don&amp;rsquo;t miss in Firebase are:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;No way to change custom user claims in the dashboard&lt;/li&gt;&#10;&lt;li&gt;No easy one-click solution to auto-timestamp document updates in Firestore 😤&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;Here are two Firebase (serverless) functions to make your life easier. &lt;strong&gt;Both are slight modifications of community knowledge from StackOverflow.&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>PostgreSQL Trigger: Calculate the Difference between Two Timestamps in Seconds</title><link>https://park.is/blog_posts/20210605_postgres_trigger_time_between_two_dates/</link><pubDate>Sat, 05 Jun 2021 00:00:00 +0000</pubDate><guid>https://park.is/blog_posts/20210605_postgres_trigger_time_between_two_dates/</guid><description>&lt;p&gt;A SQL trigger is a function that is automatically invoked when an event occurs. To set a trigger, you specify the following:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;which table(s) and column(s) to listen to&lt;/li&gt;&#10;&lt;li&gt;which actions to listen to (e.g., &lt;code&gt;INSERT&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;DELETE&lt;/code&gt;)&lt;/li&gt;&#10;&lt;li&gt;what function or procedure to invoke.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Triggers have many use cases. Some examples are:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Create an audit trail&lt;/strong&gt;: You have a table that contains sensitive information. You create a trigger to record all changes (what change has been made, which user has made the change, when the change has been made) to a separate table.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Integrity check&lt;/strong&gt;: Before adding a student to a class roster, you want to ensure that the student&amp;rsquo;s previous course enrollments fulfill prerequisites.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Derive additional data&lt;/strong&gt;: You have a table that contains the start and the end time of an online exam for test-takers. When a student is done with the exam, you want to calculate how long the student took to complete the exam using the start and end timestamps. Note that this can also be implemented using a generated column.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;This post will implement the last example. You create a test-taking web app where you mark the start time (&lt;code&gt;start_time&lt;/code&gt;) when the student hits the &amp;ldquo;Start&amp;rdquo; button. Once the student finishes taking the exam and clicks on &amp;ldquo;Submit&amp;rdquo;, the web app will mark the finish time (&lt;code&gt;end_time&lt;/code&gt;). You want to automatically calculate how long the test-taker spent on the exam in &lt;strong&gt;seconds&lt;/strong&gt;.&lt;/p&gt;</description></item><item><title>Add a multiline environment variable to Vercel (or Heroku)</title><link>https://park.is/blog_posts/20210118_add_a_multiline_env_variable_to_vercel/</link><pubDate>Mon, 18 Jan 2021 00:00:00 +0000</pubDate><guid>https://park.is/blog_posts/20210118_add_a_multiline_env_variable_to_vercel/</guid><description>&lt;p&gt;One of the common issues when deploying a React project with &lt;code&gt;firebase-admin&lt;/code&gt; is that a secret environment variable with a newline (&lt;code&gt;\n&lt;/code&gt;) character will cause a build error.&lt;/p&gt;&#10;&lt;p&gt;Assume that the text below is a simplified version of your &lt;code&gt;firebase-admin&lt;/code&gt; private key.&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;-----BEGIN PRIVATE KEY-----&#10;abcde&#10;fghij&#10;klmno&#10;pqrs=&#10;-----END PRIVATE KEY-----&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;In a &lt;code&gt;.env&lt;/code&gt; file, this would be represented as:&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;MY_PRIVATE_KEY=&amp;#34;-----BEGIN PRIVATE KEY-----\nabcde\nfghij\nklmno\npqrs=\n-----END PRIVATE KEY-----\n&amp;#34;&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;What happens when you add a secret environment variable containing your private key value - &lt;code&gt;&amp;quot;-----BEGIN PRIVATE KEY-----\nabcde\nfghij\nklmno\npqrs=\n-----END PRIVATE KEY-----\n&amp;quot;&lt;/code&gt; and redeploy?&lt;/p&gt;</description></item><item><title>Detecting Local Image Features with SIFT</title><link>https://park.is/blog_posts/20180406_sift/</link><pubDate>Fri, 06 Apr 2018 00:00:00 +0000</pubDate><guid>https://park.is/blog_posts/20180406_sift/</guid><description>&lt;p&gt;SIFT (Scale-Invariant Feature Transform) is a computer vision algorithm for detecting and describing local features in images. Developed by David Lowe in 1999, SIFT has become a fundamental tool for various applications due to its robustness and versatility.&lt;/p&gt;&#10;&lt;h2 id="use-cases-of-sift"&gt;Use Cases of SIFT&lt;/h2&gt;&#10;&lt;h3 id="-object-recognition"&gt;👀 Object Recognition&lt;/h3&gt;&#10;&lt;p&gt;SIFT is widely used for detecting and identifying specific objects within complex scenes. Its ability to extract distinctive features that are invariant to scale, rotation, and illumination changes makes it effective for recognizing objects across different viewpoints and conditions.&lt;/p&gt;</description></item></channel></rss>