How do I find my IP address?

by jim on April 27th, 2010

Well, your IP address is:
38.107.191.83

(Don’t worry, I’m not spying on you, it’s information passed from your browser to my site’s server)

You can bookmark this page next time you want to find your IP or you can use some tools available on your computer to find out.

Windows

On any Windows machine, click the Start Menu and choose Run. Type “cmd” into the prompt, that will open up the command prompt. Type “ipconfig” and it’ll show you your computer’s internet details including IP Address, Subnet Mask, and Default Gateway. The IP address is what you’ll want. If you want more details, like your Physical Address, DNS Servers, etc, you can type “ipconfig /all” to show all the information available.

Mac

Use the Finder to locate the application folders, then locate the Utilities folder. Inside Utilities you’ll see the Terminal application, load that. In that prompt, type “ipconfig” and it’ll display a whole bunch of information, including the X.X.X.X number that is your IP address.

There you go, your IP address in a jiffy.

Opinion Outpost Survey Review

by jim on April 27th, 2010


Don’t ever sign up for a survey company if they demand that you pay them a membership or subscription fee. It’s absurd and completely unnecessary. If a company demands payment, it’s probably a scam.

That being said, Opinion Outpost is one of the survey networks I’m a member of and they are 100% free. Opinion Outpost is owned by Western Wats, a market research company that uses a variety of methods, including surveys, to gather information. Online surveys, telephone interviews, as well as in person interviews are all done.

Opinion Outpost is simply their online survey division. You choose which surveys you want to answer and you can cancel your free membership anytime you want. You can look up surveys in their Members Area or wait for the emails to come to you, your choice. It’ll take a month before you start getting email invites to surveys. When you answer surveys, you’re paid within 4-6 weeks.

Do you use Opinion Outpost? If so, what do you think of it?

Somali Pirates Business Model

by jim on April 5th, 2010

An absolutely fascinating report has been produced by the Security Council on Somalian pirate operations and Undispatch pulls out a particularly intriguing bit on basic operations.

I’m always surprised to learn how organized and streamlined criminal operations are. I think having been exposed, in various forms including sensationalized movies, to organized crime like the mafia makes this less surprising, but it’s still an interesting story to read. There are class-A shareholders, financiers, local elders, supplies, and class-B shareholders – a nice hierarchy of who gets paid when.

Failure Is Good For You

by jim on April 4th, 2010

In business, there are some well known, often repeated mantras that always seem to draw the ire of critics. One of the more recent idea, at least to me in the last few years, is the idea that you should fail often or fail completely. Most recently, I read a post by the founder of Fooala, a Pittsburgh web startup that provides restaurant e-commerce services. He’s 22 years old, went to my alma mater (Carnegie Mellon), and his failure was with a web hosting company when he was 13.

David seemed to overemphasize the need to fail, which I don’t think was his original, or at least his most important, point. The key point is this one:

What’s one thing that stops inexperienced wannabe entrepreneurs from getting started? The fear of failure. The thought that your best idea is going to be wasted because you made some stupid mistakes. But if you think like this, I promise you you’ll always be that “entrepreneur” who is always talking about a business idea but hasn’t done anything yet. And you don’t want to be like that forever.

There’s discussion on Hacker News about how failure as a pre-requisite is overrated and I agree. David’s point wasn’t that a successful entrepreneur needs to fail, it’s that in order to be a successful entrepreneur, you have to be an entrepreneur in the first place. The only way you can have a successful business is by creating a business in the first place. If you let the fear of failure stop you from starting anything, I guarantee you will never have a successful business… it’s simply logic. :)

Do you need to fail completely? No, of course not. But you have to accept the fact that you could fail and that in failure you will learn something about yourself, your business, and how to do better next time.

Don’t be afraid to fail, not because it’s your job, but because when you succeed, and you will if you are persistent, no one will notice or remember your failures.

On my personal finance blog, I shared my friend’s pleasant and frugal experience buying a house through Redfin. In that post, I mentioned that even if you weren’t comfortable with the more DIY experience (and not comfortable enough that splitting the buyer’s agent commission didn’t make you more comfortable), you could at least leverage their wonderful home search capabilities in your own hunt.

We aren’t in home buying mode, we probably won’t be for a little while, but with mortgage rates at historic lows, even if not absolute lows, and the housing market soft in our area, we’re always keeping our eyes open. So we both have

