Monthly Archive for July, 2006

Isola Del Giglio

To all of our friends enjoying the Italian summer:

The GF and I are sorry we are not able to join you this year but trust you are enjoying the warm waters, great food, and excellent wine!

Isola Del Giglio (postcard)

Thanks B&A for the post card! We are looking forward to plenty of photographs when you return. :)

Skype 2.5 Video Issues

If you are experiencing video problems with Skype 2.5 software then make sure to check out the Skype Forum for the details on how to resolve the issue.

After upgrading to 2.5 I started seeing erratic behavior where video would sometimes not work incoming or outgoing. In my case, I was having issues where no one was able to see my video any more. Turns out that I was using the latest Direct X 9.0c software but others were not. After having all users upgrade to Direct X 9.0c everything started working again.

To check if you have Direct X 9.0c installed, go to the Start Menu and click on Run… Then type “dxdiag” and hit enter. You will be presented with this screen (I have marked the version field in red):

Direct X Dialog (screenshot)

You can download and install the latest Direct X drivers here.

Syndication Errors Fixed

Feed Validator (screenshot)

It seems that the default WordPress configuration for generating RSS 2.0 feeds is bogus. This is the case for both the entry and comment feeds. However, I fixed my feeds by editing the following files for WordPress:

  • wp-rss2.php (responsible for generating the RSS 2.0 entry feed) - I commented out the two content:encoded statements. I have failed to find any adequate documentation as to why one needs to use a content:encoded element in addition to the description element. The RSS 2.0 Specification does not say anything about a content:encoded element so I opted to just use the description element per specification. Details shown here:
    wp-rss2.php (screenshot)
  • wp-commentsrss2.php (responsible for generating the RSS 2.0 Comments feed) - The code suffered the same fate with the content:encoded element mentioned above. Details shown here:
    wp-commentsrss2.php (screenshot)

Applying these fixes resulted in valid RSS feeds. I no longer see any errors when using the Feed Validator or when using Feed Demon to read the feeds.

java.lang.ProcessBuilder

Lately I have been improving the way I handle the launching of processes on various operating system, namely Windows and UNIX based operating systems. The following is my experience with the handling of proper process launching in Java.

Originally, I was using the java.lang.Runtime class but found that the java.lang.ProcessBuilder class is better. It provides added API that you don’t get with the Runtime class especially when it comes to setting up the executable, current working directory, and most importantly the system environment. Regardless, of what you use, the key is to obtain the system environment so you can manipulate it appropriately. Assuming you already had a ProcessBuilder object called “pb”, the code to obtain the environment is fairly simple:

Map env = pb.environment();

With the environment in hand you can perform many of the natural mapping functions on it. While this is great, you don’t get much control over the map, unfortunately. For example, wouldn’t it be nice to control the order of objects you put in the map or even take out? Nope, not allowed. In fact, when tracing in the debugger, you’ll see random behavior of objects being added to the map. This is unfortunate because let’s say you want the environment to be set up as follows:

APPS_HOME=c:/apps
JAVA_HOME=%APPS_HOME%/java
ANT_HOME=%APPS_HOME%/ant
PATH=%PATH%;%JAVA_HOME%/bin;%ANT_HOME%/bin

Well, you might end up with something like this when the enviroment actually gets used in execution:

JAVA_HOME=%APPS_HOME%/java
ANT_HOME=%APPS_HOME%/ant
APPS_HOME=c:/apps
PATH=%PATH%;%JAVA_HOME%/bin;%ANT_HOME%/bin

Obviously, as shown above, it doesn’t help to have the apps home set AFTER the keys that require it to be set first. The best solution is to ensure that all environment keys being set are purely independent (more on this later). Interestingly, the PATH key always appears last which is very handy as it guarantees that previously defined keys will be picked up properly (if being used in the PATH value).

OK, so that handles the problem of key order and resolution but not entirely. Why? Well, depends on how you want to add new key=value pairs to the environment. In my case, I opted to use XML to define my environment which could then be consumed by my Java code to create the environment I need for launching. The syntax of the XML is simple as I just define an element that accepts key and value attributes. The syntax for value attributes uses the Windows batch script syntax (as shown in the examples above). When it comes to Unix operating systems, a simple algorithm replaces the %% with ${} and semi-colons (;) with colons (:). So, for example, the example shown above written in UNIX syntax is:

