Archive for August, 2004

Interesting comparison - part 2

Tuesday, August 31st, 2004

I’ve been playing some more…

Prompted by Aq I looked into consuming web services with Python. The words embarrassingly easy seem to be the best description…

Of course consuming a web service in a console app wasn’t a fair comparison, so I started looking at PyGTK based on my experiences of using GTK# in Mono. I then drifted into Glade which, although slightly clunky, works really well. This then lead me into using Glade# with Mono.

Screenshots


Mono w/Glade# on Linux


Mono w/Glade# on Microsoft Windows XP


Python w/Glade on Linux


Python w/Glade on Microsoft Windows XP

The same Glade file was used by both Mono and Python.

Comparison

Language Project Size (KB) Binary Size1 (KB)
Mono2 20.6 8
NET 2.03 23.5 20
Mono4 18.5 12.55
Python 6.4 n/a

1 Compiled in Debug mode

2 Using GTK#

3 Using System.Windows.Forms

4 Using Glade#

5 The Glade file (5.5KB) is embedded within the executable

Observations

Glade is nice. :)

Neither Python nor Mono (on Linux) used the padding I had set in Glade.

Python is obviously smaller, yet not as complete. I was able to transfer my Mono app between Mono enabled machines (including XP!) with nothing other that the executable, yet Python required both fpconst and SOAPpy to be installed on the target machines for Linux, and additionally PyGTK, libglade.dll, the GTK+ runtime and libxml2.dll for Win32. Portable? Yes. Easy? No… (There is an easier way though) Oh, and the Win32 version still doesn’t work – libxml2 b0rks.

Also, you lose the Managed Code side of Mono/.NET with Python.

It was an interesting exploration, but I think I’ll be sticking with Mono from now on. Next up – getting ASP.NET to work…

Books vs. Movies

Monday, August 30th, 2004

I am a great fan of reading.

I am a great fan of movies.

Sometimes these complement each other, but most times they don’t.

Don’t push me!

I’ve just finished reading First Blood by David Morrell. Most of my generation will recognise the title as the subtitle of the 80’s movie Rambo – First Blood (as it was released in the UK).

Once again the book blows the movie away, and once again I’ve made the mistake of reading the book after the movie. In my defence the book was written before I was born, I first saw the movie over 15 years ago, and I didn’t know the book existed until recently.

David Morrell’s book is an intense story of a man-hunt, survival, and revenge that is dumbed down to a mediocre action movie. The movie was notorious at the time for the ‘stitching his own arm’ sequence which simply doesn’t happen in the book. The book is bloodbath of carnage and murder with a high body count. If I remember correctly, the movie was more like an episode of the A-Team with lots of gunfire and explosions, but very little actual death1.

Stifling Imagination

Which brings me onto the main reason for this post… Having watched the Rambo movie as a kid, I could not help but picture Sylvester Stallone as Rambo whilst reading it, even though the description was completely different.

I remember reading Jurassic Park shortly after I saw the movie and enjoying the book far more, but my mental picture of the characters and locations was permanently tainted by the movie.

On the flip side, I read both Firestarter and The Stand before seeing their respective movies which then never quite matched my mental images that I’d created whilst reading. The same holds true of the Harry Potter books and movies, except that this time the movies almost matched my imagination, yet large chunks of the books had been ignored for sake of ‘pacing’.

It would seem that seeing the movie before reading the book impairs my potential enjoyment of the book, yet reading the book before seeing the movie means that the movie will never live upto my expectations.

A solution?

I’ve not read any of the Bourne books, but I have seen The Bourne Identity and plan to see The Bourne Supremacy soon. Someday I may read the books, but for now I’m going to steer clear of them and enjoy the movies for what they are. I may do the same for I, Robot although I think I would prefer to read the book for this one…

Exception to the rule

There has to be an exception, and that is The Lord of the Rings. I never read the books until after I saw The Fellowship of the Ring and Peter Jackson’s vision was so close to that of the books that it helped me enjoy them more. Unfortunately, having now read the first and second books, I find the films distinctly lacking (similar to the Harry Potter films).


1 It’s been a few years since I saw it so forgive me.

Ghost of site past

Monday, August 30th, 2004

I’ve finally gotten around to uploading the archive of Schwuk’s Playstation Page – a prior incarnation of this site. My reasons for doing this are two-fold:

  1. I want to remind myself a) how bad my web design skills were and b) why frames are bad
  2. I’m sick of the 404’s showing up in my logs…

