WinRAR is better than WinZip

by joe on February 22, 2008

I first wrote this article as a submission to Helium’s Marketplace. It was not chosen, so my loss is your gain, as I’m posting it here in it’s entirety. Note that I received no compensation for this article, but since I was hoping WinRAR would choose to publish it, I can’t say it is completely unbiased. That being said, every point in the article is absolutely true, and the benchmarks referenced are available for anyone to view.

*** Original Article Below ***

Two of the most popular file compression programs on the market today are WinZIP and WinRAR. The question that inevitably arises is, which is a better buy? The answer can be found by comparing the performance, price, and features of each.

Compression – the whole purpose behind using compression software is to shrink the size of files for more efficient storage and faster transmission over a network. Thus, how well a utility compresses files should be of primary concern to those needing to choose one. Many independent sites on the Internet consistently show that WinRAR compresses files more than WinZIP. There are a few exceptions with specific file types, particularly those that are already compressed in their native format, like mp3 files. These do not compress very much in any case by either WinRAR or WinZIP. WinRAR comes out the clear winner among most other, highly compressible file types, and the aggregate or overall measures generally show WinRAR on top. Supporting data can be found on wikipedia (Comparison_of_file_archivers), techarp.com (Compression Comparison Guide Rev. 2.0), and maximumcompression.com. [click to continue...]

{ 0 comments }

External USB drive failure and recovery

by joe on February 10, 2008

SimpleTech About 18 months ago I bought a SimpleTech 160 Gigabyte external USB hard drive for storing media files and backing up other data. I reformatted the drive so it would be writable from linux (using the reiserfs file system type). It worked great until about a month ago. At that time, whenever I rebooted, I had to power the drive off and on several times before linux would recognize it. Finally it stopped working altogether.

I tried moving it to another computer, but it wasn’t recognized there, either. The warranty on these drives is only 12 months, so I had no recourse with the company. With little to lose, I took the drive out of the enclosure to see what was under the cover. It was a Seagate Barracuda 160 Gigabyte Ultra IDE internal drive, with some circuitry to convert USB signals to IDE.

I removed the drive from the enclosure and installed it directly into the linux file server. Once I configured the mount point, it now works like a charm. I gave up the convenience of moving the drive from machine to machine, but I gained quite a bit of performance, and – more importantly – retained the data that had accumulated on the drive.

I have since read in various forums that this type of failure of external drives is fairly common. Most people fix it by buying a generic external enclosure to replace the original one. If you really need the portability, this is a better way to go. If you’re like me however, who just bought the external drive for ease of installation and because it was on sale, removing the drive from it’s enclosure and mounting it inside your computer might be a good way to recover a failing device.

One final note: I find it interesting that SimpleTech only warrants the product for 12 months, but according to Seagate’s web site, the Barracuda carries a 5 year warranty. It’s almost as if SimpleTech is admitting that the most likely point of failure is in the enclosure they provide.

{ 1 comment }

As a Configuration Manager, I’m always looking for ways to improve the automation of the builds and deployments of my company’s applications. We use scripts to compile the apps, replace certain token strings with environment-specific values, and copy the new executable code out to the production servers. Ideally, we should not have to use seperate scripts when deploying to different run-time environments (development, integration test, production, etc.). We want instead to pass the target environment into these scripts, and use logic to determine environment-specific values. So I set out to create a Lookup Table to set the values according to the target environment.

I wanted to keep it simple so maintenance would be easy. I wanted it to run in a basic command shell (I use ‘bash’, but most other shells would work as well). UNIX and linux utilities like ‘sed’ and ‘awk,’ and xml parsers would have done the job, but they added complexity so I stayed away from them (although I do use ‘grep’). The listing below is a simplified version of what I came up with. It takes one parameter representing the target environment, and sets 3 variables: the target server, the target database, and a process user ID. It then prints the new values to the screen for verification (an optional step). The script we actually use at work also sets target directories, service names, and website urls, but this is enough to give you the idea:

Listing 1

#!/bin/bash

# Sets environment variables based on lookup string

# Environments: DEV = Development, QA = Quality Assurance,

# UAT = User Acceptance Test, PROD = Production

ENVIRONMENT=$1

# Set server addresses, database names, and user IDs.