APPS_HOME=c:/apps
JAVA_HOME=${APPS_HOME}/java
ANT_HOME=${APPS_HOME}/ant
PATH=${PATH}:${JAVA_HOME}/bin:${ANT_HOME}/bin

Of course, you wouldn’t be using Windows directories on a UNIX system but that is not the point of the example above. Other considerations to take into account prior to launching processes in Java:

  1. Make sure the executable path is quoted when launching on Windows systems to handle directories with spaces or special characters.
  2. When adding key=value pairs where the value references another key, make sure you replace all key references with their actual values. This is important when you are pulling in environments that reference previously defined environments (as mentioned earlier when using XML definitions). The reason is that you can’t expect the system enviornment to do this resolution for you, you must do it beforehand.
  3. Don’t use case checking with environment keys. Let Path = PATH. In other words, if the system enviroment uses “Path” but you define it as “PATH” then let Path=PATH. Otherwise you’ll get multiple entries in your environment and more than likely pick up the wrong values.

Bookmark Icons

Introduction

This post explains how to customize the icons of your web site and RSS feeds. Most web browsers support web sites that use customized icons to represent their sites. In Firefox, it is a blue ribbon (Firefox (bookmark icon)) and for Internet Explorer it is a page with a blue ‘e’ on it (Internet Explorer (bookmark icon)). Here are the details:

Icon Specifications

For Firefox or Internet Explorer you just need an .ico file with the following specifications:

  • 16 x 16 pixels in size.
  • The .ico file must be in Windows32 format. Using 256 colors (8-bit) seemed to work fine for me.
  • File must be named favicon.ico.
  • The favicon.ico file must be located in your web root. For example, if your domain is http://www.foo.com then your full icon path would be: http://www.foo.com/favicon.ico.

For RSS 2.0 feeds, you just need the following:

  • Image must be in .jpg, .png, or .gif format.
  • Maximum size must not be greater than 114 x 400 pixels.

Examples

In truth, you can name your .ico file anything and have it located anywhere on your web server. However, it has been my experience to not deviate from the specs or you might have browser and feed reader issues. Here is the HTML code to use for all pages:

Bookmark Icon (HTML code)

In order to create the .ico file, I used SnagIt since the SnagIt Editor that comes with the program allows for the saving of images as .ico files. For my RSS feed, I simply created a .gif file of the same image used for my .ico file. Then I added the following code to my RSS feed (since I am using WordPress, I added this to the wp-rss2.php file):

Bookmark Icon (RSS code)

The problem with this is that my FeedDemon RSS reader does not seem to make use of the .gif file in my RSS feed but uses the favicon.ico in the web root of my web site instead. Not sure why this is but it is something to be considered.

Notes

Be patient when testing your newly built icons. I noticed that in both Firefox and IE that it took some time for the browsers to update the icon associated with the bookmark.

When creating .ico files, make sure to drag and drop them in your browser to see if they load properly. Behavior between what you see in your file explorer can differ than what is really being shown in your browser.

Resources

I found these sites to be helpful when figuring out how to make my own icon.

Firefox Extension Updates

Added the following to my Firefox page:

  • Firefox Extension Backup Extension (FEBE) - The ultimate backup tool for Firefox. Allows one to backup (or restore) all installed extensions, bookmarks, preferences, etc. You can customize it how you like. Great for maintaining the same configuration across multiple machines as well.
  • Compact Library Extension Organizer (CLEO) - Works in conjunction with FEBE by compacting all extensions and themes backed up by FEBE into one installable.

Blogger to WordPress Conversion

I have been using blogging software (i.e. Blogger) since November of 2005. Over the past couple of days I have been converting all Blogger posts to WordPress. This is why all recent activity on this site will appear a bit misleading since the date stamps are all within the last couple of days. I could have chosen to preserve the original date stamps but I opted not to. All original posts have now been categorized (something I could never do before). In addition, I have made proper pages out of some of the more lengthy posts. This allows for easier reference and proper updating of information on those pages (which is generally the case).

Conversion complete!

Remote Assistance

Ever have a situation where a family member or friend was in need of technical assistance but you were both located miles apart? Well, there are many software solutions for this problem but I’m going to talk about and walk through setting up Remote Assistance that comes default with Windows XP. The catch is that one must have a Passport account and you must use Windows Messenger.

