Skip navigation

Last week I ordered a complete set of parts from Newegg to assemble a desktop computer. I was able to get very good deals for cheap and was awaiting the shipment with bated breath. It arrived this Wednesday, June 22, and I immediately started putting it together. First thing I realized: I was only sent 1 SATA cable and I needed to connect a hard drive and a CD drive. That might have been my fault. Who knows. I would have certainly appreciated it if the web site had warned me of my stupid oversight, but that’s a very small complaint in view of the larger issue.

Later in the process, I was about to insert the CD drive into one of the outward facing slots. It didn’t quite fit, and I noticed the metal framework of the CD drive was bent out of shape a little. I assumed it was a cosmetic problem and just pushed the dent back in, so that the drive slid snugly into the case. I didn’t get to use it that evening because I didn’t have a cable to connect it. Tonight I was able to try it out though. It gave out such a heart-wrenching noise when I fed it a CD that I jumped out of my seat. It was worse than nails on a chalkboard. Needless to say, it didn’t read the CD. There must have been some mechanical damage to it after all.

Back to my story: instead of installing the OS from a CD, I had to find a way to install it from a spare external hard drive I had. I figured out how to do that. It wasn’t too hard. The trick is that it has to be a FAT32 file system because the BIOS wouldn’t read anything else, and in order to get a FAT32 file system you need the volume to have a pretty small size. I don’t know exactly how large, but certainly not the whole 250 GB my hard drive had. That didn’t work. I created a partition only large enough to fit the install files: around 5 GB.

Anyway, I got to use my new machine on Wednesday night and I was beside myself with joy. It was working like a charm. The next morning, I started transferring about 100 GB from my old computer. The machine froze partway through the process and wouldn’t respond to any input. A hard reboot later, the BIOS told me that the hard drive has failed according to S.M.A.R.T. and it needed to be replaced. So much for my happiness. Newegg’s return process is as long as it can possibly be so that they can avoid any possibility of being swindled. I have to send in the hard drive first, then they’ll look at it, and only then will they send me a new one. They assure me each of these steps will take some number of days, and their sum seems to be about 2 weeks. Great. I have this wonderful machine next to my desk, and it’s worthless to me for another 2 weeks.

Now, It’s not really too hard for me to wait a little longer, but there is a catch. Newegg’s return policy states that I must return everything within 30 days of the invoice date. Funny how these days are measured in actual days whereas all of Newegg’s days are measured in business days. Whatever. The kicker is that now that I have sent in my hard drive, I have to wait two weeks. Meanwhile, I can’t really put the other parts to use to make sure they’re all in perfect working order until I can get a hard drive! These 30 days will not be extended on account of the failed hard drive, so basically by the time this new hard drive arrives, this trial period will have expired. What’s more, by my reading of the terms, if the replacement hard drive were to fail in a similar way to the last one, I will have no recourse but to buy a new one because the 30 days are up.

I am pretty upset about all this and I don’t think I’ll be using Newegg again. It might not be their fault that UPS banged up the shipment well enough to destroy the only two devices in it that have moving parts, but Newegg’s return process is not robust enough to deal with that possibility. It’s too much of a risk to take. I’m not planning on asking for a replacement CD drive because that only cost $20 and I don’t feel like dealing with the return process anymore. They ask that I return it in the original packaging “with all accessories”. Well, the CD drive came with no accessories and it was just bubble-wrapped and thrown in a much bigger box with other things. I’m not going to go look for packing material and boxes. I’m done. I’ll find a CD drive elsewhere. It’s next to worthless as a part in today’s computer world anyway.

Enough ranting.

I have made a couple of improvements on the old version. Download here.

Snarl usually requires an app to register itself with Snarl, which I didn’t do. As such, you had no control over how long notifications should stay on your screen because Winamp didn’t show in the Apps tab from within Snarl’s preferences. Well now it does. I tested it, and it works. You can set the notifications to stay for 10 seconds. The default remains 3. These settings can be found within Snarl, not in Winamp’s plugin settings dialog.

Another very nice addition I’ve made is that I now use Snarl’s ability to update notifications that are already visible, so that if you find yourself skipping multiple songs, you won’t flood your screen with Winamp notifications. The same one will keep getting updated. This was the motivation for resurrecting the source code.

One additional thing: if installing the new version of gen_snarl causes your Winamp to crash, then you have to download and install the Visual Studio 2010 C++ Redistributable package. There is a chance you already have it installed, especially if you’re running Windows 7 (I believe). Installing it won’t hurt any other piece of software on your computer, I promise!

Here is a sample tweet timestamp as requested through their API.

Thu Jun 09 00:06:02 +0000 2011

In order to parse this tweet using the Boost Date Time library, we can use the following code.

#define BOOST_ALL_DYN_LINK
#include <iostream>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/date_time/posix_time/posix_time_duration.hpp>
#include <boost/date_time/c_local_time_adjustor.hpp>

int main()
{
    using namespace boost::posix_time;
    std::string format = "%a %b %d %H:%M:%S +0000 %Y";
    std::string tweetTimeString = "Thu Jun 08 00:06:02 +0000 2011";
    ptime tweetTime;

    time_input_facet facet(format, 1);

    std::stringstream ss(tweetTimeString); 
    ss.imbue(std::locale(ss.getloc(), &facet));
    ss >> tweetTime;

    std::cout << "Time: " << tweetTime << std::endl; 
    
    typedef boost::date_time::c_local_adjustor<ptime> local_adj;
    ptime adjusted = local_adj::utc_to_local(tweetTime);
    std::cout << "Adjusted for time zone: " << adjusted << std::endl;

    ptime now(second_clock::local_time());
    time_duration elapsed = now - adjusted;
    std::stringstream elapsedString;
    if (elapsed.hours() < 1)
        elapsedString << elapsed.minutes() << " minutes";
    else
        elapsedString << elapsed.hours() << " hours";
    std::cout << "Time elapsed since then: " << elapsedString.str() << std::endl;
}

The output is

Time: 2011-Jun-09 00:06:02
Adjusted for time zone: 2011-Jun-08 20:06:02
Time elapsed since then: 55 minutes
Press any key to continue . . .

Pretty neat, isn’t it? The code is pretty readable, too. The adjustment I’m talking about is a translation from UTC to my local timezone which is EDT. I have not found a good way to deal with the UTC offset, but from what I can tell, Twitter will always give me UTC timestamps, which is why I just hardcoded +0000 into the format string. I might have to fix this later though.

I signed up for an eBay account. During the sign-up, I disabled all the email notifications. I received spam. I clicked on the “unsubscribe to this kind of email” at bottom of the email. Still got spam. Note the “this kind of email.” 1 out of 100 kinds? I don’t know. I went to try to close my account. It takes 180 days from the time you request its closure! Unbelievable! I hate you.

Follow

Get every new post delivered to your Inbox.