line=`grep ^$ENVIRONMENT <<EOF

Env Server Database User ID

— ———————— ——— ———-

DEV dev.myapp.mybusiness.com myappdev devappuser

QA qa.myapp.mybusiness.com myappqa qaappuser

UAT uat.myapp.mybusiness.com myappuat uatappuser

PROD prod.myapp.mybusiness.com myappprod prodappuser

EOF`

set — $line

export AppServer=$2

export DataBase=$3

export UserID=$4

#

# Show environment settings:

echo “AppServer = $AppServer”

echo “DataBase = $DataBase”

echo “UserID = $UserID”

Sample run:

$ ./Lookup.sh DEV

AppServer = dev.myapp.mybusiness.com

DataBase = myappdev

UserID = devappuser

$

Using the Technique

Knowing how this script works is not essential to using the technique, as long as you realize that you can expand it by adding more values to the ends of the input lines, and creating enough values with the ‘export’ statements to accomodate the new values.

>>Read explanation and rest of article >>

{ 0 comments }

10 Universities Offering Free Writing Courses Online — Education-Portal.com

Found this list today on the Educational Portal blog. It’s a great list of free courses for writers. I’m definitely going to be taking some of these college-level writing courses, especially the ones on creative writing, short fiction, and writing for the web.

{ 0 comments }

I’m reading about the President’s “Tax Relief Plan” on a White House’s web site. Don’t get me wrong, I will take and appreciate the money, but let’s not get carried away about the impact it’s going to have.
According to the site:

“Real Tax Relief for Real Families:

When President Bush’s proposal is fully in place, the typical family with two children will receive at least $1,600 in tax relief. This is real and practical help:

  1. Sixteen hundred dollars will pay the average mortgage for almost two months;
  2. Sixteen hundred dollars will pay for a year’s tuition at a community college;
  3. Sixteen hundred dollars will pay the gasoline cost for two cars for a year; and
  4. Sixteen hundred dollars will buy an average family 24 months worth of electric power.”

Where in the world did these statistics come from?

  1. According to a recent article in USA Today the median mortgage payment is $1687.00. Other sites around the web arequoting $1700-2500 per month. This means that $1600.00 wouldn’t even pay one month’s mortgage for most people, let alone two.
  2. US News & World Report puts the average community college tuition at $2,300.00 per year. That’s 44% higher than the $1600.00 claim made on the site.
  3. The US Department of Energy says that the average vehicle travels about 10,000 miles per year. That’s 20,000 miles for a 2-car household. At the average fuel mileage of 24 miles per gallon, that’s 833 gallons a year. At $3.00 per gallon, that’s about $2500.00. So where are Bush’s advisor’s buying their gas if they can get by on $1600.00 per year for 2 cars?
  4. Even the electric bill estimate is rather optimistic. The average household in America consumes 10,656 kilowatt-hours (kWh) per year, according to the Department of Energy. At an average cost of 8.4 cents per kWh, the bill for 24 months would be $1790.00. Close, but still notably higher than $1600.00.

We appreciate the money, Mr. President. Really, we do. But overstating the impact will undermine the consumer confidence you’d like to inspire.

{ 0 comments }

Helium has a great feature for writers wanting to compete for some extra money. It’s called their Marketplace. Outside publishers ask for specific articles, and offer specific amounts of money for each one. Anyone can write and submit their best article for each requested title. Once the deadline has passed, the publisher will review all the submissions and choose one or more of the best ones for publication on their own website, or even in print. Each selected article will earn the author the amount specified in the original Marketplace request. Most of the publishers utilizing Helium’s Marketplace to solicit articles operate under a pseudonym for various reasons.

As a recent example, a publisher recently requested 4 titles, all related to PC optimization. Each article will pay the selected author $75.00. You can see my submissions, as well as those of the other writers competing for these titles, by following these links:

Recommended: to keep your PC running like it did when it was new, try Diskeeper 10.

On Helium, all articles of a given title are ranked by the other members. This ranking is a bit flawed, because complete novice writers with little command of vocabulary, spelling, and grammar carry as much weight in rating as do those with more season, skill, and talent. Nevertheless, your articles will always appear with the other articles of the same title, ordered by rank. Fortunately, the Marketplace publishers do not select based on rank, but rather based on the articles that came closest to meeting their requirements and specifications.

The deadline for these four titles is Friday, the 25th. It sometimes takes several weeks before the selected articles are announced, but when they are, I’ll report my success (or lack thereof).

