2007-05-25

Testing Windows Live Writer...

And no, I haven't forgotten about Part 3 of Delphi 2007 in a Radical Build! :)

I've been a bit overwhelmed in some work and non-work issues, but I'll get back to it in a couple days. I also have another interesting post on using Delphi to develop Office Add-ins in a very easy way, so those two posts will be available in a few days, start of next week at most.

As the title says, I'm writing this post using Windows Live Writer, after seeing it mentioned in this blog post from Steve Trefethen.

Also, for no good reason other than test Windows Live Writer, here's a picture of my 6 month old daughter...

That's all for now, but stay tuned...

2007-05-15

Well done JD!!

Well, I don't know if he's the one to credit for, but it certainly is a very nice change!
In this CodeGear article that presents a new product that, and I quote:
... is currently scheduled to be available as a CodeGear product in the second half of 2007

This is indeed a very nice change from the usual silence! Not that I care the least for Ruby, but it certainly opens the door to more "future looking statements"!!

Well done Jim Douglas! You're showing that you are indeed listening to customers!

And thanks to Serge Dosyukov for bringing this to our attention!

2007-05-11

To help or not to Help

Well, I've been cutting CodeGear some slack as promised, but it's now almost 2 (two!) months since Delphi 2007 is out and there are a couple things still missing... Not counting quite a few new bugs introduced in Delphi 2007 and the number of bugs (not so easy to query) that were reported against previous versions and are still present in Delphi 2007, there are two major issues that I still have with Delphi 2007:

1) (not so) Improved help, even using this hack, is a major drawback, not so much to my current work, but to the type of work I'm trying to perform on QC by helping testing/sorting out bug reports. Having to fight with the help system to get the correct definitions for things as basic as virtual, class, type, strict and more, just so I can be sure if something being reported is indeed a bug or if it's working as designed, does considerably lengthen the amount of time I need to spend on QC bug reports... I'm currently in the middle of one such fight that led me to blog a bit about this...

2) Lack of a decent backup solution and a decent installer for all those people like myself that didn't think of purchasing the Media Kit; sure, I've hacked it a bit by now, but I'd rather simply set a virtual drive to the ISO image (something that only those who do purchase the DVD get to download, go figure!), and install from there, rather than having to copy the install cache to the proper place to prevent it from re-downloading all again.

I just hope that CodeGear's way of fixing D2007 is not just wait until BDS 2007 is out and force users to move to that product to get the long promised improved help... For those thinking of criticizing this last comment, how can one not think that when they won't say a word about what's going on, be that due to SOX or to whatever?... No fixes, no word out, and two months are gone in a couple days...

I've said it before, but I'll say it again: a fix a month that targets one major issue is way better then waiting 6 or more months for a huge fix... And, of course, the worst part of all this wait is that we have no feedback on whether those fixes are a day or a year ahead... :(

2007-05-08

Tweak away

I'm a tweaker! I know that there may be some cures around for it, but I simply don't want to be cured! :)

I hate bloated software and what it does to Windows' Registry, so, whenever I get a chance, I tweak some program to my liking. The last tweaked one was Acrobat Reader 7.0.9.

Now, what exactly do I tweak and what for?

Well, I hate having to install a gazillion programs just to be able to do my normal work, so I've created a D:\Utils folder where I keep many such utils in such a way as not to require installation.

At most, a .reg file to run to register some file extensions or a batch file to regsvr32 some dlls (actually, I have both as part of my setup process that I update whenever I add a new utility that requires some of that work).

Why?
  1. It's way faster than installing it all! Just restore that folder, run a reg and a batch file and they're all easily accessible!
  2. My computer never ran faster with so much less registry/installer trash in it! It even shutdowns faster than my father-in-law's brand new Vista laptop suspends and my computer is 2 years old!
  3. I use an alternative menu, I simply add that menu in a few seconds and they're all ready to use. You can see 3 things in the images below: my current D:\Utils folder, my menu and the files that make up the menu.
Here's how it's all done:

I have 2 folders: D:\Utils which has some subfolders for those utils that have plenty of files and a Misc folder for those 1 or 2 file utils; D:\Menu, where I keep the menu shortcuts to access those programs and some other programs that I have to install such as Outlook, Word or Delphi!