Getting Started

  1. Ensure that both machines have Remote Assistance enabled. Do this by right clicking on your “My Computer” icon. Then select “Properties” from the pop-up menu and click on the “Remote” tab. Put a checkmark in “Allow Remote Assistance…”. Example:Remote Assistance (Remote)
  2. Click on the Advanced… button and use these settings (the defaults are too long IMO):Remote Assistance (Settings)
  3. Click the OK buttons to close down all dialogs.
  4. Next launch Windows Messenger from your Windows Start menu.
  5. Create a user account or use an existing one if you already have one (this, in affect, will create a Passport account for you as well). Do this for both machines.
  6. Have both users sign into Windows Messenger and add themselves as contacts for each. At this point you should be able to chat with each other without any issues.

NOTE: You might need to reboot both machines when enabling Remote Assistance for the first time.

Using Remote Assistance

  1. The user that needs assistance must initiate the connection. Do this staring a chat with the user (in this example: Aeonscope) who is going to help the user who needs assistance. As shown here:Remote Assistance (Start)
  2. After Aeonscope has accepted Remote Assistance, the user who needs assistance will see the following prompt and need to accept it (as outlined in red):Remote Assistance (Acceptence)
  3. At this point Aeonscope can see the other user’s screen. However, that is all that can be done. Should the Aeonscope user wish to take total control of the remote machine, all the Aeonscope user has to do is click the “Take Control” button from the main menu as shown here:Remote Assistance (Take Control)
  4. At this point the user in need of assistance will get the following prompt:Remote Assistance (Allow)

You will want to say yes to this prompt (as outlined in red above).

From this point forward the Aeonscope user has total control of the other user’s computer. When all assistance of the remote user’s machine is complete. One only needs to release control of the remote machine and then disconnect.

MP3 Management

Introduction

This post is for anyone managing their personal MP3 collections and in need of better tooling or information that you might or might not have already discovered.

Getting Started

Here is what I use:

iTunes

Love it or hate it, it is still a great tool for working with your MP3s. To understand why, lets look at all the features it provides.

First, take control of iTunes by clicking on Edit–>Preferences from the main menu and turn off all automatic updating settings. I personally do not like it when software tries to be too clever. The following is a series of iTunes preference dialog screenshots (at least those of interest) along with additional notes (starting from the left tab to the right tab and with my iPod connected):

General Tab

Nothing to note. The defaults are fine.

iPod Tab
iTunes Preferences (iPod Music)

As shown above, the Music sub-tab of the iPod tab is the most interesting. The podcast, photos, contacts, and calendars sub-tabs are nothing too special. You can either opt to manually manage or have iTunes manage those settings. If you have Microsoft Outlook, I can see setting your Contacts and Calendar to automatically update. Otherwise, you can leave it as a manual setting and manage it yourself especially if you have a Palm device. For information on working with your Palm device I recommend reading the iPod manual for more information.

Podcasts Tab

Nothing to note. The defaults are fine.

Playback Tab

Nothing to note. The defaults are fine.

Sharing Tab
iTunes Preferences (sharing)

I think there are better ways of doing this than leaving iTunes in control. For example, setting up your own server or using Windows shared folders (for in-home use only). Of course, this all assumes you know how to do that. If not, then you have iTunes, of course.

Store Tab

Nothing to note. The defaults are fine.

Advanced Tab
iTunes Preferences (Advanced)

There is a lot to say about this tab, so using the numbers in red in the screenshot above, here is the corresponding breakdown:

  1. I suggest creating a directory that has the sole purpose of being a dumping ground for where all new music is imported to. I would call this your “import folder”. This is not be considered your “iTunes Library” despite how iTunes would have it. I think your iTunes Library (a.k.a. MP3 collection) should be located in a different directory which you maintain yourself and which iTunes has no knowledge of. This allows you to import to one folder, correct any importing mistakes (yes, iTunes will make mistakes), and then move your corrections to the folder where your real MP3 collection resides. Read “iTunes Tips and Tricks” below for further information.
  2. This is very handy as it keeps your imports organized. The flaw with this is that when importing soundtracks or CDs with many artists involved, you might see a lot of directories by artists you might/might not be familiar with. The good news is that inside each artist folder is the name of the soundtrack (a.k.a. album). This is where you have to manually merge all the songs back into one album. Hence, #1 above.
  3. Unnecessary. As mentioned in #1 above, the iTunes library is really your “import folder”. Read “iTunes Tips and Tricks” below for further information.
  4. You do not want this. iTunes has a 40MB footprint. Check your Windows task manager to see what I mean. I suggest using Winamp instead (a 15MB footprint). Plus, with Winamp, you can have Skype automatically pause it when answering incoming calls.
  5. This might sound contradictive to #4 above but is handy when you are importing a lot of music at one time and don’t want your Windows taskbar to fill up.

