My book on LevelDB is out

Cover of Getting Started with LevelDB

My book Getting Started with LevelDB has now been released from Packt Publishing. Despite the generic nature of the title, it’s focused on using LevelDB with iOS and OS/X so about half the code in the book is Objective-C. The sub-title you can vaguely make out above reads “Store and retrieve key-value based data quickly on iOS and OS X using LevelDB”. 

If you’re a C++ programmer on Unix of any kind, I think there’s enough value in the book for it to be worth getting – all the basics of using the C++ interface are discussed and the theory discussions are generic. I’m hoping to do some followup work to make it more useful to the pure C++ crowd especially on Windows.

I’ve created a forum for discussing the book content and associated open source frameworks.

The writing process for a first-time technical book was, as I’d been warned, many times harder than I’d expected.

Continue reading

REALbasic Computed Properties Debugging Gotcha

I’ve been doing a huge amount of work recently porting the C++ OOFILE report writer to REALbasic as a complete transliteration, having given up on the earlier report-writer I was writing from scratch.

I’m using REALbasic 2008r4.1 and finding it extremely flaky when debugging. I finally worked out the cause and it’s an interesting trap.

OOFILE was written about 15 – 10 years ago and makes use of lots of inline and non-virtual functions for high-performance in C++. Methods in REALbasic are, of course, all virtual but it also has Computed Properties which allow you to write code as getter and setter functions. These are non-virtual and therefore (presumably) much faster – an ideal and idiomatic match for the inline getters and setters used heavily in OOFILE.

However, there’s one very big gotcha – if you look at an object in the REALbasic debugger, all its getters on computed properties are executed.

Continue reading