Async Web Api Performance

In one of my recent WPF project, we made extensive use of async-await pattern. Async-await pattern greatly simplified the call-back and continuation based code required for keeping the UI responsive. In WPF, the pattern for implementing async-await is to invoke the IO/CPU intensive code in a background thread and attach the continuation logic on the main UI thread. In WPF, since we have a dedicated UI thread that controls all of the UI elements, using async-await is really helpful in keeping the UI responsive without having to write complicated call-back based code.

4 min read

Podcast for developers

Podcasts are a great way of utilizing your time while you are on the move i.e. driving car or riding in a bus/train. If you are unlucky like me, who has to spend couple of hours each day travelling between office & home and vice versa, then listening to podcasts while you are stuck in traffic can be of great help. Not only are you learning something new but it also helps you in keeping calm and makes the journey appear comparatively shorter.

2 min read

Dependency Injection in PowerShell

In this blog post, I will explain how we can invoke dependency injection based managed code from PowerShell. Invoking regular managed code from PowerShell is quiet straight forward. Say for example, you are asked to create an instance of HttpClient class and call the GetStringAsync method on it, then it can be done with just following few lines of code.

2 min read

Laptop Inauguration

Today I received my new laptop which is an Intel Core i5-2450M @ 2.50GHz 4 GB RAM machine . The other laptop(office provided) which I have used for past two years for programming is an Intel Core2 Duo T6570 @ 2.10GHz machine. Reason why I am talking about the laptops that I own is because of my interest in writing multi-threaded/parallel code using the new TPL API provided in the .Net 4.0 framework. I have spent significant amount of time in past one year writing code using the Parallel API of .Net framework. But given the fact that the hardware that I was using for running those applications wasn’t that great, I was never much satisfied with the overall improvement in performance.

4 min read