Skip to main content

VPlan4: Project overview


Fast-forward to 2010: I started to use Linux for some of my development work, and I really wanted VPlan to run on Linux as well. In the meantime, all of the web-based tools have appeared with nice UIs, drag & drop, comfort functions etc. which VPlan lacked, so there was really some reason to give it another shot. This time around, I wrote down the requirements first before starting one line of code:

  • Portability: Should run on Linux and Windows; the storage format should be platform-neutral
  • Performance: Fast startup, little memory use.
  • Features:
    • Drag & drop in the tree-view
    • ACID for all operations
    • Per-task descriptions and priorities

For development, I used Qt this time around, as it is available under the LGPL and thus does not force me to publish the source (I didn't set my mind on that yet.) It also supports sqlite, which gives me the ACID compliance, and should improve memory usage and performance quite a bit compared to WPF. With that much preparation, I went to coding.


I'm a strong believer that any crap can be refactored/polished until it's good, as long as you have some crap to start with. Given my initial requirements, I didn't spend too much time fleshing out an architecture, but went to implement a data model for all tasks so it could be bound to a QTreeView and write the corresponding SQL schema as I went along.

Get a basic UI with Qt turned out to be really simple using QtDesigner. A nice feature is that you can subclass any widget but still use QtDesigner to place it -- something which turned out to be useful for my "deselecting tree-view", a tree-view which deselects if you click the empty space.

I built the project with CMake, which works nicely with Qt once you setup it properly. Most coding was done in a single sprint: The feature set was limited and known up front and all I needed to do was to adapt the SQL backend into an abstract tree model. The rest is handled by Qt, including drag & drop and various other details.

Pretty late in the development cycle I decided to add translations. With Qt, all you need is to make sure that every string is wrapped with a macro and then run QtLinguist. The actual translation is pretty simple later on. One advantage of translating is that you can also generate proper plural form handling for English. That's a nice polishing touch, and even though I assume that no VPlan user noticed it I always wanted to have this in an application since playing Transport Tycoon.


For deployment, I'm using Wix again. Wix is great for Windows deployment as it generates Microsoft Installer packages. One problem with Wix is that it's verbose for small projects and thus takes some time to write. For larger projects, some I'm playing around with some automatic Wix generation but this has other issues (especially when it comes to the directory structure.) After each build, I'm storing the binaries and tagging the repository for each installer so I can exactly recreate the same file.

Various unsolved issues

So much for the stuff that works. Some other details are not working yet which I'd definitely like to attack at some point. First of all, there is no automated testing for the UI and very limited testing for the backend. I guess that a script intermediate layer would be the easiest solution for that, but as it stands now, there is no good test coverage.

Crash handling is also an unsolved issue. For the latest version of my research engine, I'm using a crash handler and storing the PDBs along with the source and binaries so I can capture crashes and perform post-mortem debugging. As the user base seems to be minimal, this is enough for VPlan, but every larger project needs some mechanism to capture a minidump.


So much for VPlan 4. This blog post has been a long time in the making, and I hope it shed some light on the development of VPlan4. So long, and thanks for all the fish!

VPlan4: A bit of history

Some of you might have already noticed that there is a new page on VPlan4. VPlan4 is -- as the name implies -- the 4th complete rewrite of my small task planning tool. Before I ramble on a bit on VPlan4 itself and its development, let me take you on a trip into the past.

Why VPlan?

VPlan is based on "Getting things done", a very nice book by David Allen which describes a work-flow. That particular work-flow tries to maximize the time you spend on advancing various projects, for instance, some stuff at work or the long-overdue car repair. At the time VPlan1 was written, there were no web-based services like remember the milk or todoist. So I went out to write a first small basic task-tracker.


The original version: I had no clue back then what features to use, so I started with a very simple tree structure for everything (one tree only), with C#. Storage was done by serializing the tree, and the tree-view was very rudimentary. All of the UI was implemented using WinForms. There was no drag&drop, but it served as a test-bed for some prototyping. I quickly scrapped it once I wanted to implement projects (which group several tasks together.) The key take-away from VPlan1 was that a WinForms based UI is a workable path, and that the backend is key.


The first VPlan I actually used for a longer time. Still written in C#, with a WinForms based UI, but a completely rewritten backend. Tasks where now stored as a table, and the tree structure was built on the fly. This gave some robustness improvements, but the WinForms UI was starting to become the limiting part. However, I had a much better separation now between UI and data, as the UI was just containing pointers into the data table and all manipulation was done on the database backend only.


In order to finally get a nice UI, I turned to C# and WPF (at that time, the .NET 3.0 framework was brand new, and 3.5 SP1 was not yet announced.) The backend was switched to SQL Server Compact, which allowed for low-level consistence checking via foreign keys. I wrote a model for the database backend, and hooked it up to the UI.

However, choosing WPF was a double-edged sword: While I really liked the declarative approach, making an usable tree-view was totally overkill. For instance, I wanted check-boxes in the tree-view to close tasks (something which is dead easy in WinForms): However, WPF does not support this out of the box, and the workarounds are rather cumbersome. I also never managed drag&drop to work nicely, even though I spent quite some time on the UI. There were also a bunch of platform-related issues, like a 3-5 second startup (even on a pretty beefy machine!) and the high memory use (used to be 70 MiB with .NET 3.5, went down to 30 MiB with .NET 4 now.)

What was nice about VPlan3 was the backend, which made all changes ACID and thus pretty reliable. I also spent some time polishing the UI (nice messages, questions, hot-keys, etc.) and used VPlan3 quite a lot since then. Interestingly, it was again a total rewrite of VPlan2 -- I couldn't use much of the old code base, and all of the UI was completely rewritten from scratch.


Fast-forward to 2010: I started to use Linux for some of my development work, and I really wanted VPlan to run on Linux as well. In the meantime, all of the web-based tools have appeared with nice UIs, drag & drop, comfort functions etc. which VPlan lacked, so there was really some reason to give it another shot. I eventually turned away from C# and gave it a shot in C++ -- to see how much work it actually is, and to get acquainted with Qt.

In the next weeks, I hope to get around to post a bit about the development experience and deploying. I've spent quite a bit of work this time to get a solid deployment and servicing story working on Windows, based around MSI and WiX.

Heading back from NVIDIA

I'm heading back from NVIDIA right while this post comes online. It was a fun and interesting time at NVIDIA Research, and we had an absolutely stunning summer with sun in mid-November. I've met a lot of interesting people, worked on some cool topics, had access to fat hardware, and learned a lot. I think that summarises this summer quite well :) Thanks to all people at NVIDIA who made this possible!

Hopefully, the submitted work gets accepted, and I'll be able to write a post-mortem analysis soon. I'm heading straight back to university work, so I'll be likely really busy during this week. If time permits, I'll get back to more regular blogging again. There's a bunch of topics I want to write about, which are like semi-finished in the queue.

Blog content updated/revisited

During the last two weeks, I've went through all blogs posts to clean up the content, reformat stuff, fix broken links and add other minor improvements. All posts have been tagged now, which should improve the "related posts" accuracy a lot and also make searching more reliable. I've also added info-boxes to various posts -- for instance, all old posts have a warning at the top, and some have a specific note attached to them.

In total, I have modified 50% of my posts (formatting mostly), tagged all of them, and re-categorized < 25%. Going forward, I'm using custom fields now and filter functions so I can make large-scale changes more easily (for instance, I've added a "project" field to all posts, so I can easily add a box which warns that a project is no longer maintained.) Finally, you'll also notice that the headings have been corrected. The twenty-ten theme I'm using has a SEO tweak which makes post titles level 2 on the front page, but level one on single-post pages. Nested headings in posts are thus broken on one of them, but there's no way to make it work everywhere without a filter. If your interested in a very simple introduction to customising WordPress, please drop me a line in the comments and I'll write about it soon.