Tuesday, September 23, 2008

Prepare your new PC for a long run

Summary: A few recommendations that can help you get the best out of a new PC.

You just brought home a new laptop (or desktop) and feel an urge to run your favorite programs or download stuff from the Internet. Before you put your hands on the keyboard, take a few minutes to learn how to configure your system for better performance, prepare it for a disaster, and avoid common problems. Here are some recommendations which can help you get the best out of your new PC.

Before connecting to the Internet, do the following:
  1. Complete Windows installation.
    When you first turn the computer on, it will prompt you to complete the Windows setup process, during which you will create a Windows login account, select the region, time zone, language, and define other configuration settings. When creating the login account, keep the blank password for now (the following steps will require you to reboot the system and log on to Windows several times, which will be easier to do with a blank password); you will define the password later. Do not activate Windows, yet, or register the computer (since you are not connected to the Internet, the activation/registration attempts will fail). Follow the setup wizard until you log on to Windows. [Note: You may have heard or read recommendations to replace Vista/Windows 7 with XP. Unless your PC has less than 1.5 GB of RAM, which, for some reason, you cannot upgrade (you can easily upgrade RAM to 2 GB for about $20-$30), downgrading the operating system to XP makes little, if any, sense. Most people who make these recommendations, either do not have much experience with Vista/Windows 7, or base their recommendations on earlier problems, such as software and driver incompatibilities, and many of these reported issues have been resolved. See The Mojave Experiment for some insight on this topic.]
  2. Create the repair disks.
    If your computer came without the operating system and/or repair (restoration) disks (which is most likely), you must create them yourself. Without the repair disks you will not be able to restore the system if your hard drive fails (hard drives are notoriously prone to failures). You may want to rebuild the system for other reasons, e.g. if your kids install a virus which you cannot remove, or the system becomes slow and nothing else you do improves its performance. Check your computer manual or the quick start guide for instructions on creating the repair disks (normally, there is a program that lets you create the disks). Keep the repair disks in a safe place.
  3. Enable Windows firewall.
    Windows Firewall blocks unwanted access to your computer. It is not the best firewall, but it's good enough, so unless you are using something else, make sure that Windows Firewall is turned on.
At this point, you are ready to connect your computer to the Internet. If you use a wireless router, configure the wireless settings to let your PC connect to the wireless network (make sure that your wireless network is secure); otherwise, connect the network cable to the network port on your PC. After connecting your computer to the Internet, perform these tasks:
  1. Get Windows updates.
    Although your PC is new, it's probably missing the latest Windows Updates and therefore more susceptible to virus infections and other exploits. Before you start browsing the Internet, install the latest Windows updates.
  2. Uninstall crapware.
    New computers, especially the cheaper ones, come filled with crapware that a typical user does not need. These include trial versions of software that you will not purchase, toolbars that you will not use, applications that have better free alternatives, and programs that slow down your system (see the list of common crapware). The free PC Decrapifier tool can help you remove most crapware from your PC.
  3. Install anti-virus software.
    Most new PCs come with a preinstalled anti-virus application (normally, Norton or McAfee). Keep in mind that, unless you purchase a license, these trial versions will stop working after 1-3 months. If you do not intend to purchase a license for the pre-installed anti-virus, uninstall it and get a free alternative, such as Avast Home Edition, AVG Free Edition, or Avira AntiVir Personal Edition. I'm not sure about AVG and AntiVir, but I have been using Avast on my home PCs for a few years and have no complaints (if you use Avast, make sure that you register it with a valid registration code, which you should get via e-mail; otherwise, it'll stop working after one month). UPDATE: For a free anti-virus software, I now wholeheartedly recommend Microsoft Security Essentials (read why).
  4. Change your Windows login password.
    If your Windows login password is blank, change it to a strong password (use Password checker to test password strength). If you leave your login account with a blank password and someone steals your computer (or gets access to it), s/he may be able to read your sensitive documents, access your online bank accounts, steal your secrets, and do other damage. If your computer supports hard drive passwords, it may be a good idea to set up one, too (hard drive password can be defined via the BIOS settings).
  5. Install your favorite programs.
    Reboot your system and install your favorite programs. Keep in mind that some older programs fail to install on Windows Vista/Windows 7. You may be able to find a workaround, get/buy a newer version of the program, or switch to an alternative. For example, if you have trouble installing Microsoft Office 2003 on Vista/Windows 7, try these workarounds (see post by Dominic), but if it does not help, check free alternatives, such as Open Office (another option is to get Microsoft Office Home and Student 2007 for around $100). You may be surprised how many excellent programs are available for free (see my free software recommendations).
  6. Register your computer.
    There is no rush to do this, but when you get a chance, register your computer with the manufacturer, so you can get support. You should be able to register the system directly on the manufacturer's web site, or using a built-in registration program (if it is installed by the manufacturer). If you haven't done so, registered your other hardware devices: printer, router, etc.
  7. Activate Windows.
    Follow the Windows activation procedure (Windows activation must be completed within 30 days after installation).