{ 0 comments }

I have a new story published on Triond (AuthSpot), with a copy also on Helium. It’s entitled “Poor Old Charlie’s Wake,” and gives a good example of the extents to which my mom, the horse trader, would go to make a living. Here’s an excerpt:

My mother was a horse trader. Not one of those that gives horse traders the reputation for fleecing unsuspecting horse buyers (and less experienced horse traders) by representing three-legged man-hating horses as kid-safe and sound. Still, sainthood will forever elude her.

My family engaged in pretty much any horse-related activity that can turn a profit. We rented, boarded, bought, and sold horses. We supplied ponys for pony rides at parties and events, and horses for the judges at field dog trials. And for a fee, we picked up dead and injured livestock from the homes of distraught owners. Most of these were anxious to get the ordeal of a dead or terminal horse over with as quickly as possible. They were content to have us pick up their animal and leave with as little spectacle as possible. Some were not quite so accomodating.

The phone rang one morning. In a tearful voice, a woman spoke to my mother. “My name is Rebecca Rhoades, and my horse Charlie just d-died,” she sobbed. “I have no idea what to do with him now. Do you pick up d-dead horses?”

No funeral mortician who ever consoled a grieving patron could exude more sympathy and compassion than could my mother, the horse trader. “Yes, we do pick up dead horses. Judging by the pain evident in your voice, you obviously loved Charlie very much. How long did you have him?”

“I’ve had him since I was 12 years old. I grew up with him. He was 10 years old when my Dad bought him for me, but he’s 29, now. Well… I mean he was 29.”

When horse owners called and said their old horse had died, or that they had one that was terminally ill and would need to be put down (euthenized, if you prefer), they occasionally asked what we did with the body. My mother would describe our farm, and explain that we had a special section of the farm where we buried the horses. Few people ever elected to have any kind of marker or memorial. Indeed, nobody ever visited the graves of these horses. Fortunately.

Read the rest of the story >>
I was not quite as happy about this story as I’ve been with the others. It is a bit heavier, more introspective and less humorous than most of my stories. That in itself was somewhat enlightening for me. Putting this story down made me consider how my mom must have felt about some of the things she did. Please let me know what you think about it.

{ 0 comments }

Use Secure Shell (SSH) to establish safe, encrypted internet connections through a firewall. With this method, you don’t have to open additional ports through your firewall in order to access external email accounts, access usenet newsgroup servers, and multimedia streams, which leaves your internal network more secure. This means you don’t have to worry about accidentally surfing to a restricted site (which raises red flags in most corporate environments), and can access sites that have been mistakenly blocked by over-zealous monitoring software. Traffic cannot be analyzed for content by sniffers or packet inspection software because of the encryption.

Access to a Server
You will need access to a server running Secure Shell on the other side of the firewall. If you are connecting from inside your company’s firewall, you could run OpenSSH (an open source SSH server) from your home computer or that of a friend. Installing and configuring an SSH server is beyond the scope of this article, but good documentation exists for OpenSSH on its home site. Just make sure that you open a port through any router or personal firewall for SSH traffic. The default is port 22, but you can use any available TCP/IP port. Alternatively, there are some sites that will give you a free shell account on their server running SSH. SilenceIsDefeat.org will give you one for $1.00 if you use paypal (and signing up is then instant), or the cost of a $0.39 stamp if you register through the mail. Finally, if you pay for a commercial web host, many of them allow SSH connections to their servers.

Connection Settings
You also need to know a little about how you connect to the internet from within the firewall. Most companies allow web traffic through a proxy server so they can monitor the content employees are viewing, and can restrict access to sites with objectionable content. You can examine the internet connection settings for your browser. If you are set for “Direct Connection to the Internet” (Firefox), or no proxy or configuration script is set up (IE), then you probably have unfettered (but not necessarily unmonitored) access to the internet, and would only need to use SSH for privacy. You can skip down to SSH Client. If proxy access is set up in a straightforward configuration, then the proxy settings will be displayed right there. Make a note of the address and port of any HTTP or Socks proxies defined. Some companies use an Automatic Proxy Configuration Script, which makes retrieving the proxy settings a little more difficult. If you’ve already noted your proxy settings, you can skip down to SSH Client. Otherwise, here’s some help retrieving your proxy settings from an automatic script. Copy the following lines into a new blank text file and store it on your hard drive:

