Archive for October, 2007

Advanced File Transfers with HTTP and FTP

Tuesday, October 30th, 2007

As Nick already pointed out, I am presenting this month at the Pacific Northwest Delphi Users Group.  This is based partially on my CodeRage presentation from earlier this year, but since it will be a live presentation I’ll do a lot of the demos based on audience questions and suggestions, so it could go in a whole new direction.

Thursday, November 1, 2007 6:30 – 9:00 pm

Advanced File Transfers with HTTP and FTP

Presented by Jim McKeeth

Ever transfer a file via HTTP or FTP? That is easy with Delphi and Indy, but what if you want to resume a broken download, only download part of the file, or download the same file from multiple servers? Now things get a little more interesting. This month’s PNW DUG focus on advanced file transfers with HTTP and FTP, and if we are lucky a little Microsoft Background Intelligent Transfer Service or BITS (used for windows update.)

Jim McKeeth, who recently relocated to the Pacific North West from the Boise Idaho area to work for WideOrbit, will be presenting. Before moving here, Jim was the 7 year president of the Boise Software Developers Group and Camp Director at the Boise Code Camp. He also presented at BorCon, CodeRage, and is scheduled to present again at the upcoming CodeRage II. In addition to presenting, he is also a co-contributor to the book /Building Web Applications with ADO.NET and XML Web Services/ for the chapter on consuming .NET Web Services on Linux with Kylix.

Meeting Location:
Bellfield Office Park Conference Center
1150 – 114th Ave SE
Bellevue, WA 98004

www.pnwdelphi.org

Activation Restrictions Create Pirates

Wednesday, October 24th, 2007

<rant>

I understand Microsoft’s desire to reduce pirating, but their activation scheme and the “Windows Genuine Advantage” is annoying.  I’ve had it bite me a few times for trivial things, especially with the OS.  It always defaults to the “You pirate, you stole this, or it was stolen on your behalf” instead of “oops, for some reason I cannot validate right now.”

When a governing body creates more laws, they only create more criminals.  In this case, Microsoft makes it harder for legitimate users to activate and use their product, therefor making them a pirate.  I remember one of the key people behind Galactic Civilizations at Stardock making a case for not putting such restrictions in their games for exactly that reason.  If you have some users who the restrictions fail for, then you force them to find a workaround (a crack), which only makes the cracks more available.

I seriously doubt Microsoft has made any dent in the overseas pirating of their operating systems.  That is where they have the biggest hit in pirates.  Instead they force us, their legitimate users to give up our simple liberties with their software in the name of greater security.  All for naught.

</rant>

Differences in desktop VMWare versions

Wednesday, October 17th, 2007

As a developer, VMWare provides a great way to test your software and version control your entire development environment. You can do it for free too.

Version controlling your client requires just installing Delphi in VMWare and doing your development in the VM. Then when you have a release you backup the entire VM and move forward, able to change your packages, libraries and components without fear. Then if you need to go back and make a one off on the previous release you can go back to that backup and everything is setup just as you left it. Naturally you keep your source code in a version control system with the versions marked and forked correctly.

Technically VMWare claims to have 2 desktop versions: VMWare Workstation (their desktop powerhouse) and VMWare Player (their free version), but their base VMWare server is very similar to VMWare Workstation and is also free. I’ve always just used VMWare Workstation, which is what I recommend if you have the choice. But if you are on a budget, or want the latest version without upgrading (what happened to me) then here is a feature matrix of the differences for your reference:

Version Make new Snapshots Multiprocessor VM’s Drag & drop* Price
Workstation Full Multiple and forks 1 or 2 CPU (if host supports) Between host and guest $189
Player No, w/ limited editing None* Yes, but can’t change Same as Workstation Free
Server Full Single Snapshots Same as workstation No drag and drop Free
  • Drag and drop requires VMWare Tools to be installed.
  • While player has no Snapshots, you can always backup the whole VM.
  • Server has the added bonus of connecting to a VM on a remote VMWare server or locally.
  • Only Workstation has multi-monitor support.
  • Server and Workstation have a nice quick switch view for running multiple VM’s at once.

For development, VMWare Workstation is really the best. It has a number of other features not even listed here, like video capture of the screen. There are a lot of other features in common on all three too.

One last tip: If you can, get the Volume License version of Windows XP to install inside your VM since it does not require activation or reactivation.  What an annoying feature of XP – make a change to the VM and it comes up telling you that you software is now illegal and no longer works.  I believe the Volume License version of the Enterprise edition of Vista also circumvents the activation hurdle, although with 120 day evaluation, that isn’t such a big deal.

Are there other differences I am missing?

MREWS and Threading in the Night

Monday, October 8th, 2007

So I wanted to look up what exactly MREWS is (I had a vague idea) and found this great resource: Multithreading – The Delphi Way by Martin Harvey version 1.1.

The introduction states:

This guide is intended for anyone who is interested in improving performance and responsiveness in their Delphi applications by using threads. It covers a range of topics from absolute beginner to intermediate level, and some of the real world examples raise issues bordering on the advanced. It assumes that the reader has a reasonable knowledge of Object Pascal programming, including simple object orientation, and a working understanding of event based programming.

A lot of really good information on threading there, and Chapter 11 even covers MREWS. Despite being last updated in 2000, I would say it is still a good reference.

It would appear that Martin Harvey originally published his paper elsewhere, but then the original site went down. Now it is mirrored on another server.