Thursday, January 10, 2008

C# never made me anymore happier than today!

I wasn't anymore happier than today in ... hmm... in the last few months!

I have been working with a project where I need to convert a VB.Net project into C# one. The whole project contains 40 other C++ projects which are mostly libraries and plug-ins. The full project is huge.. only the source files (.cpp, .h, .vb) are probably 50+ MB.

Now there are freeware tools, both web based and desktop ones, to convert a chunk of VB.Net code to C# ones. There are some good articles on that as well. SharpDevelop, the open source C# development tool has a built in feature to convert VB.Net codes/solutions to C#. Some web based free conversion services are based on SharpDevelop. SharpDevelop does a average job in real life applications (like the one I'm working with) but it's far from being 'good'. It produces numerous amount of errors which of course we need to fix manually. It's really poor for converting VB's "implicit type conversion", "globals" and many other common stuff!

As our client suggested, I used a commercial conversion tool, it's from vbconversions.net. This one was not as fool as the open source or freeware ones but it yielded a lot of errors too. One funny thing with this tool is that it horribly masses up name spaces and some function parameters (which are not of intrinsic type or has name space), and of course it fails handling VB's implicit conversions too.

After fixing thousands of errors for almost a week we finally got our project compiling! Then the final moment arrived, we wanted to run it! We did.. and (as to my expectation).. it crashed horribly!

After one more week of debugging and tracing down the almost untraceable, horrible and ugly crashes.. I almost began to loose patients!

But today, some horrible thread related bugs were solved dramatically.. and guess what.. finally .. we got what we wanted... we got it running today! The project loads and shows the 3D models the way it should do.. well, even though there are a lot of bugs we need smash!

When the project ran and gave me the same output of the VB.Net project, it was a beautiful thing to see and a very interesting moment. It made me really happy.. :)

Now, it gives a lot of inspiration and stamina to fix the rest of bugs. I'll have a formal QA first on this stage of the project and then start fixing. So rest of the bugs, be aware.. here I come.. :)

By the way, the client of the project I am working for is one of the leading game development companies in the world, everyone knows their name and it's interesting to work for them.

1 comment:

umar said...

I am working in software company .i have join recently .we r working on asp.net ,javascript,sqlserver,css how i will learn all these technologies