Give and Take

Have you ever looked at the source code of MySQL Workbench? There are quite some hidden gems there, e.g. the OpenGL canvas and our latest addtion: a new UI port of the famous open source edit control Scintilla. This port allows us to use this fantastic editor control natively on Mac OS X Leopard as a Cocoa framework.

Scintilla, native Cocoa port on OS X In fact, we are using Scintilla for a long time already, mainly on Windows. It allows us to give you a powerful editor interface for SQL code. This includes features like syntax highlighting, text markers (e.g. for marking syntax errors), code folding, code completion and many more. However, so far we could not use it on OS X. There is a Carbon port available, but that did not work well (particularly, if the rest of the UI is using Cocoa) so we decided to write our own port for Cocoa, taking the Carbon code as the starting point. This new framework is by far not complete but works already so well that we have it included in our recently published 5.2. alpha release. But we thought there should be more than that. Since we are committed to open source software (even though we have some productivity features in our SE version of MySQL Workbench, which are not available in source code, however the vast majority of the code is open) we decided to publish our port as a separate project, so that also users who do not use MySQL Workbench, but Scintilla, can make use of it. In the good tradition of publishing MySQL code on Launchpad we created a new project called Scintilla-Cocoa, where everybody can see what changed and can download the new code. Currently you have to use a Bazaar client to create a local branch of the Launchpad project in order to actually get the code.

Additionally, we sent the author of the Scintilla project Neil Hodgson a patch so that he can incorporate our code into the main distribution. If anybody of you is interested in helping to complete the Cocoa port let us know. We can give you write access to the Launchpad project where you can directly work on the actual code.

Tell me what your code looks like…

Code line distribution over all projectsFrom time to time it is necessary to get a bigger picture of your project in terms of size, test coverage, code vs. comments ratio and others (aka metrics). While it is quite difficult to find a good (and free) code coverage tool for C++ there is already a very nice tool package called DPack, which is not only freely available but also gives us some very useful additions in our IDE. One of those features is code statistics.

Continue reading “Tell me what your code looks like…”