Once you get your new PC running, perform the following steps every few months or so:
  1. Check Windows updates.
    Make sure your system is patched with the latest Windows updates.
  2. Check anti-virus software updates.
    Keep an eye on your anti-virus software to make sure that updates the virus database.
  3. Remove unnecessary programs from the startup list.
    Check if the Windows startup program list contains any applications that don't need to start up automatically, and if so, block them (do you really need Skype to run all the time?). Some programs allow you to remove themselves from the startup sequence; for others, use the System Configuration utility.
  4. Defragment the hard drive
    A fragmented hard drive can significantly slow down your system. Use the built-in Windows Defragmenter (if your disk is badly defragmented, you may need to run Windows Defragmenter a couple of times) or a better alternative, such as Smart Defrag, UlimateDefrag, Defraggler, Ultra Defragmenter, or some other defragmenting tool to defragment the disk. Before defragmenting the drive, it is a good idea to delete unnecessary files using Disk Cleanup.
  5. Install the latest firmware updates.
    If your PC runs smoothly, you do not need to worry about this, but if it crashes or causes problems, which cannot be solved by regular software updates, check if updates to the system BIOS and drivers (video/audio/network/wireless/etc) are available from the PC manufacturer. You can get updates directly from the manufacturer's web site, or via a built-in program (if your computer comes with one).
Finally, a couple of tips, which can extend the life of your PC (these mostly apply to laptops):
  1. Use laptop cooler.
    Overheating (which is more common in laptops that one may wish) can cause anything from performance degradation to hardware failure (motherboards are especially prone to failures caused by overheating). To prevent your laptop from overheating, invest $10-$20 in a notebook cooler.
  2. Do not carry a running notebook.
    If you carry a running laptop from one place to another, you are increasing the chances of the hard drive failure. Unless you wish to spend $100 or so on a new hard drive, before moving the notebook, switch it to a sleep mode (it takes just a couple of seconds to turn the system to and from the sleep mode).
Okay, don't go, yet: here is one more piece of advice. While you're enjoying your new PC, keep in mind that sooner or later, you may need to replace it with something else. To make your next PC replacement easier, address the data migration strategy now (by data migration I mean the process of moving your data -- such as documents, photos, music files, Internet bookmarks, e-mail messages, and so on -- from one system to another). A common recommendation is to perform frequent backups using an external hard drive or an online backup service such as Mozy. In addition to backups, you can use other strategies. One option is to keep your important files online. For example, you can store your photos at photo sharing sites, such as Flickr and Picasa. Your office documents can go to Microsoft Office Live Workspace or one of the file hosting services, such as Adrive, SkyDrive, or Box.net (file hosting sites can be used for storing not only office documents, but other files, too). You may also consider moving from the desktop-based office suite, such as Microsoft Office or Open Office, to a web-based office suite, such as Zoho, Google Docs, or ThinkFree. There are many file synchronization services that can make your files available for easy migration, such as Dropbox, Microsoft's Live Mesh and FolderShare, Syncplicity, or SugarSync. You can use one of these file synchronization programs to back up (or synchronize between multiple computers) your Internet Explorer favorites. Firefox users can greatly benefit from the Foxmarks Bookmark Synchronizer. Or you can use a social bookmarking service, such as Delicious (or one of these), which has certain advantages over traditional bookmarks. For e-mail, I always recommend GMail because it is free, offers lots of space, can be used with most e-mail client programs (such as Microsoft Outlook), and it is the only service which allows you to redirect your e-mail to any other e-mail account for free (Hotmail only supports redirection to Microsoft-hosted e-mail services, while Yahoo!'s e-mail forwarding feature is not free). I haven't figured out where to keep my music (MP3) files, yet; most services, such as Imeem and Deezer, allow you to upload and listen audio files, but I cannot find an option to download my own files from these services (if you have any recommendations, please leave a comment).

