Kissed a QT and now I’ve caught Mono

September 2nd, 2007

The Irish Penguin branches out to a new platform this week as Mono, the Linux-y version .NET of is tackled. What wonders await…

Well, thus far, we’re not actually sure, although early signs are promising. We pulled down the MonoDevelop codebase as well as it’s dependancies via Subversion and most things built without major problems (on Ubuntu Fiesty) and a little help from the fabulous monodevelop-list AT lists.ximian.com (just replace AT with @) #. Although the holy grail of having a happily built MonoDevelop environment is proving just a little elusive - a conflict between Cario from v1.0 mono libraries and Cairo from v2.0 libraries is a spanner in the works. This should be a straightforward one to iron out.

It will be interesting to compare the Form’s/Widget designer to the fabulous QT Designer and see if MonoDevelop provides a stable and first rate environment for doing GUIs. But of course, even more interesting will be the politics…

Judge to SCO - You Don’t Own Unix!

August 12th, 2007

And so the biggest legal saga to face Linux over the last few years was that of SCO trying to sue people for copyright infringement, saying that it owned the rights to UNIX. This has dragged Novell, IBM and more into the courts to fight for the right to party. Well today that party was in full swing as the judge in the case, Dale Kimball, has ruled in Novell’s favour saying that it is Novell, and not SCO, who own the UNIX and Unixware rights.

Kudos to Novell! It’s hard to see that there is much, if anything, left in the SCO locker that they can accuse IBM of infringing. In fact, it looks like they’ll be busy trying to organise a whip-a-round to pay up to Novell who will now be due a big cheque from SCO for the UNIX rights that Microsoft and Sun had previously paid SCO for. Yes, that sentence is a bit long and confusing. Perhaps it would be better to allocate IP addresses to each note in the UNIX rights cash pile and use traceroute to track its hops from one accounting subnet to another!

Interesting it was Microsoft who were reported to have set the SCO ball rolling back in 2003 by paying them for the first UNIX licence . Here’s one of the article’s from back then when the news first broke and the world looked a bleaker place. Once details of a Microsoft-SCO association had been reported it prompted one analyst, Gordon Haff of Illuminata, to say “Microsoft should certainly be worried about even a little bit of SCO’s stench rubbing off.” Well the only stench today will be from rear end of the trousers of the SCO management as they nervously wonder where to go next from here.

Given that Microsoft stumped up the initial cash to set SCO off like a bull in a China shop, it is possibly fitting that such money will now likely pass on to Novell to fund Linux development. Mind you, it’s hard to keep track of the amount of Microsoft cash that the Novell management are rolling around in these days. Maybe the Redmond team should just give up on Windows and focus on their Linux development entirely. Let’s be honest, it’s much more fun!

Groklaw has been covering this tale from the start of the case and and PJ is in bouyant mood as she covers the details whilst downing some chocolates. Thanks for a great site PJ, to keep the great unwashed up to date on the legal rumblings over the last few years, and please continue to do so as this fish gets reeled in.

YouTube Vs Hollywood: Transformers Movie Shootout!

July 30th, 2007

And the results are in, YouTube 2 - 0 Hollywood! Mr Bay you have been beaten…

Easily, the best Transformer films of the summer are

Mee, Grimlock luv U-Tube!!!

Momentumless Linux and the Death of Open Source - A Developer’s Response

July 15th, 2007

A couple of blog and news posts on the Internet this week seemed to make the headlines with death knells for Linux and Open Source for a multitude of reasons, both chronic (less anti-Microsoft sentiment about) and recent (GPL 3). But on reading, I couldn’t help but feel that both posts sounded wrong, utterly utterly wrong in fact. No disrespect intended to the authors of course.

