Archive for April, 2013

Are your services scalable ?

April 20, 2013 Leave a comment

Actually I know this for a quite sometimes, but didn’t have a chance to post it.

When we are building service that can be consume by our client apps. We want it to be scalable. Whether it’s a windows service, web service, WCF hosted in IIS etc. But to make the service scalable, we have to know the underlying concept of where the service resides. How the operating system really works. How process and threads are involved in the process.

Everyone is so crazy about the cloud bla bla bla, but seems forgot a tiny things. Operating System concept, Computer Architecture. It’s really needed to build a high scalable and performance service.

I found an interesting talks in Channel 9 presented by the expert Jeffrey Ritcher about threading and it’s really important. Please watch this stuff before you continue read all my opinion.




Have you watch it all ? Great. Take a look at this simple diagram.




This is a very common architecture used nowadays. WPF apps will call WCF services and will then retrieve data from Database then give the result back to the client.

Now my question are ?

Have you create WCF asynchronous proxy for your WPF application ?

Have you use ADO .NET async feature for database connection ?

If you creating TCP/IP Client server application then …

Have you create your TCP client and server asynchronous  ?

Maybe you have already read about Asynchronous Programming Pattern and Event Asynchronous Programming. But you decide to use the blocking API because it’s complex ?

Another thing to learn is to differentiate I/O bound operation and Compute bound operation.

Well. Take a look at .NET 4.5 and c# 5.0. async await feature. Everything async is simple now. A lot of API is async now. You can use it for scalability.

If you are still using .NET 4, you can still using asynchronous programming. Wrap it with task. You can use Microsoft.Async.BCL with Visual Studio 2012 targeting .NET 4.0.

When you think that your code is doing I/O or network operation.


async it when you can ! don’t tell me it’s hard. it’s there for you to use.



Categories: Uncategorized

Just give me the source code please….

April 8, 2013 1 comment

Source code is really important for us. That’s why I love open source so much. Well. not only as a consumer of open source, but also a producer. Smile 

Reading people codes can give you a huge knowledge about best practice and change how you write the code. Especially if the writer is good developer.

Sometimes we need so badly to see the source code… But we can’t. This is a very painful experience. Maybe we find there’s a strange error in commercial library, or maybe we need to debug in production environment when we can’t debug with our beloved Visual Studio.

Absolutely we need that source code !

Previously I create a blog post about a decompiler. I use RedGate Reflector. But. it’s not free and my trial version has been over. Sad smile 

But, I found telerik is generous enough to create the exact same tools that satisfy all my needs. Thanks guys you are awesome. Just download and install it. Pretty straightforward process.



You may need to register but that’s okay. You have to give some to get some right ?

After installed, you’ve just need to type JustDecompile in search. What a nice feature from Windows 8 right ?



All you need to do is just drag the assembly


Voila, you can see the source code very clear


But, sometimes the result of decompilation is not readable. That’s because the library creator trying to make your life harder by obsfucating the library. No problem. JUstDecompile extensions came to rescue.


To install the plugin you’ve just need to go to the menu and find plugin manager


I suggest you download all of it. Reflexil also been ported from Reflector. What a good news !


You will see that all plugins installed right now


Now you will see that the menu is appear in your right click



Let’s say that you found an obsfucated assembly like this one.


could you decode it ? I doubt that. We need to deobsfucate that first.

You can do this by right click the assembly and choose Obsfucator search. It will find the algorithm used for obsfucate and reverse it. Very cool.



It will clean the file and create a new clean assembly. Of course it’s not perfect but we can read the code and tweak it if we need.


Now let’s say we want to patch some bugs and remove some line in the code. Can we do it ? YES We can. We use Reflexil to inject the code or IL.

Choose the method you want to patch.


And select reflexil from the main menu.



You can find an IL. Heck, you can also edit it. That’s depends on your choice, you can replace the IL or you can replace by code.


After you are done cracking, hacking, patching or whatever.. you can save the assembly that contains your patch.



That’s it all you need to know. Go and patch some assembly.



Categories: Uncategorized

Grab your Visual Studio 2012 Update 2

April 6, 2013 1 comment

I know I’m a lil bit late joining the party for installing VS 2012 update 2. But just get my internet connection upgraded. Smile. The first thing I do to download the VS 2012 update 2.

I think I need to create an offline installer and share it to my colleague next week. Yes. You can create an offline installer. I think this is the best way to install it. You can share it with others and save a national bandwith. Smile

You can follow the instruction here. Once again Rob Caron done a pretty great job explaining it step by step. But firstly you need to download an online installer here. Then follow Rob article. 

How to: Install Visual Studio 2012 Update 2 Offline

You can watch the interesting show about what’s awesome in this update.


If you like reading more than watching then you should read this one.

More complete list

And you know what I love the most ??


Yes. We need that bad. especially for large project.


Enjoy it !


Categories: Uncategorized