Thursday, October 1, 2015

Using a scripting language for a large project with third party components?

I had been programming in Python and C/C++,C# for more than 5 years and one question that I always ask to myself before is, when is the right time to use a dynamically typed language such as Python and a strongly typed language as C/C++,C#?

Recently, I had been assigned as lead a team for a big project. I chose C# as the language. And after the development was finished, we produced many lines of codes and lots of source files (150+ .cs files) with some third party libraries. These are the things that I learned from that experience:
1.The compiler check provides great help in big projects with lots of source file and with many developers.
2. It is much better to see the error on compile time rather than on run time.
3. We are refactoring aggressively. The compiler helped us a lot to see if we broke something.
4. The compiler check also protects our unit tests (sometimes the developer forgets to update the unit test after refactoring)
5. There was one time that the third party library manufacturer issued an update, and they changed the enum structure. Luckily, the compiler catched that one!

In case if I chose Python on that project, I may have been scratching my head everytime there are run-time errors which could have been easily catched by the compiler and I may need to double or triple my effort to have a very strong unit test suite to compensate for the lack of compile-time check.

Am I saying that I will not use Python anymore? No, I will never stop using python and I still love python. I am using python for numpy/scipy prototyping, build script, raspberry pi experimentation ,testing and some projects that don't require lots of classes and logics. Although I will always consider first the potential size of the project before using a dynamically typed language as I believe that compile time check is an integral part of the development process to maintain or boost the quality.

No comments:

Post a Comment