One day I may get around to dumping the content into another format so that it at least looks good!

Enjoy…

Interesting comparison

Sunday, August 29th, 2004

So far I written my web service based Hello World! app in Mono and .NET 2.0 beta:

Language Project Size (KB) Binary Size1 (KB)
Mono2 20.6 8
NET 2.03 23.5 20

Mono produces one output file, Visual C# Express produces five! What on earth is .NET putting in there?


1 Compiled in Debug mode

2 Using GTK#

3 Using System.Windows.Forms

Using Subversion with Apache Virtual Hosts

Saturday, August 28th, 2004

I’ve been using Subversion for a while through SSH. Whilst upgrading my home server to Fedora Core 2 I decided to try implementing it through Apache WebDAV.

This is already well documented, but I wanted to be awkward – I wanted to host my repository behind a virtual host, and documentation for this is lacking so…

Simply add the following to your httpd.conf – I’m assuming you already know how to set up virtual hosts.

 <VirtualHost *:80>
     DocumentRoot /path/to/subversion/repositories
     ServerName svn.example.com
     ServerAlias svn

     <Location />
         DAV svn
         SVNParentPath /path/to/subversion/repositories
     </Location>
 </VirtualHost>

This configuration will allow you to host multiple repositories located in /path/to/subversion/repositories under the virtual host svn.example.com – now you just need to figure out your permissions!

I thoroughly recommend the book “Version Control with Subversion” which is available in both dead tree and online formats.

Better late than never!

Friday, August 27th, 2004

The title applies to more than one topic…

.NET Rocks!

I’ve finally gotten round to catching up on last few1 .NET Rocks! shows2, having missed a bunch due to holidays/lack of bandwidth. They make a great show, but at 70-100MB per show3… Ow!

.NET Rocks is really good show, and they seem to have a lot of fun doing it. I recommend it to all .NET developers.

Visual C# 2005 Express

Listening to show #70 prompted me to finally try out the Visual Studio 2005 Express betas – in particular Visual C# 2005 Express Edition Beta.

In a nutshell, it confirms my belief that currently Mono will convert more people to .NET than to away from it because the developer tools (to a certain extent) make the language.

A brief digression…

I believe that “Visual Studio” is one of the best IDEs out there, and even in it its cut down ‘Express’ form blows the competition away. Of course I might feel differently if I had to pay for it instead of my employer, but if I was self-employed (again) I would probably still put my hand in my pocket for it. Can you give a higher recommendation?

I think the Express products are a really good idea, and as long as Microsoft get the price right, they could net (pun intended) a lot of ‘non-professional’ developers. Of course there is always SharpDevelop for the independent .NET developer, and it is an excellent achievement but it requires a more intimate knowledge of .NET and the SDK to get the most out of it.

Anyway, back on topic…

Caveat Installer

Installation is a big gotcha – do people not realise that not everyone has broadband yet? The initial download for C# Express is 2.34MB. Once you kick off the install, it wants to download a futher 28MB of C# Express and 24MB of .NET Framework 2.0 Beta, and also offers to download 36MB of SQL Server 2005 Express and 162MB of MSDN Documentation. Try doing that on ISDN!

I cheated though… I’d already read the manual install instructions and downloaded the following:

…via broadband. I’d missed the full install (30MB) of the Visual C# though… D’oh!

I’ll certainly be doing it for the Visual Web Developer 2005 Express as 42MB (via web installer – 44MB for full download) is maybe a bit too much for ISDN. Then again, I’ve downloaded bigger…

Initial impressions

So far I’ve not dived into it too deeply, but the surface enhancements seem well thought out. My favourite so far has to be the ‘hints’ the form designer gives you when laying out controls on Windows Forms. Makes things far easier…

Hello World!

For my regular readers (and I do have a few!) who remember my first Mono app, here’s its .NET 2.0 counterpart:

Nothing earth shattering of course, and very simple to code. Again using my PHP / NuSOAP based WSDL enabled ‘Hello’ web service4 to test interoperability and web service consumption.

Visual C# Express (and of course Visual Studio) make consuming web services far easier than MonoDevelop or SharpDevelop both of which require you to use the .NET SDK tool wsdl.exe which generates the proxy class for you. Of course some (including me) may say that the wsdl tool gives you more control over your web service consumption (e.g. multiple proxies within the same namespace) but from a user-friendliness point-of-view, the ‘Visual’ products win hands down.


