<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Posts on Echo $Musings</title>
    <link>https://hongzhucui.com/posts/</link>
    <description>Recent content in Posts on Echo $Musings</description>
    <image>
      <title>Echo $Musings</title>
      <url>https://hongzhucui.com/images/papermod-cover.png</url>
      <link>https://hongzhucui.com/images/papermod-cover.png</link>
    </image>
    <generator>Hugo -- 0.137.1</generator>
    <language>en</language>
    <copyright>Hongzhu Cui</copyright>
    <lastBuildDate>Sat, 17 May 2025 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://hongzhucui.com/posts/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Async/await IV - Control of Execution in Async Programming</title>
      <link>https://hongzhucui.com/posts/async_await_iv_control_of_execution/</link>
      <pubDate>Sat, 17 May 2025 00:00:00 +0000</pubDate>
      <guid>https://hongzhucui.com/posts/async_await_iv_control_of_execution/</guid>
      <description>In asynchronous programming, understanding control of execution is just as important as knowing how to use await. You’re not just deferring work — you’re restructuring how your program flows, pausing and resuming logic across time and threads.</description>
    </item>
    <item>
      <title>Async/await III - &#34;Suspending&#34; and &#34;Blocking&#34; in Async programming</title>
      <link>https://hongzhucui.com/posts/async_await_iii_suspending_and_blocking/</link>
      <pubDate>Fri, 16 May 2025 00:00:00 +0000</pubDate>
      <guid>https://hongzhucui.com/posts/async_await_iii_suspending_and_blocking/</guid>
      <description>In C# async programming, &amp;ldquo;block&amp;rdquo; and &amp;ldquo;suspend&amp;rdquo; refer to very different behaviors in how code waits for something to complete. In C#, await suspends the method without blocking the thread—that’s the magic of async/await.</description>
    </item>
    <item>
      <title>Async/await II - Different ways of using aysnc/await</title>
      <link>https://hongzhucui.com/posts/async_await_ii_different_approaches/</link>
      <pubDate>Sun, 04 May 2025 00:00:00 +0000</pubDate>
      <guid>https://hongzhucui.com/posts/async_await_ii_different_approaches/</guid>
      <description>In async programming, there are several different approaches to handling asynchronous tasks beyond just immediate awaiting. Each approach is suited for different use cases depending on whether you need to wait for results, execute tasks in parallel, or handle exceptions.</description>
    </item>
    <item>
      <title>Async/await I - Brief history of async/await</title>
      <link>https://hongzhucui.com/posts/async_await_i_brief_history/</link>
      <pubDate>Sat, 03 May 2025 00:00:00 +0000</pubDate>
      <guid>https://hongzhucui.com/posts/async_await_i_brief_history/</guid>
      <description>The async/await pattern was introduced to simplify asynchronous programming by making asynchronous code look and behave more like synchronous code. Here’s how it evolved across different programming languages.</description>
    </item>
    <item>
      <title>Functional programming in Python, Java, C#</title>
      <link>https://hongzhucui.com/posts/fp_python_java_csharp/</link>
      <pubDate>Mon, 28 Oct 2024 00:00:00 +0000</pubDate>
      <guid>https://hongzhucui.com/posts/fp_python_java_csharp/</guid>
      <description>&lt;p&gt;Functional programming (FP) is a paradigm that emphasizes immutability, pure functions, and higher-order functions. While Python, Java, and C# are all multi-paradigm languages (supporting both object-oriented and functional programming), they each have different levels of FP support. Here’s a comparison:&lt;/p&gt;
&lt;h3 id=&#34;1-first-class-functions&#34;&gt;&lt;strong&gt;1. First-Class Functions&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;All three languages support first-class functions, meaning functions can be assigned to variables, passed as arguments, and returned from other functions.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Python:&lt;/strong&gt; Full support for first-class functions using &lt;code&gt;lambda&lt;/code&gt;, &lt;code&gt;map()&lt;/code&gt;, &lt;code&gt;filter()&lt;/code&gt;, &lt;code&gt;reduce()&lt;/code&gt;, and list comprehensions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Java:&lt;/strong&gt; Added functional support in Java 8 with &lt;strong&gt;lambda expressions&lt;/strong&gt; and the &lt;strong&gt;Stream API&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;C#:&lt;/strong&gt; Supports functional programming via &lt;strong&gt;delegates&lt;/strong&gt;, &lt;strong&gt;lambda expressions&lt;/strong&gt;, and &lt;strong&gt;LINQ (Language Integrated Query)&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;2-higher-order-functions&#34;&gt;&lt;strong&gt;2. Higher-Order Functions&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;A function is considered &lt;strong&gt;higher-order&lt;/strong&gt; if it takes another function as an argument or returns one.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Python interface and protocol</title>
      <link>https://hongzhucui.com/posts/python_interface_protocol/</link>
      <pubDate>Thu, 22 Aug 2024 00:00:00 +0000</pubDate>
      <guid>https://hongzhucui.com/posts/python_interface_protocol/</guid>
      <description>&lt;p&gt;Python isn&amp;rsquo;t like Java or C# where they have explicit interface keywords. So, how do interfaces work in Python?&lt;/p&gt;