The first post Open Source Is Dead, Long Live Open Patents? by David DeJean, which took a commonly cited angle on GPL3 hurting Open Source by fragmenting the community. But that is to not understand the community. Bare in mind one important fact about community-oriented Open Source developers, of which I am one - we write the software because we love to. For the vast majority of SMD’s (Small-to-Medium size project Developers, for want of a better term) we don’t really care whether our project is GPL2 or GPL3 - why? Because they are both effective Open Source licences and they will both serve our personal purposes fine as either licence would suit our pet projects. Of course, we’ll all still get our goat up as to whether Linux or the GNU Compiler Tools should be GPL 2 or 3 - but that’s a separate issue - it’s won’t stop us writing the software we love. It is naive for commentators to think that because a new licence comes out that it will hurt the amount of FOSS produced. As for businesses, if it made sense to switch to Linux before GPL 3, it will still make sense after GPL3 - irrespective of what or who adopts GPL 3. It technically affects Tivo (although they will be able to stick with Linux 2.4 kernel) - so what? Such cases only make up a small part of the econosphere. Plenty of business providers seem to be happy. Even embedded solution providers are saying that GPL 3 won’t turn customers off, with Jason Wacha of MontaVista saying “Our customers are used to working with licenses that are much more restrictive than the GPL. In my opinion, typical proprietary licenses are much more restrictive in pretty much all instances than the GPL.”

Read the rest of this entry »

Transformers - The Worst Movie Ever!

July 8th, 2007

Robots in disguise? No. Michael Bay - film maker in disguise. He has taken a cult classic and turned it into a steaming pile of utter junk of the “Yeeh hawww! God bless America variety.” Certainly, he should never be allowed near a movie studio ever again. Here’s why…..

You would think that Transformers would be a film about robots. No, in fact the only time robots make it into the film is to appear in cabaret style slapstick sketches where they incompetently fall about the place. They are like extras from a pantomime, lacking any personality, led by incredibly boring Optimus Prime who comes across a sort of Treebeard, from Lord of the Rings, with a number plate strapped - he really is that bland in this film.

A massively disappointing thing in the film is that all the Transformers look the same - kind of like a couple of electricity pylons stuck together. It’s actually hard to tell Megatron, the ultimate baddie, from any of the robots because they all look the same. Poor Megatron doesn’t even have his trademark canon strapped on his arm??? And Optimus’ colour scheme makes him looks like he’s about to lead a gay pride Autobot march rather than go into battle. Worse again he has lips - no doubt this is to give the audience something ‘human’ to identify with. However the only thing this movie could be identified with is the type of thing that you flush down a toilet after a long night on the beer. Yes, it’s that bad.

And to top it off the film can’t resist rolling out the usual racial stereotypes

  • The black people in the film are portrayed as stupid and fat
  • The dialogue is peppered with things such as ‘Could the Iranians have invented this weapons system? No, they’re not smart enough. It must be the Chinese or the Russians…’ (not an exact quote as I’m trying to forget things about this film but close enough)
  • And whilst the autobots collapse clumsily around the place, the U.S. marines fly in to save the day. Wup dawg!

The Autobots and the Decepticons also never really get to have a good fight with each other. For example when Megatron and Optimus tee off they look more like a couple of fat wrestlers bumbling each other around that robots having a death match. You don’t really get to see much, just a blurry zoomed in camera on their shoulders as they tussle about like drunks thrown out after closing time. There are a few saving graces to this movie. The acting isn’t bad, there’s a few funny gags along the way, the lead female in the film - Megan Fox - does a very good job of looking hot, the small boom-box radio transformer at the start of the film is funny and has a bit of personality.

But the bottom line, if you want to watch a war film - along the lines of Armageddon or something - then this might pass the time for you. Think of this as Iraq with cabaret robots. If you, like me, grew up with Optimus and Co and were hoping for a strong appearance on the silver screen then this is two and half hours of your life that you’ll want back! But like the brilliance of the original series - you can’t have it!

Digg this story or rate it on Reddit


QObject, QMake and Sadness - ‘Undefined reference to vtable’

July 1st, 2007

Mmmm… Bit of a longwinded title there! Basically, I could not shake off the following error recently, when writing a class Browser which inherited from QObject. Apparently, the answer is that sometimes you simply have to delete your Makefiles and regenerate them using QMake (KDevelop automatically creates Makefiles from me if none are found), in order to get over this error.

