KIS Systems, Inc - Contract Programming for Unix/Windows/Web in C++/C#/PHP/Qt/.NET and other technologies.

KIS Technoblog

Technical ruminations from our chief codemeister – Rick Berger

Archive for the 'Qt' Category

First Look at Meego

Posted by rickb on 30th May 2010

So, Intel and Nokia and the Trolls at Qt have linked up and are merging Maemo with Moblin to create something called MeeGo

(I think I’ve got the caps in the right places…)

As this is a a potential target development environment (and especially since the development platform of choice is Qt), I’ve been very interested in checking it out, once it got to a fairly stable state. Now, the first ‘unified’ environment is available and I can take it out for a spin.

Installation

An installation is a two-phased job for me: the environment, itself, and the development SDK. First the SDK:

This has to be done on a Linux Box, because it’s a whole ‘chroot’ environment. If you don’t know what that is, think FreeBSD ‘jails’. If you don’t know what that is, think kind of like virtual machine, but not really. It’s just an isolated filesystem that looks like a whole different machine, inside of another machine. You log into it, and from there on, it appears to your login process that you’re on that machine.

I installed the chroot image on an Ubuntu 10.04 (latest) Fusion VM on a Macbook, which gave me a ‘kind-of’ VM inside of a VM configuration. It could drive you crazy, thinking about it – but the bottom line is: it works. Including the emulator. The only issue I had was that video wasn’t visible. But, I did have a Meego desktop to play with, and the SDK appears to be available.

The SDK is a kind of typical remote cross-platform development environment, except it’s not really needed, for the netbook app – the target is just another x86 linux implementation. In fact, I wonder if you couldn’t just put the SDK on the netbook, compile there, and then debug remotely.

There are probably performance issues, there – especially if the builds got big – but you do wonder…

On to the Hardware – ASUS 1000H (dual boot w/ easy-peasy image)

The initial task over, it was time to put the OS on some real hardware. I have an ASUS 1000H, dedicated to just such endeavors. It has easy-peasy in the first partition, but I left some space in a blank partition and can dual-boot through GRUB.

