My first question to StackOverflow

Recently, I’ve got a bit sucked in by the StackOverflow and related communities. Even if I don’t completely understand how it is supposed to be different to my favourite old-school-but-still-the-best communication channels to share knowledge, meaning Usenet and mailing lists. Web X.Y generally sucks! I never liked the idea of Web discussion boards – doesn’t feel user-friendly for me at all and it’s way more time consuming to participate in discussions on such boards than in mailing lists. The idea of StackOverflow works for me, somehow. A couple of times I got sucked quite deeply and stole two or three ours of my sleep to take the challenge, to benchmark my brain a bit.

After lurking and kicking my own axons, it’s time to nudge stackoverflowers with my first question. Here we go:

Which macro to wrap Mac OS X specific code in C/C++

Formal review of the Generic Geometry Library by Boost Community

Generic Geometry Library (GGL) Nearly a month after sending out request for review of the Generic Geometry Library (GGL), the Boost Community started process of formal review on November 5th, according to the official Boost reviews schedule. The review is being led by Hartmut Kaiser.

Boost Community members interested in computational geometry has posted quite a large number of comments, questions and suggestions. Barend, as the designer and lead developer of the GGL with most comprehensive knowledge about its every particle, has been doing very hard work scrupulously reacting to every feedback.

Today, Hartmut announced we’re halfway through the GGL review and called for sending reviews. Not every feedback from Boost developers and users sent during library review is considered as review response. Some of senders mark their e-mails as not a review. So, now its time to send review votes.

This is first time I’ve been monitoring Boost formal review in details and I have to admit that it was amazing to observe such very particular feedback. Boost Community conducts proper reviews indeed. Even if a library is not to be accepted, it’s extremely useful for developers to give it a go and collect such feedback about their software. Barend Gehrels has been constantly updating the GGL documentation already. I’m going to compile GGL FAQs based the collected feedback.

All (almost) the posted feedback is recorded in the main Boost mailing list archives under thread with subject [boost] [Review] GGL review starts today, November 5th. There are also some forked but related threads like [boost] GGL Extensions and [boost] GGL Review.

osgeo.codepad.org

Online compilers are another generation of collaborative debugging tools delivered to Open Source communities. The overall idea is great. Actually, I can not imagine online discussions on IRC channel without being able to paste code snippets or compilation logs.

The codepad.org provides feature called private and project pastes. Some time ago I proposed private general purpose paste service dedicated to OSGeo communities. it is hosted at osgeo.pastebin.com and people has found it useful, as I can see. Today, I registered osgeo.codepad.org – a programmers-oriented paste service. Perhaps, people will find it useful too..

Users of the World’s second best programming editor, Vim (first place taken by Emacs), can install codepad.vim plug-in and send Vim buffers as pastes directly to the codepad.org service. Kudos to Nicolas Weber for the plug-in!

I’ve taken the liberty and modified the plug-in to use the private service at osgeo.codepad.org – here is custom codepad.vim plug-in.

Charter Member Nominations 2009

The OSGeo Foundation Chief Returning Officer (CRO) has posted new nominations to OSGeo Charter Members.

Personally, I’m glad to see Robert Szczepanek from Poland listed among other noble members of OSGeo Community. Robert has played an important & leading role in FOSS and FOSS4G advocacy, education and development in our Polish yard for long time:

It’s a good news for OSGeo Community in Poland.

Portability poem

Meaning of PortabilityNumber of OSGeo stack software written by C/C++ camp have to run on Microsoft Windows systems. I think I wouldn’t be dead wrong if said that most of hackers from OSGeo Community work on Unix systems (Linux, Mac OS X) but there is large number of users who work on Windows.

Conclusion? Portability. Google is bursting at the seams of the essays about how to write portable code in C or C++ language. I’d add a little poem to the collection.

Principles of Portability

  • Obey the standards, because they are not just dumb rules.
  • Make a list of compilers that must be supported. Learn about their differences.
  • If possible, use GCC 4+ and Visual C++ 7.1+.
  • Using old compilers? If possible, use C89 but avoid C99.
  • Prefer GCC 4.3 and Visual C++ 8.0+, so you get C++0x support. C++0x “brings C++ more in line with the C99″ – Wikipedia, so portability is much easier.
  • Write code in C or in C++, but do not write both at the same time.
  • Avoid (direct) use of C POSIX Library.
  • Never ever disable any warnings compiler throw. Fix them.
  • Be pedantic. Compile in highest strict mode possible.
  • If possible, do not use compiler-specific features.
  • Do not make platform/architecture specific assumptions about memory addressing, memory layout, etc.
  • First understand why, then cast the hack.
  • Personal preferences are evil. Make decisions based on reasoning.
  • (Re)Use good code that already exist. Boost C++ Libraries won’t bite you!
  • KIMS (Keep it modular, stupid) and let modules to loose coupling but keep cohesion in architecture, design as well as in development cycle (releases, inter-modular dependencies).