Debugging Life, One Musing at a Time

Welcome to my little corner of the internet! 🏠

  • This is where I ramble about all things software engineering, bioinformatics, machine learning, and cloud tech—basically, the stuff that keeps my brain buzzing.
  • Expect a mix of insights, battle scars, and “aha!” moments from my adventures.
  • Feel free to stick around—let’s explore and debug life together. 🚀

Async/await IV - Control of Execution in Async Programming

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.

May 17, 2025 Â· 4 min Â· Hongzhu Cui

Async/await III - "Suspending" and "Blocking" in Async programming

In C# async programming, “block” and “suspend” 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.

May 16, 2025 Â· 5 min Â· Hongzhu Cui

Async/await II - Different ways of using aysnc/await

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.

May 4, 2025 Â· 4 min Â· Hongzhu Cui

Async/await I - Brief history of async/await

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.

May 3, 2025 Â· 3 min Â· Hongzhu Cui

Functional programming in Python, Java, C#

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: 1. First-Class Functions All three languages support first-class functions, meaning functions can be assigned to variables, passed as arguments, and returned from other functions. Python: Full support for first-class functions using lambda, map(), filter(), reduce(), and list comprehensions. Java: Added functional support in Java 8 with lambda expressions and the Stream API. C#: Supports functional programming via delegates, lambda expressions, and LINQ (Language Integrated Query). 2. Higher-Order Functions A function is considered higher-order if it takes another function as an argument or returns one. ...

October 28, 2024 Â· 3 min Â· Hongzhu Cui