Here are a few things that Redfin does that I don’t know why others don’t:

  • Leverage Google maps. If you go on almost any other real estate company site to look for a home, you get little more than the MLS results. There is a map but oftentimes it’s to a crappy Mapquest map (who still uses Mapquest?). Redfin gives you an integrated map on the page with an outline, in red, of the property and its neighbors. In an instant you know where it is and what it is. The real question is why doesn’t anyone else do this?
  • Ability to save favorites and get updates. You usually can’t even register on another website so saving favorites is a moot point (so is sending updates). I think part of this is because they assume an agent will do this for you so they have little incentive for you to register and mark your own favorites. I’m waiting for the day that you get to mark down what you like (or they tease it out from your searches and your marked favorites) and Redfin tells you when new properties fitting that description are entered into MLS.
  • Keeps limited historical data on past sales. Here’s a house I marked as a favorite when I was first played with the system (it was put on the market in late 2009 and just recently delisted). Thank you for keeping some of the data around, even if they are from public records.
  • Posting a listing history & other important information. Go to any live, or historical, listing and you will see data pulled from sources other than MLS. I like the property history underneath the map. That’s useful information and thank you for not forcing me to go to the Maryland Real Property tax search (or your equivalent in your home state) to find out what it sold for last time around.

There are about a million other things I like about Redfin and I have yet to find a reason why I’d go to a real estate company’s website over their.

YSlow’s Smush.it Adds File Uploader

by jim on March 24th, 2010

Almost all of the images on Bargaineering are stored in a local directory. My experience with Flickr has taught me that it’s all too uncommon for a photographer to remove a photo and have things look silly on my site. To Flickr’s credit, they replace it with a nice “This photo is no longer available” image, rather than an ugly broken 404 image. So in response to this, I search for CC-licensed images and I download them locally. I put them through Yahoo! Yslow’s Smush.it and upload them to the site.

Storing images locally is a trade off. You get that control but there’s increased server load, the risk that someone hotlinks an image thus creating more load (though you can stop this easily), but you get one less lookup. I think it’s worth it.

I didn’t always do this and my directory had tons of files that were un-smushed, so I was pumped when the recent update to Smush.it included an uploader tool. This lets me download all of my image files, smush them in batches, rewrite some filenames, and upload them back to my server.

The “rewrite some filenames” piece is the result of Smush.it converting GIFs to PNGs, PNGs are better because they’re more efficient, and you can do that by running this file renaming .JS script file in the directory.

I was able to trip a good 20% off the size of my image directory using Smush.it for about thirty minutes.

Paul at Providentplan.com emailed me the other day because he had a vexing problem. It appears that all of his links in his RSS feed are a redirect through feedproxy.google.com. He has his feed hosted through Feedburner, now owned by Google, and wanted them “back to normal.”

…for some feeds in my Google Reader the link to the post is feedproxy.google.com followed by a bunch of junk. (It still takes you to the website.) But other feeds go straight to the post on the website.

I’m wondering why this is and how you can fix it because I’ve noticed it for my own website.

Fortunately there is a simple solution. If you have feedburner’s click tracking feature turned on, it’ll turn all those links to the “gibberish” feedproxy links. They’re redirects for tracking purposes and you need to remove tracking to get the links back to normal.

To turn it off, log into your Feedburner account and click on the Analyze tab. In the left sidebar you’ll see under “Services” a link that says “Configure Stats.” Click it and you’ll see a screen where you can modify tracking. Uncheck the boxes and you’ll see your links return to normal.

Ever need to a search and replace with a folder of filenames? You saved a bunch of images from your camera as Steve and Michelle Wedding when you meant Stephen and Michelle? Or you put the wrong date or otherwise need to change a lot of filenames and don’t feel like doing it manually?

Fortunately you can use javascript to do the work for you. Javascript is very versatile and perfect for these quick and dirty solutions where you don’t need something complex, just a little script that goes into a directory and replaces all instances of one word, or string, with another. I adapted this script from this snippet.

In this example, I’m going to rename all the files that end in .gif.png so that they end in just .gif. The code will replace all instances of .gif.png, even if they appear in the middle of a filename (so image.gif.png.jpg will be renamed image.gif.jpg), but I know that in my directory this won’t happen because of the files I have inside of it.

Again, this is a quick and dirty script, no error checking and is not a robust solution. Remember to make your edits to the values before you run it.

var sFolderName, sStringToFind;
var nResult;
//////////////////////////////////////////
// Set these values
sFolderName = "C:\\Temp\\Images"; // use directory containing image
sStringToFind = ".gif.png";
sStringToReplace = ".gif";
//////////////////////////////////////////
 