This turned out to be a little tricky – the installation process wouldn’t let me install without a boot sector, and it wanted to use a different file system called btrfs. For some reason, the installation didn’t like that in a non-default partition and complained that a btrfs system is unbootable. So, I had to fallback to ext3 (ext4 was not an available choice.) It hung when trying to load the boot sector (which I suspect boots into something non-btrfs, so I killed it, booted back into the easy-peasy image, and did a ‘grub-update’. Handy – the new grub 2 scans the disks for likely OS candidates and presents them in the boot menu.

Voila! Boot into Meego and everything looks fine.

The Verdict

Well, it is cute!!

Those little brightly-colored blocky people populating the intro video and all of the promotion materials look real friendly, and they look happy, too! How bad can it be?

When you hover over a menu item, it squoidges (my own term – I don’t know what else to call it – basically a ‘bounce’ animation done in scale-factor.) Run your mouse along the menu bar, and you get squoidge, squoidge, squoidge… as the mouse passes over the menu.

In terms of layout, it kind of follows the Ubuntu UNR/easy-peasy form – a bar at the top to select various ‘panels’, which are fixed size and take up the whole screen, although each panel may be divided into subpanels.

Beyond that, it’s more like a cell-phone OS. You have an applications panel – that seems normal. And you can select applications, launch them, and add them to a favorites panel. That seems normal, too (in fact, most of the applications are generic Linux apps, that look and feel like generic Linux apps.

It’s very heavy on the ’social’ and ‘personal’ aspects. Everything is geared towards showing all your friends, allowing your friends to ping you or you to ping them, your mail and calendar are right up front.

What is different is that things you’d normally expect to see in a web browser – facebook contacts, calendar updates, blogs, etc., can show up directly on a panel. The idea, presumably, is that getting to those would be quicker directly from a panel, rather than having to bring up a web-browser and navigate to a page – something that can be onerous and time-consuming on a small device.

No Login

Again, reflecting the device-OS ancestry of Maemo – there is no capability for multiple user accounts. it’s really tuned to reside on a personal device. So personal, you don’t have to log in. The upside is that when it comes up, it’s ready to go. The downside is that if someone else is using the netbook, they’ll likely screw up the desktop (or view that you have screwed up the desktop.) Not only that, but with it’s heavy emphasis on ’social’ apps, it’s like someone else logged into your Facebook app. All of your personal details are there.

I’d have to concur with others who have installed it on hardware – it’s really fast. It looks like this is a really trimmed down Linux distro. A lot of heavy stuff that used to happen at boot time is apparently deferred, or eliminated, already, because it’s not something that is needed on a device OS.

So, it boots fast, it runs fast.

Is it usable?

My initial impression (thus far) is that it would be a really good tablet OS (or, of course, a cellphone/pda OS), rather than a netbook OS. I don’t think I’m going to give up the easy-peasy environment on this netbook, just yet. For one thing, my netbook serves as a ‘kitchen’ pc, with different accounts so my Significant Other can log in and mess up the screen layout anyway she wants…

In the tablet/OS environment, text input is always the issue. Nothing has beat the keyboard, yet, but smaller devices can’t handle them. So, there have been a variety of solutions – virtual keyboards, character stroke recognizers, full handwriting recognizers, and the occasional oddball scheme designed for eye-tracking (which can work quite well, but it is an odd way of expressing things) – all of these have have their trade-offs and none have been proven to be faster or more accurate than the good old keyboard.

Of course, this is version 1.0 and there is a whole lot yet to be done. It’s definitely a different paradigm, I think, one that’s going to take a bit of getting used to. It seems more natural to smaller devices without a keyboard, but I think that is the real intended direction. Having it as a netbook OS is just icing.

Posted in Platforms, Qt, mobile | No Comments »

‘Git’n It

Posted by rickb on 6th May 2010

I’m getting ready to open-source QXSAP (a Qt-based multi-lingual and simple marshaling parser) and, of course, before doing that, I need to get it into a source control repository, of some sort.

In the past, that’s been SCCS (Source Code Control System), RCS (Revision Control System), CVS (Concurrent Versioning System) and finally SVN (Subversion), with a couple of side trips to some strange source control systems, whose names I forget and would rather not recall.

Something New: Git

Now, the latest thing is Git, created by no less a luminary than Linus Torvald, himself. I’m not sure if the name is an acronym that stands for something, or if it’s just a play on the slang term to ‘git’ something. Whatever – it’s the VCS du jour, and it’s being used by a lot of important (to me) organizations, primarily Nokia for Qt and all it’s sub-components.

Gitorious is the repository of choice for Qt-based objects, so that’s where I want to put QXSAP.

Which means I’ve had to spend the last couple of days getting up to speed on Git. From what I’ve seen, it looks like it’s capable of doing anything it’s predecessors can do. I like the idea of having a local repository, and that the repositories can communicate with each other and update themselves. Beyond the standard required features (fetch/push/branch/tag, etc), the ’stash’ mechanism seems kind of interesting.

Start out with the basics, and then broaden the scope, from there.

Until the next ‘new best thing’ comes along….

Posted in C++, Linux, Mac, MacIntosh, Platforms, Qt, Software Development | No Comments »

Using QtCreator

Posted by rickb on 22nd April 2010

The Symbian development platform (on which I’m currently working) has historically been incredibly arcane. A modified C++ with a non-standard exception mechanism, for starters. And a whole bunch of pieces to install, one of which is a doctored up Eclipse IDE.

Qt doesn’t alleviate the proliferation of installation pieces, at the moment, primarily because everything is still in transition. In fact, you have to install a whole bunch more new pieces to get the development environment together on your desktop machine and on the phone.

QtCreator

One of those available new pieces is QtCreator, Qt’s answer to the IDE.

I’ve used a lot of IDE’s over my career, and they all have their pluses and minuses. MSDEV is great for MS-only applications (and is particularly brilliant in C#). XCode is cool on the Mac, and Eclipse is great for Java. I’ve been a fan of Eclipse since working with it on a Java project a couple of years ago, and so was looking forward to using it in the Symbian environment – since Carbide C++ (the blessed Symbian IDE) is based on it.

That proved to be somewhat less than productive – the environment is insanely fragile. I managed to break the debug perspective completely, just trying to move a few windows around (the Variables window, specifically). It took some research and digging down into the nest of hidden project files to find the proper configuration file to delete and get some order back to the IDE. Then, too, communicating with the phone required yet another panel with arcane settings, and that had to be reset, frequently.

Since I’m using Qt, I thought it would be an interesting exercise to use Qt’s blessed IDE, even thought it’s still at an early stage of development.

Order of Magnitude

I can honestly say, QtCreator has been a lifesaver for this project. For starters, though still in early incarnation, it’s really good and intuitive to use for Qt development. And, it seems to communicate with the phone more readily.

There are a lot of glitches, still – I have yet to get the on-device debugger to work. Judicious use of qDebug() statements have been the stop-gap measure around that – effectively reducing debugging to the proverbial ‘print statement’ technique. Not optimal, but it works. And I can’t get the debugger to work on the device in Carbide-C++, either, so it’s no effective difference, there.

Better than nothing.

But, what has been the real lifesaver has been the ability to take advantage of an outfall of what Qt ultimately is: a cross-platform development environment. What this means in practical terms is this: you can do a lot of development on the desktop!

When you install Qt, you can install two versions – one for the desktop, and one for the phone. QtCreator has a (admittedly wanky, but slated for improvement) configuration panel that allows you to switch between build configurations: desktop or device (actually, there are two configurations for the device, as well – emulator vs. actual device.) You have to flip a bunch of switches to do it, but I’ve gotten it down to a fairly manageable routine and can flip between the two environments with relative ease.

That ability has been nothing but a godsend (or maybe a troll-send) for this project of limited funding and limited timeframe. Turnaround (the time it takes to go through a code, run, debug, fix and do it again cycle) on the device is slow. Turnaround in the emulator is even slower. But turnaround on the desktop is fast – no loading required.

Because of that, I’ve been able to do a large bulk of the coding effort – getting the big stuff in place – on the desktop. It helps to create an appropriately sized main window, and you do have to have a jumparound here and there (primarily for the OpenGLES stuff and the menu system), but most of the code and components are exactly the same.

So, when it comes time to deploy to the device, most of the hard stuff has been done. Now you can focus on the harder, device-specific stuff.

Not the Same

Just to come full circle, QtCreator has some real promise. It has glitches – the VIM emulator is a great idea, but I’m seeing a bunch of issues with it. I’m told that much of this is fixed in the newer version.

It’s difficult to specify and organize source folders – I’ve taken to creating source file ‘hulls’ on the command-line in the directories I want them, and then update the .pro file, accordingly. The IDE will honor what you’ve created, and show appropriate folder organization.

Not on the Mac, though – the project contents are just a flat list of entries. You can still get to stuff, but you may have to scroll through a long list of other stuff to get to it. I imagine that will get fixed in the next update or two as well.

Summary

Overall, I think this will only get better. The Trolls (now part of Nokia) are working on this furiously (note the announcement of Meego and the parallel announcement that Qt will be the development platform of choice on that environment – it already is on Maemo).

For me, QtCreator will definitely become the development platform of choice for future Qt applications, with decreasing reliance on the platform-specific IDE.

Posted in Eclipse, Platforms, Programming, Qt, mobile | No Comments »

Qt on Symbian

Posted by rickb on 19th April 2010

Yet a new platform to exercise my Qt chops on.

As you may or may not know, Qt has been acquired by Nokia. It appears that Qt will be the development environment of choice for all of Nokia current and future OS’s, including Symbian, Maemo, and the newly announced Meego.

And that’s a good thing.

Leveraging Qt

I can speak for a newbie getting into the Symbian S60 environment: If it weren’t for Qt, this would have been a much more difficult endeavor.

As it was, I was able to put together a pretty sophisticated molecular modeling app, complete with 3D OpenGLES visualization, in about six weeks, thus far. (Still putting in HTML downloads and cleaning up interaction.)

It’s not without issues. The Trolls and Nokia are still getting to grok one another. So some things (like the menu system) display some strange behavior, and Qt doesn’t support OpenGLES on Symbian, yet (at least not on the S60 devices.) So, I’ve had to ‘go native’ for the OpenGL. Not the end of the world – it just means opening up a Native Symbian window and creating a QObject-based class to serve as a controller. It’s working fine.

Trying to do this in native Symbian would have likely at least doubled the development time, I think. By leveraging the Qt knowledge already gained, the process of moving to a new platform like Symbian is greatly facilitated.

Now, if we could just get Qt on the iPhone and Android (efforts are underway for these – see here and here.)

Posted in C++, Programming, Qt | No Comments »

QT Legacy

Posted by rickb on 8th January 2010

It’s occurred to me that, having worked in a number of languages and platforms, lately, just how much an influence Qt has been, particularly the signal-slot mechanism.

That single mechanism is, in my mind, as much an innovative development as the subroutine, the library, and the class.

Why so?

Fundamentally, because it provides a mechanism for incredibly strong isolation of modules, which, in turn, makes them more likely candidates for re-use. It also allows for stronger modular development in general – you can focus tightly on the functionality of the module and – perhaps even more importantl – you can hook tests to the module with ease. Unit testing is an easy and natural fallout of signals and slots.

IT’S WHAT I HAVE coined as ‘connection-based architecture’. (In ‘pattern-speak’, it’s called the observer pattern.)

Whatever you want to call it, it’s the best thing since sliced bread.

Once you’re exposed to it and have to go over to another language or toolkit, you immediately look for an equivalent mechanism in that technology. Some toolkits/languages provide the function inherently, others somewhat. For instance, Objective C implements it as part of the language construct. In fact, you could look at Objective C and wonder if Trolltech didn’t use it as a model – in effect turning C++ into an Objective C implementation. The syntax of Objective C for sending messages is a bit funky, but the functionality permeates every class declared in the language, which is better than Qt can do – you have to derive from QObject or embed a QObject-based instance to use it in C++.

The .NET CLR languages have a corollary in their delegate mechanism (not to be confused with Qt’s ‘delegate’ base class). Essentially, you can declare a delegate as a singular notification mechanism that behaves very much as a signaler, and you can register classes to receive it’s signals on a function. Syntax variants to declare and use delegates vary from language to language. In VB, it’s terrible (unless changed recently.) In C# (really the only language to write .NET apps in, IMHO), it’s easy.

As you go down the language line, it becomes increasingly difficult to use this kind of mechanism. ECMA-based scripting languages (ActionScript3, JavaScript), for instance, don’t have quite an equivalent mechanism, but the event mechanism is closely analogous. It’s reasonably easy to create a custom event and provide handlers for the event.

Server side languages are harder. Java actually has an Observer class, but it’s kind of clunky to use and not typesafe. Perhaps with the emergence of the generics construct, it may be easier to implement a signal-slot type of mechanism.

Of course, signals and slots are not the only thing that makes Qt a standout technology – the window and widget abstraction are often the rationale for using Qt in the first place. If you’ve ever tried to create a multi-platform application from scratch (I have – pre-Qt), it’s a lot of work and you’re often restricted to lowest-common-denominator functionality.

And, Qt provides some other niceties, as well – the bundled 3rd party functionality for things like XML handling relieves you from having to build and support these things as extras (which can be a difficult endeavor in a multiple-platform effort.)

But, the real conceptual leap (unless you’ve been a NEXT/Mac developer working in Objective C) is the signal-slot mechanism. The rest is UI abstraction, a certain amount of architectural framing (which is useful), and bundling.

That dynamic connection-based isolation capability is what I look for any time I have to make a move.

Posted in C++, Programming, Qt, Software Development | No Comments »

One Week to Write the Demo, Four to Document and Package

Posted by rickb on 7th March 2008

It is an axiom in software development – more often than not, it takes more time and effort to document a project than it does to actually do it.

Which is why a lot of documentation never gets written…

Qt Demo on the Loose

Which is why it’s taken forever to get my simple little Qt demo up and posted.

But, it’s there – QXListView is out for the world to see at http://qxlistview.sourceforge.net .

Video Throes

Part of the documentation effort has been making a video demonstration. My first attempt was to just use a video camera to shoot the screen – there’s no flicker issue with LCD’s, so it ought to work, right?

Well, it works, but the result was terribly fuzzy, so that wouldn’t do at all.

The next attempt was to find some screen capture software for the Mac. There are a few out there, but I settled on a beta thing called Screenium. I found a setting that gave me nice, clear video and proceeded to work through the demo.

Screenium is ok – has some nice feature, but it’s way beta. I had a lot of troubles with it stopping prematurely or just recording a blank screen (but with soundtrack.)

But, I managed to cobble together a bunch of clips. Next, I brought those up in iMovie, edited them, and prepared to export them, happily expecting a movie to come out the other end.

No such luck!! Sound, but no video.

Crawled around the web and after posting numerous questions in numerous forums, I discovered to my dismay that my ‘nice, clear video’ codec (’animation’, which is an Apple codec, I understand) was not exportable by iMovie (which is an Apple product, I understand.)

What to do? I didn’t want to pop for professional-level stuff just to do this little project, and I didn’t want to record everything over. So I started looking for converters and stumbled across MPEGStreamClip. This nice little app allowed me to convert the ‘animation’ coded clips to H.264 (with a myriad of settings I don’t quite understand), which is a variant iMovie could export. But, I lost my nice clear images in the bargain. Now they’re a little fuzzy, but they’re better than the video camera atttempt.

So, I could finally export my movie, package up the demo, and get it out to the site.

Next, I have to update my home site (this) to point to the demos.

A bit wanky, but hopefully once I work out the flow, more should be coming.

But, there’s something else coming up that’s going to impact the time I can put on this, and change the direction of the next few dozen blogs, I think.

More on that, later.

rickb

Posted in C++, Documentation, Programming, Qt, Video Presentation | No Comments »

Qt Demo – QXListView “Active List”

Posted by rickb on 1st February 2008

The code and demos for this discussion can be found here: http://www.kis-systems.com/examples/QXListView
There are executable demos for Mac,, Windows, and Linux.

An ‘Active List’

I’ve been working part-time for the past couple of months on a project that has been buzzing in the back of my head for a long time: upgrading a piece of ‘active list’ functionality to Trolltech’s Qt 4.

Basically, the idea is this: We want certain cells in a listview to be ‘active’ – i.e., when you click on them, something happens in the app, immediately. Furthermore, we’d like these cells to look and behave like native widgets (checkboxes, radio buttons, etc.), but, of course, we don’t want to load up the listview with a few thousand widgets to achieve this.

Original Implementation: Qt 3

The original implementation was in Qt 3, and was a real bear to do. I had to intercept a lot of events and signals and do a lot of overrides to QListView — ostensibly not an unreasonable requirement (this is OO programming, after all) — but many of the overrides and signals didn’t behave as expected, or had funny side effects. Ultimately, I had to resort to a few tricks to get “way under the covers” and ferret out internal functionality.

It worked, but many aspects were not an optimal or happy solution. I had to document profusely what I was doing, and flag caveats where I was relying on undocumented internals that could change at any time.

Qt 4 to the Rescue!!

So, along came Qt 4. The trolls had refactored everything in the ListViews’ implementation to align with their new Model/View architecture.

Eventually the project wound down and I was no longer part of it. I did a feasibility paper on moving QXListView to Qt 4, but I wound up moving on to other things and the idea was shelved.

Eventually I found myself in between gigs, Qt 4 was by this time way beyond any stability issues, and this problem had been gnawing at the back of my head for the past couple of years. Time to push it to the top of the stack.

The Port

I’m happy to report that the port to Qt 4 wasn’t particularly onerous (despite some of the horror stories I’ve heard from others.) I did have to pretty much rewrite the entire thing, but I didn’t have to resort to any funky tricks to make it work. I did have to follow some of Qt’s internals to see what it was doing and what it expected, but that’s just part of Qt development — more importantly, I didn’t have to ferret out or use anything undocumented. I did have to derive a whole bunch more classes and figure out their inter-relation to each other. And, of course, I had to fit the paradigm into the Model/View indexing scheme. None of that turned out to be terribly onerous, either.

There was a bonus: editing text fields in the Qt 3 implementation would have required significantly more effort. Likewise, re-ordering the columns would have required more effort, since we would have had to do a “logical” vs. “display” mapping (and keep it all synchronized and current.) As a result, those features never really did make it to the “todo” stack. In the Qt 4 implementation, however, those features basically came along for free.

A Good Result

The outcome is a functionality that I think will still be very useful in future projects. And, if nothing else, it’s a good example of how to override and turn Qt’s Model/View architecture to do your bidding.

And now, of course, I need to put this away and get on to the “next important thing”…

Posted in C++, Qt, Software Development | No Comments »

Developing on the Mac

Posted by rickb on 22nd January 2008

Now that the Mac has finally settled down, I’ve been moving my development efforts off of Windows and onto the Mac.  And just recently, I’ve done a partial upgrade to Leopard (hedging my bets by installing it on an external USB drive.  Best of both worlds – I can boot Leopard off the USB, and Tiger off the internal.)

XCode is a reasonable IDE – better with the Leopard incarnation.  The integration with gdb is tight – I’m having to go to the cl gdb less frequently.  Qt is working just fine on the Mac, with no surprising ‘Mac’ gotchas.  (In fact, I’ve gotten more ‘gotchas’ in the linux environment than I have Mac.)(Or Windows.)

A few things I miss in the Windows environment:

  • Visual Studio has better capability to look at out-of-scope expressions.  If I want to examine the contents of a pointer, it’s easier in VS than in Xcode.
  • Visual Studio’s ability to debug Javascript in IE is simply awesome – it looks and behaves pretty much like any other language in the IE.
  • Windiff is still the best windowed comparison program in the land.

For PHP development, Zend’s Eclipse IDE port works fine on the Mac (and the latest incarnation adds a lot of features.)  For first cut debugging of Javascript, the Firefox debugger handles most cases – although in a crunch, I’m tempted to go back to MSVS for the more puzzling situations.

Still, for the most part, I’ve been ‘living in the environment’ and haven’t been tempted to shift back over to Windows for anything in particular.

So,  the Mac is becoming pretty much my mainstream preferred development environment.  With the addition of Parallels and a few scattered VM’s , I can do the verification builds and debugging on Windows and Linux as necessary, using net shares to access the central development environment.  There’s a bit of a time penalty for going this way – but I don’t build frequently in the VM’s and the trade-off for not having to carry more than one machine more than compensates for a slightly slower build.

Ah.  There is one area where the Mac is really hands-down the preferred platform: imaging.  For one thing, you can color profile both displays – an annoying shortcoming in Windows (XP, anyway).

Posted in C++, Mac, MacIntosh, Open Source, Parallels, Platforms, Programming, Qt, Software Development, Virtual Machine Software | No Comments »

Namespaces – A Good Thing

Posted by rickb on 30th November 2007

I’m becoming more of an advocate of namespaces.

Traditionally, they’ve been defined informally by prefixing function and/or variable names with some unique mnemonic – such as ‘Q’ for Qt stuff, ‘wx’ for wxWidgets stuff, or even something as potentially ambiguous as ‘C’ for MFC stuff.

All well and fine and helpful, but you can still run into name collisions. For instance, I was browsing the mac utility headers a while ago and ran into a raft of ‘QT’ names – for QuickTime. Dangerously close to ‘Qt’.

The newer languages, such as C# and Java, enforce namespaces. In C#, you can’t write a single line of code, unless it’s wrapped in a namespace.

The usefulness was heightened for me in a recent project with C#: we were attempting to use an underlying module for statistical binning and drawing. But, we needed a highly optimized version so we could dynamically select bins and draw the results on the fly.

Some customization was in order.

Now, in an ideal world, we would go to the creators, explain what we needed, and collaborate with them to get the enhancements we needed. In the real world, though, the creators are off doing something else highly urgent, and we’re not on their ‘to-do’ list.

So, we did the undesirable: clone the module and get the modifications in, ourselves.

Of course, we didn’t want our version to collide with the older version. How to avoid? Simple: since it’s C#, there’s guaranteed to be a namespace associated with the module. Just change the namespace of our cloned module and proceed.

Voila! (I’m writing this in Paris, so I get to stick in my bit of francaise.)

Of course, things aren’t quite so simple – the binning module used several namespaces (a bit of fragmentation overkill, IMHO), and relied on other underlying modules, which had to be detected and determined if they needed cloning, namespace changes, et al. It still can get pretty ugly. But the namespace feature helped.

Another time when namespaces would have been useful was when a somewhat recalcitrant vendor provided a package with a modified libjpg. Naturally, none of our stuff that relied on libjpg worked any more after we integrated their new code…

After the initial shock and dismay, we had to come up with a solution – the vendor was in Germany and were perfectly happy with the solution, as it was, so were disinclined to make changes. In that case, I think we isolated their libjpg into a fully resolved dynamic library along with their system, and didn’t export the jpeg functions. A pain in the ass, to be sure.

Back then, namespaces weren’t widely supported in the compilers (notably, Microsoft), but had they been, it could have been a better solution. Granted, libjpg is in C, but it can be compiled as C++ and then wrapped in a namespace that would prevent it from colliding with our libjpg (assuming we could get the vendor to cooperate.)

As software grows, and applications become more of a ‘mash-up’ of different modules, namespaces can become an increasingly important construct to eliminate conflicts. For instance, if Trolltech wrapped everything in a ‘TT’ namespace, or, better yet, a ‘TT_QT’ namespace, it would disambiguate them from any other code that might just happen to start with ‘Q’. Like ‘QT’ for QuickTime.

So, in my current effort (creating an extension for Qt), I’m wrapping everything in a namespace (’KIS_QX’). It means users will have to sprinkle ‘using’ statements in their code. A bit onerous, admittedly, but I think utimately that namespace usage is a good habit to get into.

Posted in .NET, C++, CSharp, Programming, Qt, Software Development, software, wxWidgets | No Comments »

MacBook Saga, Cont’d

Posted by rickb on 28th November 2007

So, I think I finally have the MacBook situation stabilized. The machine is running well, and I’ve been working it pretty hard, usually running two Parallels VM’s and the MacOS, itself. I normally have a second monitor hooked to it for development purposes.  My only complaint is the ‘chicklet’ keys sometimes don’t register a hit.  I have to be somewhat deliberate in my typing.

Been compiling Qt4.3 in various configurations for all platforms, and the huge disk is just gobbling them right up. That’s nice. I understand I can upgrade the memory to 4gb. Have to future that – it’s not in the budget, right now. But I wonder if getting it would allow me to run three VMs at once? I’d like to have the FBSD server, XP, and Ubuntu Linux running simultaneously alongside the MacOS. That might take the next generation hardware leap (which should be out in, what? A week or two?)

I do assiduously avoid getting any liquids near it…

rickb

Posted in Mac, MacIntosh, Parallels, Qt, Virtual Machine Software, software | No Comments »