Inside the belly of the beast

Some time ago I've indicated that I will eventually learn C++ and dive into the Qt framework. Just a few weeks ago I've showed my love for Jolla and mentioned that learning C++ turned out quite a bit harder as expected. Let's throw in a #jolla2gether for no apparent reason :-)

Why is that?

The answer to that is the subject of this blog post.

Why C++ and Qt?

At work we have a 99.9% Microsoft environment and thus it makes sense to develop in .NET/C#. And I'd say that this is probably good enough for 95% of all GUI applications. C# is easy to learn, the .NET framework is huge and provides classes and methods for almost any aspect of a Windows machine.

Performance is no problem at all, if it's done right and if we are talking visual tools/programs for desktop or terminalserver. Development is straight forward and many, many tools are available. I even prefer SharpDevelop over Visual Studio (2012).

Some time ago I've learned Objective-C, so that I could code for Mac and/or iOS. If these two are your primary targets platforms, you probably should learn Objective-C. I'm really not an Apple fanboy but the API and documentation is the best that I've seen so far. And yet it's not perfect, just to make that clear.

C# is Microsoft only (yes, there is something like Mono, but hey - come on - seriously?) and I tend to dislike the politics of Apple.

The next technology I wanted to learn should be more or less platform independent, bring performance on mobile devices and it should have a GUI. Don't get me wrong, I like the command line but I prefer a GUI for daily tasks. Of course one could read his email via bash and mutt but why?

That was the moment I remembered reading about Qt and on first sight this would enable me to develop for Windows, OSX and even many tastes of Linux. There were first signs of iOS support and Jolla will have a GUI based on Qt. Go for Qt makes a lot of sense.

How hard could it be to learn C++?

So the journey started.

If you start learning C++ with Qt together, the first steps are as easy as pie. Qt provides a large framework and the young Padawan can dive in with a small subset of C++. On one hand side that seems to be a good thing, keeping the learning curve flat. Qt has many features that enabled the C++98 developer to achieve things that now are available within C++11. Clean code for day one on is no problem at all. On the other hand this keeps you away from the standard library and the "built-in" features of C++/libstdc++. The ones who learned C++ first and Qt afterwards were probably in a better position because they could see the benefits of using Qt and they knew what feature of the standard library was replaced or complemented by a (feature) richer component. More then eight months later I am still not sure if it was a good decision to learn both together.

Conclusion

I've learned a lot in those eight months, discovered so many things I still don't know and want to learn. C++ can (not must) be a complex beast and alone that makes it an interesting science project.

No regrets, still looking forward :-)