Comments, Code and Qt. Some words about the wonderful world of software engineering


Why I decided to unpublish Podcatcher

Posted by kypeli

So I've announced to unpublish Podcatcher from the Windows Phone marketplace. Podcatcher has been a dear project to me for many reasons and I've noticed it also had some satisfied users. In this blog post I try to open up some of the reasons for unpublishing it.

Code cruft

Podcatcher was (one of the other) projects that I used to teach myself how to do Windows Phone programming. Or even C# programming for that matter. When you start a new project in a completely new environment and language you tend to make a lot of mistakes. And then you fix them. That's how you learn, right. But some things are more fundamental than others. One of the things that I couldn't fix anymore - a thing that was so fundamental - and a thing that I today for sure would have done differently is how to model the state data using Linq-to-SQL DataContext. It sits at the bottom of every other model that I have. I already once redid the DataContext functionality by properly disposing them inside using() statements. But at this point of time to go forward I would need to redesign how I lay out my data in multiple DataContexts to handle concurrency better and make it easier to update just the correct pieces of data. Some of the bugs that I've now faced were DataContext.ChangeConflictExceptions which are especially nasty to debug and fix. But basically they mean that the data models are not holding up anymore. Another major pain point has been how the UI components are being updated from UI events that are being fired and updating the data models. This is related to the previous point about the need to do major data model changes. Nowadays I would never have used the Events like I did in the beginning. First they felt like the signals and slots from Qt, which I am very familiar with. So I used them like Qt's signals and slots to update the models that were tied to the UI. But in the long run this became somewhat messy and uncontrolled. This, too, would have required some major changes to fundamental functionalities of how the UI is being updated. Today I would have probably used something along the lines of Rx to handle the events in the system.

async and await

Boy, if I would have been able to use async and await from the beginning instead of BackgroundWorker as my threading model, the code would have been so much cleaner and more maintanable. But because Podcatcher originally targeted Windows Phone 7.5, it wasn't available at the time. The application was then moved over to Windows Phone 8.0, but all the critical threading code and model handling had already been implemented. This is also one of the teaching that I got along the way and I am glad I first did it "the wrong way" because now I can appreciate async/await so much more.

Windows Phone 8.1

Microsoft announced Windows Phone 8.1 at the Build conference. It's a great step forwards for Microsoft but also to all Windows Phone users. Windows Phone 8.1 will bring even nicer applications to end users with more fluent animations and good looking UIs. Why does this matter for Podcatcher? Well, Podcatcher has never been really a poster boy for good looking UIs. I am not a designer so the UI is what I call a "developer graphics UI". So for Podcatcher to meet the demands of what a Windows Phone 8.1 app should look like would require big efforts. First of all, it should be a Windows Phone 8.1 XAML application (as opposed to a Windows Phone 8.1 Silverlight application. Confusing, I know) because not all of the animations for Windows Phone 8.1 are available for Silverlight applications. I could probably try to convert the application from a Windows Phone 8.0 application to a Windows Phone 8.1 XAML application, but I have my doubts about this since my upgrade from Windows Phone 7.5 to Windows Phone 8.0 was not successfull. Yes, the Windows Phone 8.0 variant of Podcatcher is an application that I started from scratch in Visual Studio. So first I would need to make the Podcatcher a Windows Phone 8.1 XAML app to be able to utilize the new animations and other fancy stuff available in the new platform. Then I would need to make Podcatcher look even more appealing by probably doing some major UI design updates along the lines of adding new animations. With all the stuff I descirbed above, this is somewhat of a big hurdle.

The Podcast app

Microsoft is adding an app called "Podcast" that comes preinstalled on every Windows Phone 8.1 device that is bought from a retail store. How the heck am I going to compete against Microsoft in this space? This is probably the reason why I don't have the energy to fix the issues that I've described earlier. After all, yes, the issues are "just code" related and you can always write new code, right. But with Microsoft having their own podcast app in the app list preinstalled does not really add any extra motivation to make the necessary changes.

