Project Setup
This time I’ll just tell you about my project setup. You already know which books I read, but what other tools do I use to reach my goal?
First, however, I want to give attention to the following blog posts:
- thinkMoult – The Road to KDE Devland (Moult Edition) #0
- veracity – The Road to KDE and Qt Development
It’s nice to hear about other people who walk towards the same goal, but not necessary the same road. Looking forward to hearing more from them, and I also hope to see more “The Road to …” series emerging.
Where do you hack?
To start off, here’s my temporary working environment:
Yes, that’s a Microsoft mouse. I don’t consider a mouse important enough to bring my own, so I just use an unused one I found lying around.
The netbook is a Samsung NC10, which I’m very happy with. I can’t get compositing to work when using the external monitor, but I guess that’s a limitation in the hardware. Otherwise most things work out of box with Arch Linux, the distro of my choice.
As you can see, Tux is currently on vacation. I’ve borrow Micaiah from my little brother as a temporary hacker mascot.
The tools
Let’s take a closer look at my screenshot:
In my experience, IDEs are more troublesome than helpful when it comes to small projects. In an introduction to C++ course in high school, the teacher recommended us to use CodeWarrior (we were writing applications like “Hello World”). What a mess. Most problems my classmates had seemed to be IDE-related rather than related to code. I used a trial version of TextMate and compiled from the command line instead. When the trial was over, I switched to gVim (and made a friend who was tired of CodeWarrior switch too).
On my own computer, I preferred to use Kate. I tried KDevelop briefly, but I didn’t think that all the extra features it offered was needed. KISS, right?
As you can see, I now use Vim as my text editor. I’ve used Vi/Vim for a pretty long time (vim foo
; a
; <navigate around with arrow keys and enter text>; escape
; :wq
), but I haven’t really learned how to use Vim until now. If you want to start with Vim, I highly recommend vimtutor
(enter it in the command line).
I’m still far from a Vim master, but I find it very nice to work with. Here are some scripts that make my life easier:
- SuperTab – allows you to use the tab key to do all your insert completion
- EnhancedCommentify – switch lines between commented and uncommented
- FSwitch – switch between source and header file
- snipMate – TextMate-style snippets for Vim
To fix syntax highlighting for Qt, I followed this blogpost.
The other application you see in the screenshot is Qt Assistant – a very helpful assistant, indeed.
Despite everything I’ve said about IDEs, I recommend you to check out Qt Creator if you like these kind of tools. Personally I think I’ll stick to Vim for a long time, and maybe try to get Vide working again. Someday.
As seen in the screenshot, I’ve started with some Qt by now (after about 3 weeks of C++). I’ll write more about it in the next step. Now it’s time to go to my other hacker place – bed. I’ve only dreamed about code a few times, but those dreams were quite pleasant; it felt like I finally understood some things.
August 3, 2009 at 0:44
KDevelop (4) is pretty awesome, actually — think of it as a turbo-Kate. I use it the same way I use Kate — filesystem browser on the left, bunch of tabs to edit code in, embedded konsole at the bottom. Except the ‘bunch of tabs’ is way more advanced. The simplest feature is probably also the most useful one — because it “understands” C++, it’ll underline errors in yellow. Looking at the code and going “hmm, why is it highlighting that in yellow? — oh, a typo” (for example) is a hell of a lot more convenient then trying to decipher compiler errors every time. Also you can hover a class/variable/etc. name and it’ll show you where it was defined and other info, and you can jump to the documentation or header file, etc.
August 3, 2009 at 0:45
Do you know that kate (and hence kdevelop for that matter) has an internal VI-Mode? Afaik Qt Creator has something like that as well.
Of course it doesn’t map 100% of the VI features, yet you might want to try it out.
August 3, 2009 at 1:18
+1 illissius: I am also using kdevelop4 and it rocks! It is so much more fun to write source code if the application “understands” what you are doing and supports you in several ways … IIRC there is also someone working on refactoring support which would be awesome too.
BTW: I am using the SVN version as it is a lot more stable then their latest published beta.
KDevelop hackers you rock!
August 3, 2009 at 3:37
I still use Vim even for my large web-development projects – but then again, as an intepreted language (PHP) perhaps that makes most IDE features obsolete.
August 3, 2009 at 3:49
The problem with KDevelop (4) as with most IDEs is that it takes so long to load from the command line. Since I don’t like keeping a bunch of windows up at all times (too confusing and slow trying to tab between them all), I have to wait for the application to launch itself every time I need to make a change.
When I need to make a quick fix to the code, vim is up in seconds. And I can use vim +line_number filename.ext to go to the exact line number I need.
That said, I appreciate all the wonderful features in the new KDevelop and I’m glad that it is making such good progress. (My wife will be very excited when Quanta finally gets integrated into the new framework in a usable way.) It’s just not my style.
August 3, 2009 at 4:32
Hello Hans,
Thanks for the pingback to lahsiv.net/blog (veracity) 🙂 I have since installed the QtCreator IDE and downloaded and compiled the Qt 4.5.2 library on my Arch 64bit install to try to add bling (motion dynamics) to the progress bar widget. So I guess the roads are almost same now? See http://www.techenclave.com/open-source-and-linux/the-road-to-kde-qt-development-141826.html#post1204738 for notes and my youtube videos!
Regards,
Vishal Rao
August 3, 2009 at 4:38
[…] and Qt Development heh, the guy noticed i blogged about his posts in this latest post of his: The Road to KDE Devland ? step 3 Who Says Penguins Can’t Fly? so i replied via the comments: The Road to KDE Devland ? step 3 Who Says Penguins Can’t Fly? […]
August 3, 2009 at 4:38
[…] and Qt Development heh, the guy noticed i blogged about his posts in this latest post of his: The Road to KDE Devland ? step 3 Who Says Penguins Can’t Fly? so i replied via the comments: The Road to KDE Devland ? step 3 Who Says Penguins Can’t […]
August 3, 2009 at 7:14
I agree about IDEs being troublesome. I used to use CodeBlocks IDE at university, and found it to be really good (took a little work to make it work nicely with Qt tho). Since starting to use emacs for almost everything I do (from LaTeX to Python), I find it increasingly more difficult to use an IDE for anything. So far, the best I have found is Qt Creator. It doesn’t seem to get in the way as much as others. I just need to get used to doing C++ in emacs, I guess.
August 3, 2009 at 13:03
@illissius:
Yes, I’ve read about pretty neat things in KDevelop4 on the Planet, for example the visualize code feature. However, the beta label has kept me away from trying it out – I want something that Just Works™.
@Milian Wolff:
I know about it, but I don’t see why I would use it instead of the real thing – I don’t really miss any feature from Kate. However, I might give KDevelop a try sometime in the future, and the Vi input mode will probably make the experience much better (no :w in the code ;)).
@Simon:
I use Vim for LaTeX too (with VIM-LaTeX) – it’s nice to have an editor for everything, isn’t it?
I have the same impression of Qt Creator as you (doesn’t get in your way while providing useful features), and that’s why I recommend people to try it. 🙂
May 25, 2011 at 17:30
Your post is a bit old but how did You get started with Qt? Did You use the ressources You listed in the first post? How hard was it to start after “finishing” C++.
May 25, 2011 at 17:34
oh never mind, you already answered all my questions. you can delete my comments, if you please.
May 25, 2011 at 18:30
@gook:
Nice that you found your answers. I generally don’t delete comments unless it’s clearly spam, but if you want I can remove yours.
Also, good luck with Qt – I haven’t had time to code in a while, but if someone finds these old posts useful it would make me very happy.