The Importing sub-tab of the Advanced tab needs a few remarks as shown here:

iTunes Preferences (Advanced Importing)

Notice that I have the import setting as “custom”. Here are my custom settings:

iTunes (MP3 encoding)

An MP3, after all, is a compressed format so there will be degradation of the original CD recording. The default settings are to record at a flat rate of 128kbps. I suggest upping it to 192kbps for a slightly better import. This assumes that you do not mind eating up just a little more hard drive space. I also suggest using a medium VBR as shown above. Recording in stereo at 44.100kHz is fine. Going any higher is beyond what you get from your CD by default.

iTunes Tips and Tricks

With iTunes configured, here are a few tips and tricks to keep in mind. First, however, I want to clarify the concepts of the “import” and “mp3 collection” folders mentioned earlier:

  • Import Folder - This, by default, is what iTunes considers to be your “library” but it is really just a scratch folder for importing new music. This is where you can fix up your artist and album folder structures before moving them for permanent storage to your MP3 Collection Folder.
  • MP3 Collection Folder - This is where your “real” library is located. It is where you keep your entire MP3 collection for permanent storage.

With this in mind, it is easy to keep the iTunes library (a.k.a imports) clean:

iTunes (library)

Keeping the library clean, allows you to simply drag-and-drop an entire folder structure or song into the library at any time for fix up. Then you can delete the library view when finished so it is clean for your next import or song fix up. For example, lets say I want to fix the genre of the “Alhambra” album by The Tea Party. Here is what I would do:

  1. Make sure the library view (show above) is clean of all song content.
  2. Find the Alhambra album in your MP3 Collection and then drag-and-drop the entire folder on the library view. Doing so, yields the following where the genre is set as Alternative & Punk:
    iTunes (alhambra)
  3. Next I select all songs in the library view, right click, and select Get Info from the pop up menu which yields the following dialog (changing the genre to “Rock”):
    iTunes (get info)
  4. Next click OK and you’ll be returned to the library view with all songs changed from the original genre of Alternative & Punk to Rock instead:
    iTunes (alhambra changed)

That is it.

MP3 Tag Studio

While iTunes is very handy for importing new music, correcting song information, managing your MP3 collection, and syncing with your iPod, it can not handle some finer details of song editing. For example, some MP3s run on forever with no sound. There is no need to eat up unnecessary hard drive space so why not fix it? This is where MP3 Tag Studio is your one and only tool for correcting these kinds of things.

There is much that could be explained when using MP3 Tag Studio but I am only going to point out two very useful tools: Trim MP3 and Repair MP3.

Lets say that we want to trim the X-Files Theme Song (14 X-Files Theme.mp3) from the The X-Files: The Album movie soundtrack. The original recording is 14 minutes and 13 seconds long but the actual song is only 3 minutes and 25 seconds long. So to trim the MP3 just launch MP3 Tag Studio and browse to the folder where the MP3 file is located and trim it setting the trim settings for 3:25 at the end of the song. Like so:

MP3 Trim

Just hit the Cut! button and you are done.

Well, almost. Since my song was in VBR format, the MP3 header information still thinks the song is 14 minutes and 13 seconds long. We do not want that so we must repair the header information. To do this just click on the repair tab, select the song (if not already selected) and hit Execute! button using the settings as shown here:
MP3 Repair

That is it.

Conclusion

So spend less time managing your MP3 files and more time enjoying what you have.

Organizational Software

The following software programs can help capture thoughts and ideas in an organized manner for solving complex problems:

Both offer various ways of exporting captured content to other applications such as XML, PDF, HTML, etc.