<HTML>
<HEAD>
<TITLE>Download a file instead of rendering it</TITLE>
<BODY>
<A xhref=”http://URL.OF.SCRIPT” mce_href=”http://URL.OF.SCRIPT” >Right-Click here and select Save As</A>
</BODY>
</HTML>

Edit this file and replace URL.OF.SCRIPT with the address of the automatic configuration script as defined in your connection settings. Save the file as dl.html. . In your browser, use File->Open to open this file. You should see a single link saying to “Right-Click here and Select Save.” Right click on the link select “save link as” or “save target as” (depending on your browser), and save the file locally. You now have a copy of the Automatic Configuration Script which you can peruse in any editor, looking for proxy information. Often a company will use a number of different proxies for different purposes – you’re mainly looking for Socks and HTTP proxies. Note the address and port of any you find. If you think you’ve found an HTTP proxy, you can test it by changing your connection settings and telling your browser to use that server and port explicitly instead of using the Automatic Configuration Script, and connecting to the internet. Just remember to restore the settings afterward.

SSH Client
The last piece you need is a Secure Shell client. This is just a program that opens and manages an encrypted connection to a server. Normally, you would use this combination to log on to, administer, and exchange data between a remote computer (the server) and your local computer (the client). We’re going to be using a more advanced feature of SSH known as “port forwarding”, which lets you direct other network traffic through such a connection. A good choice for Windows users is PuTTY, which can be downloaded freely from the Download Site. Macs and linux users will almost certainly have a good SSH client installed. I’ll be using PuTTY in the examples in the remainder of this tutorial, but the principles will be the same in any SSH client.


PuTTY Configuration
The PuTTY documentation does a good job covering configuration, so I’m just going to focus on the essentials for port forwarding. Basically, you enter the IP address or DNS name of the host to which you’ll be connecting, the port it uses, and a descriptive name in the ‘Saved Sessions’ field. If your browser uses a proxy server to access the internet, then you will configure PuTTY to use the same one(s). In PuTTY’s ‘Category’ tree (left portion of window), click the ‘+’ sign next to ‘Connection’ and click on ‘Proxy.’ If the browser had a Socks proxy configured, select that type in PuTTY. If not, but it had an HTTP proxy configured, then select that type. Enter the Proxy hostname and port that you previously noted. When this is done (or if you didn’t have to add proxy configuration), click back up on the ‘Session’ category and click the [Save] button. Then click the [Open] button. If everything is correct, you should get a new window with a login prompt from the remote system. You’re ready for the last step – actually forwarding a port or two.

There are two methods of forwarding ports through an SSH connection. “Dynamic” forwarding is easier to configure and more flexbile, but can only be used by applications that support a Socks proxy. This includes most modern web browsers, so we’ll start with setting up secure, encrypted web browsing. If you actually logged in, type ‘exit’ and press the key. Otherwise, just close the window. Bring up Putty again, select the ‘Saved Session’ you stored earlier and click the [Load] button. In the ‘Category’ tree, expand ‘Connection’, ‘SSH’, and select ‘Tunnels.’ In the ‘Source port’ field, enter 8081. This can actually be any number higher than 1024, I’m just using 8081 as an example. Select the ‘Dynamic’ radio button, then click the [Add] button. ‘D8081′ will appear in the ‘Forwarded ports’ field. Under Categories, select ‘Session’ (you may have to scroll up to see it), and click the [Save] button again. Click [Open] and log in to the remote server. In your browser, you’ll need to change your proxy settings. Make sure to write down the current settings, so you can restore them later. You are going to set the browser to use a Socks proxy (which dynamic forwarding creates for you). In IE under Lan connection settings you have to select the [Advanced] button to see the proxy configuration fields. In Firefox, they’re visible in the Network ‘Settings’ panel. Add the word localhost as the proxy host or proxy server address, and 8081 as the port. Click [OK] until you are out of the configuration screens. If you can now browse the web, then congratulations, you’re doing so in a secure, encrypted tunnel. Nobody can see what sites you visit unless they watch over your shoulder. Note: examination of your computer’s cache, log files, history, and other forensic evidence will still yield information on your surfing habits. A secure tunnel only protects the data in transit.

