Wild Beasts
2011-11-28 Leave a comment
In “Private Practice: Taming Templates”, I had (deliberately, of course
) hidden a bug in the implementation of KDGenericFactory. I’ve now added a discussion about the bug and its fix.
Marc Mutz on Qt, Boost, and C++
2011-11-28 Leave a comment
In “Private Practice: Taming Templates”, I had (deliberately, of course
) hidden a bug in the implementation of KDGenericFactory. I’ve now added a discussion about the bug and its fix.
2011-11-18 Leave a comment
I’ve started a new column, Private Practice, that looks at existing implementations and examines them.
The first Private Practice article, Taming Templates, examines techniques to control template code bloat. There’s nothing particularly earth-shattering in there, but I noticed that a lot of people don’t seem to be aware of the fact that templates can cause a lot of duplicated code, so I thought I’d write about it.
Even if they haven’t been released under the Private Practice banner, the following articles also fit that category well:
2011-10-18 Leave a comment
Together with my fellow KDABians Stephen Kelly and Volker Krause, I wrote a whitepaper on QtQuick usage in the KOMO project. From the whitepaper:
Developing a serious and large application from scratch, or from an existing desktop application, presents a different set of challenges compared to your normal smart-phone ‘app’. Portability to different platforms, and long-term maintainability in the face of ever-changing mobile target platforms suddenly come into play. This paper attempts to summarize the experience we gathered using the new declarative GUI framework, QtQuick, in this project.
Unfortunately, recent events (read: Tizen) have already invalidated much of the content in the supplemental box on the future of Qt, but that’s the bane of everyone writing about Qt’s future these days…
Get the English version (with slightly more details) at http://www.kdab.com/whitepapers, or read the German version (with better editing) in the current print issue of German computer magazine iX: http://www.heise.de/ix/inhalt/2011/11/114/.
In other news: I’ve updated “Understand the Qt Containers” with a discussion of the differences between STL and Qt containers regarding size types, associative container insertions, and error handling. I also mention QT_STRICT_ITERATORS now.
2011-09-20 Leave a comment
I’ll be giving a two-day “In-depth multi-threading with Qt” training just after the DevDays in Munich, ie. Oct 27th-28th. The training language will be English. The training material is the one from the usual Qt training, but “seriously expanded” to fill the two-day schedule.
From the announcement:
This two-day training teaches how to use multithreading with the primitives provided by Qt. Participants will gain insight into multithreading problems in general, and how they pertain to Qt programs in particular.
Examples include how to offload work from the GUI thread, how to increase throughput to the maximum in your application, and optimal strategies for communication between threads.
The training covers topics such as cross-thread signal/slot connections, QThreadPool, QObjects and multithreading, QtConcurrent, QFuture, and Qt atomic operations.
Participants are expected to have a working knowledge of C++ and Qt. Prior experience with multithreaded programming is recommended, but not necessary. The course will start with a one hour multithreading refresher.
To book, visit http://www.kdab.com/schedule.
Until October 1st, you’ll save 200€ on the early-bird offer. Just use d94ec6fd in the Voucher(s) field.
Hope to see you there!
2011-08-19 Leave a comment
This is just a short heads-up to those that have asked for quantitative measurements. I’ve begun updating “Understand the Qt Containers” with a section on data.
As of now, the memory and append performance is in. I’ll re-run the iteration test over the night once more (I’ve detected an anomaly that I’d like the verify first), and re-add them again, when done.
2011-08-15 3 Comments
The third of my Effective Qt columns, “Understand the Qt Containers“, just went live on my site.
If you know me, you will know what awaits you there
I hope I have not disappointed you. That said, this is just a first part. I plan to eventually extend it to cover more containers (currently, just QVector and QList), and give more data and assembler code for the containers I’ve already described.
These are the guidelines this item covers:
constBegin()/constEnd() (cbegin()/cend()) when assigning the result to a const_iterator.std::remove() family.Q_FOREACH, unless the element type is customarily passed by value.BOOST_FOREACH, and the additional features it offers.QFlags as Q_PRIMITIVE_TYPE if there’s a chance they will be held in Qt containers.Q_MOVABLE_TYPE if there’s a chance they will be held in Qt containers.vector (std or Q) over QList.QList<T> where T is not declared as either Q_MOVABLE_TYPE or Q_PRIMITIVE_TYPE or where sizeof(T) != sizeof(void*) (remember to check both 32 and 64-bit platforms).QList, and for which QList is not inefficient.Hope you enjoy!
2011-08-14 Leave a comment
I’m happy to report that I finally sat down to translate the second part of my Heise Developer article on the Pimpl Idiom to English. Please find it here.