nResult = renameFiles(sFolderName, sStringToFind, sStringToReplace);
WScript.Echo(nResult + " files renamed");
 
//    Function Name:    renameFiles
//    Parameters:
//    sFolder:    Folder Name (use double backslashes)
//    sString1:    String to search for
//    sString2:    String to replace
//    Returns:    Number of files renamed
 
function renameFiles(sFolder, sString1, sString2) {
    var oFSO, oFile, oFolder;
    var re, index;
    var sName;
    var i = 0, n;
 
    oFSO = new ActiveXObject("Scripting.FileSystemObject");
    oFolder = oFSO.GetFolder(sFolder);
    try {
        index = new Enumerator(oFolder.Files);
        for (; !index.atEnd(); index.moveNext()) {
            oFile = index.item();
            sName = oFile.Name;
            n = sName.indexOf(sString1);
            if(n != -1) {
                try {
                    sName = sName.substring(0, n) + sString2 + 
                            sName.substr(n + sString1.length);
                    oFile.Name = sName;
                    i++;
                } catch(e) {
                    WScript.Echo("Can not rename file " + sName + " because\n" + e.description);
                }
            }
        }
    }
    catch(e) {
        WScript.Echo("Could not access folder " + sFolder + " because\n" + e.description);
        return 0;
    } finally {
        oFSO = null;
        re = null;
        return i;
    }
}

There you have it, a quick search and replace javascript for renaming files.

If you’ve played with Yahoo! YSlow’s Smush.it tool, you’ll probably notice that it will often convert .GIF files into .PNG files. Ever wonder why they do that? It’s because PNG files are patent-free (though the underlying GIF patent, the LZW algorithm, expired in 2003), contain alpha channels, gamma correction, and two dimensional interlacing. All that gibberish means translates into a better version of a GIF file that also compresses better, about 5% to 25% according to the W3.org.

For you trivia enthusiasts out there, GIF stands for graphics interchange format and was introduced in 1987. It uses the Lempel-Ziv-Welch (LZW) lossless data compression technique that was patented in 1985. CompuServe got into a tiff (haha, get it? TIFF?) Unisys, which held the patent, and the PNG standard was developed.

PNG stands for portable network graphics and nowadays it’s widely accepted as an image format by all major browsers. As a result, it’s becoming more popular as it is generally smaller than GIFs by 5-25%.

You may be wondering where the JPEG, joint photographic experts group, fits in all this. It differs from GIF and PNG in that it’s a lossy compression algorithm (whereas GIF/PNG are lossless) designed for photos.

There you have it, the differences between GIF and PNG (and JPEG!).

How to Track Clicks with Google Analytics

by jim on February 24th, 2010

Google Analytics makes it dead simple to track outbound clicks on your site.

First, you need to put your Google Analytics code above the content of your page (or at the very least, before any link you want to track). The function call you will add to the OnClick javascript hook will reference a function in the Analytics code so it needs to be loaded by the time you get to the link. Page speed principles recommend that you put javascript at the bottom, since there can be a little lag in loading it, but in this case there’s no way around it. Google is pretty fast anyway so I consider this a fair tradeoff for additional data.

Then, simply add this bit to your links (if you use Google Website Optimizer, you’ll notice it uses the same mechanism to track clicks):

onClick='javascript: pageTracker._trackPageview("/click/tracking")'

You can change /click/tracking to anything you want. I like to bucket my tracking into different areas and change the term tracking to something that makes sense to me. If it’s affiliate clicks I might put /click/aff/company/tag and programmatically change the company name or the tag based on the page. (you can use php to do this).

Let’s say you want to track a click on an affiliate link on a particular page, you could do this if you were running WordPress:

onClick='javascript: pageTracker._trackPageview("/click/affiliate/<?php echo $post->ID; ?>")'

which would resolve to:

onClick='javascript: pageTracker._trackPageview("/click/affiliate/XXXX")'

with XXXX as the ID of the post.

(remember, to run PHP in a post on WordPress you’ll need to download a php execution plugin and turn off comments for security)

How do you review the data? Go into your Google Analytics and each of the clicks is considered a pageview. I review it by going to Content -> Top Content – View full Report and then searching on the term /click/. Advanced users of Analytics now recognize that you can start assigning goal values and whatnot but I generally avoid that because I don’t find that adds value.