Half-Blood Programmer

Threading

Infinite Loops Best Practice (Not a real best practice)

[Updated: This post is too old to be correct. Even #SNMP starts to use a completely different way to handle incoming packets http://code.google.com/p/sharpsnmplib/source/browse/SharpSnmpLib/Messaging/ListenerBinding.cs. So please read it carefully.] In .NET (especially when you program with socket), sometimes you have to write…

Delphi Roadmap, Oxygen, And JCF Update

It is wonder to see that Delphi IDE is going to have a code formatter bundled. However, that would happen at least one year later, so Code Beautifier Collection still have its place. There are other importance items listed in…

Save CPU Utilization In An Empty Loop

Sometimes you need to kill some time by running an empty ”for” or ”while” loop. The only problem is that the CPU utilization will soon reach 100% for a single core CPU or 50% for a duel-core. Oh, my Goodness,…

Threading or Pause-Ready Backgroundworker

It is hard to make a Thread and control it well. However, using a Backgroundworker is much easier until you need to pause/resume it. Can we make a Backgroundworker pause-ready? Yes. I have joined a discussion on the MSDN Forums.…