So why?

So why did I unpublish the application in the end, instead of keeping it as it was? I guess it boils down to two things: pride and time. Pride because I am not proud of Podcatcher anymore as it is now and as we enter the Windows Phone 8.1 era. It should be so much better, nicer looking and coded in a different way. I know I can do it now, but not with the problems it carries on its shoulders. Time, because I don't really have the time to do the necessary changes but also because I do get feedback (positive, but also complaints and bug fix requests) that I feel bad about.  I don't have the time to fix the issues or add the feature requests. So in the end it feels like the application is not complete anymore and its just easier to let it go.

What next?

All of Podcatcher's code is open sourced on GitHub with the GPL license (except for the Telerik components that the Windows Phone 8.0 version depends on). Go get the code from here: As for me, I will now code something else 🙂 Yep, I've installed the Windows Phone 8.1 SDK so I will probably do something else for Windows Phone in the future. No idea yet what. Starting from scratch and to be able target the more mature Windows Phone platform feels great. But one thing is certain: I've learned so much from coding Podcatcher that the project has not been in vain. And now that the code is out there, I hope it will help someone else too.

Technorati Tags: , , ,


Why QNetworkAccessManager should not have the finished(QNetworkReply *) signal

Posted by kypeli

I was recently writing some network code in Qt using QNetworkAccessManager and again I did the mistake I've already done a few times. The reason for my mistake was that QNetworkAccessManager provides the finished(QNetworkReply *) signal. There are essentially two ways to request some data from the net using QNetworkAccessManager. In the first approach you have the QNetworkAccessManager as an instance variable in your class and you connect the finished(QNetworkReply *) signal from the instance variable to your slot. This is a tempting solution as it provides a quick and easy solution to fetch some data from the net.

Technorati Tags: , , ,


Sneak peek: Integrate your application with the Nokia N9 events view.

Posted by kypeli

I am working on a Qt C++ library that will integrate your application with the Nokia N9 MeeGo Harmattan event feed page. You can add and update items with your icon, text or even a list of images that will be shown on the event feed page. I still want to add some features and polish the code before publishing it, but the library will be open source. So here's a video demonstrating what the library already can do. Stay tuned! Update: The library has been published. More information here.

Technorati Tags: , , , , ,


Introducing kQOAuth – Easy and Powerful OAuth library for Qt

Posted by kypeli

kQOAuth is a powerful yet easy way to integrate OAuth authentication to your Qt application. kQOAuth handles OAuth request signing, request submitting and reply parsing for you. It also provides an easy way to retrieve user authorization to protected resources with a built in HTTP server. All this is done with Qt programming in mind, so you can use Qt's signals to react to OAuth events in your own application. This also means that the library works fully asynchronously. kQOAuth is licensed under the LGPL license. You can read more about kQOAuth usage in my next post: Advanced use of kQOAuth. There is now also an official web page for kQOAuth: If you are unfamiliar with OAuth, it is worth first checking out some tutorials:

Technorati Tags: , , , , ,


Nokia UI Extensions for Mobile compiled in Ubuntu and Maemo 5 SDK

Posted by kypeli

Nokia has released a technical preview of their second Qt and C++ based UI Framework (the first being Maemo 6 UI Framework) called Orbit or DirectUI, this time with the name UI Extension for Mobile. Source code is publicly available under the LGPL license at Gitorious: I need take a closer look at the source code, but my initial impression is that the APIs are clean and very Qt-like. Nice job! The nice thing is also that the source code compiled without problems in my Ubuntu 9.10 and in Maemo5 SDK with the latest Qt 4.6 packages. Unfortunately there are only two binaries (that I could find) included called hbthemeserver and themechanger. I have a screenshot of themechanger below. This is the only actual application and glimpse of the UI framework in action (please let me know if  you find anything else!).

Yes, it runs in Maemo5 too 🙂

Technorati Tags: , , , , , , ,