Do What I Mean

•February 7, 2013 • Leave a Comment

It was a pleasant surprise when I discovered udpate was a synonym for update. No more must my typing speed be constrained by accuracy; Accurev knows what I mean.

A Good Reputation

•August 17, 2012 • 1 Comment

Well, I just hit 1000 points on StackOverflow. I do have to say that I really love that site. It has given me so many insights into how other programmers think, what other technologies are out there, and how to solve common (or not-so-common) programming problems.

1,000 Reputation

But there is one thing that really bugs me. My best answers are not my highest-rated ones. In fact, for some of my best answers, I’ve gotten practically no recognition. That’s a little frustrating. Especially when some of my highest rated answers are vague statements about general design and development of software: things that are easily repeated, and are too vague to be of much direct use.

There’s two main reasons for this problem:

  1. Vague answers about general design are easier to verify as correct than detailed research into APIs and standards. More verifiable means more votes.
  2. Questions with popular tags seem to get more traffic. There are roughly 10x as many questions and users for C++ as for Qt. More traffic means more votes.

The traffic problem is the worse of the two, as well. It has a terrible side-effect of funnelling a large volume of ignorant C++ developers into questions tagged both ‘c++’ and ‘qt’. Horrific things will occasionally happen when a general C++ developer attempts to answer a Qt-specific question. Surprisingly, even veteran members will attempt to answer questions they clearly have no understanding of.

This becomes a serious problem, because there are a lot of C++ developers looking through the question. I suspect they outnumber Qt developers nearly 10:1, leading to bad voting. My worst example of this would be in a question asking whether it is safe to create a QLayout on the stack. The original accepted answer was so painfully wrong I had to write a detailed answer citing documentation to contradict its mistaken assertion. But, despite that, the correct answer still has just 1 upvote and the falsehood has 5. Five upvotes for this? Really?

Every QObject deletes its children. Only objects with no parent can have automatic storage.

Alas, that sounds reasonable. Thus, it was highly upvoted by numerous people who did not know any better. That’s the danger of a ‘c++’ tag on your Qt question. Of course, voting sometimes does pull through. Another question I saw about throwing exceptions across signal/slot connections had some confused comments and a confused answer (all posted by vanilla-C++ developers), but the rating system ultimately did its job.

So, StackOverflow has its warts, and it’s clearly not fair. But generally speaking, it works. Things usually turn out ok in the end, and it is a fantastic resource even for those who do not participate in its community.

Qt Signal Metaobjects: A Wishlist

•May 29, 2012 • Leave a Comment

Sometimes I feel like there are things missing in Qt. I find myself wanting built-in functionality to dispatch, filter and tag emitted signals.

To start with, dispatching would be very useful. As a general rule, QObjects do not go through my presenter interface. Imagine an interface:

While you could instead give out QObjects that then implement message, highlight and remove without any id, I prefer the flat interface. It works more simply across threads and doesn’t have to deal with object lifetime.

But users of the class may sometimes still want to create their own objects to manage these signals. Wouldn’t it be nice if you could dispatch the signals to different QObjects based on the id? Filtering would be good enough to start, but actual dispatch would be better.

The reverse process could occasionally be useful as well. Prepending an id to the argument list of an emitted signal would be excellent. The QSignalMapper just isn’t enough.

I think that developing generic classes to do this is possible using Dynamic Signals and Slots. But, of course, that’s easier said that done. Maybe in a future post I’ll take a stab at them.

Physics With Bullet

•May 2, 2012 • Leave a Comment

I was pleasantly surprised when I downloaded the bullet physics library and discovered how easy it was to build on Windows. I’m running VS2008 standard and when I opened it up I saw a folder marked msvc. In it, I found something great:

bullet msvc folder

Usable projects for every released version of VS released since 2005! Score!

I hate trying to figure out a unique andĀ arcaneĀ build system for each library I use. This was as easy as opening the solution and hitting ‘build all’.

Hello world!

•December 8, 2011 • Leave a Comment

We’re up and running. No time to post anything tonight, but this blog will mostly be covering programming topics. Maybe with a bit of gaming mixed in. I’m a professional programmer with a few years experience working in C++, mainly with Qt.