Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Editing Tips for Selecting Open Source Code for an Open C/C++ Project

From Wiki
Jump to: navigation, search
Article Metadata
Created: rebloor (29 Jul 2009)
Last edited: hamishwillee (27 Jul 2012)

Open C/C++ is typically used when porting existing C/C++ code to the S60 platform. The following checklist provides a set of criteria developers can use when determining if a particular piece of code is suitable for porting.

On the topic of code quality:

  • Does the code follow POSIX standards? This will ensure the best compatibility with Open C.
  • How mature is the code being ported? The longer the code has been under development, the fewer bugs there will be. Alpha and beta releases are labeled that for reason.
  • Has the code ever been ported to different platforms? If so, then someone else has probably done some of the developer's work already. If the code can run under Unix and Microsoft Windows, it has a good chance of working with Open C, too.

About the community of developers:

  • Has the project been underway for some time? In the open source code world an enormous number of projects have been undertaken, but some never quite took off. Those with mileage behind them tend to be the best.
  • How many developers are working on the project? Most open source projects are one- or two-man operations. The more people that are involved, the better the results usually are. And the better the results, the easier life will be while porting the code.
  • What is the quality of the documentation? It’s a simple fact that reading thousands of lines of code just to get to know it is not really what most people want to do. The existence of documentation usually indicates that the code is already mature, and that the community now has time to ponder what is going on.

And finally, the porting process:

  • How will the developer make the code work with his/her native environment? S60 and Symbian C++ differ from the world of C language. For example, conversions between data types will be needed, and here less is better.
  • Does the original code use a console for output? If yes, the developer will have to think of alternative ways to inform the user about what is going on. Again, less conversion work is most likely better.
  • What about memory leaks? When coding for desktop purposes, resources such as memory are not going to run out easily. But in the mobile environment, all memory leaks should be plugged. If the code being ported is mature and has already been proven to work with many platforms, there is a good chance that these leaks have already been ironed out.

See also these examples of Open C projects that have been ported from Open Source software:

Open C: IRC Example

Open C: FTP Client Example

This page was last modified on 27 July 2012, at 05:15.
6 page views in the last 30 days.