UPDATE: For additional recommendations, see the Managing files and personal information online post.

Additional references:
How to set up a new PC in one easy session
10 things you should do to a new PC before surfing the Web
Things to do first on your brand new PC
First ten things to do with your new computer
10 things you should do to every Windows PC
MUO Polls: Do you Backup Important Files? How?
Reinstall Windows and outfit your system with all freeware programs

Friday, September 19, 2008

More fun with Yahoo! Pipes

Summary: A few advanced techniques for building Yahoo! Pipes.

In the previous post, I explained how to use Yahoo! Pipes for monitoring hot deals. In this post, I'll cover several techniques which can help you get the best out of your pipes.

Before I get to the the good parts, let me share a couple of problems, which I discovered. Understanding these issues can help you avoid some frustration.

Problem #1: Changes appear not to be saved.
If you create a new pipe (or make changes to the existing pipe), save the pipe, and then try to run it (or open it for edit), you may get an error saying that the pipe was deleted. If you re-open the My Pipes page, the new pipes may be missing, and if you open a modified pipe in the editor, you may not see the changes you just made. Don't panic, yet: your new pipes (or modifications) are there. Just refresh the page until the error message goes away (you will need to refresh the page a few times). I'm not sure what causes the problem, but to me it looks like there is a synchronization issue on the Yahoo! side (maybe your changes are saved in one database, but when you switch a page, you hit a different server to which your changes have not been replicated). After a couple of hours the problem will go away and you will not see the errors. I reported this problem to Yahoo! (and others did too), so hopefully, it will be fixed (no word on this, yet).

Problem #2: RSS reader is slow to report new posts.
I do not know if it affects all RSS readers, but I saw this problem on Bloglines, as well as Google Reader: matching posts returned by your pipes may appear in the RSS reader several hours after they have been posted in the original feed. This is not a big deal for regular posts (like your favorite blog subscriptions), but if you want to be notified about a product returned by your pipe faster, you may want to use the pipes' built-in notification mechanisms instead of relying on the RSS reader.

Update: A few weeks ago, Bloglines stopped retrieving RSS posts from almost all of my Yahoo! Pipes. Due to multiple issues with Bloglines (also reported by others), I no longer recommend using it (I switched to Google Reader).
And now, the good stuff.

Hint #1: Reuse your pipes.
Say, you want to build several pipes with something in common. Instead of duplicating the common functionality in every pipe, you can build a special pipe containing the shared logic, and then pick this pipe as any other module from the module library (you will find your pipe under the My pipes heading in the library panel of the editor). For example, I created the following pipe defining the input sources and transformation rules for all of my shopping-related pipes:


My other pipes use this pipe as input, and apply additional filters to specify pipe-specific conditions. Now, if I find a better way to define input sources and transformation rules, I just need to change one pipe and all pipes that use it will pick up the modifications automatically.

Hint #2: Use regular expressions for more precise matches.
Say, you are shopping for a ring, so you define a filter with the following rule:
item.title contains ring
What you may not realize is that this pipe will return posts with titles containing the following words: spring, boring, ringtones, and so on. To make sure that your filter finds exact matches of the whole word ring, instead of the Contains condition, use Matches regex.

Tips: For non-programmers: Regex stands for regular expression, which is a sophisticated mechanism for finding (and replacing) more complex matches. For programmers: In case you wonder, Yahoo! Pipes use the Perl-like regular expression syntax with certain caveats. For example, to look for case-insensitive matches, you need to prefix the search string with (?i) (I thought it would be /text/i). For all: Here are some great resources for learning, building, and testing regular expressions:And this is some informations specific to Yahoo! Pipes:
To search for the exact word match, you need to use the following pattern:
(?i)\Wtext\W
As you may have noticed the \W tokens surrounding the search string specify the word boundaries, while (?i) indicates case-insensitive search. Here is an example of the search filter one may use for baby-related products (notice that it uses another pipe as input):


Once you get a grip on regular expressions (if you are so inclined), you will be able to build more efficient filters, but in the meantime, the information I provided should get you one step past the novice. If you stumble upon a problem you cannot solve, check the Message Boards for Pipes (this is where I found how to implement case-insensitive search).