1 Actually eight… Oops…

2 Now added to my ‘External’ links in the right hand side bar.

3 I’ve just noticed that on the last few shows they’ve been offering low quality versions (Windows Media only though) at ~20MB – much better! They always offered a streaming version (again Windows Media only) though, but my limited bandwidth is too precious… :) So every so often I hijack various friends ADSL lines and grab a few to listen to at my leisure.

4 Which I will publish one of these days…

Happy Birthday to me!

Monday, August 23rd, 2004

Well, that’s it. I’m offically 30.

My wife arranged for my friend Mat and I to spend the day sailing, windsurfing, and kayaking at Nichol End on Derwentwater. A very enjoyable day, and a hearty recommendation for the owner Nick who is a fantastic character. Mat has now been bitten by the watersports bug, and is busy planning his first sailing course!

My sister-in-law sent me a Territory hat from Akubra. An authentic Australian bush hat!

Amazon vouchers from my parents have funded a few additions to my ever-growing library.

Wisely chosen (with help from their mother) PC World vouchers from my kids, plus other birthday money have now been converted into a DVD RW drive – I’ve finally joined the DVD revolution, having limped along with a 40x CD ROM for years. I’m still experimenting with creating actual DVD movies, but I can finally backup my media (audio, video, and photo) collections.

Time to upgrade my computer (especially the storage) though!

VoIP

Friday, August 20th, 2004

Just a brief1 comment on VoIP – Nathan Torkington blogs about his First steps in VoIP. In it he mentions Skype which frequent readers (if I have any) will know I’ve used quite a bit.

He wanted VoIP so that he could communicate with his family back home whilst on trips. At the moment I’ve mainly used it to communicate with family abroad instead of spending money on phone calls, and it works admirably well for this – as Skype say on their website:

Better sound quality than your regular phone

…and it’s true – a call to Australia sound better on Skype than they do on BT!

The trouble with VoIP is too many options. As well as Skype2, there’s X-Lite (as mentioned by Nathan in his blog), Linspire have released the PhoneGaim plugin for Gaim, and of course you can use MSN Messenger for voice calls – except I could never get MSN to work with firewall, and Skype worked out of the box. By no means an exhaustive list, but a start…

I think VoIP definitely has a place in the modern internet, and as broadband3 becomes more ubiquitous there will be a greater emphasis on using it.

1 Okay, it ended up not being that brief!

2 Skype have recently released version 1.0 for Microsoft Windows and Pocket PC, and 0.91 for Linux.

3 I’ve finally got a date for ADSL! 15/12/2004 – w00t!

The trouble with XP SP2

Thursday, August 19th, 2004

I’ve been reading a few posts about how bad XP SP2 is – “it breaks applications” – and how companies like IBM (and my own) and placing a hold on deploying SP2.

The company bit I understand – as will every other person who has worked for a medium-to-large company – as there are serious logistics involved in deploying patches like this in a sensible fashion.

As for the people complaining about it breaking applications – do they not understand that the basic principle of a firewall is to block traffic, and a good firewall should block by default? I mean, it’s not exactly hard to unblock the ports you require is it? Even Microsoft’s own knowledge base article about it basically just tells you to unblock the ports…

/me shakes head…

Jonathan Hassell gets it right in his O’Reilly blog – this sums his post up nicely:

SP2 does break software, but it breaks software that was doing security wrong.

Couldn’t agree more…

MSN Web Messenger &#38; other stories…

Tuesday, August 10th, 2004

Got this one via Pocket PC Wireless.net – it appears that Microsoft (or MSN rather) have a browser based MSN Messenger in beta. Fairly cool in itself, but to my surprise it works under Firefox on Linux – very impressive!

Just goes to show you don’t need to use ActiveX to get fancy applications in a web browser.

Other stories…

A few updates to the site…

First up is that I’ve ditched the banners that were based on photos from OpenPhoto.Net – a good resource for royalty free images if you need them – instead I’ve started using my own photos. I was browsing through them last night and decided that some of them were good enough to use, so…

The banners are rotated at random – you can keep hitting refresh or look here.

I’ve also added a colophon. If you’re wondering what that is:

A statement found at the end of a book. A colophon may give information about the typography and printing methods used in the book or may serve as a statement of printing limitation.

I’ve noticed them on various sites (notably Dunstan Orchards blog) in place of the typical “about me” or “about this site” pages and decided to put one here.