You work in a project that manages (create, enhance and maintain) a large software product. Your manager comes to you and ask you to add a new software feature for this product. He has given you complete freedom in deciding on how to proceed. You know that the same software feature is already available in another OS as open source with favourable licensing or from a company as closed source. You can port it instead of implementing it yourself. So the critical question here is should you go ahead and port the code or implement this yourself?
In last few years, I have ported couple of large features while reviewed few large features that were ported by others. There were few very specific reasons why we decided to port a specific feature (I think most of you who decides to port a particular code will be having something similar):
Also some of you would have done some porting in your software engineer life so far, please do share your experience, views and opinions on this.
In last few years, I have ported couple of large features while reviewed few large features that were ported by others. There were few very specific reasons why we decided to port a specific feature (I think most of you who decides to port a particular code will be having something similar):
- Porting the feature will save ample amount of time and in turn money.
- We will get a well tested code and we will be bringing in less number of bugs into our code base (which we know is a better code).
- Community (or the company if you have bought the code base) will provide bug fixes and enhancements which can be ported easily so we as such do not need to worry about them.
- In at least one of the cases, the code we ported was not modular enough and did not gel well with our code base. We end up spending lots of time in creating or extending existing APIs in the ported code.
- In at least one of the cases, we needed to port only one part of the feature but we had to port the whole code and later we realized that there is no way to just compile that part of the feature. It took us lots of time to finally get what we wanted.
- One of the feature had interaction with operating system and management systems like CLI. These interactions have been standardize in our product. It took us some efforts to make ported code use these standardized interfaces instead of what it was using before.
- In couple of cases, we decided to own the code after porting as we had made changes so we could not rely solely on bug fixes from the actual source.
- As the code was not writing internally, none of us knew the whole code which brought in unknown to our code base. If any bug is seen, there was always a doubt that it is coming from the ported code. In any case, everybody thinks that whatever they have written is almost a bug-free code.
- Is the code modular and structured enough that you can integrate it with your software without creating too many new interfaces?
- Are you looking to port only part of the code? Is this part big enough to justify porting?
- Is it possible to port the code without making too many changes in the code? This means if you are making too many changes then you may not be able to take bug fixes and enhancements just like a patch. Also in such a case, you must look at the whole code and after porting, you have a similar confidence as if you have written it yourself.
- Can your management system support be added in the ported code easily?
- Is the code you are porting is readable and maintainable? Can your team be able to maintain this without the outside help?
Also some of you would have done some porting in your software engineer life so far, please do share your experience, views and opinions on this.