/path/to/frogface/trunk/src/browser.cpp:38:
undefined reference to `vtable for Browser’
browser.o: In function `Browser’:
/path/to/frogface/trunk/src/browser.cpp:34:
undefined reference to `vtable for Browser’
/path/to/frogface/trunk/src/browser.cpp:34:
undefined reference to `vtable for Browser’
collect2: ld returned 1 exit status
gmake[1]: *** [../bin/frogface] Error 1
gmake: *** [sub-src-make_default] Error 2
*** Exited with status: 2 ***

Thanks to the patient folks on the QT mailing for the help!

Funnily enough as I write this, someone’s just posted the following checklist on the #qt irc channel, which is good advice

  1. Make sure the Q_OBJECT macro is present in the definition of all QObject-derived classes
  2. Make sure you define your QObject-derived classes in your header files ONLY
  3. Make sure all of your header files are listed in your .pro file in the HEADERS= list
  4. Run qmake every time you add Q_OBJECT to one of your classes or modify your .pro file
  5. The last one is particularly important as I’ve made an art form out of forgetting it :)

QDomDocument is not a QObject

June 29th, 2007

Aha! Here’s one that caught me out for a while. I was writing a class that inherited from QDomDocument and was more than a bit puzzled when I got the error

moc_fdom.cpp:37: error: ‘staticMetaObject’ is not a member of ‘QDomDocument’
moc_fdom.cpp: In member function ‘virtual void*
JsDomDocument::qt_metacast(const char*)’:
moc_fdom.cpp:51: error: ‘qt_metacast’ is not a member of ‘QDomDocument’
moc_fdom.cpp: In member function ‘virtual int
JsDomDocument::qt_metacall(QMetaObject::Call, int, void**)’:
moc_fdom.cpp:56: error: ‘qt_metacall’ is not a member of ‘QDomDocument’
gmake[1]: *** [moc_fdom.o] Error 1
gmake: *** [sub-src-make_default] Error 2
*** Exited with status: 2 ***

Turns out QDomDocument isn’t a QObject so I was making the mistake of including the Q_OBJECT macro at the start of my class definition. D’oh!

class XDomDocument : public QDomDocument
{
Q_OBJECT //Don’t do this!!!
public:
XDomDocument();
}

A side effect of not being a QObject is that you cannot wire up signals and slots in the normal manner. Although googling around should bring up a few workarounds.

The Linux Kernel - An Overview from IBM

June 29th, 2007

Good things come in small packages packages. But great things are scabable!

One such example is the Linux kernel - it can run on anything from a toaster to a supercomputer; how does it do it? The answer to this, and other interesting questions, can be found in the very readable guide to the Linux kernel by IBM Anatomy of the Linux kernel.

.NET - Develop in Visual Studio, Deploy on Linux

June 24th, 2007

Recently, a new product has hit the market for those folks who would like to develop in .NET, and in particular Visual Studio, but prefer to run their application on Linux.

Although you could already code up .NET solutions in MonoDevelop - which itself has made great progress recently - most enterprises will only want to write .NET server and web apps in Visual Studio. Mainsoft has seen the gap in the market and filled it with a free plugin for Visual Studio, called Grasshopper, which lets you deploy to Linux. It achieves this by compiling the application to Java bytecode rather than the .NET intermediate language and also leverages work done in the Mono project, which has already done much work in bringing .NET to Linux.

In other news, Silverlight has been successfully ported to Linux through an incredible hackathon effort by Miguel de Icaza and his Mono team! Going under the name of Moonlight, the port was pretty much wrapped up in 21 days - so it’s amazing to think that with all this going on Miguel has any time to keep his blog updated!

The PHP Header() Trap

June 24th, 2007

This is just a quick tip for young players - new to the PHP game. The rather sexy header() function can be used to redirect the user from one page to another. But an important point about this function is that you cannot send ANY html or empty lines or spaces (or anything) to the client browser prior to calling the header() function.

This sounds easy to guard against but it isn’t always obvious. You could include a file using include(), require() or require_once() and it could be the culprit. This hit home particularly hard today when it turned out that out database connection file had empty lines after the closing php tag “?>”

Ironically, if the empty lines had been located before the closing php tag then everything would have been fine, as they would not have been sent to the client - c’est la vie! The solution became apparent after stumbling across this page which spelt the problem out clearly.