&lt;p&gt;Traditionally, Python uses a different approach. Instead of explicit interfaces, it relies on duck typing. That means if an object behaves like a duck (has the necessary methods), it&amp;rsquo;s treated as a duck, regardless of its type.&lt;/p&gt;
&lt;h3 id=&#34;duck-typing&#34;&gt;&lt;strong&gt;Duck Typing&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Python relies on &lt;strong&gt;duck typing&lt;/strong&gt;: If an object behaves like a duck (i.e., has the required methods/properties), it is treated as a duck. No formal interface declaration is needed.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Quorum-based replication and Raft</title>
      <link>https://hongzhucui.com/posts/quorum_based_replication_vs_raft/</link>
      <pubDate>Thu, 08 Aug 2024 00:00:00 +0000</pubDate>
      <guid>https://hongzhucui.com/posts/quorum_based_replication_vs_raft/</guid>
      <description>&lt;p&gt;Quorum-based replication and Raft are both techniques used in distributed systems to ensure consistency and fault tolerance, but they differ in their approaches and use cases.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&#34;quorum-based-replication&#34;&gt;&lt;strong&gt;Quorum-Based Replication&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Quorum-based replication is a general approach to achieving consistency in distributed systems by requiring a majority (quorum) of nodes to agree on operations like reads and writes. It is often used in systems like distributed databases and key-value stores.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Quorum Size:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A quorum is a subset of nodes that must agree on an operation (e.g., read or write) for it to be considered successful.&lt;/li&gt;
&lt;li&gt;The quorum size is typically defined as a majority of nodes (e.g., &lt;em&gt;N/2 + 1&lt;/em&gt; for &lt;em&gt;N&lt;/em&gt; nodes).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Read and Write Quorums:&lt;/strong&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>How callback works in C#?</title>
      <link>https://hongzhucui.com/posts/callback_in_csharp/</link>
      <pubDate>Mon, 17 Jun 2024 00:00:00 +0000</pubDate>
      <guid>https://hongzhucui.com/posts/callback_in_csharp/</guid>
      <description>An introductory article that explores the fundamental concept of callbacks in C#, providing a clear explanation along with practical examples to demonstrate their basic usage.</description>
    </item>
    <item>
      <title>Intact analysis, top-down analysis, and peptide mapping in mass spectrometry</title>
      <link>https://hongzhucui.com/posts/peptide_mapping_intact_topdown/</link>
      <pubDate>Sat, 08 Jun 2024 00:00:00 +0000</pubDate>
      <guid>https://hongzhucui.com/posts/peptide_mapping_intact_topdown/</guid>
      <description>This article provides a comparison of three mass spectrometry approaches—Intact Analysis, Top-Down Analysis, and Peptide Mapping. It explains their methodologies, applications, advantages, and limitations, along with a detailed comparison table to highlight their key differences.</description>
    </item>
    <item>
      <title>Async/await under the hood</title>
      <link>https://hongzhucui.com/posts/async_await_underhood/</link>
      <pubDate>Sat, 23 Sep 2023 00:00:00 +0000</pubDate>
      <guid>https://hongzhucui.com/posts/async_await_underhood/</guid>
      <description>Comparison of &lt;code&gt;await&lt;/code&gt; Implementation in C# and Python.</description>
    </item>
    <item>
      <title>Hello, World! 🌍</title>
      <link>https://hongzhucui.com/posts/hello-world/</link>
      <pubDate>Thu, 22 Jun 2023 00:00:00 +0000</pubDate>
      <guid>https://hongzhucui.com/posts/hello-world/</guid>
      <description>&lt;p&gt;Welcome to my blog!&lt;/p&gt;
&lt;p&gt;This space is where I’ll be sharing my thoughts, experiences, and insights on topics that interest me—whether it’s technology, coding, personal projects, or random musings.&lt;/p&gt;
&lt;p&gt;I’ve always wanted a place to document my journey, experiment with ideas, and maybe even connect with like-minded people along the way. So here we are—my very first post!&lt;/p&gt;
&lt;p&gt;Looking forward to this new adventure! ✨&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;See you soon!&lt;/strong&gt; 👋&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
