Ever had anyone ask you if you “like” your job? I never understood the point of this question aside from being a staple of meaningless small talk. An honest answer will never be a simple “yes” or “no”. Normally my job can swing from nauseating and boring to incredibly stimulating and stressful (FYI: I write software…poorly).
Right now though (and for the last few weeks), I could honestly say my job has been cool. It’s one of those rare times when a developer gets paid to do something they have a personal passion for. Long story short, I get to play with Qt all day.
I’ve followed Qt (that’s pronounced “cute” if you’re obnoxious and “que-tee” if not) since the late 90′s. This was right around the time I first tried Redhat and KDE. I’ve never had the chance to utilize it on a real project until now, though. Given the nature of the project, I had an odd request come my way a few days ago. My boss basically asked me to get a line count of the Qt source code.
Now, any UNIX guru worth his/her salt would chuckle, crack their knuckles, and spin some regular expression and command line magic to produce the answer in seconds. I’m not one of these people, and I already had the source extracted on my XP workstation. So, I went searching for a line counter on the intertubes that would work on the Windows shell and came across this.
For anyone who’s curious, Qt 4.5 is massive. I’m guessing a lot of that bulk is due to the fact that it runs on everything under the sun. Here’s the report from numlines (along with the command options I used):
numlines /i /s C:\Qt\4.5.0\src\*.h;*.cpp > qt_count.txtTotal files: 7532 Total lines: 2,402,695 Total uncommented, non-blank lines: 1,561,824 Total semi-colons: 653,431 Total bytes: 93,440,893 Average lines: 318 Average bytes: 12,405 Report date: 27-Mar-2009 1:35:11a
My hat’s off to the devs at Trolltech (err…Nokia now I guess) for making an incredibly powerful and flexible UI framework…all 1.5 million lines of it.
