<?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 Joshen Lim on Medium]]></title>
        <description><![CDATA[Stories by Joshen Lim on Medium]]></description>
        <link>https://medium.com/@limjoshen?source=rss-6d0ace092d9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*xmMvr7bAH48G14Y2</url>
            <title>Stories by Joshen Lim on Medium</title>
            <link>https://medium.com/@limjoshen?source=rss-6d0ace092d9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 19:06:27 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@limjoshen/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[Gradient Borders with Pure CSS]]></title>
            <link>https://medium.com/@limjoshen/gradient-borders-with-pure-css-db55c83c840b?source=rss-6d0ace092d9------2</link>
            <guid isPermaLink="false">https://medium.com/p/db55c83c840b</guid>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Joshen Lim]]></dc:creator>
            <pubDate>Mon, 17 Nov 2025 04:01:42 GMT</pubDate>
            <atom:updated>2025-11-17T04:05:37.402Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yDh9eR80nufA6ULNk9o7vw.png" /></figure><p>You’ve probably seen those subtle, glowing gradient borders around cards, buttons, or avatars and wondered how to make them without adding extra layers or images. Turns out, it’s entirely doable with just one pseudo-element and a bit of masking magic.</p><p>Let’s build it up step by step.</p><h3>1. Start with a Simple Element</h3><p>All you need is one container:</p><pre>&lt;div class=&quot;card&quot;&gt;<br>  &lt;h2&gt;Gradient Border&lt;/h2&gt;<br>  &lt;p&gt;Lorem Ipsum&lt;/p&gt;<br>&lt;/div&gt;</pre><h3>2. Set Up the Base Styles</h3><p>We’ll make it look like a regular card first.</p><pre>.card {<br>  position: relative;<br>  padding: 24px;<br>  border-radius: 16px;<br>  background: #eef1f5;<br>  color: #1c2333;<br>  isolation: isolate;<br>}</pre><p>isolation: isolate; ensures the gradient pseudo-element we’ll add stays neatly layered behind your content.</p><h3>3. Add the Gradient Layer</h3><p>The border itself is drawn using a ::before pseudo-element.</p><pre>.card::before {<br>  content: &#39;&#39;;<br>  position: absolute;<br>  inset: 0;<br>  border-radius: inherit;<br>}</pre><p>At this point, you have an invisible layer sitting exactly on top of the card.</p><h3>4. Create Space for the Border</h3><p>Add a transparent border so the gradient has a place to live:</p><pre>.card::before {<br>  border: 1px solid transparent;<br>}</pre><p>This invisible line defines how thick your gradient border will be.</p><h3>5. Paint the Gradient</h3><p>Now, fill that border with a gradient that sits in the border-box area.</p><pre>.card::before {<br>  background: linear-gradient(<br>    51.6deg,<br>    #945eff 0%,<br>    #2061ff 36.12%,<br>    #ff757d 78.03%,<br>    #ffd66c 94.76%<br>  ) border-box;<br>}</pre><p>The gradient now covers the whole box, including the border area — but we only want the ring to show, not the middle.</p><h3>6. Mask Out the Center</h3><p>Here’s where the magic happens: masking removes the inner part, leaving only the gradient ring visible.</p><pre>.card::before {<br>  mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);<br>  mask-composite: exclude;</pre><pre>  /* Safari/WebKit fallback */<br>  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);<br>  -webkit-mask-composite: xor;</pre><pre>  pointer-events: none;<br>}</pre><p>Think of it as cutting a hole through the middle of the gradient so you’re left with just the outer edge.</p><h3>Full Example</h3><pre>.card {<br>  position: relative;<br>  padding: 24px;<br>  border-radius: 16px;<br>  background: #eef1f5;<br>  color: #1c2333;<br>  isolation: isolate;<br>}</pre><pre>.card::before {<br>  content: &#39;&#39;;<br>  position: absolute;<br>  inset: 0;<br>  border-radius: inherit;<br>  border: 1px solid transparent;<br>  background: linear-gradient(51.6deg, #945eff 0%, #2061ff 36.12%, #ff757d 78.03%, #ffd66c 94.76%) border-box;<br>  mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);<br>  mask-composite: exclude;<br>  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);<br>  -webkit-mask-composite: xor;<br>  pointer-events: none;<br>}</pre><h3>Variations</h3><ul><li><strong>Circle avatars:</strong> set border-radius: 50%.</li><li><strong>Thicker borders:</strong> increase the border value.</li><li><strong>Animated gradients:</strong> change the gradient angle or colors on hover.</li></ul><pre>.card:hover::before {<br>  background: linear-gradient(120deg, #945eff, #2061ff, #ff757d, #ffd66c) border-box;<br>  transition: background 0.3s ease;<br>}</pre><h3>Shortcut: No Masking Version</h3><p>For broader browser support, you can fake the effect using layered backgrounds:</p><pre>.card {<br>  border: 1px solid transparent;<br>  border-radius: 16px;<br>  background:<br>    linear-gradient(#eef1f5, #eef1f5) padding-box,<br>    linear-gradient(51.6deg, #945eff, #2061ff, #ff757d, #ffd66c) border-box;<br>}</pre><p>It’s not as flexible but still looks great — and works almost everywhere.</p><p>That’s it! A fully customizable gradient border built from scratch, no extra HTML or images. You can tweak the gradient, border thickness, or corner radius, and even animate it for hover effects.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0y-eG05qTI3WiXZkYPr8xw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=db55c83c840b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to create a unique CRUD app for your portfolio with React, Supabase]]></title>
            <link>https://medium.com/@limjoshen/how-to-create-a-unique-crud-app-for-your-portfolio-with-react-supabase-5681f159f146?source=rss-6d0ace092d9------2</link>
            <guid isPermaLink="false">https://medium.com/p/5681f159f146</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[supabase]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[frontend]]></category>
            <dc:creator><![CDATA[Joshen Lim]]></dc:creator>
            <pubDate>Mon, 22 Apr 2024 17:27:33 GMT</pubDate>
            <atom:updated>2024-04-22T17:27:33.094Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*Ixg8vrtpKoohloJ9" /><figcaption><a href="http://www.supabase.com/">Supabase</a>, now a robust and fully available service, offers real-time databases, authentication, auto-generated APIs, and storage</figcaption></figure><p>With Supabase announcing its General Availability, there has never been a better time to leverage this comprehensive platform for building dynamic applications. Say goodbye to mundane todo lists and replace them with full-featured CRUD apps that highlight your technical prowess and creativity using React and Supabase.</p><blockquote><a href="http://www.supabase.com/">Supabase</a>, now a robust and fully available service, offers a multitude of powerful features including real-time databases, authentication, auto-generated APIs, storage, and much more — all powered by the solid foundation of PostgreSQL. This guide will walk you through the process of using Supabase with React to create a standout portfolio project that goes well beyond basic functionality.</blockquote><p>I’ll be sharing a personal website I built really quickly in only 3 weeks with a supabase backend — Syn (from Synesthesia), which ultimately landed me internships and a full-time role as a Frontend Web Developer. <a href="https://syn.vercel.app/">Click here to try it out</a>.</p><h3>Introduction</h3><p>This is Syn:</p><blockquote>A website for people to<strong> vote on what colour comes to their mind when they listen to some classical music pieces, which then creatively displays the data through gradients and timestamps.</strong></blockquote><p>My <a href="https://www.reddit.com/r/reactjs/comments/yz6qz2/after_3_weeks_i_finally_finished_my_first_reactjs/">reddit post on /r/reactjs</a> currently sits at <strong>28.6k views, 94% upvote rate, 15 total shares, and 134 upvotes</strong>.</p><figure><img alt="Syn: A website for people to vote on what colour comes to their mind when they listen to classical music." src="https://cdn-images-1.medium.com/max/1024/1*VVULpIYKTRF7cyYz9PFf4g.png" /><figcaption>Syn: A website for people to vote on what colour comes to their mind when they listen to classical music.</figcaption></figure><p>So.. why did I make it? I made this website to practise full-stack web development in 2022, and to simultaneously share my passion in music with others. The pieces I chose to feature are from the Impressionist era, which has close ties to the Impressionist art movement in 19th century France. They both share similar aesthetic characteristics, focusing on atmosphere and mood, which I feel provides a listener/viewer with the creative flexibility when interpreting the works.</p><h3>How to Use “Syn”</h3><figure><img alt="On Syn, you can vote the exact hexcode you “hear” at a specific timestamp in the music." src="https://cdn-images-1.medium.com/max/918/1*CLKL2TIRtRSU7VV0H1Dpgw.png" /><figcaption>On Syn, you can vote the exact hexcode you “hear” at a specific timestamp in the music.</figcaption></figure><p>On Syn, you can vote the exact hexcode you “hear” at a specific timestamp in the music. Once submitted, all components that display data are re-rendered through a callback function to the parent component.</p><pre>// SongSection.tsx<br>const fetchColorsData = async () =&gt; {<br>  let { data, error, status } = await supabase<br>    .rpc(&#39;collect_votes_of&#39;, {<br>      songid: songId<br>    })</pre><pre>  if (error &amp;&amp; status !== 406) {<br>    console.error(error)<br>  }<br>  setColorData(data);<br>}<br>// ...<br>const refreshData = () =&gt; {<br>  fetchColorsData();<br>  fetchHexData();<br>  setRefresh(true);<br>}<br>// ...<br>&lt;ColorPopover dataUpdater={refreshData} songId={songId} /&gt;<br></pre><pre>// ColorPopver.tsx<br>...<br>const handleSubmit = async () =&gt; {<br>  // ... if successful<br>  openSuccess();<br>  console.log(`${color} successfully submitted.`);<br>  props.dataUpdater(); // &lt;-- <br>};</pre><p>Above the player, each colored triangle represents a single vote. It is positioned by calculating (vote’s timestamp / songDuration) * 100%. It’s position is set to absolute in a container, and it’s left attribute is set to the value above.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/549/0*eB0MUs5IHZrAzFIH.png" /><figcaption>Each triangle is positioned based on the timestamp.</figcaption></figure><p>It works pretty well, but gets cluttered when there are many votes. Future iterations should group hex codes together or hide some hex codes, or prioritise the votes with comments.</p><pre>// CustomPlayer.tsx<br>function initMarkers() {<br>  console.log(`Initialising markers..`)<br>  const newMarkers = data?.map((row, id) =&gt; {<br>    return (<br>    &lt;Tooltip<br>      arrowSize={2}<br>      hasArrow<br>      placement=&#39;top-start&#39;<br>      key={id}<br>      label={row.username<br>        ? &lt;Stack spacing=&#39;0&#39;&gt;<br>            &lt;Text &gt;{row.comment}&lt;/Text&gt;<br>            &lt;Text fontSize=&#39;xx-small&#39;&gt;-{row.username}&lt;/Text&gt;<br>          &lt;/Stack&gt;<br>        : row.comment}<br>      fontSize=&#39;sm&#39;&gt;<br>      &lt;TriangleDownIcon<br>        color={row.hex_code}<br>        position=&quot;absolute&quot;<br>        left={timestampToPercentage(row.timestamp, duration!)}<br>        sx={{<br>          &quot;:hover&quot;: {<br>            transform: &quot;scale(2)&quot;,<br>            zIndex: &quot;2&quot;,<br>            filter: `drop-shadow(0px 0px 3px ${row.hex_code})`<br>          },<br>          transition: &quot;all cubic-bezier(.02,.62,.26,1) 0.5s&quot;<br>        }}<br>        /&gt;<br>    &lt;/Tooltip&gt;<br>  )});<br>  setMarkers(newMarkers);<br>  console.log(`New markers set.`);<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*u2-5mR4HFWcflEXdBoHeAA.png" /><figcaption>Some data is displayed through a table</figcaption></figure><p>The data is retrieved from the database and displayed on the top right. To avoid a really long scrolling list, I limited the number of rows to 10. So, how does the backend work, and how did I learn to set it up in only 3 weeks?</p><h3>Back-end: Supabase</h3><p>Supabase is an<strong> open source</strong> Firebase alternative, a <strong>PostgreSQL database </strong>that provides an instant <strong>RESTful API</strong>. Start your project with a Postgres database, Authentication, instant APIs, Edge Functions, Realtime subscriptions, and Storage. To get started, head over to <a href="http://supabase.com/">supabase.com</a> to start a new project. Once inside, head over to Table Editor and create your tables.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/536/0*C068MwaIhlQAJB6w.png" /></figure><p>Then, you can setup supabase in your React project to start retrieving and uploading data to the tables. Find more detailed information <a href="https://supabase.com/docs/guides/api">here</a> on how to use their REST API.</p><p>Once you’ve installed the library into your project with <br>npm install --save @supabase/supabase-js and acquired your API URL and API KEY, you can put them in your .env file in your root directory.</p><pre># .env<br>VITE_SUPABASE_URL=&#39;https://&lt;project_ref&gt;.supabase.co&#39;<br>VITE_SUPABASE_ANON_KEY=&#39;YOURKEY&#39;</pre><p>Then, initialise your supabase client, and call it in any component you like.</p><pre>// supabaseClient.tsx<br>import { createClient } from &#39;@supabase/supabase-js&#39;;</pre><pre>const supabaseUrl = import.meta.env.VITE_SUPABASE_URL;<br>const supabaseAnonKey = import.meta.env.VITE_SUPABASE_ANON_KEY;</pre><pre>export const supabase = createClient(supabaseUrl!, supabaseAnonKey!);</pre><pre>import { supabase } from &#39;../supabaseClient&#39;;</pre><pre>// SongSection.tsx<br>const fetchHexData = async () =&gt; {<br>  let { data, error, status } = await supabase<br>    .from(&#39;hexcodes&#39;)<br>    .select(&#39;*&#39;)<br>    .eq(&#39;song_id&#39;, songId);</pre><pre>  if (error &amp;&amp; status !== 406) {<br>    console.error(error);<br>  }</pre><pre>  console.log(`Hexcodes found with ID ${songId}`)<br>  setHexData(data);<br>}</pre><pre>// ColorPopover.tsx, submitting a vote<br>const handleSubmit = async () =&gt; {<br>  const { error } = await supabase<br>    .from(&#39;hexcodes&#39;)<br>    .upsert({<br>      song_id: props.songId,<br>      hex_code: color,<br>      timestamp: currTime,<br>      comment: comment,<br>      username: name})<br>    .select();<br>  // ... error handling <br>}</pre><p>If you are familiar with writing SQL queries, simple CRUD operations can be handled by built-in supabase JS functions. It’s that simple!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7hEtNsDstJanRL_j.png" /><figcaption>Tables can be populated with data directly upserted from the API calls.</figcaption></figure><h4>Supabase: Complex Data Handling</h4><p>For more complex queries, you can write your own SQL code in the <strong>SQL Editor </strong>to create SQL functions and triggers. They can be created in SQL, PL/pgSQL, and more.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*AGWaHqvlugta-oc_.png" /><figcaption>Write your own SQL functions.</figcaption></figure><p>What I love is that supabase also auto-generates API Docs for the functions/triggers you create, so all you have to do is click a single button, and copy-paste the code snippet into your IDE. Read more about Remote Propcedure Calls (RPC) <a href="https://supabase.com/docs/reference/javascript/rpc">here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_VlotWoFL-PYm6To.png" /><figcaption>Auto-generate the code-snippets for your functions with a single click.</figcaption></figure><h3>Conclusion</h3><p>From start to finish, my first ever full-stack personal website took 3 weeks, and it was definitely because I had tools like Supabase to help me make an app that <strong>functions correctly</strong>. Supabase allows me to add as many songs as I want to feature on my site, and even gather feedback from users. So far I love it, so <a href="https://syn.vercel.app/"><strong>give Syn a try today</strong></a>!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5681f159f146" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[EZ Integration: How to connect Stripe to Supabase Using Quickstarts]]></title>
            <link>https://medium.com/@limjoshen/ez-integration-how-to-connect-stripe-to-supabase-using-quickstarts-d1808aae0c1b?source=rss-6d0ace092d9------2</link>
            <guid isPermaLink="false">https://medium.com/p/d1808aae0c1b</guid>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[supabase]]></category>
            <category><![CDATA[stripe]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Joshen Lim]]></dc:creator>
            <pubDate>Thu, 21 Dec 2023 18:45:25 GMT</pubDate>
            <atom:updated>2023-12-21T18:45:25.749Z</atom:updated>
            <content:encoded><![CDATA[<p>Let’s get to know more about Generative AI apps! <a href="https://www.taleweaver.net/"><strong>TaleWeaver</strong></a><strong> </strong>has been running for a while now, and I look back at the painful experience of integrating a Stripe payment gateway with our app. Thankfully, with <a href="https://supabase.com/">Supabase</a>, handling payments and subscriptions are so much easier!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/1*vn1yKKaYWHgTKC54bJvDCQ.png" /><figcaption>TaleWeaver allows you to generate illustrated storybooks for kids aged 2–6!</figcaption></figure><p>In the realm of web development, marrying a robust backend with seamless payment integration is crucial for any scalable application. Enter <strong>Supabase and Stripe</strong> — a dynamic duo that can elevate your project’s capabilities. Supabase, with its real-time database and serverless functions, offers a strong foundation for web applications, while Stripe, on the other hand, is renowned for its secure and flexible payment processing solutions. When combined, they provide a potent solution for developers aiming to integrate subscription-based models or one-time payments effortlessly.</p><h4>Quickstarts</h4><p>One of the standout features of Supabase is its Quickstarts, located in the <strong>SQL Editor</strong>. These Quickstarts are designed to expedite the development process by providing pre-configured schemas and functions tailored for specific functionalities. For those looking to dive into the world of Stripe Subscription integration, Supabase Quickstarts come as a boon. They allow developers to kickstart their Stripe Subscription integration schemas and functions, ensuring that the initial setup is both smooth and efficient!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YB-2dxRbB7MWJUFrkjkwyA.png" /><figcaption>Quickstarts to kickstart your Stripe Subscription integration</figcaption></figure><p>Let’s take a peek at what we get in these Quickstarts:</p><pre>/**<br>* USERS<br>* Note: This table contains user data. Users should only be able to view and update their own data.<br>*/<br>create table users (<br>  -- UUID from auth.users<br>  id uuid references auth.users not null primary key,<br>  full_name text,<br>  avatar_url text,<br>  -- The customer&#39;s billing address, stored in JSON format.<br>  billing_address jsonb,<br>  -- Stores your customer&#39;s payment instruments.<br>  payment_method jsonb<br>);<br>alter table users<br>  enable row level security;<br>create policy &quot;Can view own user data.&quot; on users<br>  for select using (auth.uid() = id);<br>create policy &quot;Can update own user data.&quot; on users<br>  for update using (auth.uid() = id);<br><br>/**<br>* This trigger automatically creates a user entry when a new user signs up via Supabase Auth.<br>*/<br>create function public.handle_new_user()<br>returns trigger as<br>$$<br>  begin<br>    insert into public.users (id, full_name, avatar_url)<br>    values (new.id, new.raw_user_meta_data-&gt;&gt;&#39;full_name&#39;, new.raw_user_meta_data-&gt;&gt;&#39;avatar_url&#39;);<br>    return new;<br>  end;<br>$$<br>language plpgsql security definer;<br><br>create trigger on_auth_user_created<br>  after insert on auth.users<br>  for each row<br>    execute procedure public.handle_new_user();<br><br>/**<br>* CUSTOMERS<br>* Note: this is a private table that contains a mapping of user IDs to Strip customer IDs.<br>*/<br>create table customers (<br>  -- UUID from auth.users<br>  id uuid references auth.users not null primary key,<br>  -- The user&#39;s customer ID in Stripe. User must not be able to update this.<br>  stripe_customer_id text<br>);<br>alter table customers enable row level security;<br>-- No policies as this is a private table that the user must not have access to.<br><br>/**<br>* PRODUCTS<br>* Note: products are created and managed in Stripe and synced to our DB via Stripe webhooks.<br>*/<br>create table products (<br>  -- Product ID from Stripe, e.g. prod_1234.<br>  id text primary key,<br>  -- Whether the product is currently available for purchase.<br>  active boolean,<br>  -- The product&#39;s name, meant to be displayable to the customer. Whenever this product is sold via a subscription, name will show up on associated invoice line item descriptions.<br>  name text,<br>  -- The product&#39;s description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.<br>  description text,<br>  -- A URL of the product image in Stripe, meant to be displayable to the customer.<br>  image text,<br>  -- Set of key-value pairs, used to store additional information about the object in a structured format.<br>  metadata jsonb<br>);<br>alter table products<br>  enable row level security;<br>create policy &quot;Allow public read-only access.&quot; on products<br>  for select using (true);<br><br>/**<br>* PRICES<br>* Note: prices are created and managed in Stripe and synced to our DB via Stripe webhooks.<br>*/<br>create type pricing_type as enum (&#39;one_time&#39;, &#39;recurring&#39;);<br>create type pricing_plan_interval as enum (&#39;day&#39;, &#39;week&#39;, &#39;month&#39;, &#39;year&#39;);<br>create table prices (<br>  -- Price ID from Stripe, e.g. price_1234.<br>  id text primary key,<br>  -- The ID of the prduct that this price belongs to.<br>  product_id text references products,<br>  -- Whether the price can be used for new purchases.<br>  active boolean,<br>  -- A brief description of the price.<br>  description text,<br>  -- The unit amount as a positive integer in the smallest currency unit (e.g., 100 cents for US$1.00 or 100 for ¥100, a zero-decimal currency).<br>  unit_amount bigint,<br>  -- Three-letter ISO currency code, in lowercase.<br>  currency text check (char_length(currency) = 3),<br>  -- One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.<br>  type pricing_type,<br>  -- The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`.<br>  interval pricing_plan_interval,<br>  -- The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months.<br>  interval_count integer,<br>  -- Default number of trial days when subscribing a customer to this price using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan).<br>  trial_period_days integer,<br>  -- Set of key-value pairs, used to store additional information about the object in a structured format.<br>  metadata jsonb<br>);<br>alter table prices<br>  enable row level security;<br>create policy &quot;Allow public read-only access.&quot; on prices<br>  for select using (true);<br><br>/**<br>* SUBSCRIPTIONS<br>* Note: subscriptions are created and managed in Stripe and synced to our DB via Stripe webhooks.<br>*/<br>create type subscription_status as enum (&#39;trialing&#39;, &#39;active&#39;, &#39;canceled&#39;, &#39;incomplete&#39;, &#39;incomplete_expired&#39;, &#39;past_due&#39;, &#39;unpaid&#39;);<br>create table subscriptions (<br>  -- Subscription ID from Stripe, e.g. sub_1234.<br>  id text primary key,<br>  user_id uuid references auth.users not null,<br>  -- The status of the subscription object, one of subscription_status type above.<br>  status subscription_status,<br>  -- Set of key-value pairs, used to store additional information about the object in a structured format.<br>  metadata jsonb,<br>  -- ID of the price that created this subscription.<br>  price_id text references prices,<br>  -- Quantity multiplied by the unit amount of the price creates the amount of the subscription. Can be used to charge multiple seats.<br>  quantity integer,<br>  -- If true the subscription has been canceled by the user and will be deleted at the end of the billing period.<br>  cancel_at_period_end boolean,<br>  -- Time at which the subscription was created.<br>  created timestamp with time zone default timezone(&#39;utc&#39;::text, now()) not null,<br>  -- Start of the current period that the subscription has been invoiced for.<br>  current_period_start timestamp with time zone default timezone(&#39;utc&#39;::text, now()) not null,<br>  -- End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created.<br>  current_period_end timestamp with time zone default timezone(&#39;utc&#39;::text, now()) not null,<br>  -- If the subscription has ended, the timestamp of the date the subscription ended.<br>  ended_at timestamp with time zone default timezone(&#39;utc&#39;::text, now()),<br>  -- A date in the future at which the subscription will automatically get canceled.<br>  cancel_at timestamp with time zone default timezone(&#39;utc&#39;::text, now()),<br>  -- If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with `cancel_at_period_end`, `canceled_at` will still reflect the date of the initial cancellation request, not the end of the subscription period when the subscription is automatically moved to a canceled state.<br>  canceled_at timestamp with time zone default timezone(&#39;utc&#39;::text, now()),<br>  -- If the subscription has a trial, the beginning of that trial.<br>  trial_start timestamp with time zone default timezone(&#39;utc&#39;::text, now()),<br>  -- If the subscription has a trial, the end of that trial.<br>  trial_end timestamp with time zone default timezone(&#39;utc&#39;::text, now())<br>);<br>alter table subscriptions<br>  enable row level security;<br>create policy &quot;Can only view own subs data.&quot; on subscriptions<br>  for select using (auth.uid() = user_id);<br><br>/**<br> * REALTIME SUBSCRIPTIONS<br> * Only allow realtime listening on public tables.<br> */<br>drop publication if exists supabase_realtime;<br>create publication supabase_realtime<br>  for table products, prices;</pre><h4><strong>USERS</strong></h4><p>The foundation of any application is its users. Supabase offers a clean user schema that not only holds essential user details like full_name and avatar_url but also provisions for billing_address and payment_method. With <a href="https://supabase.com/docs/guides/auth/row-level-security"><strong>row-level security</strong></a> in place, users can only access and modify their data, ensuring data privacy and security.</p><p><strong>Handling New Users<br></strong>One of the standout features here is the handle_new_user function and the associated trigger. This automation ensures that every time a new user signs up via Supabase Auth, a corresponding entry is created in the users table, populating it with essential user metadata. This hands-off approach streamlines the user management process.</p><h4>CUSTOMERS</h4><p>The customers table acts as a bridge between your application and Stripe. By mapping user IDs to their respective Stripe customer IDs, you can seamlessly track and manage subscriptions and payments without exposing sensitive Stripe data to the end-user.</p><h4>PRODUCTS and PRICES</h4><p>These tables are particularly interesting as they highlight the flexibility and adaptability of the schema. Instead of hardcoding products and prices directly into the database, Supabase integrates with Stripe through webhooks. This means any changes or additions to products or prices on Stripe’s end get synchronized to your database, ensuring real-time accuracy.</p><h4>SUBSCRIPTIONS</h4><p>Arguably the heart of the integration, the subscriptions table captures the essence of each user&#39;s subscription journey. With detailed timestamps, statuses, and associations with products and prices, it offers a comprehensive view of user subscriptions. Row-level security ensures users can only view their own subscription details, reinforcing data privacy.</p><h4><strong>REALTIME</strong></h4><p>In today’s fast-paced digital landscape, real-time updates are non-negotiable. Supabase acknowledges this by allowing real-time listening on public tables. This means any changes to products or prices, vital for user subscriptions, trigger instant updates in the application interface, offering users a seamless experience.</p><h3>Stripe</h3><p>So, why use Stripe as your payment gateway? With a few clicks and little to no-code, businesses can design a visually appealing pricing table on their Stripe Dashboard, tailored to showcase varied subscription levels directly to their clientele. This not only enhances the transparency of offerings but also significantly eases the path for customers to transition seamlessly to the checkout process. Furthermore, Stripe’s prowess extends beyond mere presentation. By integrating the Stripe Checkout, businesses can ensure secure, hassle-free payment experiences for their customers. Check out what we’ve done with TaleWeaver:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/0*VlftYqKxpQgE8Ued.png" /><figcaption>Embedded pricing tables in Stripe</figcaption></figure><h4>Conclusion</h4><p>Supabase’s Quickstarts for Stripe Subscription integration are a testament to modern web development’s power and flexibility. By providing pre-configured schemas and functions, developers can bypass the intricacies of setting up a database from scratch and focus on delivering a robust, user-friendly application. With Supabase handling the backend and Stripe powering the payments, the path to crafting a top-tier subscription-based application has never been clearer.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d1808aae0c1b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Supabase Vector and LLMs]]></title>
            <link>https://medium.com/@limjoshen/supabase-vector-and-llms-efa5d32f719d?source=rss-6d0ace092d9------2</link>
            <guid isPermaLink="false">https://medium.com/p/efa5d32f719d</guid>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[supabase]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Joshen Lim]]></dc:creator>
            <pubDate>Tue, 10 Oct 2023 02:01:39 GMT</pubDate>
            <atom:updated>2023-10-10T02:01:39.771Z</atom:updated>
            <content:encoded><![CDATA[<p>Let’s get to know more about Generative AI apps! I joined @supabase’s Content Storm to talk about an upcoming launch of our new product — <strong>TaleWeaver</strong>. With Supabase Vector, we’re extremely excited to leverage on their tools and APIs to handle embeddings, vectors, and more!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fwMWKys5P69DDBzUJiAdrw.png" /><figcaption>TaleWeaver is a web application that generates customised, illustrated storybooks</figcaption></figure><h3>Introduction</h3><p>TaleWeaver is a web application targeted at parents of children aged 2–6 that leverages on LLMs to solve this problem:</p><blockquote><em>Are you a time-strapped working parent struggling to find quality storytime for your child? TaleWeaver allows you generate safe, customisable illustrated storybooks tailored directly to your child’s learning needs. Feature your child as the main character, or make the story rhyme? No problem, start weaving your tales now!</em></blockquote><p>We realised that most illustrated storybook applications do not provide the customisation features that focuses on education at an early age. For apps that do, they also lack the guardrails and proper regulation to ensure that the content generated is age-appropriate and free of mature themes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/966/0*YqhoxrqMpHQLNgS3.png" /><figcaption>TaleWeaver ensures that storybooks are age-appropriate and free of mature themes.</figcaption></figure><p>In this article, we’ll explore how TaleWeaver aims to leverage embeddings (Work in Progress!) to make storytelling not just entertaining but also highly customized to your child’s needs.</p><h3>What are Embeddings?</h3><p>Before we dive into how TaleWeaver can use embeddings, let’s understand what they are. Embeddings are like digital fingerprints for text, images, videos, or any type of information. They capture the “relatedness” of content, making them invaluable for various applications, including search, recommendations, classifications, and clustering.</p><p>Imagine you have three phrases: “The cat chases the mouse,” “The kitten hunts rodents,” and “I like ham sandwiches.” As humans, it’s easy for us to group the first two phrases together because they have similar meanings. Embeddings help computers do the same, even when the words used are different.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*RshHo7nnwgcpDZ-Y.png" /><figcaption>Embeddings help computers calculate ‘relatedness’</figcaption></figure><blockquote><strong>How can TaleWeaver use Supabase Vector to better support our services?</strong></blockquote><h3>Enhancing Content Recommendations</h3><p><em>Imagine having a personal librarian who knows your child’s tastes inside out.</em></p><p>In TaleWeaver, embeddings could be used to recommend stories that are tailor-made for your child. It would go beyond simple genres by considering your child’s specific interests, reading level, and comprehension. The result? A curated selection of stories that are not just suitable but also captivating, ensuring that your child is always engaged and excited about their reading adventures.</p><p>With embeddings, TaleWeaver could group stories with similar themes or content. This means that parents and children could effortlessly explore stories that align with their interests and moral values. Whether your child loves tales of bravery, friendship, or fantasy, TaleWeaver’s potential story clustering feature could provide a curated list of recommended storybooks generated by other users that children will enjoy!</p><h3>Improving Search and Classification</h3><p><em>Say goodbye to frustration and hello to precise search results.</em></p><p>Searching for the ideal story can be challenging, especially when your child has specific preferences. With embeddings, TaleWeaver’s search functionality could eliminate this challenge by providing accurate and context-aware results. Even if the exact words aren’t present in the story descriptions, TaleWeaver’s potential search engine with embeddings could ensure that you find stories that closely match your search terms. It’s like having a search engine with a deep understanding of your child’s reading desires.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q3jhS_Nawq6Pndb-wursFA.png" /><figcaption>TaleWeaver’s search engine with embeddings could ensure that you find stories that closely match your search terms.</figcaption></figure><p>This would be even cooler if TaleWeaver implements an embeddings-driven content classification feature that automatically categorizes and tags stories based on their content, instead of only through the parameters we assign to them. This would mean that you could effortlessly filter and explore stories by genre, themes, or educational topics. Whether you’re looking for science-related tales or heartwarming stories of kindness, TaleWeaver could make it a breeze to find precisely what you’re seeking.</p><p><em>P.S. Did I mention that Supabase has </em><a href="https://supabase.com/docs/guides/storage"><em>awesome storage features</em></a><em> to store generated images?</em></p><h3><a href="https://supabase.com/vector">Supabase Vector</a></h3><p><a href="https://supabase.com/vector">Supabase Vector</a> is very well the secret sauce that empowers TaleWeaver to efficiently handle embeddings. It provides <strong>streamlined storage and retrieval mechanisms</strong> for the vast dataset of embeddings, ensuring that TaleWeaver can swiftly access personalized content recommendations and search results. With scalability at its core, Supabase Vector accommodates the app’s growth, making it possible to serve an ever-expanding user base seamlessly.</p><p>Additionally, we are already integrated with Supabase’s plethora of other services, including <strong>authentication, storage, </strong>and <strong>relational databases!</strong></p><p>Supabase Vector simplifies data management, allowing TaleWeaver to focus on delivering a superior user experience by automating processes related to embeddings. Its compatibility with similarity calculations could enhance the precision of content recommendations, ensuring that every story suggestion aligns closely with each child’s preferences and reading level. With Supabase Vector in its toolkit, TaleWeaver is well-prepared to provide a personalized and magical storytelling journey for children and parents alike.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=efa5d32f719d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Supabase LaunchWeek 7 is here!]]></title>
            <link>https://medium.com/@limjoshen/supabase-launchweek-7-is-here-477e55e14b4a?source=rss-6d0ace092d9------2</link>
            <guid isPermaLink="false">https://medium.com/p/477e55e14b4a</guid>
            <category><![CDATA[supabase]]></category>
            <category><![CDATA[creative-coding]]></category>
            <category><![CDATA[music]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Joshen Lim]]></dc:creator>
            <pubDate>Tue, 25 Apr 2023 01:01:33 GMT</pubDate>
            <atom:updated>2023-04-25T01:01:33.054Z</atom:updated>
            <content:encoded><![CDATA[<p>To celebrate <a href="https://supabase.com/launch-week">#SupaLaunchWeek </a><a href="https://supabase.com/launch-week">7</a>, <a href="http://supabase.com/">@supabase</a> invited me to participate in their Content Storm, so it’s time to revisit my old project with a supabase backend — Syn (from Synesthesia). <a href="https://syn.vercel.app/">Click here to try it out</a>.</p><h4>Introduction</h4><p>Syn was my first React.js (<a href="https://vitejs.dev/">Vite</a>, TS, <a href="http://supabase.com/">supabase.com</a>, <a href="https://chakra-ui.com/">chakra ui</a>) project:</p><blockquote><em>A website for people to</em><strong><em> vote on what colour comes to their mind when they listen to some classical music pieces, which then creatively displays the data through gradients and timestamps.</em></strong></blockquote><p>My <a href="https://www.reddit.com/r/reactjs/comments/yz6qz2/after_3_weeks_i_finally_finished_my_first_reactjs/">reddit post on /r/reactjs</a> currently sits at <strong>28.6k views, 94% upvote rate, 15 total shares, and 134 upvotes</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*TrPZ6rCjPqFsjVCS.png" /><figcaption>Syn: A website for people to vote on what colour comes to their mind when they listen to classical music.</figcaption></figure><p>So.. why did I make it? I made this website to practise full-stack web development, and to simultaneously share my passion in music with others. The pieces I chose to feature are from the Impressionist era, which has close ties to the Impressionist art movement in 19th century France. They both share similar aesthetic characteristics, focusing on atmosphere and mood, which I feel provides a listener/viewer with the creative flexibility when interpreting the works.</p><h3>LaunchWeek 7</h3><h4>Supabase Logs: open source logging server</h4><p>Syn requires a robust logging system to ensure data is properly stored and easily accessible for analysis. In LaunchWeek 7,<a href="https://supabase.com/blog/supabase-logs-self-hosted"> Supabase Logs</a> is finally released for both self-hosted users and CLI development. Additionally, it sounds even more developer-friendly for local development and self-hosting!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vB-H7ri0shnXz1CC" /><figcaption>While you’re building a project, you can view and query your logs from any Supabase service, just as you would in Supabase’s cloud platform.</figcaption></figure><p>It was surprising to find out that Logflare handles over 1 billion log events every day for various tools in the Supabase infrastructure ever since joining Supabase over a year ago!</p><p>Logflare’s multi-node, highly available Elixir cluster ensures that Syn’s log events are ingested and stored securely, even during spikes in traffic. This means that Syn can rely on Logflare’s infrastructure to handle their log events and ensure their availability.</p><p>Additionally, Logflare Endpoints provide an HTTP integration into Supabase Studio, which powers the log query UIs and most time-series charts, exposing log data to developers like me. This means that Syn can easily access and analyze log data, making data-driven decisions that can improve its overall performance.</p><blockquote>Check out the <a href="https://supabase.com/docs/reference/self-hosting-analytics/introduction">new self-hosting docs</a> to get <strong>Logflar</strong>e up and running as your analytics server.</blockquote><p>I’ve already tried it out, and the amount of information provided to debug is absolutely awesome.</p><h4>Resumable Uploads</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*35s-R8Yz0LG4A24D" /><figcaption>Supabase Storage is receiving a major upgrade, implementing many of the most requested features from our users: Resumable Uploads, Quality Filters, Next.js support, and WebP support.</figcaption></figure><p><strong>Resumable Uploads </strong>sound super cool for my next project. Essentially, you can continue uploading a file from where you left off, even if you lose internet connectivity or accidentally close your browser tab while uploading. To make this feature even better, they’ve increased the upload size limit from 5 GB → <strong>50 GB</strong>!</p><p>You can also load images from Storage, specify transform options when downloading them, and restrict the size and type of uploaded objects. With the recent release of Midjourney V5 and other image-generation AI tools, these features that target file downloading and uploading will definitely streamline workflows for developers that are building apps for shared storage, image handling, and large file sharing. Check it out <a href="https://supabase.com/docs/guides/storage/image-transformations#nextjs-loader">here</a>.</p><p>For me personally, these features will come in extremely useful when they are being rolled out over the next months as I work on a new project that auto-generates brand guidelines for graphic designers. With the latest support for large files, I’m excited to test out the robustness of this new feature.</p><h4>Support for Swift, Python, and C#</h4><p>One thing I love about Supabase is their in-depth, yet easy to follow documentation. In LaunchWeek 7, they shipped <a href="https://supabase.com/blog/launch-week-7-community-highlights#support-for-swift-python-and-c%23">3 new client libraries</a> for Swift, Python, and C#, complete with documentation and source code. Their documentation is formatted beautifully, and a developer of any level can easily comprehend it and incorporate it into their codebase.</p><h3>Conclusion</h3><p>There’s so much more to LaunchWeek 7, and I’m stoked that Supabase is continuing to push with features and updates that the community has requested. It’s truly exciting to see what else they come up with, and even more so to work with the cutting-edge tools that they provide.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=477e55e14b4a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Drive in the USA as a Singaporean]]></title>
            <link>https://medium.com/@limjoshen/how-to-drive-in-the-usa-as-a-singaporean-843d1ba94d2?source=rss-6d0ace092d9------2</link>
            <guid isPermaLink="false">https://medium.com/p/843d1ba94d2</guid>
            <category><![CDATA[usa]]></category>
            <category><![CDATA[driving]]></category>
            <category><![CDATA[how-to]]></category>
            <category><![CDATA[singapore]]></category>
            <dc:creator><![CDATA[Joshen Lim]]></dc:creator>
            <pubDate>Thu, 15 Dec 2022 07:49:18 GMT</pubDate>
            <atom:updated>2022-12-15T07:49:18.129Z</atom:updated>
            <content:encoded><![CDATA[<h4>SEP AY22/23 Sem 1 @ UofArizona</h4><p>okay, quick Part 2 of my experience exchanging in the USA for 5 months, but this time talking about cars, because I love cars, and there’s no escape from cars in the massive, giant <strong>land of the free</strong>.</p><h3>Brief Overview</h3><p>I drove a lot in Singapore (driving daily-weekly since 2020), so I’m pretty well-accustomed to generous drivers, average drivers, and drivers who should have their license revoked, get their narcissistic personality disorder diagnosed, and be sent to anger management workshops.</p><p><strong>You don’t need to convert your license, but you can get an IDP if you want to be safe. </strong>Throughout the 5 months, I did not have to use an IDP, did not get pulled over, and used my SG driving license for rental (Hertz, Turo) with no issue.</p><p>I drove a lot in the first road trip we had here in USA, and I identified some similarities and differences. Timeline went abit like this:</p><ul><li>August 9: Leave Singapore on National Day. Majulah Singapura.</li><li>August 9: Check-in to Tucson</li><li>August 10: Fly from Tucson to San Francisco and rent car</li></ul><p>On the second day on American soil, my housemate and I were required to drive at 70mph/112kmph speeds, left-hand drive, with new road signs and road etiquette. We wouldn’t have survived without Gene’s help (thanks Gene). So, what life-saving tips did he give us?</p><h3>1. Stop Signs</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*WG_8Vq_6nwgaDCNF.jpg" /><figcaption><a href="https://en.wikipedia.org/wiki/All-way_stop">Wikipedia: All-way Stop</a></figcaption></figure><p>Okay, this one is important, because these junctions don’t exist in Singapore, and is almost everywhere in the small roads in the US. To summarise:</p><ol><li>You <strong>MUST</strong> slow down when you see a red stop sign</li><li>At an all-way stop, the “acceptable” way is to slow down, but if you see that there are no cars waiting on your left and right, you can continue without coming to a complete stop.</li><li>The car that reaches first usually gets to go first.</li></ol><p>This works because everyone is aware that they MUST STOP at these stop-sign junctions, so cars tend to approach the junctions slowly. There are sometimes these awkward scenarios where all the cars in 4 directions are just stopped waiting for 1 car to take the initiative and make the first move, which is kinda funny, but just be alpha and proceed if no one moves. It’s like the 7 drinking game, yknow.</p><p>Also, <strong>you can turn right on red. </strong>It’s basically a filter lane, just that it’s not a designated lane with a zebra crossing. It will feel wrong at first, but observe others do it and follow once you’re comfortable. Check for traffic like you would in a filter lane though. <a href="https://911drivingschool.com/right-turn-red-3-things-know/">Read more here.</a></p><h3>2. Right of Way</h3><p><strong>Passengers have the right of way</strong>. This explains a lot, no wonder I always see expats just walking across the road at Tanjong Pagar as if they walking on their Grandfather road. In the USA, pedestrians have the right of way, and cars almost always let me pass first (if I’m walking or cycling).</p><h3>3. Driving on the Freeway/Highway</h3><p><strong>Cars go fast here</strong>. The main difference between Singapore and USA is that USA is <strong>HUGE. </strong>Like, the lanes are much wider, places you drive to can be the equivalent of Singapore to Kuala Lumpur, and bike have their own roads.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EiKPT6mGNJZnIkRlmvVL1g.png" /><figcaption>HUGE ROADS</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Hc8m7_Po5ASO88w2ONYFzA.png" /><figcaption>DEDICATED BIKE LANES</figcaption></figure><p>On average, I drove 75mph (120kmph) on the freeway, fastest I went was ~95 mph (150kmph) to overtake slow cars. So get used to driving faster than in Singapore, and my best advice is to practise! I recommend having at least some experience driving on Singapore’s highways because it’ll be quite scary driving fast in USA.</p><p><strong>Drivers are okay.</strong> Someone said that Singaporean drivers are worse, and I can see why. If you have driven on CTE during peak-hours, most of USA highways are probably within your comfort zone. There’s not as many entitled drivers as there are in Singapore, but you might have to get used to people who <em>signal and change lanes simultaneously.</em></p><p><strong>If driving &gt;2 hrs, learn to use cruise control.</strong> Cruise control is something new to prevent your legs from getting tired. While driving on empty highways, cruise control keeps your speed at whatever you set it to, so you don’t have to keep your foot on the pedal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M76I260sJqj1fjmxpPXx-w.png" /><figcaption>Us driving in California, straight roads for hours</figcaption></figure><h3>4. Cost</h3><p><strong>If you’re planning to travel a lot throughout the few months, consider investing in a car</strong>. We didn’t, and we regret it because we definitely would have saved money, and it would have been way more convenient as well. It can cost as low as 4–6k SGD (I think), and you just have to make sure you sell it off at not too much a loss once you leave.</p><p><strong>Gas is cheaper than in Singapore</strong>. A full tank costs about ~60 SGD in cheaper states, about ~90 SGD in big cities like LA.</p><p><strong>If you’re under 25, car rental is expensive.</strong> We used Turo for a lot of our weekend trips, and you can estimate the prices to be around ~150 SGD for a day, ~220 SGD for 2 days, etc. It gets more “worth” the more days you rent. One perk is that you get to try different cars you won’t get to ever drive in Singapore. I drove a Mazda 6, Chevy Camaro, Chrysler 300, Kia Soul, Prius, Hyundai Kona. You can see why buying a car would have been cheaper.</p><h3>5. Road Quality</h3><p>You will realise that Singapore’s roads are basically butter compared to the rocky, pothole-ridden, uneven mess that you might find in USA. Potholes are no joke. Imagine driving over this on your suspension-less bike:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YGKT9EADbEwQIK6NbnuIHg.png" /><figcaption>butt-bumping pothole yup</figcaption></figure><p>Yep, not fun. I think there’s so many potholes because USA is just so big that it’s almost impossible to maintain every single road. Just a guess. I actually miss driving on smooth roads in Singapore while here.</p><h3>Conclusion</h3><p>So, a lot of differences, from roads, to money, to etiquette. Overall, USA car culture is cool, there’s lot of big trucks, cool cars (saw a Bugatti Chiron in LA), there’s SO MANY Mustangs and muscle cars, lots of vintage/classic cars, so enjoy the motoring sights in the USA and drive safe. Also, left-hand drive is not that scary — just get someone to yell “STAY RIGHT!!” every time you make a turn at a junction. ;)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=843d1ba94d2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I created an interactive website with React, Chakra UI + Supabase]]></title>
            <link>https://medium.com/@limjoshen/how-i-created-a-personal-website-with-react-chakra-ui-supabase-39661852746a?source=rss-6d0ace092d9------2</link>
            <guid isPermaLink="false">https://medium.com/p/39661852746a</guid>
            <category><![CDATA[supabase]]></category>
            <category><![CDATA[ui]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[ui-design]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Joshen Lim]]></dc:creator>
            <pubDate>Mon, 05 Dec 2022 23:16:25 GMT</pubDate>
            <atom:updated>2022-12-05T23:38:40.284Z</atom:updated>
            <content:encoded><![CDATA[<p>To celebrate <a href="https://supabase.com/launch-week">#SupaLaunchWeek 6</a>, <a href="http://supabase.com/">@supabase</a> invited me to participate in their Content Storm, so I’m sharing a personal website I built really quickly with a supabase backend — Syn (from Synesthesia). <a href="https://syn.vercel.app/">Click here to try it out</a>.</p><h3>Introduction</h3><p>After 3 weeks, I finally finished my first React.js (<a href="https://vitejs.dev/">Vite</a>, TS, <a href="http://supabase.com/">supabase.com</a>, <a href="https://chakra-ui.com/">chakra ui</a>) project:</p><blockquote>A website for people to<strong> vote on what colour comes to their mind when they listen to some classical music pieces, which then creatively displays the data through gradients and timestamps.</strong></blockquote><p>My <a href="https://www.reddit.com/r/reactjs/comments/yz6qz2/after_3_weeks_i_finally_finished_my_first_reactjs/">reddit post on /r/reactjs</a> currently sits at <strong>28.6k views, 94% upvote rate, 15 total shares, and 134 upvotes</strong>.</p><figure><img alt="Syn: A website for people to vote on what colour comes to their mind when they listen to classical music." src="https://cdn-images-1.medium.com/max/1024/1*VVULpIYKTRF7cyYz9PFf4g.png" /><figcaption>Syn: A website for people to vote on what colour comes to their mind when they listen to classical music.</figcaption></figure><p>So.. why did I make it? I made this website to practise full-stack web development, and to simultaneously share my passion in music with others. The pieces I chose to feature are from the Impressionist era, which has close ties to the Impressionist art movement in 19th century France. They both share similar aesthetic characteristics, focusing on atmosphere and mood, which I feel provides a listener/viewer with the creative flexibility when interpreting the works.</p><h3>How to Use “Syn”</h3><figure><img alt="On Syn, you can vote the exact hexcode you “hear” at a specific timestamp in the music." src="https://cdn-images-1.medium.com/max/918/1*CLKL2TIRtRSU7VV0H1Dpgw.png" /><figcaption>On Syn, you can vote the exact hexcode you “hear” at a specific timestamp in the music.</figcaption></figure><p>On Syn, you can vote the exact hexcode you “hear” at a specific timestamp in the music. Once submitted, all components that display data are re-rendered through a callback function to the parent component.</p><pre>// SongSection.tsx<br>const fetchColorsData = async () =&gt; {<br>  let { data, error, status } = await supabase<br>    .rpc(&#39;collect_votes_of&#39;, {<br>      songid: songId<br>    })<br><br>  if (error &amp;&amp; status !== 406) {<br>    console.error(error)<br>  }<br>  setColorData(data);<br>}<br>// ...<br>const refreshData = () =&gt; {<br>  fetchColorsData();<br>  fetchHexData();<br>  setRefresh(true);<br>}<br>// ...<br>&lt;ColorPopover dataUpdater={refreshData} songId={songId} /&gt;<br><br><br>// ColorPopver.tsx<br>...<br>const handleSubmit = async () =&gt; {<br>  // ... if successful<br>  openSuccess();<br>  console.log(`${color} successfully submitted.`);<br>  props.dataUpdater(); // &lt;-- <br>};</pre><p>Above the player, each colored triangle represents a single vote. It is positioned by calculating (vote’s timestamp / songDuration) * 100%. It’s position is set to absolute in a container, and it’s left attribute is set to the value above.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/549/0*eB0MUs5IHZrAzFIH.png" /><figcaption>Each triangle is positioned based on the timestamp.</figcaption></figure><p>It works pretty well, but gets cluttered when there are many votes. Future iterations should group hex codes together or hide some hex codes, or prioritise the votes with comments.</p><pre>// CustomPlayer.tsx<br>function initMarkers() {<br>  console.log(`Initialising markers..`)<br>  const newMarkers = data?.map((row, id) =&gt; {<br>    return (<br>    &lt;Tooltip<br>      arrowSize={2}<br>      hasArrow<br>      placement=&#39;top-start&#39;<br>      key={id}<br>      label={row.username<br>        ? &lt;Stack spacing=&#39;0&#39;&gt;<br>            &lt;Text &gt;{row.comment}&lt;/Text&gt;<br>            &lt;Text fontSize=&#39;xx-small&#39;&gt;-{row.username}&lt;/Text&gt;<br>          &lt;/Stack&gt;<br>        : row.comment}<br>      fontSize=&#39;sm&#39;&gt;<br>      &lt;TriangleDownIcon<br>        color={row.hex_code}<br>        position=&quot;absolute&quot;<br>        left={timestampToPercentage(row.timestamp, duration!)}<br>        sx={{<br>          &quot;:hover&quot;: {<br>            transform: &quot;scale(2)&quot;,<br>            zIndex: &quot;2&quot;,<br>            filter: `drop-shadow(0px 0px 3px ${row.hex_code})`<br>          },<br>          transition: &quot;all cubic-bezier(.02,.62,.26,1) 0.5s&quot;<br>        }}<br>        /&gt;<br>    &lt;/Tooltip&gt;<br>  )});<br>  setMarkers(newMarkers);<br>  console.log(`New markers set.`);<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*u2-5mR4HFWcflEXdBoHeAA.png" /><figcaption>Some data is displayed through a table</figcaption></figure><p>The data is retrieved from the database and displayed on the top right. To avoid a really long scrolling list, I limited the number of rows to 10. So, how does the backend work, and how did I learn to set it up in only 3 weeks?</p><h3>Back-end: Supabase</h3><p>Supabase is an<strong> open source</strong> Firebase alternative, a <strong>PostgreSQL database </strong>that provides an instant <strong>RESTful API</strong>. Start your project with a Postgres database, Authentication, instant APIs, Edge Functions, Realtime subscriptions, and Storage. To get started, head over to <a href="http://supabase.com/">supabase.com</a> to start a new project. Once inside, head over to Table Editor and create your tables.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/536/0*C068MwaIhlQAJB6w.png" /></figure><p>Then, you can setup supabase in your React project to start retrieving and uploading data to the tables. Find more detailed information <a href="https://supabase.com/docs/guides/api">here</a> on how to use their REST API.</p><p>Once you’ve installed the library into your project with <br>npm install --save @supabase/supabase-js and acquired your API URL and API KEY, you can put them in your .env file in your root directory.</p><pre># .env<br>VITE_SUPABASE_URL=&#39;https://&lt;project_ref&gt;.supabase.co&#39;<br>VITE_SUPABASE_ANON_KEY=&#39;YOURKEY&#39;</pre><p>Then, initialise your supabase client, and call it in any component you like.</p><pre>// supabaseClient.tsx<br>import { createClient } from &#39;@supabase/supabase-js&#39;;<br><br>const supabaseUrl = import.meta.env.VITE_SUPABASE_URL;<br>const supabaseAnonKey = import.meta.env.VITE_SUPABASE_ANON_KEY;<br><br>export const supabase = createClient(supabaseUrl!, supabaseAnonKey!);</pre><pre>import { supabase } from &#39;../supabaseClient&#39;;<br><br>// SongSection.tsx<br>const fetchHexData = async () =&gt; {<br>  let { data, error, status } = await supabase<br>    .from(&#39;hexcodes&#39;)<br>    .select(&#39;*&#39;)<br>    .eq(&#39;song_id&#39;, songId);<br><br>  if (error &amp;&amp; status !== 406) {<br>    console.error(error);<br>  }<br><br>  console.log(`Hexcodes found with ID ${songId}`)<br>  setHexData(data);<br>}<br><br>// ColorPopover.tsx, submitting a vote<br>const handleSubmit = async () =&gt; {<br>  const { error } = await supabase<br>    .from(&#39;hexcodes&#39;)<br>    .upsert({<br>      song_id: props.songId,<br>      hex_code: color,<br>      timestamp: currTime,<br>      comment: comment,<br>      username: name})<br>    .select();<br>  // ... error handling <br>}</pre><p>If you are familiar with writing SQL queries, simple CRUD operations can be handled by built-in supabase JS functions. It’s that simple!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7hEtNsDstJanRL_j.png" /><figcaption>Tables can be populated with data directly upserted from the API calls.</figcaption></figure><h4>Supabase: Complex Data Handling</h4><p>For more complex queries, you can write your own SQL code in the <strong>SQL Editor </strong>to create SQL functions and triggers. They can be created in SQL, PL/pgSQL, and more.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*AGWaHqvlugta-oc_.png" /><figcaption>Write your own SQL functions.</figcaption></figure><p>What I love is that supabase also auto-generates API Docs for the functions/triggers you create, so all you have to do is click a single button, and copy-paste the code snippet into your IDE. Read more about Remote Propcedure Calls (RPC) <a href="https://supabase.com/docs/reference/javascript/rpc">here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_VlotWoFL-PYm6To.png" /><figcaption>Auto-generate the code-snippets for your functions with a single click.</figcaption></figure><h3>Conclusion</h3><p>From start to finish, my first ever full-stack personal website took 3 weeks, and it was definitely because I had tools like Chakra-UI and Supabase to help me make an app that <strong>functions correctly</strong>. Supabase allows me to add as many songs as I want to feature on my site, and even gather feedback from users. So far I love it, so <a href="https://syn.vercel.app/"><strong>give Syn a try today</strong></a>!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=39661852746a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Biggest Culture Shock in USA as a Singaporean]]></title>
            <link>https://medium.com/@limjoshen/the-biggest-culture-shock-in-usa-as-a-singaporean-40de8a6004bb?source=rss-6d0ace092d9------2</link>
            <guid isPermaLink="false">https://medium.com/p/40de8a6004bb</guid>
            <category><![CDATA[exchange]]></category>
            <category><![CDATA[un]]></category>
            <category><![CDATA[singapore]]></category>
            <category><![CDATA[students]]></category>
            <dc:creator><![CDATA[Joshen Lim]]></dc:creator>
            <pubDate>Fri, 02 Dec 2022 18:32:12 GMT</pubDate>
            <atom:updated>2022-12-02T18:40:25.715Z</atom:updated>
            <content:encoded><![CDATA[<h4>SEP AY22/23 Sem 1 @ UofArizona</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jrYm-EpoSyF22L9jihJTdg.png" /><figcaption>5 Singaporeans in an Airbnb in Tucson, AZ during Halloween</figcaption></figure><p>Hi, I’ve currently spent 4 months in USA while on exchange at the University of Arizona. The biggest culture shock in USA is obviously something I have to deal with everyday — <strong>communication</strong>.</p><h3>1. Small Talk</h3><p>Americans are really friendly, and you will definitely learn how to make small talk in the USA. Here’s how a standard greeting goes in the US:</p><blockquote>cashier/friend/stranger: Hi! How are you?/How are you doing today? :))))<br>me: I’m goOD!! How bout you? (this is where my mind shuts off)<br>not me: I’m good! ^_^</blockquote><p>Now, compare this to my usual Singaporean greeting:</p><blockquote>not me: eh, sup<br>me: eh yo, where u going?<br>not me: eat lunch, u?<br>me: same, see u man</blockquote><p>I’m serious, you have to practise asking the person “How are you” back, and you will find it more comfortable to code-switch. On the topic of code-switching, I learnt that code-switching is changing your <strong>variation of language </strong>to make things easier to understand.</p><p>So, I argue that it is NOT CRINGE to codeswitch to an American way of speaking (i.e. using proper grammar) because you will soon realise after 1 week into your exchange that no one can understand the broken creole singlish that everyone speaks in Singapore. Relatively, Singaporeans speak really fast and shortcut-ish, which needs to be transformed into longer sentences with proper grammar in the US.</p><blockquote>Singlish: Siao, you cycle like that skali fall down how?</blockquote><p>But, if you come back from exchange and you somehow get <em>StuCk WiTh yoUr AmeriCan AcCenT</em>, there is no way you’re not intentionally doing it to act cool.</p><h3>2. Stranger Danger</h3><h4>Nice</h4><p>People will talk to you, even if you don’t know them. Most of the time, their intentions are positive.</p><p>During my exchange, I’ve had a Yosemite tour guide tell us that a certain route would take 5 hours, but we took 8 hours (bruh). I’ve also had a stranger help fix my housemate’s bike when the chain derailed. I was walking past a guy and he pointed to my shirt and said “nice shirt” without stopping in his steps. I caught a napkin as it flew and a guy who walked past said “nice catch” without turning his head. My American friends tell me that they can’t stand awkward silences, so small talk fills the gap, and I can definitely see why.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eoN1qkU90iyTTN0_0R7ifg.png" /><figcaption>Other exchangers at some international students event</figcaption></figure><h4>Not Nice</h4><p>Ok, here’s the not nice part about strangers talking to you. At sketchy gas stations, homeless people might ask you for change. In downtown areas, people who are not mentally healthy might approach you and just.. stare at you funny. If you rented a Camaro (like I did) or did something that screams “I want attention” (probably what I did), you might end up in a situation where homeless people try to heckle you, or ask you to buy their shady speaker so they can have an opportunity to harass you further.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RQ0A5cTq-ImgkuuMoK3cyQ.png" /><figcaption>Chevrolet Camaro SS 2015 rented on Turo in Phoenix, AZ</figcaption></figure><p>In my situation, they did say things like “hey, nice car, give me the keys man” and “don’t make me go over there”, which was a combination of annoying, infuriating, and anxiety-inducing. In New Orleans, a common scam is to bet tourists “I bet I know where you got your shoes”, and we encountered this 2~3 times in 1 day. If you respond or acknowledge the bet, they’ll say some shit like “You got them on your feet” or “You got them on [street you’re on]” and demand you to pay. My best advice (also from my friends here) is to treat them like GTA V NPCs, ignore them, and get away if you feel unsafe. It works, as I’m still alive! :-)</p><h4><strong>Friendliness</strong></h4><p>Americans give so much compliments. It is not until I entered the land of the free, home of the brave that I realised how cynical, critical, and negative Singaporeans tend to be (myself included). Here, even after the worst rehearsal or worst submission, you can expect your professor/conductor/friends to respond with “Wonderful, lots of great things!”. In Singapore, I underperform a bit and I’ll get slapped with a “Eh, what’s wrong with you today ah?” I wear uniqlo airism shirt and get <em>hentam </em>with “Eh basic sia”. Now, I understand this scene (1:33–1:45) perfectly:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FKUn6Zlo3LjU%3Fstart%3D93%26feature%3Doembed%26start%3D93&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DKUn6Zlo3LjU&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FKUn6Zlo3LjU%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/5d4f42baf759534ed1b067549e55bf1c/href">https://medium.com/media/5d4f42baf759534ed1b067549e55bf1c/href</a></iframe><h4>Verdict — 9/10 good culture shock</h4><p>It is a very nice feeling compared to Singapore where you can talk to anyone and not feel weird/reserved about it. The hospitality from service staff can make your day, and it’s always nice to be able to just go up to someone’s dog and start petting it. About 95% of my interactions were very positive, and a stranger’s advice can sometimes go a long way when you are caught in unfamiliar situations.</p><p>But, this verdict might change once I’ve visited New York. ;)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=40de8a6004bb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[This is Why Classical Music Sounds “Boring”]]></title>
            <link>https://medium.com/@limjoshen/this-is-why-classical-music-sounds-boring-c6a23d7c0a5b?source=rss-6d0ace092d9------2</link>
            <guid isPermaLink="false">https://medium.com/p/c6a23d7c0a5b</guid>
            <category><![CDATA[appreciation]]></category>
            <category><![CDATA[classical-music]]></category>
            <category><![CDATA[music]]></category>
            <category><![CDATA[culture]]></category>
            <category><![CDATA[concerts]]></category>
            <dc:creator><![CDATA[Joshen Lim]]></dc:creator>
            <pubDate>Mon, 21 Nov 2022 10:29:37 GMT</pubDate>
            <atom:updated>2022-11-21T10:29:37.655Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aPq90n2W4S4wcfkSjnj0MA.jpeg" /></figure><p>After a 10-minute sequence of introducing his passion in classical music, alternating between Chopin’s Prelude in E minor and pausing to explain the music theory in simple analogies, Benjamin Zander tells the audience:</p><blockquote>“I’ve one last request before I play this piece all the way through. Would you think of somebody who you adore, who’s no longer there? A beloved grandmother, a lover — somebody in your life who you love with all your heart, but that person is no longer with you. Bring that person into your mind, and at the same time, follow the line all the way from B to E, and you’ll hear everything that Chopin had to say.”</blockquote><p>He performs the whole Prelude, this time knowing that the audience understands just a bit more about Chopin’s intentions when composing the piece. After the final resolution, he is met with thunderous applause from the TED Talks audience.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fr9LCwI5iErE%3Fstart%3D995%26feature%3Doembed%26start%3D995&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dr9LCwI5iErE&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fr9LCwI5iErE%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/32d3ceeacb5a1973c8878f5e160d3b5e/href">https://medium.com/media/32d3ceeacb5a1973c8878f5e160d3b5e/href</a></iframe><p>To me, I have always felt disappointed, almost sad that not many people get into classical music. However, I understand the amount of education it requires to understand basic music theory, and the amount of additional effort and passion it takes to dive deep into the theory and explore even the most complex concepts. For example, imagine the 2 notes, A (440Hz) and Ab (414.3Hz). Music theory have evolved so much today that composers work in between the intervals that were considered the smallest possible interval in the Baroque era. Despite being deeply rooted in theory, some classical pieces continue to appeal to the mass audience, such as Bach’s <em>Prelude №1 for Unaccompanied Cello </em>which has appeared in countless TV commercials, or Debussy’s <em>Clair de lune</em> which has gained 86M views on YouTube to this date. This information tells me that any listener does not need to understand music theory to enjoy classical music, even though many musicians (even Banjamin Zander!) believe that understanding the context of classical music is essential to increasing one’s enjoyment of the piece. This article explores the idea that <strong>classical music is more easily digestible for any listener when it can allow the listener to form connections between the music and their past experiences</strong>.</p><h4>Tortoises, Boys, and Wolves</h4><p>Classical music that portrays a clear subject matter allows the audience to draw connections between what they hear in the music and their own experiences, allowing them to relate with the music they hear. The Carnival of the Animals is a musical suite composed by Saint-Saens ‘for fun’ that comprises of 14 movements, each movement representing a different subject matter, from <em>Poules et coqs</em> (Hens and Roosters) to the <em>Pianistes </em>(do I have to translate this?)<em> </em>themselves. In one of the movements, <em>Tortoises</em>, the piano plays a repetitive triplet figure, supporting the main melody by the strings. In obvious satirical fashion, this main melody is the famous <em>Can-Can</em> from Offenbach’s comic opera, but played at an extremely slow speed. It is also played as eighth-notes over the pulsing piano triplets, which further emphasizes the slowness of the melody. By playing what the audience recognizes as a fast melody so slowly, a connection is drawn between the listener and piece to understand how a slow tortoise could be represented in musical terms. <em>Peter and the Wolf </em>is another composition that narrates a fairy tale of a boy named Peter. In the piece, Peter, his grandfather, a duck, and other animals are each represented by a different instrument and a melody. The bird is represented by a flute, a high-register woodwind instrument that is commonly associated with birds. The duck is represented by the oboe, as it’s nasal timbre mimics the quack of a duck. The wolf’s theme is played by powerful, grand French Horns and Peter’s melody is a lively, joyous tune played by the lush string instruments. As the story is narrated, the animals appear in the music as they are narrated, their melodies blending to create a story out of only musical notes. This allows any listener to form associations between the music and the story, and possibly picture the scene simply from identifying the themes that appear in the music. I believe that this likely allows any listener to enjoy the piece, evidenced by it being the most frequently performed work not only out of Prokofiev’s compositions, but also out of all classical pieces.</p><h4>Pagodas, Boats, and Water</h4><p>Abstraction of musical ideas can allow listeners to creatively form connections between the music and their own experiences. During the Impressionist era, late 19th century French music also portrayed descriptive scenes through new techniques use in tonality, harmony, and color. In Claude Debussy’s <em>Estampes: №1 Pagodes</em> (Pagodas), a solo work for piano, he takes inspiration from the pentatonic scale and Javanese Gamelan music to create the main polyphonic themes present in the work. By setting the tonality and texture of the work to be heavily inspired by Asian musical elements, Debussy allows listeners to imagine the East Asian Pagodas that he attempts to depict in this piece. ‘Impressionism’ was borrowed from the aesthetic movement associated with painting as the new style of late 19th century French music similarly emphasized atmosphere and mood, instead of focusing on key subjects. A piece that is commonly tied to an Impressionist work is Maurice Ravel’s <em>Une Barque sur L’ocean</em>, which recounts a boat sailing on the waves of the ocean. It’s painting counterpart, <em>Impression, Sunrise</em> by Claude Monet, is commonly associated with the piece because of its portrayal of a boat, and their shared aesthetic values. The key characteristic of Ravel’s work (and also in Impressionist paintings) is its colorful textures, almost muted and suggestive instead of distinct form, structure, and diatonicism. Clearly revolting against the conventional melody-and-accompaniment texture of Romanticism, all the instruments work as one entity, depicting a singular scene on the ocean with arpeggiated sections and sweeping melodies that imitate the flow of the waves. By abstracting some of the musical details that we commonly hear in Romanticism, I feel that impressionism allows listeners to be more creative when visualizing musical ideas presented to them, which in turn provides more flexibility for them to draw connections to their own experiences and memories. Hence, I argue that a clear subject matter and abstraction of musical ideas can both in their own ways improve a classical music listeners’ experience.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FbTYUyDjVCRU%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DbTYUyDjVCRU&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FbTYUyDjVCRU%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/537be3f9b69d325a115e85cf0a978aad/href">https://medium.com/media/537be3f9b69d325a115e85cf0a978aad/href</a></iframe><h4>Dr Jekyll, Space Exploration, and Elvis Presley</h4><p>In the cases where classical music does not obviously portray a subject matter, their use in popular media allows listeners to draw relations to the subject matters in the media they are portrayed in. <em>Toccata and Fugue in D minor</em> is a piece of organ music by J.S. Bach which original intentions have been often debated. The title of the piece, much like any other pieces from the Baroque era, describes the form and technique of the piece. Toccata means a piece designed for its performer to showcase his/her touch and technique, while a fugue is a contrapuntal composition in which a short phrase or idea is introduced by a single part and recurs frequently in other interweaving parts. As such, the listener without prior music knowledge cannot immediately associate it with something close to them. However, this piece became iconic through its use in horror films <em>Dr. Jekyll and Mr. Hyde</em> and <em>The Black Cat</em> and continues to retain its status as ‘that scary organ music’ in pop culture. A similar classical piece that made its way to worldwide popularity is <em>Also Sprach Zarathustra</em> by R. Strauss. The iconic piece blasts out at the openings of <em>2001: A Space Odyssey</em>, in the BBC television coverage of the Apollo space missions, and even Elvis Presley’s concerts. I believe that the presence of these classical pieces in pop culture have increased peoples’ enjoyment of classical music because of their association with something familiar, even possibly nostalgic. What these pieces are representing are rather abstract; they do not provide the listener with a clear visual reference or something physical that they can easily connect to. However, by presenting them as film music, listeners are provided with the context of whatever they understand about the film, whether it is horror, sci-fi or the wild west; whether it involved tragedy, romance or betrayal; whether it took place on Earth, in a fantasy world, or in a castle. Listeners can thus appreciate the classical pieces through their understanding of the contextual information that the accompanying medium provides.</p><h4>Listen to the pieces. fr.</h4><p>I feel that the barrier to entry to understand and appreciate classical music on a theoretical level is high. Although it took me several years of music theory lessons to develop my own appreciation for the techniques that composers employ, I reserve the active-listening sessions for occasional moments when I feel more musically inspired or when I had to study the pieces for my A-Level examinations. However, I still enjoy classical music at a surface level — meaning that I listen to it while doing something else, such as writing this essay. In these scenarios, I tend to select classical pieces that belong to the above categories, which I believe make them more digestible to not only me, but any listener. The examples I have listed above are classical pieces that I always introduce to my friends to get them interested in classical music, and it is not until I began writing this essay, did I realize that it was likely that classical music is harder to get into because of the above reasons. The examples listed above are likely biased towards my own experiences which have allowed me to associate them with mostly positive memories. For other listeners, there could be some other classical piece by Rimsky-Korsakov that they set as their phone alarm during their Year 2 Summer break, which continues to remind them of their Orbital project then, because of the association that they have formed. Some people claim that the classical music scene is dying. I believe that to help people appreciate the classical pieces that are more abstract, programme notes or other forms of media could accompany classical concerts to facilitate the process of forming relations between classical pieces and one’s experiences.</p><p>:) Joshen</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c6a23d7c0a5b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction: Waht to expects.]]></title>
            <link>https://medium.com/@limjoshen/introduction-waht-to-expects-a6cab1569933?source=rss-6d0ace092d9------2</link>
            <guid isPermaLink="false">https://medium.com/p/a6cab1569933</guid>
            <category><![CDATA[joshen]]></category>
            <category><![CDATA[introduction]]></category>
            <category><![CDATA[about-me]]></category>
            <dc:creator><![CDATA[Joshen Lim]]></dc:creator>
            <pubDate>Mon, 21 Nov 2022 09:33:55 GMT</pubDate>
            <atom:updated>2022-11-21T09:36:09.019Z</atom:updated>
            <content:encoded><![CDATA[<p>I admit, my English is not very good, as I much prefer design, music, engineering, programming to occupy my free time instead of literature.</p><p>However, I shall write stuff to either leave content for people to read after I exit this world, or share my school essays that maybe reveal a bit more about me. I will continue to write nonsense. This is not a professional blog. Follow me if you like nonsense or what I create.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g9cbVJmnX2Vj5o2NOppXaA.png" /></figure><p>:) Joshen</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a6cab1569933" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>