samedi 30 octobre 2010

Parallel programming


The parallel programming is an old concept but now it’s very demanded specially after the success of the distributed applications and the stop of the CPU evolution. In the past if your boss don’t like your code and want you to write a better code you can just take a 6 month  vacation   and when you will come back your code will run fine on a more developed machine but now it is impossible so we need to start thinking about  the parallel programming. But parallel programming is hard and if you don’t pay attention the best thing that can happen is to get wrong results and of course the worst thing is your code will crash down so the developer needs help. 
Java and .net offer some tools to help the developer to write nice parallel code with some slight differences but basically is the same concept even the name of most methods are the same like “isalive”,”join”…. But I found that java is more flexible in handling variables specially that comes from outside the current thread thru inheriting from the thread class and overrides the run methods so you can create constructers and entering all variables that you like witch I found little harder with .net even with the paramatrizedThreadstart delegate  but I think that with .net is easier to create a new thread and run any method that you like in it also the two frameworks offer the tools to manage the thread pool and I think in both frameworks it was handled fine.
But starting from the .net framework 4.0 there was a great work on the parallel programming with the parallel task libraries so the idea is to match the code with the parallel programming patterns and models thru names like tasks and taskfactories also they create great book http://msdn.microsoft.com/en-us/library/ff963552.aspx explaining how you can use those classes and libraries and even showing some figures to help developer to decide whatever hi will paralyze data, tasks or flows. So I think that they done a great job in the new framework.  Now we are waiting for java 7 and I’m sure that java will create something to handle these problems and to develop better parallel programming tools

lundi 25 octobre 2010

Welcome


In this blog I will try to write about Java and .Net also I will encourage people to use them both and stop comparing the two of them. So I hope that you like my blog and I hope that finally you be convinced that taking sides is not helping any one specially you.