<?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 Jill Chang on Medium]]></title>
        <description><![CDATA[Stories by Jill Chang on Medium]]></description>
        <link>https://medium.com/@jill6666?source=rss-2bb62dee3d68------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*NkgIqzWw-Q_YwB6LV8zDFw.jpeg</url>
            <title>Stories by Jill Chang on Medium</title>
            <link>https://medium.com/@jill6666?source=rss-2bb62dee3d68------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 18:43:16 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jill6666/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[[Note] Understanding Sui’s Object Model: Why Coins Split, Merge, and Why UX Matters for dApp…]]></title>
            <link>https://medium.com/@jill6666/note-understanding-suis-object-model-why-coins-split-merge-and-why-ux-matters-for-dapp-9b3515b763f0?source=rss-2bb62dee3d68------2</link>
            <guid isPermaLink="false">https://medium.com/p/9b3515b763f0</guid>
            <category><![CDATA[sui]]></category>
            <category><![CDATA[dapps]]></category>
            <category><![CDATA[blockchain-technology]]></category>
            <category><![CDATA[web3]]></category>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[Jill Chang]]></dc:creator>
            <pubDate>Tue, 27 Jan 2026 09:26:42 GMT</pubDate>
            <atom:updated>2026-01-27T09:26:42.432Z</atom:updated>
            <content:encoded><![CDATA[<h3>[Note] Understanding Sui’s Object Model: Why Coins Split, Merge, and Why UX Matters for dApp Developers</h3><p>When I first started building on <strong>Sui</strong>, one of the most confusing parts was understanding why token balances behave so differently compared to EVM chains. It wasn’t just the syntax difference , it was the entire <em>mental model</em>.</p><p>On Ethereum, a user simply has a number:</p><pre>balanceOf(address) = 100</pre><p>But on Sui, a user can have:</p><pre>Coin&lt;T&gt;(id=0xabc) = 7<br>Coin&lt;T&gt;(id=0xdef) = 2<br>Coin&lt;T&gt;(id=0xghi) = 1</pre><p>Three objects. Three “coins.” All representing the same token.</p><p>This is not a bug, it’s the core idea of Sui.</p><p>In this article, I will summarize the essential concepts of Sui’s Object Model, explain why coins fragment into many objects, how Move handles asset safety, and what dApp developers should do to avoid poor UX and unexpected gas costs.</p><h3>1. Move &amp; Sui’s Core Principle: Everything Is an Object</h3><p>Sui does NOT use a global balance ledger like Ethereum. Instead:</p><blockquote><strong><em>Every asset is a Move object with its own ID, version, and owner.</em></strong></blockquote><p>A Coin&lt;T&gt; is literally defined as:</p><pre>struct Coin&lt;T&gt; has store {<br>    value: u64<br>}</pre><p>This means:</p><ul><li>Each coin has a unique objectId</li><li>Mutating a coin creates a <em>new</em> object and destroys the old one</li><li>Coins behave like “UTXOs”, not like ERC20 balances</li></ul><p>This model gives Sui:</p><ul><li>High parallel execution (no locking global storage)</li><li>Strong asset safety (no double-spend)</li><li>Auditable asset history (each object has a lineage)</li></ul><h3>2. How Coin Objects Work: Merge, Split, and Destroy</h3><p>In Sui, your balance may be fragmented into many Coin objects because:</p><ul><li>Transfers create new change objects</li><li>DEX swaps return output as new coin objects</li><li>Airdrops distribute one coin per claim</li><li>Staking rewards, rebates, and game items all produce new objects</li></ul><p>When a user has coins like:</p><pre>7 SUI<br>2 SUI<br>1 SUI</pre><p>They are <em>three separate object IDs</em>.</p><p>If you merge them:</p><pre>merge(7, 2, 1) → 10</pre><p>The old three objects are <strong>destroyed</strong>, and a new object with value=10 is created.</p><p>If you split the 10:</p><pre>split(10 → 4.5, 4.5, 1)</pre><p>You get 3 new objects:</p><ul><li>4.5 SUI</li><li>4.5 SUI</li><li>1 SUI</li></ul><p>And the 10-coin object is destroyed.</p><p><strong>Coin objects come and go. Values stay consistent. Objects do not.</strong></p><p>This is the Move resource model in action.</p><h3>3. Why Merge &amp; Split Are Required for dApps</h3><p>Unlike ERC20 tokens, Sui smart contracts don’t take an amount as input.</p><p>They take:</p><blockquote><strong><em>A Coin&lt;T&gt; object containing exactly the amount required.</em></strong></blockquote><p>Example: an OFT (LayerZero) bridge might require:</p><pre>entry fun send(coin: Coin&lt;SAT&gt;, dst_chain: u64, to: vector&lt;u8&gt;)</pre><p>If the user’s balance is scattered into:</p><pre>5<br>3<br>2</pre><p>There is no “5-coin” object to send unless you:</p><ol><li><strong>Merge</strong> all coins → 10</li><li><strong>Split</strong> → 5 (send), 5 (change)</li></ol><p>So merge + split becomes the natural workflow for any dApp that handles tokens on Sui.</p><h3>4. Atomic Execution: Why You Can Never “Lose” Coins</h3><p>A critical concept:</p><blockquote><strong><em>All merge, split, and send operations are combined into a single TransactionBlock.</em></strong></blockquote><p>Nothing happens on-chain until you execute:</p><pre>wallet.signAndExecuteTransactionBlock(tx)</pre><p>This guarantees:</p><ul><li>No partial changes</li><li>No half-merged coins</li><li>No risk of losing tokens</li><li>Either everything succeeds, or everything rolls back</li></ul><p>All-or-nothing execution is one of the strongest guarantees Sui provides.</p><h3>5. What Happens When Two Transactions Use the Same Object?</h3><p>Sui’s object model prevents double spending:</p><ul><li>Every object has a version</li><li>When one transaction consumes an object, its version increments</li><li>Any other transaction attempting to use the old version → <strong>fails</strong></li></ul><p>You cannot race two transactions using the same coin.</p><p>This prevents:</p><ul><li>Double-spending</li><li>Inconsistent state</li><li>Merge/split corruption</li></ul><p>Developers will see errors like:</p><pre>Object version mismatch</pre><p>This is expected and a sign the system is working correctly.</p><h3>6. The Real UX Problem: “Fragmented Coins = Higher Gas”</h3><p>Although Sui is extremely safe, coin fragmentation causes practical UX issues.</p><h3>Why?</h3><p>Because gas depends on:</p><ul><li>Number of objects touched</li><li>Number of merge operations</li><li>Transaction size</li></ul><p>If a user has 1,000 tiny coins and wants to bridge 50 SUI:</p><ul><li>You may need to merge many objects</li><li>Merge 100 coins → higher gas than merge 2 coins</li><li>User sees a more expensive transaction</li><li>User complains: “Why does this dApp cost more gas than others?”</li></ul><p>Even worse: <strong>Most users don’t know what coin objects are.</strong></p><p>They simply think the dApp is inefficient.</p><h3>7. Developer Best Practices: How to Improve Sui dApp UX</h3><p>This is the part that matters most for real production apps.</p><h4>✔ 1. Smart coin selection (greedy algorithm)</h4><p>Don’t merge everything.<br> Pick the smallest number of coins needed to reach the target amount.</p><p>Example:</p><pre>7, 2, 1, 0.5<br>Target = 8<br>→ choose 7 + 1 (2 coins)</pre><p>Not:</p><pre>7 + 2 + 1 + 0.5</pre><p>This single optimization massively reduces gas.</p><h4>✔ 2. Auto-Consolidation (with threshold)</h4><p>Implement a utility:</p><pre>autoConsolidateCoins(owner, coinType, threshold = 50)</pre><p>When a user has too many small objects:</p><ul><li>Merge them once</li><li>Future transactions become cheaper and simpler</li></ul><p>But only do it <strong>when needed</strong>, not every time.</p><h4>✔ 3. Consolidation inside the main TX (atomic)</h4><p>Instead of two transactions:</p><ul><li>consolidate</li><li>then bridge</li></ul><p>Put this inside one TransactionBlock:</p><pre>merge → split → bridge</pre><p>User sees only one transaction.<br> Gas appears predictable and reasonable.</p><h4>✔ 4. UX Transparency: Let users know what’s happening</h4><p>If coins are extremely fragmented, display:</p><blockquote><em>“Your tokens are highly fragmented.<br> We recommend consolidating them to reduce future gas costs.”</em></blockquote><p>Users appreciate transparency. They don’t want to feel tricked or taxed.</p><h3>✔ 5. Prevent double-click / multiple TX submission</h3><p>Because version conflicts are common, ensure:</p><ul><li>Disabled button while pending</li><li>Debounced actions</li><li>Single-flight transaction pattern</li></ul><p>This prevents confusing errors.</p><h4>✔ 6. Refresh coin objects after successful TX</h4><p>Because object IDs change after every mutation, don’t rely on stale cache.<br> Always refetch coins after:</p><ul><li>merge</li><li>split</li><li>transfer</li><li>swap</li><li>bridge</li></ul><h3>8. Why Sui Designed It This Way</h3><p>Sui’s object model is not an accident — it gives the chain significant strengths:</p><h4>• Massive parallelism</h4><p>Independent objects can be executed concurrently.</p><h4>• Extremely strong safety guarantees</h4><p>Objects cannot be double-spent or mutated inconsistently.</p><h4>• Rich asset expression</h4><p>Each object can carry metadata, rules, and ownership.</p><h4>• Predictability &amp; atomicity</h4><p>No partial writes, no re-entrancy noise, no global balance locks.</p><p>It’s a different paradigm, but once understood, extremely powerful.</p><h3>Final Thoughts</h3><p>Sui challenges the traditional “account balance” mindset.</p><p>But once you internalize:</p><ul><li><strong>assets = objects</strong></li><li><strong>merge/split = natural transformations</strong></li><li><strong>transactions = atomic recipes</strong></li><li><strong>UX = you must manage coin fragmentation</strong></li></ul><p>… you begin to see why Sui is designed this way and how to build fast, secure, user-friendly dApps on top of it.</p><p>Understanding coin objects is not just theory. It directly impacts real-world UX, gas costs, and transaction reliability.</p><p>If you’re building a DeFi app, wallet, bridge, or game on Sui,<br> embracing the object model early will save you months of pain later.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9b3515b763f0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dune vs. Sentio: Benchmarking Web3 Analytics in Real Life]]></title>
            <link>https://medium.com/@jill6666/dune-vs-sentio-benchmarking-web3-analytics-in-real-life-e71338914efb?source=rss-2bb62dee3d68------2</link>
            <guid isPermaLink="false">https://medium.com/p/e71338914efb</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[crypto]]></category>
            <category><![CDATA[web3]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <dc:creator><![CDATA[Jill Chang]]></dc:creator>
            <pubDate>Tue, 08 Jul 2025 21:46:43 GMT</pubDate>
            <atom:updated>2025-07-08T21:46:43.664Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dxpBnI5W5Qt4g1NJ1HOScA.png" /></figure><p>Getting meaningful insights from blockchain data is tricky.</p><p>Public blockchains are transparent, but transforming raw events into useful product metrics takes more than just access — especially when your protocol spans multiple chains, or when you’re trying to make sense of both on-chain and front-end behavior.</p><p>In my role, I rely primarily on:</p><ul><li>🟢 <strong>Sentio</strong> for on-chain observability</li><li>🔵 <strong>Mixpanel</strong> for off-chain behavior and debugging</li><li>🟡 <strong>Dune</strong> only when I’m surveying competitors or exploring hypotheses</li></ul><p>This article shares what I’ve learned from using these tools in production, how I benchmarked Sentio and Dune, and what “reliable data” means in a real-world Web3 product setting.</p><h3>🔍 Sentio vs. Dune: Not Built for the Same Thing</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eq55Fo_OhQhhoJZnWg_f-w.png" /></figure><h3>🛠️ My Workflow: Sentio + Mixpanel</h3><h3>✅ I use Sentio to:</h3><ul><li>Decode and enrich on-chain events across chains</li><li>Trigger alerts when metrics deviate</li><li>Track collateral behavior, TVL changes, and user interactions</li><li>Build dashboards and expose public metrics</li></ul><h3>✅ I use Mixpanel to:</h3><ul><li>Detect failed transactions by logging error messages and RPC codes</li><li>Track front-end flows (e.g. drop-off steps)</li><li>Understand user journey through the app UI (e.g. which step they drop off at)</li><li>Group users by wallet types, countries (IP-based), or chain behavior</li></ul><p>While Sentio gives me backend visibility, Mixpanel fills the UX gap — helping me debug and improve parts of the app that never touch the chain.</p><h3>🔍 I use Dune only when…</h3><ul><li>I want to survey other protocols (e.g. <a href="https://dune.com/lombard_protocol/lombard">Lombard</a>)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m7wjJj3ExjvBxW3ssl6PfQ.png" /></figure><p>I <strong>don’t</strong> use Dune for internal monitoring or production metrics. Why?</p><ul><li>It doesn’t support contract view calls (e.g. live price fetching)</li><li>I can’t define custom logic or enrich events</li><li>Data quality varies — some tables are uploaded manually or miss logs from certain chains</li></ul><h3>📊 A Demo: TVL Tracking on Sentio vs. Dune</h3><p>Let’s compare how I implemented TVL tracking on Sentio vs. Dune.</p><h4>🟢 On Sentio</h4><p>I used a custom processor to track TroveUpdated events and fetch the <strong>live token price from a contract</strong>:</p><pre>import { token } from &#39;@sentio/sdk/utils&#39;;<br><br>vault.onEventTroveUpdated(async (evt, ctx) =&gt; {<br>  const collInfo = await token.getERC20TokenInfo(ctx.chainId, evt.collateral);<br>  const price = await ctx.contract.callStatic.fetchPrice(); // live view call<br>  const tvl = Number(evt.args.coll_amt) * Number(price) / 1e18;<br> <br>  ctx.meter.Gauge(&quot;tvl_usd&quot;).record(tvl, {<br>   collateral: collInfo.symbol;<br>  });<br> <br>  ctx.eventLogger.emit(&quot;on_trove_updated&quot;, {<br>    distinctId: evt.args.user_address,<br>    collateral: symbol,<br>    token_price: price,<br>    message: `Trove: ${evt.args.coll_amt} symbol, ${evt.args.debt_amt} debt`,<br>  })<br>});</pre><p>Benefits:</p><ul><li>I define exactly what TVL means</li><li>Real-time alerts notify me of spikes or drops</li></ul><p>Other usecases:</p><ul><li>I export metrics as API and embed them in the app front-end</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lOzwiiANWHYA2OXTRqOx2Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AoRjG4FkWs6crx5Sfyl5zg.png" /></figure><ul><li>Setup alerts when metrics deviate</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EWop7SIVF1I-w-B6N4RFVQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GLxtCQqfcwz_wv7c3lkrpg.png" /></figure><h4>🔴 On Dune</h4><p>With Dune, I wrote a SQL query like:</p><pre>SELECT block_time, SUM(amount / 1e18) AS coll_cmt<br>FROM ethereum.logs<br>WHERE contract_address = &#39;0x123...&#39;<br>AND event_name = &#39;TroveUpdated&#39;<br>GROUP BY 1</pre><p>It worked, but:</p><ul><li>I couldn’t fetch prices directly from a pool or oracle</li><li>I had to rely on existing price feeds (or not include price at all), or I had to upload a table of price but it’s not real-time.</li><li>No alerting or real-time monitoring</li></ul><h4><em>🧠 Key takeaway:</em></h4><blockquote><em>🟡 </em><strong><em>Dune is </em>not<em> an indexer</em></strong><em> — it queries what others have already extracted</em></blockquote><blockquote><em>🟢 </em><strong><em>Sentio </em>is<em> an indexer</em></strong><em> — I define what’s tracked, enriched, and monitored</em></blockquote><h3>🧠 What I Learned</h3><ul><li>Sentio gives me full control, but requires setup and is limited to supported chains.</li><li>Mixpanel helps me catch issues that don’t hit the chain.</li><li>Dune is great for public storytelling and research, not production.</li></ul><p>Understanding where your data lives (on-chain, RPC, UI) helps you build smarter metrics — and avoid false assumptions.</p><h3>🧭 Final Thoughts</h3><p>There’s no single analytics tool that covers everything in Web3. My current stack looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WCy4-gsApVtER5bCStMrKg.png" /></figure><p>For me, <strong>Sentio + Mixpanel </strong>gives me confidence in the product’s behavior across both layers.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e71338914efb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AI-Powered Secure & Scalable Trading on Monad by Butter-Fi]]></title>
            <link>https://medium.com/@jill6666/ai-powered-secure-scalable-trading-on-monad-by-butter-fi-7c47f02fe08b?source=rss-2bb62dee3d68------2</link>
            <guid isPermaLink="false">https://medium.com/p/7c47f02fe08b</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[trading-bot]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[defi]]></category>
            <dc:creator><![CDATA[Jill Chang]]></dc:creator>
            <pubDate>Sun, 18 May 2025 17:46:16 GMT</pubDate>
            <atom:updated>2025-05-18T17:46:16.810Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EZ3AUeSXyCS7B7BGZsDemg.jpeg" /></figure><p>🧈 Butter-Fi: Smooth trading, high scalability — like butter! Our mission is to make finance simpler, smarter, and safer.</p><h3>🚨Pain Points</h3><ol><li>Users risk losing funds due to insecure TG trading bots.</li><li>Manually researching and executing trades is time-consuming.</li><li>Current trading processes are complex and inefficient.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AuVzALZoX0ofQ-JY2ueL_Q.png" /></figure><h3>✅ Solution</h3><ul><li>🔑 <strong>Turnkey</strong> → Secure key management</li><li>💬 <strong>LLM</strong> → AI-driven strategy suggestions</li><li>🟣 <strong>Monad</strong> → Fast execution with low fees</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*raSt2PHu1a-s-VfOqDww9w.png" /></figure><h4>🧠 LLM-Powered Insights</h4><p>Butter-Fi runs proprietary LLM models that analyze users’ risk profiles and capital preferences to recommend optimal strategies. Trades are executed via on-chain aggregators for seamless performance.</p><h4>🟣 Built on Monad</h4><p>A Layer 1 blockchain with parallel EVM execution, delivering 10,000+ TPS — designed for high-performance decentralized trading. (<a href="https://www.monad.xyz/">monad.xyz</a>)</p><h4>🔐 Secured by Turnkey</h4><p>A secure, flexible, and scalable key management infrastructure ensuring end-to-end protection. (<a href="https://www.turnkey.com/">turnkey.com</a>)</p><h3>🚀 Trading Experience</h3><ul><li>Ask for AI-generated trade ideas and execute on-chain instantly</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/948/1*rFAMu6MNRf0ixNzRGRbZjA.gif" /></figure><ul><li>Get instant feedback in one sentence</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/948/1*5gQdQ0wRs2gkM7OdIR5R-A.gif" /></figure><h3>🧩 What Makes Us Different</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PeqjRv6_onUmJWVycyhK0w.png" /></figure><ul><li><strong>⚡ Speed</strong>: Built on Monad for ultra-fast, scalable, and cost-efficient transactions</li><li><strong>🤖 Intelligence</strong>: Smart, automated execution powered by our own LLM</li><li><strong>🔒 Security</strong>: Trade confidently with Turnkey’s robust key management</li></ul><h3>🤝 Let’s Build Together</h3><p>We’re looking for partners, early adopters, and investors who share our vision. Want a <strong>demo</strong>, <strong>integration details</strong>, or to <strong>collaborate</strong>?<br> Reach out now — we’d love to connect!</p><p>X: <a href="https://x.com/butter_finance">https://x.com/butter_finance</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7c47f02fe08b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Do I Improve My English Writing with ChatGPT?]]></title>
            <link>https://medium.com/@jill6666/how-do-i-improve-my-english-writing-with-chatgpt-cba118c80c46?source=rss-2bb62dee3d68------2</link>
            <guid isPermaLink="false">https://medium.com/p/cba118c80c46</guid>
            <category><![CDATA[english-learning]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[english-language]]></category>
            <category><![CDATA[language]]></category>
            <dc:creator><![CDATA[Jill Chang]]></dc:creator>
            <pubDate>Thu, 05 Dec 2024 01:45:04 GMT</pubDate>
            <atom:updated>2024-12-05T01:45:04.241Z</atom:updated>
            <content:encoded><![CDATA[<p>Learning a language is a journey, and improving your writing skills is one of the most rewarding aspects. Recently, I discovered how ChatGPT can be a valuable partner in this process. Here’s how I use it to refine my English writing and make steady progress.</p><h3>Step 1: Writing Freely and Honestly</h3><p>The first step in improving is writing freely about your thoughts, experiences, or any topic that interests you. For example, I wrote a diary entry about my excitement when seeing snow for the first time. Writing about personal experiences allows me to express myself naturally without overthinking grammar or vocabulary.</p><p>ChatGPT’s Role:<br>After I finish, I ask ChatGPT to review my text, focusing on correcting grammar, word usage, and sentence structure while keeping my tone intact.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8fjgMvdH-QziIxwFQqfPpg.png" /></figure><h3>Step 2: Understanding Feedback</h3><p>ChatGPT provides detailed feedback on my writing, highlighting grammar mistakes, awkward phrasing, or repetitive expressions. For instance, I learned why we use “on” in <em>“born on a tropical island”</em> instead of “in.” It explained that “on” is idiomatic for surfaces like islands. This type of explanation helps me understand not just the corrections but the logic behind them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*afNGsTNPsKmN0Ww49go-Jw.png" /></figure><h3>Step 3: Identifying Areas to Improve</h3><p>Based on ChatGPT’s feedback, I can pinpoint specific areas where I need improvement. Here’s what I discovered about my writing:</p><ul><li><strong>Prepositions:</strong> I often mix up “on,” “in,” and “at.”</li><li><strong>Verb Tenses:</strong> I sometimes struggle with consistency, like using gerunds (-ing) instead of infinitives.</li><li><strong>Sentence Flow:</strong> My sentences can feel choppy, so I’m learning to use linking words for smoother transitions.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YDlVfR6yhxuV8SgHZfQeBA.png" /></figure><h3>Step 4: Simulate Real-Life Tests</h3><p>To push myself further, I treated my diary entry as if it were part of an IELTS writing test and asked ChatGPT to grade it. The feedback included a band score prediction (6.5–7.0) and specific suggestions for improvement in areas like lexical resource and grammatical range. This helped me set tangible goals and track progress over time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a0WzgpDliNstV7nNdrcYxQ.png" /></figure><h3>Foster a Growth Mindset</h3><p>What I appreciate most about using ChatGPT is the encouragement it offers alongside corrections. Instead of just pointing out mistakes, it highlights strengths and celebrates progress, which keeps me motivated. For instance, ChatGPT praised my creativity in writing about building a snow “cat” and encouraged me to expand on this unique detail.</p><h3>Tips for Using ChatGPT to Improve Your Writing</h3><p>If you want to use ChatGPT effectively for your own writing practice, here are some tips:</p><ul><li><strong>Be specific with your requests</strong>: Ask ChatGPT to focus on certain aspects, like grammar, vocabulary, or coherence.</li><li><strong>Learn from corrections</strong>: Don’t just accept the suggestions — ask <em>why</em> they’re better and take notes.</li><li><strong>Practice different styles</strong>: Use ChatGPT to experiment with formal, casual, or creative writing.</li><li><strong>Simulate tests</strong>: Challenge yourself by having ChatGPT evaluate your writing as if it were for an IELTS or TOEFL exam.</li><li><strong>Track your progress</strong>: Keep a record of your drafts and compare them over time to see how much you’ve improved.</li></ul><h3>Conclusion</h3><p>Using ChatGPT as a writing assistant has transformed the way I approach learning English. Its ability to provide personalized, instant feedback makes it a powerful tool for anyone looking to sharpen their skills. By treating each piece of feedback as an opportunity to learn, I’ve not only improved my grammar and vocabulary but also gained confidence in expressing myself.</p><p>If you’re on a similar journey to improve your English writing, why not give it a try? With dedication and the right tools, progress is just a few keystrokes away.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*7jpUg9PcelNgy8rbk4qtkQ.jpeg" /><figcaption>Snow “cat”</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cba118c80c46" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Distribute Unique Avatar to EVM Address Without a Database | JavaScript]]></title>
            <link>https://medium.com/@jill6666/distribute-unique-avatar-to-evm-address-without-a-database-javascript-7bdc8bf48c56?source=rss-2bb62dee3d68------2</link>
            <guid isPermaLink="false">https://medium.com/p/7bdc8bf48c56</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[web3]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[evm]]></category>
            <dc:creator><![CDATA[Jill Chang]]></dc:creator>
            <pubDate>Mon, 04 Nov 2024 21:24:50 GMT</pubDate>
            <atom:updated>2024-11-04T21:24:50.019Z</atom:updated>
            <content:encoded><![CDATA[<p>Demo URL: <a href="https://distribute-avatar.vercel.app/">https://distribute-avatar.vercel.app/</a><br>GitHub: <a href="https://github.com/jill6666/distribute-avatar">https://github.com/jill6666/distribute-avatar</a></p><h3>Introduction</h3><p>In many applications, users with unique identifiers (like blockchain addresses) often want a personalized experience. One common feature is to assign each user a unique avatar. Typically, this would require a database to store each user’s avatar mapping. However, in decentralized applications or cases where you want to avoid database dependencies, assigning avatars in a deterministic way without a database can be very beneficial.</p><p>In this article, I’ll explain how to assign unique avatars to Ethereum Virtual Machine (EVM) addresses without using a database. Each address will consistently map to the same avatar every time, based on its unique characteristics.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*IWfso5f6NDYF-VcW_-O1bQ.gif" /></figure><h3>How It Works</h3><p>The key idea is to generate a unique avatar by breaking down the address and using specific portions of it as input. We have a fixed set of avatars to select from, and the avatar assignment is based on converting parts of the address to numbers, which then correspond to colors and icon styles.</p><p>In this implementation:</p><ol><li><strong>Color Selection</strong>: We select a color category for the avatar based on the first part of the address.</li><li><strong>Icon Selection</strong>: Using the second part of the address, we choose an icon within that color category.</li></ol><p>Since this process is deterministic, each address will always yield the same avatar without any need for storage.</p><h3>Code Walkthrough</h3><pre>import { avatarBgColors, userAvatarMap } from &quot;../data/constants&quot;;<br>import getRandomAvatar from &quot;./getRandomAvatar&quot;;<br>import { isAddress } from &quot;web3-validator&quot;;<br><br>const getAvatarByAddress = (address) =&gt; {<br>  if (!address || !isAddress(address)) return getRandomAvatar();<br><br>  const trimmedAddress = address.slice(2);<br>  const firstPart = trimmedAddress.slice(0, 4);<br>  const lastPart = trimmedAddress.slice(-4);<br><br>  // Convert hexadecimal to decimal<br>  const firstDecimal = parseInt(firstPart, 16);<br>  const lastDecimal = parseInt(lastPart, 16);<br><br>  const max = 65535; // Maximum decimal value for 4 hex characters (FFFF)<br>  const bgColorIndex = Math.floor((firstDecimal / max) * avatarBgColors.length);<br>  const bgColor = avatarBgColors[bgColorIndex];<br>  const userAvatarIndex = Math.floor((lastDecimal / max) * userAvatarMap.get(avatarBgColors[bgColorIndex]).length);<br>  const avatar = userAvatarMap.get(avatarBgColors[bgColorIndex])[userAvatarIndex];<br>  <br>  return { avatarImage: avatar.url, bgColor, name: avatar.name };<br>};</pre><p>In this function, we:</p><ol><li>Extract the first 4 and last 4 characters of the address, converting each to a decimal.</li><li>Map the first decimal value to a color category and the second to a specific avatar within that color.</li><li>The avatar is then returned consistently for that address.</li></ol><h4>Avatar Mapping</h4><pre>export const avatars = [<br>    {<br>        name: &quot;Chiikawa&quot;,<br>        url: &quot;/images/chiikawa.webp&quot;<br>    },<br>    {<br>        name: &quot;Hachi&quot;,<br>        url: &quot;/images/hachi.webp&quot;<br>    },<br>    {<br>        name: &quot;Kuri&quot;,<br>        url: &quot;/images/kuri.webp&quot;<br>    },<br>    {<br>        name: &quot;Momo&quot;,<br>        url: &quot;/images/momo.webp&quot;<br>    },<br>    {<br>        name: &quot;Shisa&quot;,<br>        url: &quot;/images/shisa.webp&quot;<br>    },<br>    {<br>        name: &quot;Usagi&quot;,<br>        url: &quot;/images/usagi.webp&quot;<br>    },<br>];<br>export const avatarBgColors = [<br>    &quot;#FFC0CB&quot;,<br>    &quot;#FFA07A&quot;,<br>    &quot;#FFD700&quot;,<br>    &quot;#FF69B4&quot;,<br>    &quot;#FF6347&quot;,<br>    &quot;#FF4500&quot;,<br>];<br>export const userAvatarMap = new Map(avatarBgColors.map((color) =&gt; [color, avatars]));</pre><p>This way, each color category contains a set of distinct icons. The avatars are evenly distributed across categories, ensuring a balanced and visually diverse set of avatars.</p><h3>Advantages</h3><ol><li><strong>Consistency</strong>: Each user always sees the same avatar, based solely on their address.</li><li><strong>No Database Required</strong>: Eliminates the need for a database to store avatar assignments.</li><li><strong>Scalability</strong>: Easily scalable to millions of users, as avatar computation is lightweight.</li></ol><h3>Conclusion</h3><p>This approach allows us to distribute unique avatars to users deterministically without the need for database storage. It’s efficient, scalable, and perfectly suited for decentralized applications where avoiding database dependencies is advantageous.</p><p>Check out the <a href="https://distribute-avatar.vercel.app/">demo</a> to see it in action or view the code on <a href="https://github.com/jill6666/distribute-avatar">GitHub</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7bdc8bf48c56" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Transforming Rental Spaces: Enhancing Value through Interior Decorating and Creative Design]]></title>
            <link>https://medium.com/@jill6666/transforming-rental-spaces-enhancing-value-through-interior-decorating-and-creative-design-87e356f9743f?source=rss-2bb62dee3d68------2</link>
            <guid isPermaLink="false">https://medium.com/p/87e356f9743f</guid>
            <category><![CDATA[interior-decorating]]></category>
            <category><![CDATA[creativity]]></category>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[interior-design]]></category>
            <category><![CDATA[values]]></category>
            <dc:creator><![CDATA[Jill Chang]]></dc:creator>
            <pubDate>Thu, 04 Jul 2024 02:33:09 GMT</pubDate>
            <atom:updated>2024-07-04T02:33:09.070Z</atom:updated>
            <content:encoded><![CDATA[<h3>Transforming Rental Spaces: Enhancing Value through Soft Furnishings and Creative Design</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2a_pHYW9wzQYq-dK" /><figcaption>Photo by <a href="https://unsplash.com/@benchaccounting?utm_source=medium&amp;utm_medium=referral">Bench Accounting</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Introduction</h3><p>Soft furnishings refer to fabric-based decor items such as curtains, cushions, rugs, and upholstery that enhance the aesthetic appeal and comfort of interiors.</p><p>It can significantly increase the value of rental houses by making them more attractive and comfortable, thereby maximizing profit for both house owners and renters.</p><p>This article aims to share my experiences in the field of soft furnishings and to explore new opportunities for collaboration and partnership in this area.</p><h3>My Journey with Soft Furnishings</h3><blockquote>After graduating from university, my parents let me transform a cluttered, unused room in our house. Diving into the project, I researched design ideas, fabrics, and layouts. Turning the space into a cozy, functional area sparked my passion for interior design. This experience ignited my enthusiasm for soft furnishings, and I realized I wanted to pursue this passion further, aiming to bring value to rental properties and create joyful living spaces.</blockquote><p><strong>First Projects and Learning Experiences</strong></p><ul><li>In my first project, it was hard to control the expenditure cost, and earned only $153 USD over 22 months.</li></ul><p><strong>Aiming to Add Value to Rental Houses</strong></p><ul><li>Due to the very unfair rental market in Taipei, renters pay almost one-third of their salary for renting broken rooms. The quality does not match the value for renters. Therefore, I aim to provide a better market for renters and keep the market balanced.</li></ul><p><strong>Maximizing Profit for House Owners and Renters</strong></p><ul><li>1st Project: APY 0.6% (Earned $153 USD in 22 months)</li><li>2nd Project: APY 9.9% (Earned $1,511 USD in 23 months)</li><li>3rd Project: APY 13.8% (Earned $1,606 USD in 12 months)</li></ul><h3>Showcasing My Work</h3><h4>Working Timeline</h4><ul><li>Planning and Conceptualization: 1–2 days</li><li>Purchasing: 7+ days</li><li>Balancing Functionality and Aesthetics: 3 days</li><li>Posting and Guesting House View: 5 days</li></ul><h3>Sample Project 1: [Industrial style 3 Bedrooms Apartment]</h3><h4>Before and After Photos</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ymkWp5rIEZN-v5-s13ymFw.png" /></figure><h4>Design Process and Challenges</h4><ul><li>In Taiwan, most rental houses come furnished, and the owners won’t let you remove or relocate the furniture. This makes it challenging to arrange and fit them into a new style.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rhab6m4mKu90Yz1oD_Eq0A.png" /></figure><h3>Sample Project 2: [Old School Style 2 Bedrooms Apartment]</h3><h4>Before and After Photos</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GkZ2URImmiS_6SjYof3tiw.png" /></figure><h4>Design Process and Challenges</h4><ul><li>This apartment was really old, and the walls resembled those of a public bathroom. It was extremely difficult to plan a suitable style for it with minimal changes.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PJtSn_oW9uBvd86VwUOWZg.png" /></figure><h3>Sample Project 3: [Bright and Fresh 3 Bedrooms Apartment]</h3><h4>Before and After Photos</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-9KimY1QjffTb3HjmdAz1Q.png" /></figure><h4>Design Process and Challenges</h4><ul><li>This house was empty, and the rental price was higher than before. So, I had to find furnishings as soon as possible. I searched on Facebook Marketplace and bought second-hand but new-like beds for it. And hired someone to relocate it from the seller’s house.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nbFigKSGLtOj7Ead0xYehA.png" /></figure><h3>Challenges and Solutions</h3><h4>Common Issues in Soft Furnishings Design</h4><ul><li><strong>Mismatched Styles</strong>: Integrating soft furnishings with existing decor.</li><li><strong>Budget Constraints</strong>: Balancing quality and cost-effectiveness.</li><li><strong>Space Constraints</strong>: Maximizing comfort without overcrowding.</li></ul><h4>Tips for Overcoming Design Hurdles</h4><ul><li><strong>Measurements Matter</strong>: Ensure furnishings fit space dimensions.</li><li><strong>Mix Textures</strong>: Combine different textures for visual interest.</li><li><strong>Functional Layout</strong>: Arrange furnishings for optimal use.</li><li><strong>Recycling and Upcycling</strong>: Repurpose old furnishings to minimize waste.</li></ul><h3>Conclusion</h3><p>I love design and making it become realistic. It is incredibly rewarding when the final outcome helps both house owners and renters, and even improves the rental market.</p><p>By sharing my work and insights, I hope to inspire others in the field and foster new opportunities for collaboration. Whether you’re an interior designer, a fabric manufacturer, or a homeowner looking to enhance your property, I believe there is great potential in working together to create spaces that are not only aesthetically pleasing but also economically and ethically sound.</p><p>Let’s connect and explore how we can bring more value to rental properties, create better living environments, and contribute to a more balanced rental market. Thank you for taking the time to read my story. I look forward to the possibilities that lie ahead.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GeHCp-u89_OOc9R2-XP0vA.png" /><figcaption>The room I was worked with in my parent’s house.</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=87e356f9743f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Responsive Carousel Component with React, TypeScript, and TailwindCSS]]></title>
            <link>https://medium.com/@jill6666/building-a-responsive-carousel-component-with-react-typescript-and-tailwindcss-71aeadcfcbec?source=rss-2bb62dee3d68------2</link>
            <guid isPermaLink="false">https://medium.com/p/71aeadcfcbec</guid>
            <category><![CDATA[tailwind-css]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[css]]></category>
            <dc:creator><![CDATA[Jill Chang]]></dc:creator>
            <pubDate>Fri, 28 Jun 2024 13:59:21 GMT</pubDate>
            <atom:updated>2024-07-01T22:56:18.730Z</atom:updated>
            <content:encoded><![CDATA[<p>In this article, we will walk through the process of creating a responsive carousel component using React, TypeScript, and TailwindCSS. This component will automatically cycle through images, display a progress bar, and allow users to navigate to specific event pages by clicking on the images.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/924/1*cI0EHXwDKPXO6KQowh7yvQ.gif" /></figure><h3>Prerequisites</h3><p>To follow along, ensure you have a basic understanding of React, TypeScript, and TailwindCSS.</p><p>ref: <a href="https://tailwindcss.com/docs/installation">https://tailwindcss.com/docs/installation</a></p><h3>Carousel Component Implementation</h3><p>Here’s the demo link on code sandbox: <a href="https://codesandbox.io/p/sandbox/vigorous-thunder-7h87fs?file=%2Fsrc%2Findex.js">https://codesandbox.io/p/sandbox/vigorous-thunder-7h87fs</a></p><pre>import React, { useEffect, useState, useRef, useMemo } from &quot;react&quot;;<br>import { clsx } from &quot;clsx&quot;;<br>import { twMerge } from &quot;tailwind-merge&quot;;<br><br>function cn(...inputs) {<br>  return twMerge(clsx(inputs));<br>}<br><br>const Carousel = ({ data = [], duration = 4900 }) =&gt; {<br>  const [currentIndex, setCurrentIndex] = useState(0);<br>  const [progress, setProgress] = useState(0);<br>  const progressRef = useRef(null);<br>  const hasData = useMemo(() =&gt; Boolean(data.length), [data]);<br><br>  useEffect(() =&gt; {<br>    if (!data.length) return;<br><br>    const interval = setInterval(() =&gt; {<br>      setCurrentIndex((prevIndex) =&gt; (prevIndex + 1) % data.length);<br>      setProgress(10);<br>    }, duration);<br><br>    return () =&gt; clearInterval(interval);<br>  }, [data, duration]);<br><br>  useEffect(() =&gt; {<br>    const progressInterval = setInterval(() =&gt; {<br>      setProgress((prevProgress) =&gt; {<br>        const nextProgress = prevProgress + 100 / (duration / 100);<br>        if (nextProgress &gt;= 100) clearInterval(progressInterval);<br><br>        return nextProgress;<br>      });<br>    }, 100);<br><br>    return () =&gt; clearInterval(progressInterval);<br>  }, [currentIndex, duration]);<br><br>  useEffect(() =&gt; {<br>    if (progressRef.current) progressRef.current.style.width = `${progress}%`;<br>  }, [progress, duration]);<br><br>  return (<br>    &lt;div className=&quot;w-full h-[300px] flex flex-col hover:bg-white/10 duration-300 ease-in-out group overflow-hidden&quot;&gt;<br>      &lt;div className=&quot;relative w-full h-full&quot;&gt;<br>        {!hasData &amp;&amp; &lt;&gt;default image...&lt;/&gt;}<br>        {hasData &amp;&amp;<br>          data.map((item, index) =&gt; (<br>            &lt;div<br>              key={item?.id}<br>              className={cn(<br>                `flex flex-col w-full h-full absolute transition-opacity duration-1000 cursor-pointer`,<br>                index === currentIndex ? &quot;opacity-100&quot; : &quot;opacity-0&quot;<br>              )}<br>            &gt;<br>              &lt;div className=&quot;w-full h-[340px] group-hover:scale-110 transition-all duration-300 ease-in-out&quot;&gt;<br>                &lt;div<br>                  style={{<br>                    backgroundImage: `url(https://medium.com/&#39;${item?.imageUrl}&#39;)`,<br>                    backgroundSize: &quot;cover&quot;,<br>                    backgroundRepeat: &quot;no-repeat&quot;,<br>                    backgroundPosition: &quot;center&quot;,<br>                    width: &quot;100%&quot;,<br>                    height: &quot;100%&quot;,<br>                  }}<br>                /&gt;<br>              &lt;/div&gt;<br>              &lt;div className=&quot;w-full text-left text-base tracking-wider leading-7 text-amber-300 py-4 px-4&quot;&gt;<br>                {item?.title}<br>              &lt;/div&gt;<br>            &lt;/div&gt;<br>          ))}<br>      &lt;/div&gt;<br><br>      {hasData &amp;&amp; (<br>        &lt;div className=&quot;gap-1.5 w-full p-0 px-4 pb-4 flex&quot;&gt;<br>          {data.map((item, index) =&gt; {<br>            const isActive = currentIndex === index;<br>            return (<br>              &lt;div<br>                key={`${item?.id}-${index}`}<br>                className={cn(<br>                  &quot;overflow-hidden relative shrink-0 h-2 bg-white bg-opacity-30 rounded-full&quot;,<br>                  isActive ? &quot;w-[30px]&quot; : &quot;w-2&quot;<br>                )}<br>              &gt;<br>                {isActive &amp;&amp; (<br>                  &lt;div className=&quot;absolute bottom-0 left-0 w-full h-2 bg-transparent rounded-full&quot;&gt;<br>                    &lt;div<br>                      ref={progressRef}<br>                      className=&quot;h-full bg-amber-300 rounded-full&quot;<br>                    /&gt;<br>                  &lt;/div&gt;<br>                )}<br>              &lt;/div&gt;<br>            );<br>          })}<br>        &lt;/div&gt;<br>      )}<br>    &lt;/div&gt;<br>  );<br>};<br><br>export default Carousel;</pre><h3>Effect Hooks for Carousel</h3><h4><strong>1. Changing the Carousel Image</strong></h4><p>This effect hook sets an interval to change the carousel image at a specified duration (default 4900ms).</p><pre>useEffect(() =&gt; {<br>  // If there is no data, exit early<br>  if (!data.length) return;<br><br>  // Set an interval to change the current image that runs every duration<br>  const interval = setInterval(() =&gt; {<br>    // % operator ensures it wraps around to the first image after the last one<br>    setCurrentIndex((prevIndex) =&gt; (prevIndex + 1) % data.length);<br>    setProgress(10); // Reset the progress bar<br>  }, duration);<br><br>  // Clear the interval when the component is unmounted or when dependencies change<br>  return () =&gt; clearInterval(interval);<br>}, [data, duration]);</pre><h4><strong>2. Updating the Progress Bar</strong></h4><p>This effect hook sets an interval to update the progress bar in small increments.</p><pre>useEffect(() =&gt; {<br>  // Set an interval to update the progress bar<br>  const progressInterval = setInterval(() =&gt; {<br>    setProgress((prevProgress) =&gt; {<br>	    // fit into the duration to increment the progress bar correctly.<br>      const nextProgress = prevProgress + 100 / (duration / 100);<br>      if (nextProgress &gt;= 100) {<br>        clearInterval(progressInterval); // Clear the interval when progress reaches 100%<br>      }<br>      return nextProgress;<br>    });<br>  }, 100); // Update progress every 100ms<br><br>  // Clear the interval when the component is unmounted or when dependencies change<br>  return () =&gt; clearInterval(progressInterval);<br>}, [currentIndex, duration]);</pre><h4><strong>3. Updating the Progress Bar Width</strong></h4><p>This effect hook updates the width of the progress bar based on the progress state.</p><pre>useEffect(() =&gt; {<br>  if (progressRef.current) {<br>    progressRef.current.style.width = `${progress}%`;<br>  }<br>}, [progress]);</pre><h3>Conclusion</h3><p>This implementation ensures a smooth and synchronized carousel experience with a progress bar, suitable for displaying campaign items. The component is responsive and adjusts the layout based on the screen size. Feel free to customize the styles and functionality further to meet your specific requirements.</p><p>By following this guide, you should now have a fully functional carousel component integrated into your React application. If you have any questions or need additional features, don’t hesitate to reach out!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=71aeadcfcbec" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Use .webm Files in JavaScript? | Use .webm in React]]></title>
            <link>https://medium.com/@jill6666/how-to-use-webm-files-in-javascript-use-webm-in-react-fa14a5d8fbea?source=rss-2bb62dee3d68------2</link>
            <guid isPermaLink="false">https://medium.com/p/fa14a5d8fbea</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[user-experience]]></category>
            <dc:creator><![CDATA[Jill Chang]]></dc:creator>
            <pubDate>Thu, 27 Jun 2024 23:41:47 GMT</pubDate>
            <atom:updated>2024-06-28T13:19:10.892Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to Use .webm Files in JavaScript? | Use .webm in React</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/999/1*2tm7_7oIrqULmLdsR82klQ.gif" /><figcaption><a href="https://app.satoshiprotocol.org/campaign/voting">https://app.satoshiprotocol.org/campaign/voting</a></figcaption></figure><h3>Introduction</h3><p>Integrating high-quality video content into web applications can significantly enhance user experience. .webm is a popular video format that offers efficient compression and high quality. In this article, we will explore how to use .webm files in both JavaScript and React applications, addressing common challenges such as looping, dynamic source changes, and handling user interactions.</p><h3>Using .webm Files in JavaScript</h3><h4>Basic Implementation</h4><p>To embed a .webm video file in your HTML and ensure it loops continuously, you can use the following structure:</p><pre>&lt;video id=&quot;banner-video&quot; autoplay muted playsinline loop&gt;<br>  &lt;source src=&quot;path/to/your/video.webm&quot; type=&quot;video/webm&quot;&gt;<br>  Your browser does not support the video tag.<br>&lt;/video&gt;</pre><h4>Advanced Implementation: Lazy Loading and Multi-Resolution Support</h4><p>For a more optimized approach that includes lazy loading and different resolutions for various screen sizes, consider this implementation:</p><pre>&lt;video id=&quot;banner-video&quot; preload=&quot;none&quot; playsinline muted loop&gt;<br>  &lt;source src=&quot;path/to/your/video-1080p.webm&quot; type=&quot;video/webm&quot; media=&quot;(min-width: 1200px)&quot;&gt;<br>  &lt;source src=&quot;path/to/your/video-720p.webm&quot; type=&quot;video/webm&quot; media=&quot;(min-width: 768px)&quot;&gt;<br>  &lt;source src=&quot;path/to/your/video-480p.webm&quot; type=&quot;video/webm&quot;&gt;<br>  Your browser does not support the video tag.<br>&lt;/video&gt;<br><br>&lt;script&gt;<br>  document.addEventListener(&#39;DOMContentLoaded&#39;, function() {<br>    const video = document.getElementById(&#39;banner-video&#39;);<br>    const observer = new IntersectionObserver(entries =&gt; {<br>      entries.forEach(entry =&gt; {<br>        if (entry.isIntersecting) {<br>          video.play();<br>          observer.unobserve(video);<br>        }<br>      });<br>    });<br>    observer.observe(video);<br>  });<br>&lt;/script&gt;</pre><h4>Explanation</h4><ul><li><strong>Loop Attribute</strong>: Ensures the video restarts automatically after ending.</li><li><strong>Autoplay and Muted Attributes</strong>: Autoplay starts the video when the page loads. Some browsers require the video to be muted for autoplay to work.</li><li><strong>Playsinline Attribute</strong>: Ensures the video plays inline on mobile devices.</li><li><strong>Preload Attribute</strong>: Controls how the video is loaded. none reduces initial load time.</li><li><strong>Intersection Observer</strong>: Lazy loads the video, playing it only when it enters the viewport.</li></ul><h3>Using .webm Files in React</h3><p>When working with React, integrating .webm files involves using refs and managing state for dynamic behavior. Below is a comprehensive example demonstrating how to handle different video sources based on user interactions like mouse events.</p><h4>Full React Component Example</h4><p>Here is a sample React component that demonstrates how to use .webm files, including changing the video source dynamically based on user interaction:</p><pre>import React, { useRef, useState } from &#39;react&#39;;<br><br>const VideoComponent = ({ isSignIn, handleOnVote, handleSignIn, voteForSatoshi }) =&gt; {<br>  const videoRef = useRef&lt;HTMLVideoElement&gt;(null);<br>  const sourceRef = useRef&lt;HTMLSourceElement&gt;(null);<br>  const [timer, setTimer] = useState&lt;NodeJS.Timeout | null&gt;(null);<br><br>  const changeSource = (src: string) =&gt; {<br>    if (!src) return;<br>    const video = videoRef.current;<br>    const source = sourceRef.current;<br><br>    if (video &amp;&amp; source) {<br>      source.src = src;<br>      video.load();<br>      video.play();<br>    }<br>  };<br><br>  const handleCoinAnimation = () =&gt; {<br>    if (timer) clearTimeout(timer);<br>    changeSource(&quot;/videos/coin_ready.webm&quot;);<br><br>    const firstTimeout = setTimeout(() =&gt; {<br>      changeSource(&quot;/videos/coin_spin.webm&quot;);<br>    }, 300);<br><br>    const secondTimeout = setTimeout(() =&gt; {<br>      changeSource(&quot;/videos/coin_ended.webm&quot;);<br>    }, 2500);<br><br>    const thirdTimeout = setTimeout(() =&gt; {<br>      changeSource(&quot;/videos/coin_wave.webm&quot;);<br>    }, 4500);<br><br>    setTimer(thirdTimeout);<br>  };<br><br>  const handleOnVote = async () =&gt; {<br>    handleCoinAnimation();<br>    // Additional vote handling logic...<br>  };<br><br>  return (<br>    &lt;div className=&quot;relative cursor-pointer w-full h-full md:min-h-0&quot;&gt;<br>      &lt;video<br>        ref={videoRef}<br>        id=&quot;coin-video&quot;<br>        playsInline<br>        muted<br>        autoPlay<br>        loop<br>        preload=&quot;metadata&quot;<br>        className=&quot;w-full m-auto md:p-4 md:max-w-[360px] max-h-[360px] md:max-h-full md:pb-4 pb-25 mt-4&quot;<br>        onClick={handleOnVote}<br>        poster={voteForSatoshi.src}<br>      &gt;<br>        &lt;source ref={sourceRef} id=&quot;video-source&quot; src=&quot;/videos/satoshi_coin_wave.webm&quot; type=&quot;video/webm&quot; /&gt;<br>        Your browser does not support the video tag.<br>      &lt;/video&gt;<br>      &lt;div className=&quot;md:hidden absolute bottom-[25%] left-[calc(50%-50px)] m-auto shadow-sm&quot;&gt;<br>        &lt;p className=&quot;relative text-sm leading-[22px] click-to-vote rounded-sm bg-white text-black px-3 py-2 w-fit &quot;&gt;<br>          Click to vote<br>        &lt;/p&gt;<br>      &lt;/div&gt;<br>    &lt;/div&gt;<br>  );<br>};<br><br>export default VideoComponent;</pre><h3>Key Improvements</h3><ol><li><strong>Using Refs</strong>: Utilize useRef to get references to video and source elements instead of directly manipulating the DOM.</li><li><strong>Managing Timer</strong>: Manage the timer state with useState and clear previous timers before setting new ones.</li><li><strong>Event Handling</strong>: Ensure event handlers are correctly set up to change video sources based on user interactions.</li></ol><h3>TypeScript Considerations</h3><p>When using TypeScript, ensure the refs are typed correctly to avoid errors:</p><pre>const videoRef = useRef&lt;HTMLVideoElement&gt;(null);<br>const sourceRef = useRef&lt;HTMLSourceElement&gt;(null);<br>const [timer, setTimer] = useState&lt;NodeJS.Timeout | null&gt;(null);</pre><h3>Conclusion</h3><p>Integrating .webm files into your web application using JavaScript or React involves understanding HTML video attributes, event handling, and efficient state management. By following the examples and best practices outlined in this article, you can enhance your web application&#39;s user experience with high-quality, efficiently loaded video content.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fa14a5d8fbea" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Joining Satoshi Protocol: My First Month’s Insights, Challenges, and Future Prospects]]></title>
            <link>https://medium.com/@jill6666/joining-satoshi-protocol-my-first-months-insights-challenges-and-future-prospects-b36f60ec3234?source=rss-2bb62dee3d68------2</link>
            <guid isPermaLink="false">https://medium.com/p/b36f60ec3234</guid>
            <category><![CDATA[web3]]></category>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[careers]]></category>
            <dc:creator><![CDATA[Jill Chang]]></dc:creator>
            <pubDate>Thu, 23 May 2024 19:52:20 GMT</pubDate>
            <atom:updated>2024-05-24T00:05:01.402Z</atom:updated>
            <content:encoded><![CDATA[<h3>Intro ❤️‍🔥</h3><p>I am excited to announce that I have officially joined the Satoshi Protocol team and have completed a fulfilling and challenging first month. In this post, I want to share my experiences, the challenges I faced, and my outlook for the future.</p><h3>About Satoshi Protocol</h3><p><a href="https://linktr.ee/satoshi_protocol">Satoshi Protocol</a> is a universal stablecoin protocol built on Bitcoin. It empowers users to deposit BTC as collateral and borrow stablecoin SAT that circulate in the whole Bitcoin ecosystem.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vTohqlCyB9gOL1yj.png" /></figure><h3>Reflections After Joining</h3><p>Since joining Satoshi Protocol, I have been deeply impressed by the enthusiasm and professionalism of the team. The team members are passionate and creative, and everyone is working hard towards our common goals. Working in such an environment has been immensely beneficial, broadening my horizons and enhancing my skills.</p><p>During this period, I have participated in projects such as:</p><ul><li><strong>Blockchain data integration, analysis, and monitoring</strong></li><li><strong>Web3 development and automated testing</strong></li><li><strong>Project management</strong></li></ul><p>Compared to Web2 teams, Web3 products differ significantly in architecture, objectives, and development pace. Here are some differences from a product development perspective:</p><p><strong>Monitoring</strong></p><ul><li>In Web2, tools like <a href="https://www.elastic.co/elasticsearch">Elastic Search</a> are used as intermediaries to search for logs sent by services and use different levels as standards for monitoring and alerts. The Web3 architecture is similar; it requires setting up RPC nodes to listen to on-chain events, reading transactions and events happening on the blockchain, and then writing processors to run monitoring logic on the HTTP server.</li></ul><p><strong>Frontend Development</strong></p><ul><li>Data Updates and Accuracy Whether in Web2 or Web3, products related to financial transactions emphasize real-time data display to reduce operational errors and enhance user experience. Thus, the frontend’s mission is to ensure the accuracy and timely updates of numbers shown, utilizing refetch, retry, and cache to manage data states.</li><li>Error Handling Compared to Web2, Web3 frontend users encounter more diverse error scenarios, such as unstable RPC node environments, high gas fees for on-chain transactions, and unsupported wallet usage in certain regions.</li></ul><p><strong>Automated Testing</strong></p><ul><li>For Web2 backend API servers, K6 is used for stress testing and Postman for end-to-end tests, while Cypress is used for frontend end-to-end tests. In Web3, the only difference is connecting to a wallet and preparing enough tokens to run transaction tests. Overall, Web3 end-to-end test costs are high, as sending a transaction can cost up to $4 when gas fees are high.</li></ul><h3>Challenges Faced</h3><p>Of course, any new beginning comes with its challenges. For me, the biggest challenge was adapting to the new industry environment and technical architecture.</p><p>Although I had previously participated in blockchain development and had some understanding of blockchain operations, development models, and technologies, I found my knowledge of the industry’s trends and dynamics was still vague when I entered the industry. Initially, it required a significant amount of time to learn and adapt. However, Satoshi Protocol offers abundant resources, with a marketing lead with years of experience in the blockchain industry, professional researchers, experienced contract engineers, and highly efficient full-stack engineers.</p><p>With the help of the team members, I quickly found ways to overcome these difficulties and gradually integrated into the team and the industry.</p><h3>Future Outlook</h3><p>I am full of confidence and anticipation for my future and the development of Satoshi Protocol. Currently, I am contributing to the core aspects of the project, which has been a valuable experience for me. In the future, I will work with the team to advance the project’s progress, aiming to make Satoshi Protocol a more powerful platform that provides diverse and high-quality services for Bitcoin Layer 2 stablecoin applications.</p><h3>Conclusion</h3><p>Lastly, I welcome everyone interested in Bitcoin Layer 2 to connect with me and explore potential collaboration opportunities. If you have any suggestions or opinions, I am thrilled and eager to hear from you. Let’s create a better future together!</p><p>Thank you for reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b36f60ec3234" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How To Check Dubai Visa Online: Validate UAE Visa Status ｜如何驗證杜拜簽證真偽：使用當地人擔保申請杜拜簽證]]></title>
            <link>https://medium.com/@jill6666/how-to-check-dubai-visa-online-validate-uae-visa-status-%E5%A6%82%E4%BD%95%E9%A9%97%E8%AD%89%E6%9D%9C%E6%8B%9C%E7%B0%BD%E8%AD%89%E7%9C%9F%E5%81%BD-%E4%BD%BF%E7%94%A8%E7%95%B6%E5%9C%B0%E4%BA%BA%E6%93%94%E4%BF%9D%E7%94%B3%E8%AB%8B%E6%9D%9C%E6%8B%9C%E7%B0%BD%E8%AD%89-55a649c9418d?source=rss-2bb62dee3d68------2</link>
            <guid isPermaLink="false">https://medium.com/p/55a649c9418d</guid>
            <category><![CDATA[visa-services]]></category>
            <category><![CDATA[dubai]]></category>
            <category><![CDATA[visa]]></category>
            <category><![CDATA[travel]]></category>
            <category><![CDATA[traveling]]></category>
            <dc:creator><![CDATA[Jill Chang]]></dc:creator>
            <pubDate>Fri, 12 Apr 2024 21:54:00 GMT</pubDate>
            <atom:updated>2024-04-12T21:55:27.549Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*s0KfHSceNhWH0d0C" /><figcaption>Photo by <a href="https://unsplash.com/@waelhneini?utm_source=medium&amp;utm_medium=referral">Wael Hneini</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>If you have decided to travel to Dubai, there are several ways to obtain a visa for Dubai. One option is to select a specific airline and add on the visa sponsorship service when booking your ticket. The other option is to apply for a visa through a local visa sponsor such as a tour agency or an individual.</p><p>如果你打算前往杜拜旅行，有幾種方式可以獲得杜拜的簽證。其中一種是在訂票時選擇特定航空公司（e.g. 阿聯酋），並在預訂機票時添加簽證服務。另一種方式是透過當地簽證贊助人，如旅行社或個人申請簽證。</p><p>In this article, I will introduce the second method and focus on how to check its status and validity.</p><p>在本文中，我將介紹第二種方法，並重點介紹如何檢查其狀態和有效性。</p><h3>Why Do I Need to Validate the Visa Status? 為什麼需要驗證簽證狀態？</h3><p>As mentioned earlier, you can apply for a visa through any local sponsor. Therefore, if you want to get a good deal or take advantage of a promotion, you can definitely compare options. However, it is important to check the validity and status of the visa so that you can enter Dubai without any issues and have a pleasant trip.</p><p>如前所述，你可以透過任何當地贊助人申請簽證。因此，如果你想獲得優惠或參加促銷活動，絕對可以比較各種選擇。然而，檢查簽證的有效性和狀態非常重要，這樣你就可以順利進入杜拜，並享受愉快的旅程。</p><h3>How to Validate Online by Passport? 如何透過護照號碼在線驗證？</h3><p>Once the local visa sponsor has completed the application process, you can validate the visa online using only the passport number.</p><p>一旦當地簽證贊助人完成申請程序，你可以僅使用護照號碼在線驗證簽證。</p><ol><li>Visit UAE government website <a href="https://smartservices.icp.gov.ae/echannels/web/client/default.html#/fileValidity">Service Portal</a>.</li><li>Select ‘Search By Passport Information’, and ‘Select the Type’ of Visa</li><li>Enter the required information.</li><li>Click on ‘Submit’.</li><li>訪問政府網站 <a href="https://smartservices.icp.gov.ae/echannels/web/client/default.html#/fileValidity">Service Portal</a></li><li>選擇「Search By Passport Information」，並選擇「Select the Type Visa」。</li><li>輸入所需信息。</li><li>點擊「提交」。</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qX0e2eo3c05QFNQHkKGt5A.png" /></figure><h4>Result 驗證結果</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*obqdZVqNuJWX64xCmkTG2A.png" /></figure><h3>Conclusion 結論</h3><p>I hope this article will be helpful to someone. Have a great trip!</p><p>我希望這篇文章能夠幫助到某些人。祝旅途愉快！</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=55a649c9418d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>