Additional references:
Yahoo! Pipes Documentation
Yahoo! Pipes Tutorials

Sunday, August 31, 2008

RSS tools for smart shoppers

Summary: How technology can help frugal shoppers find good bargains.

Today's bargain hunters have many tools at their disposal:Unfortunately, these services are not very helpful when you're (a) looking for the best bargain (or, at least, a good one) on a particular product and (b) not in a rush to buy.

Ideally, the above-mentioned scenario should be addressed by a service, which would let you enter the product (either the exact model, such as Garmin Nuvi 360, or a range of products meeting certain criteria, such as GPS device), and notify you when this product becomes available at the price you set (or at a significant discount). Alas, this service does not exist, so while waiting for geeks and venture capitalists to get their act together [and if someone is interested, please give me a call], let me explain how to achieve similar results with the help of already available tools.

When hunting for bargains on a particular product or type of product (laptop, printer cartridge, HDTV, diapers, baby products, or whatever), the following services will let you save time, effort, and money (if you're not familiar with these, don't worry: I'll explain what they do and how to use them shortly):
  1. RSS reader
  2. RSS feed from you favorite deals alert aggregator and/or discount shopping site
  3. Yahoo! Pipes
Before I show how to put these services together, let me briefly explain what each of them does (if you already know this, skip the next two sections).

RSS feeds allow you to easily access frequently changing contents of the web sites, such as blogs, forums, news, and, in our case, shopping-specific posts. [In addition to RSS, you may also encounter subscriptions to Atom feeds. Atom is a subscription format similar to RSS, so I use the term RSS to refer to both.] RSS feeds are available via subscription links most often marked with the RSS icon, such as this one: RSS/Atom feed. To get a better understanding of RSS, watch this short (less than 4 min) video:


As the video explains, to access the contents of a web site via an RSS feed, you should use an RSS reader (or RSS aggregator). Bloglines Google Reader Feedly is my favorite web-based RSS reader, but you may prefer a desktop-based FeedDemon (for a very brief overview of Google Reader, watch this one-minute video [UPDATE: Google Reader is dead, but the idea can be applied to any RSS reader]):


For a list of other RSS readers see Wikipedia.

Now, that you know how to read RSS feeds in the RSS reader of your choice (I assume that by this point you've picked one), you can subscribe to RSS feeds from your favorite shopping sites (see links above), but don't do this, yet (or you will risk spending most of your day catching up with the subscription posts). To save time and effort, you should filter posts returned from these feeds by the type of product you're interested in, and this is where Yahoo! Pipes comes in.

Yahoo! Pipes is a free service, which lets you combine and apply filters to one or more RSS feeds. The resulting feed will return only posts matching your criteria. Once you define a pipe, you can receive notifications of the new posts via an RSS reader, e-mail, or phone. To understand the basics of Yahoo! Pipes, see this four-minute Yahoo! video:


So how do you use Yahoo! Pipes to search for bargains? You have a couple of options: you can use a pipe built by someone else, or you can build your own.

Option 1. Use someone else's pipe.
While writing this post, I discovered that other people already built shopping-oriented pipes. For example, Shiva Hothu made two pipes to search for hot deals. Both pipes let you specify up to three search filters, and each filter accepts one or more words. The pipe will scan the most popular hot deals sites looking for the posts matching your criteria (it will look for the exact match of all text entries defined in each filter). There is one difference between these pipes: the first pipe will scan the complete posts' descriptions, while the second pipe will only look at the posts' titles. You can access these pipes here:When you open the pipe's page, enter the search filters, and run the pipe. For example, if you are shopping for a 46-inch LCD HDTV, you can define the following search criteria:
Filter 1: 46
Filter 2: LCD
Filter 3: HDTV
After running the pipe, you will see the list of matching hot deals. At this point, you can do various things with the customized pipe. You can generate a widget (Yahoo! calls it badge) for the pipe results to be displayed in your web site or blog. You can retrieve the URL of the RSS feed of the pipe and subscribe to this RSS feed via one of the supported RSS readers (use the More Options menu). Or you can set up an e-mail or phone-based notification, so that you will be informed immediately once the pipe detects new posts matching you criteria (via the Results by Email or Phone menu).

A limitation of the existing pipe approach is that it does not allow you to define the more precise search criteria. Say, you're only interested in TVs supporting the 1080p display resolution, and you don't care about the ViewSonic models (Note: I'm using ViewSonic here only as an example; ViewSonic TVs are actually pretty decent). Since you cannot add the fourth search filter (1080p) and an exclude criterion (ViewSonic) to these pipes, you can consider building your own as described in option 2.

Option 2. Build your own pipe.
When building a new pipe, you can clone and modify an existing one, such as one of the pipes mentioned in option 1, or create one from scratch.

To build a pipe from another pipe's clone, use the Clone menu option to make your own copy of the original pipe, and then make your modifications. Before doing this, check the source of the original pipe to see if you can figure out how to change it. To view the pipe's source, use the View Source menu option (Note: Do not confuse the pipe's View Source menu with the web browser's View Source menu).

I can't show you how to create a complex pipe, like one of the pipes built by Shiva Hothu, from scratch, but this is how you can build a simple pipe to search for hot deals on 46-inch LCD HDTVs with the 1080p display resolution, which excludes ViewSonic models (again, no offense to ViewSonic; this is just an example):
  1. Create a pipe.
    Sign in to the Yahoo! Pipes web site using your Yahoo! user ID and password (if you do not have Yahoo! credentials, you will need to register; registration is free). After signing in, click the Create a pipe link.
  2. Add RSS feed(s) to the pipe.
    In the pipe editor, expand the Sources group (in the left pane) and drag the Fetch Feed module to the editor window. In the URL field of the Fetch Field module, enter the URL of the RSS feed of your favorite hot deals site. In this example, I will use FreshBargains' feed (http://rss.freshbargains.net/rss.xml) because it already aggregates feeds from multiple hot deals sites. [If you think that FreshBargains feed fetches too many results, many of which are not really hot deals, you can use a more restrictive alternative. For example, you can use SlickDeal's feed (http://feeds.feedburner.com/SlickdealsnetForums-9) or something else.] To add more feeds, click the plus sign on the right side of the URL label and fill enter the URLs off additional feeds.
  3. Add inclusive filters.
    Expand the Operators group (in the left pane) and drag the Filter module to the editor window. Click on the dot at the bottom of the Fetch Feed module (Fetch Feed output) and drag the edge of the appearing line to the dot at the top of the Filter module (Filter input) to connect them. In the Filter module, make sure that the top-most text reads: Permit items that match all of the following. Click the plus signs next to the Rules label repeatedly to create four rows of rules. Make the first two columns of all four rules read: item.title contains. [This pipe will only search for matches in titles; to search complete posts, instead of item.title, select item.description.] Enter the following values in the third column of the four rules: 46, LCD, HDTV, and 1080p (order is not important).

    Tip: To see the output of each module, use the Debugger tab at the bottom of the screen. The Debugger tab displays the output of the currently selected module, so you can immediately see the effects of your filter settings. You can also use the Debugger tab to vie the elements of the feed (you need to click the arrow next to each feed entry to view its contents).
  4. Add exclusive filter.
    Add one more Filter module (as you did in previous step), and connect the output of the previous Filter module to the input of the new Filter module. In the new Filter module, make sure that the top-most text reads: Block items that match any of the following. Make the rule read: item.title contains ViewSonic.
  5. Complete the pipe.
    Finally, connect the output of the last Filter module to the Pipe Output module (this module was auto-generated when you added the first module to the pipe), so your pipe will look like this:
    Click the Save button. When saving the pipe, give it a meaningful name, such as Yahoo! Pipe (46", LCD, HDTV, 1080p, no-ViewSonic). You can also define other properties, such as description and tags, but these are only necessary if you want to publish your pipe in the Yahoo! directory to make it visible to general public.
  6. Use the pipe.
    When your pipe is ready, run it and use the Use this Pipe menu options to retrieve the URL of its RSS feed, subscribe to it in your favorite RSS reader, or register for the e-mail or phone notifications when the pipe detects new posts.
For other examples of using Yahoo! Pipes, see the following articles (although these are not related to shopping, they can give you a better understanding of Yahoo! Pipes):Once you get a grip on the basics, you can build more complicated and useful pipes, but in the meantime, even the most simple pipes should be able to help you find the best deals, and save time and money.

Additional references:
More fun with Yahoo! Pipes
Blogging and podcasting: personal syndication for fun and profit

Monday, August 4, 2008

Technobrief #4

Summary: Recent discoveries: software, articles, videos, and more.

Since the last technobrief, I have added the following to the list of items worth checking out:

Software
  • Avanquest Connection Manager detects laptop network settings and sets up printers, email, and disk drives and other connection-specific resources.
  • Configuration Mania Firefox add-on for editing advanced Firefox settings.
  • CubicExplorer is a better alternative to Windows Explorer.
  • DVD Catalyst Free converts DVDs and other video formats (avi, mpeg, divx, xvid, mp4, mkv, etc) into format that can be played on portable video players (iPod, Zune, etc).
  • FireFTP Firefox add-on for accessing FTP servers.
  • Jing screencast and screenshot software for capturing images, recording videos, storing and sharing them online.
  • Ka Type In inserts predefined text snippets into any application.
  • KMPlayer plays most video and audio formats without the need to install additional codecs.
  • nCleaner cleans your system and applications, frees disk space, and boost your system's speed.
  • Open IT Online Firefox add-on for editing documents and images online.
  • Ordered Preference Import/Export Firefox add-on for exporting and importing Firefox extension settings.
  • Pencil Firefox add-on for sketching and prototyping.
  • Pismo File Mount mounts compressed archives (ZIP files), ISO image files as virtual drives.
  • Pronounce Firefox add-on for pronouncing English words.
  • Read It Later Firefox add-on for bookmarking interesting pages that you would want to read when you get time.
  • Speed Launch application launcher for opening frequently used websites, documents, and applications.
  • WinDirStat disk usage statistics viewer and cleanup tool.
  • Windows SteadyState allows to revert a computer to a previously stored state every time it reboots, or when an administrator sets it to.
  • Xerox Mobile Express Driver allows you to print to virtually any PostScript device on your network, even to those made by other manufacturers, without installing device-specific drivers.
  • XnView shell extension adds graphics-specific options (image thumbnail, image format conversion, etc) to the context menu.
  • ZoomIt screen zoom and annotation tool for technical presentations.
Web
  • Deezer and Imeem offer storing, (legal) sharing, and steaming of your favorite music (I can't yet figure out which one is better).
  • HP Blog Printing widget lets your blog readers choose the posts they want to print, free of sidebars, ads and other clutter.
  • Just-Traceroute online route tracing from four or more servers located on different continents.
  • Podmailing lets you send and share really huge files.
VideoArticles

Friday, August 1, 2008

Freeware Appreciation Day: Mp3Tag

Summary: For editing MP3 tags, look no further than Mp3Tag.

This month, my Freeware Appreciation Day's contribution goes to Mp3Tag.

Mp3Tag (written and managed by Florian Heidenreich) allows you to edit metadata (such as ID3 tags identifying the artist, album, track, song title, genre, and so on) of audio files. It supports many audio formats including MPEG-3 (mp3), Windows Media Audio (wma), MPEG-4 (mp4 | m4a | m4b | iTunes compatible), Advanced Audio Coding (aac), Ogg Vorbis (ogg), and more.


Before switching to Mp3Tag, I tried several ID3 tag editors (e.g. MP3/Tag Studio), but I found Mp3Tag the easiest to use. The program is very intuitive. It may have less features than other alternatives, but what it does, it does well. My favorite features include:
  • Ability to apply the same tags to multiple files.
  • Tags-to-file name and file name-to-tags conversion.
  • Unicode support.
  • Drag-and-drop (I particularly like dropping album pictures dragged from the Web sites, such as Amazon.com).
  • Online database search and import.
Importing from an online source (such as freedb and Amazon.com) could be a bit quirky, though: defining search criteria lacks flexibility (it would be nice to have an easy way of inserting defined properties of selected track, such as title, artist, and album, into the search field) and when a match is found, it's not always obvious which values will be applied to which files and tags (I normally figure it out by trial and error). In all other respects, Mp3Tag is well designed and implemented application.

I also appreciate the author's approach to donations:
"I firmly believe that software for private use should be free, and I have no intention at all of commercializing Mp3tag. Unfortunately, its hosting and development are not cost-free for me. There is a lot of traffic on the Mp3tag servers and the software I'm using for developing Mp3tag isn't free. So, I am asking you to download my software, try it, and if you like it and can spare a few bucks, please come back and make a donation. Any amount is appreciated. This money will be used to cover the costs of Mp3tag hosting and development, and it is absolutely voluntary! You won't get less support or crippled versions if you don't."
Well said, brother!

The donation process is very simple, so if you try Mp3Tag and like it, or if you have already been using it, I encourage you to make a donation and help Florian continue his work.

Tuesday, July 29, 2008

Using parameter qualifiers in Windows shell scripts

Summary: How to extract file information from command-line arguments in batch (.BAT) files.

It may seem archaic, but despite the advancement of more recent Windows command shell tools and technologies -- such as Windows Script Host, PowerShell, etc. -- the original Windows NT® Shell is alive and well. VBScript, and PowerShell scripts may look young and hip, but old and proven batch (.BAT) files still offer the easiest way of performing simple operations, such as copying, moving files, or launching programs.

I have been writing batch files for many years, but I still struggle to remember a few common things such as runtime substitution of parameter qualifiers. Parameter substitution is most helpful if you want to extract parts of a file name. For example, you may want to extract directory path from the full path of the running batch script, so you can build a path for another file located in the same directory. Or maybe you want to use the folder path to access a parent directory. There are many good uses for parameter substitution, so this is how you can do it.

First, remember that command-line parameters are referenced using percent sign followed by the parameter index, such as %0 (references the running batch file), %1 (first parameter), %2 (second parameter), and so on. To extract a part of the path name from the parameter, insert tilde (~) followed by one or more of these specifiers between the percent sign and parameter index (%~fdpnxN, where N is the index of the argument):

QualifierExpands to a...
fFully qualified path name
dDrive letter and colon character
pPath (to a directory) without a drive letter, file name, or file extension (may contain a trailing backslash)
nFile name only without a drive letter, directory name, and extension
xFile extension with a leading period
The following examples show how to extract file information for the running batch script (assume that the script's full path is C:\Scripts\Test.bat):
%~nx0
Returns name and extension of the running batch script: Test.bat

%~dp0
Returns directory and folder path of the running batch script: C:\Scripts\

"%~dp0..\Other.bat"
Returns quoted full path of the Other.bat file in the parent folder: "C:\Scripts\..\Other.bat"
Notice that all samples above use argument #0 (the running batch file), but you can use parameter substitution with other arguments as well. Also, there are other qualifiers, which can be used for parameter substitution, but I did not mention them because they are rarely needed. To learn more about parameter qualifiers in Windows shell scripts, see references below.

Additional references:
The Set, Call, and Shift statements by Richard Charrington (see The call statement section)
Windows NT® Shell Scripting by Tim Hill (the best book on the subject)

Friday, July 25, 2008

Blogging and podcasting: personal syndication for fun and profit

Summary: Presentation with links and references, which can help you find, use, and produce blogs and podcasts.

I recently gave a presentation at work which my teammates seemed to like. The presentation discusses blogging and podcasting and addresses such questions as:
  • Why would you want to read blogs and listen to podcasts?
  • Where can you find interesting blogs and podcasts?
  • How do you start a blog?
  • How dow you produce a podcast?
  • Where do you store the podcast files?
  • How do you stream audio and video podcasts?
  • And many more.
Coincidentally, at about the same time, a couple of (non-technical) friends asked me about the very same topics, so I thought I would make this presentation available online to help both technical and non-technical -- okay, make it semi-technical -- people, who are just starting on the path to blogging and podcasting.

Here is the inline version of the presentation (the best part of the presentation is links to resources and articles, so don't miss them):


If you want to access the presentation directly, use the following links:By the way, I was not sure which presentation sharing/hosting service to use, so I started investigating by reading two excellent reviews at Digital Inspiration:First, I tried the services not mentioned in the reviews: ThinkFree's Online Office and Microsoft's Office Live Workspace. I did not like either of them. ThinkFree removed all hyperlinks from the presentation and did not offer any way to put them back, while Office Live's sharing screen looked rather ugly (dunno, maybe I did not use it correctly). Anyway, I tried Scribd recommended by Digital Inspiration, and I really liked it. I suspect that there may be better options (such as SlideShare), but Scribd fulfilled my immediate needs; I may try other services in future, though.

UPDATE #1: Apparently, Scribd turned off hyperlinking capability from the online presentations, which is a shame. I'm now back to square one: looking for a better online presentation hosting service.

UPDATE #2: I just found out that Docstoc offers pretty much the same features as Scribd, but it also supports embedded hyperlinks. Kudos to Docstoc. I updated the embedded presentation (and reference to it) to point to the Docstoc version.