The second method of forwarding ports involves forwarding each port used by your network application from your local PC to the actual server running the network service you wish to access. You then configure the application to use your local machine as the server. For example, to connect to your external pop3 mail server, in PuTTY you would go back to the ‘Tunnels’ configuration screen. Add 1110 as the Source port, select the ‘Local’ radio button, enter your mail server’s address followed by ‘:110′ in the ‘Destination’ field, and click [Add]. You should see something like L1110 your.mail.server:110 appear in the ‘Forwarded Ports’ field. Once again, return to the ‘Sessions’ screen and click [Save]. Fail to do this after any changes, and you’ll lose them. Now, open your mail client. Wherever you would normally enter your pop3 server address and the port it uses, enter ‘localhost’ and 1110. In Outlook Express for example, you will find these settings in the ‘Servers’ tab and the ‘Advanced’ tab in the Account Properties screen. Once you’ve made these changes, you should be able to connect to the SSH server using your saved session in PuTTY, then retrieve and read your mail in your mail client software. Sending mail uses a different port (25),and often a different server name, so you’ll have to forward another port in a similar manner if you want to be able to send mail as well.

Pretty much any network service that uses a defined port or set of ports can be configured to work through an SSH tunnel in this manner. This includes services that your company may ordinarily block, like Instant Messaging services, Usenet Newsgroup access, streaming music sites, etc. Note that anyone with access to network sniffers or inspection software, be they crackers, hackers, or network admins, will still be able to see network traffic between your computer and the remote SSH server, they just won’t be able to tell what it is or where it goes beyond that point.

{ 3 comments }

Vacationing in Florida, Retirement Style

by joe on January 5, 2008

I haven’t written in a while, due in a large part to the fact that my family and I took our Christmas vacation in Florida, escaping for a couple of weeks from the Michigan winter. We stayed with my in laws, who own a mobile home in Lakeland in a park for retirees 55 and older. Now one might think that staying in a mobile home park surrounded by old folks would be boring, but in fact if one is willing to temporarily adopt the local lifestyle, nothing could be farther from the truth.

Every Monday night they play euchre. For money. For those of you unfamiliar with euchre, its a fast card game played with partners. Okay, it only cost a quarter to play, and you don’t stand to win much, but the game is fun and the players compete as if there were hundreds of dollars at stake. I won fifty cents.

Nearly every day there is competitive shuffle boarding. Sometimes it’s a “pin game,” where there is a modified bowling pin on each end of the court. It costs a dime to play, and a nickel every time you knock down the pin. I won seventy five cents. Some of the players are actual pros. I didn’t even know there was a such thing as a professional shuffleboard player, but there is and several of them live in that Lakeland park.

Wednesday morning is bowling. Most of the residents who participated bowled better than I did. Wednesday night is bingo. I think I’m the only one in my family who didn’t win a game. Again, the stakes are small – fifty cents gets you 6 cards, and you play 8 or 10 regular games plus a couple of specials.

Thursday nights is for playing bid euchre – a variation where each player has to bid for the right to name trump. I won a dime.

We didn’t go to Florida to go to any of the expensive theme parks – we’ve done all that before. We didn’t go for the night life or to mingle with the jet set, we went to relax and enjoy the weather. I didn’t get any writing done, but I did a lot of reading, made some friends among the Grandmas and Grandpas there, and came home relaxed and refreshed.

{ 0 comments }

One of my best stories, “The Great Rodeo Trainers” was published on Helium, and sold on the Marketplace there. The publisher (who wishes to remain anonymous) purchased the story with exclusive rights, which means it can’t appear on any other web-sites for a while. Once they expire, it will return to Helium, and I’ll probably publish it here on the blog as well under the ‘Memoirs of a Horse Trader’s Son’ category.

Another story – one I had submitted to Maissonneuve 3 months ago but never heard back from, I’ll probably submit somewhere else. Its a humorous account of a group of ponies roaming loose, and the havoc they wreak on an upscale golf course. After 2 months I sent a follow up inquiry Maissonneuve, but still nothing. I don’t know if I should try another in-print publication or just break down and put it on-line, either Triond or Associated Content. The Wild Horse Race Story is doing pretty well there.

Finally, another story is nearing completion. I’m not sure of the title yet. It will probably either be “To Mourne a Horse”, or “Here Lies Good Ol’ Mopsie-Flopsie”, depending on the mood that the final draft instills.

{ 0 comments }