<?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:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[I'm Tommy Tsui]]></title><description><![CDATA[Thoughts, stories and ideas.]]></description><link>https://tommytsui.co/</link><image><url>https://tommytsui.co/favicon.png</url><title>I&apos;m Tommy Tsui</title><link>https://tommytsui.co/</link></image><generator>Ghost 5.72</generator><lastBuildDate>Tue, 23 Dec 2025 19:09:20 GMT</lastBuildDate><atom:link href="https://tommytsui.co/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Dialing in espresso. What I have learnt from my first espresso training]]></title><description><![CDATA[<p>As a newbie barista, it is such a pleasure that your workplace provides a coffee training to you. This blog is to record what I have learnt in the training.</p><h2 id="what-is-dialing-in-an-espresso">What is Dialing in an Espresso?</h2><p>Dialing in means to adjust the shot to be a desired espresso extraction, by</p>]]></description><link>https://tommytsui.co/dialing-in-espresso/</link><guid isPermaLink="false">662933857681f4000121dfb8</guid><category><![CDATA[coffee]]></category><dc:creator><![CDATA[Tommy Tsui]]></dc:creator><pubDate>Wed, 24 Apr 2024 18:51:55 GMT</pubDate><content:encoded><![CDATA[<p>As a newbie barista, it is such a pleasure that your workplace provides a coffee training to you. This blog is to record what I have learnt in the training.</p><h2 id="what-is-dialing-in-an-espresso">What is Dialing in an Espresso?</h2><p>Dialing in means to adjust the shot to be a desired espresso extraction, by changing the temperature, pressure, grind size and yield.</p><h3 id="extraction">Extraction</h3><p>When we talk about coffee, there is always a very important concept we need in our head: Extraction. Over-extraction and under extraction are also not good for an espresso. We always need to reach the middle of them, which is ideal extraction.</p><h4 id="under-extraction">Under extraction</h4><p>Under-extracted coffee means that the coffee particle haven&apos;t been extracted from the coffee bean. It tastes salty, sour, lacking complexity, lacking sweetness, lacking pleasant finish, unbalanced.</p><h4 id="over-extraction">Over extraction</h4><p>Over-extracted coffee means the coffee particles have been extracted too much from the coffee bean. It will bring the bitterness, burnt-ness, astringency, harsh acidity.</p><h4 id="ideal-extraction">Ideal extraction</h4><p>It should taste balanced, sweet, complex, long lasting, pleasant finish, as well as to have a rich mouthfeel.</p><h2 id="dialing-in">Dialing in</h2><p>To dialing in an espresso shot, we can change a lot of factors, such as grind dose, volume, extraction time, grind size. To simplify the whole process, this blog will only mention <strong>grind size</strong> and <strong>volume.</strong></p><h3 id="volume">Volume</h3><p>The higher the yield, the more water has been passed through the coffee &#x2013; meaning a higher extraction level.&#xA0;</p><p>By increasing the volume, the sweetness and biterness will increase while the sourness and body will decrease.</p><h3 id="grind">Grind </h3><p>The finer the coffee grind is, the more sweetness, bitterness and body will be extracted, while the acidity of the coffee will decrease.</p>]]></content:encoded></item><item><title><![CDATA[Eliminating Redundancy: Best Practices in Coding Style]]></title><description><![CDATA[<h3 id="introduction">Introduction</h3><p>I&apos;ve observed a tendency among our developers to write code that goes beyond the scope of current functionality. For example:</p><pre><code class="language-typescript">  async updateEnrollmentStatus(
    id: string,
    status: EnrollmentStatus,
    options?: QueryOptions,
  ) {
    const query = this.model.updateOne(
      {
        id: id,
      },
      { status: status },
    );
    if (options) this.setQueryOptions(query, options);

    const result = await query.</code></pre>]]></description><link>https://tommytsui.co/coding-style-code-redundancy/</link><guid isPermaLink="false">6549dc990df92300014f5cea</guid><dc:creator><![CDATA[Tommy Tsui]]></dc:creator><pubDate>Wed, 08 Nov 2023 08:04:38 GMT</pubDate><media:content url="https://tommytsui.co/content/images/2023/11/4hg3iy.jpg" medium="image"/><content:encoded><![CDATA[<h3 id="introduction">Introduction</h3><img src="https://tommytsui.co/content/images/2023/11/4hg3iy.jpg" alt="Eliminating Redundancy: Best Practices in Coding Style"><p>I&apos;ve observed a tendency among our developers to write code that goes beyond the scope of current functionality. For example:</p><pre><code class="language-typescript">  async updateEnrollmentStatus(
    id: string,
    status: EnrollmentStatus,
    options?: QueryOptions,
  ) {
    const query = this.model.updateOne(
      {
        id: id,
      },
      { status: status },
    );
    if (options) this.setQueryOptions(query, options);

    const result = await query.exec();
    return result.modifiedCount == 1;
  }</code></pre><p>The <code>options</code> parameter is redundant, as they are not used anywhere in the entire codebase. While it&apos;s beneficial to maintain flexibility in code for extensibility, it can also inadvertently contribute to technical debt. </p><h3 id="code-redundancy">Code Redundancy</h3><p>In the realm of software engineering, redundancy is not inherently detrimental; it acts as an essential safeguard against system failures. Take mission-critical systems like those in aircraft, for example, which are intentionally built with significant redundancy to ensure reliability and prevent downtime. In the context of a codebase, however, the same kind of redundancy can lead to different challenges. </p><p>Many developers are inclined to create highly generic functions with the aim of future extensibility. However, from my perspective, this approach may not be advisable. Here&#x2019;s why.</p><h4 id="polluting-the-codebase">Polluting the codebase</h4><p>Effective programming is meant to enhance our efficiency and output. However, inserting superfluous code can obscure the intended functionality and lead to decreased productivity. Moreover, preemptively incorporating features intended for future use often complicates the codebase. This not only makes the debugging process more challenging but can also inflate the cost of maintaining and modifying the code over time. Such preemptive coding assumes future requirements that may evolve differently than anticipated, leading to wasted effort and resources. It is typically more prudent to implement features as they become necessary, ensuring that the code remains relevant, streamlined, and easier to manage.</p><h3 id="solution">Solution</h3><h4 id="implement-tdd-test-driven-development">Implement TDD (Test Driven Development)</h4><p>TDD, or Test-Driven Development, is a methodology where unit tests are written before the code itself. Developers then create just enough code to pass these tests, thereby avoiding any unnecessary code that isn&apos;t required by the tests. This practice ensures that all new code is immediately covered by tests and helps prevent over-engineering by focusing development efforts solely on what is needed for the desired functionality.</p><h4 id="refactor-the-code">Refactor the code</h4><p>Code can become obsolete as requirements change over time. This necessitates regular refactoring to remove such outdated segments, ensuring the codebase remains efficient and free of unused code.</p><p></p><h3 id="conclusion">Conclusion</h3><p>Code quality is of utmost importance and should always be at the forefront of a developer&apos;s mind. Even though we may occasionally adopt a &apos;get things done&apos; approach to meet deadlines, we must not compromise on the standards that ensure maintainability, efficiency, and readability of our code.</p>]]></content:encoded></item><item><title><![CDATA[About this website]]></title><description><![CDATA[<p>I&apos;m Tommy Tsui. I&apos;m a 7 years software engineer. Currently staying in Vancouver, Canada.</p><p>I am also a newbie barista in Vancouver.</p><p>This website is a place for me to record what I have learnt and study on in my life.</p><p></p>]]></description><link>https://tommytsui.co/docker/</link><guid isPermaLink="false">654629d692141c0001439087</guid><dc:creator><![CDATA[Tommy Tsui]]></dc:creator><pubDate>Sat, 04 Nov 2023 11:31:08 GMT</pubDate><content:encoded><![CDATA[<p>I&apos;m Tommy Tsui. I&apos;m a 7 years software engineer. Currently staying in Vancouver, Canada.</p><p>I am also a newbie barista in Vancouver.</p><p>This website is a place for me to record what I have learnt and study on in my life.</p><p></p>]]></content:encoded></item></channel></rss>