The D:\Menu folder is actually just a bunch of shortcuts, named in such a way as to have all the options starting with a different character. It also has subfolders that I customize and change the icon so as to be more clear what they have inside. Then, by simply having those two folders on my D: drive, all I need to do is right-click on the taskbar, select Toolbars->New Toolbar... and browse for the D:\Menu folder. Reposition/resize so as to be so small that not a single icon shows and in a way that it's to the right of the Start Menu and presto: an easy to access menu, either by mouse or, as I most use it, by keyboard...

Keyboard access is easy: Windows Key, Tab (that's not Win+TAB, but two separate key presses: Windows Key opens up the Start menu, TAB tabs away to the next item which is my menu. For instance, Win, Tab, P (for programming), D (for Delphi).

[EDIT]: Apparently, for Win, Tab to work it requires the XP start menu: it doesn't work with Classic Start Menu. It doesn't require themes though, so either themes or no themes as long as you use the XP menu (2 column) pressing Win then Tab will open the menu...

And there you go: after a format, and a couple clicks, I have all those utils shown below and many more on the Misc folder, ready to be used.

Now onto today's tweak which is what led me to start this post! :)

After trying to tweak Acrobat 8 into working in my D:\Utils, I decided to give up and go for an older one. 8 relies too much on MSI features and insists on re-installing files that I don't want there! Plus, there's nothing really useful in it. Also, I must add that I don't read PDFs inside any of the browsers: with all security flaws constantly showing up, it's safer to download it and read it off-line. So, how does one set up Acrobat 7 in a way that it doesn't require installation?

Easy!

Start by downloading it (Acrobat 7.0.9)

Then, using a VM (or a trash computer or even your own if you don't mind the registry trash that installing/uninstalling will leave behind!), install it.

Then, go to %programfiles%\Adobe and copy the Acrobat 7.0 folder. You can also copy the %windir%\Installer\{AC76BA86-7AD7-1033-7B44-A70900000002} folder if you want some of the extra icons but it's not really required. If you installed on your own machine, uninstall and reboot.

Now put the saved folder in it's final destination (in my case, I placed it in D:\Utils and renamed it to just Acrobat) and let's trim away some needless stuff:
  1. Delete the following subfolders:
    1. ActiveX
    2. Esl
    3. Resource
    4. Setup Files
  2. Move all the files/folders inside Reader\Plug_ins into Reader\Optional (you may want to keep just Search.api and Search5.api). If you later find that some functionality such as signing or form filling is needed, you can go back to the optional folder and move those back to the plug_ins. Not having them there makes Acrobat fly when starting even without resorting to pre-loading the DLL files on startup as done by reader_sl.exe on a default install.
  3. You can also safely delete Reader\reader_sl.exe and Reader\AdobeUpdateManager.exe
Now, just double click a PDF file and browse to the Reader\AcroRd32.exe file and select to use that as the default. You'll accept the license and you can then go to the File Types (Tools->Folder Options in Explorer) and select Advanced and change the icon to another one of your liking.

If you save the following registry keys, you can later, on a subsequent installation just run that reg file and have it ready to go:
HKEY_CLASSES_ROOT\.pdf
HKEY_CLASSES_ROOT\pdf_auto_file

Saving HKEY_CURRENT_USER\Software\Adobe\Acrobat Reader\7.0 will allow you to have your options ready as you like, but save only after you set them! :)

Just export those, add to your master_reg file and next time you waste no time setting those up.

BTW: in case you're wandering how the 3rd screen-shot only shows my D:\Menu folder and nothing else: "explorer /root,D:\Menu\"




EDIT: One final tweak... Removing the ADS from Acrobat Reader 7...

Use regedit or add this to your master_reg file:

[HKEY_CURRENT_USER\Software\Adobe\Acrobat Reader\7.0\AdsInReader]
"bShowAds"=dword:00000000

2007-05-01

Delphi 2007 in a RADical build - Part 2

After a sour harm and a rough weekend, here's part 2 of 4 in setting up your Delphi RADical Build.

In this part, we will configure the OS inside the VM to make it start/shutdown faster, require less memory and less CPU. This will shorten the time needed to get your dev environment up and running, even if for normal usage you can simply suspend it between usages which will make it restore faster when needed.

Option: Disabling Shutdown Event Tracker
Why...: Make it shutdown faster and unattended
How...: Run Group Policy Editor (start->run->gpedit.msc)
Browse to "Computer Configuration"->"Administrative Templates"->"System"
Double-click Display Shutdown Event Tracker from the System Setting list
Select the Disabled option button
Click OK and close Group Policy Editor

Option: Set a fixed-size Swap file
Why...: Avoid needless fragmentation of the swap file
How...: Right-Click My Computer, Properties, Advanced, Performance, Settings, Advanced, Virtual Memory, Change
If you allocated less than 1 GB of RAM to your VM, use a value equal to twice the allocated amount, otherwise you can use a smaller value.

Option: Modify performance settings
Why...: A server OS will default to give preference to services instead of applications.
How...: Right-Click My Computer, Properties, Advanced, Performance, Settings, Advanced
Select "Programs" in both options shown.

Option: Adjust Visual Effects
Why...: Not really needed for a dev machine and slow things down
How...: Right-Click My Computer, Properties, Advanced, Performance, Settings, Visual Settings
I disable all except "Show shadows under mouse pointer" as that one does improve the pointer a bit. If you absolutely like some other option, just leave it in.

Option: Disable Automatic Updates
Why...: Since we'll be reverting to a clean state on shutdown, it's pointless to have it auto-update
How...: Right-Click My Computer, Properties, Automatic Updates
Un-check the "Keep my computer..."
In part 1 (http://memyselfanddelphi.blogspot.com/2007/04/delphi-2007-in-radical-build-part-1.html), you should have already installed the critical updates, so your system won't be that outdated.

Option: Disable Memory Dump creation
Why...: Defaults to the same size of your memory, and for the most part is useless
How...: Right-Click My Computer, Properties, Advanced, Startup and Recovery
Select "None" on the bottom in the "Write debugging information" section.
You may also unselect "Automatically restart" (so you can see what's happening) and "Send an Administrative Alert".

Option: Disable Password Expiration
Why...: Pointless to change password when you revert to snapshot on shutdown
How...: Run Group Policy Editor (start->run->gpedit.msc)
Navigate to "Computer Configuration"->"Windows Settings"->"Security Settings"->"Account Policies"->"Password Policy"
Set "Maximum password age" to 0.

Option: Cut down on active services
Why...: Many services serve no use for a dev VM, so just keep the following.
How...: Using Service Manager, just set all non-essential services that are started and set to automatic to disabled. The following is the list of started services on my VM: it's a semi-conservative list where I leave some things enabled such as "Shell H/W Detection", that can be disabled afterwards before creating the snapshot.
Disable all started services except the following ones:
  • COM+ Event System
  • Cryptographic Services
  • DHCP Client
  • DNS Client
  • Event Log
  • HTTP SSL
  • IIS Admin Service
  • IPSEC Services
  • Logical Disk Manager
  • Network Connections
  • Network Location Awareness (NLA)
  • Plug and Play
  • Print Spooler
  • Protected Storage
  • Remote Procedure Call (RPC)
  • SBCore Service
  • Secondary Logon
  • Security Accounts Manager
  • Server
  • Shell Hardware Detection
  • Simple Mail Transfer Protocol (SMTP)
  • System Event Notification
  • TCP/IP NetBIOS Helper
  • VMware Tools Service
  • Windows Management Instrumentation
  • Workstation
  • World Wide Web Publishing Service
Option: Enabling AutoLogon
Why...: Make it start faster and unattended
How...: You can either edit the registry directly or use TweakUI (http://www.microsoft.com/windowsxp/downloads/powertoys/xppowertoys.mspx)
Using TweakUI is as simple as selecting Logon->Autologon.
You can also directly edit the registry, but there's no good reason for that: even if you don't want to install TweakUI, you only need to copy the .EXE from another installation to your VM and run it there: it does not need any support files or configuration.
Note: with server OSes, it appears to only work for "next" logon instead of "all" logons. Since I'm kind of uninspired to search for more info, you can simply do this step as the last step before creating a snapshot of the working VM. Then, whenever it shutdowns and reverts to snapshot, next start up will work just fine. If I find the inspiration to do the right searches and find some more info, I'll update this post.

This is about everything I do to cleanup my dev VM.

Next part, 3 of 4, will be about setting up Subversion and the continuous build, plus some examples of how to start using it.