Meta

Archive for April 2009

I have lots of music that I like to listen to, and I sometimes want to listen to it while lounging around my living room. The most convenient (and obvious) way to access my music is through my iPod, which houses my entire collection. At the moment, I don’t have a way to play my music in the living room (besides busting out my headphones, which I don’t always feel like doing).

Does anyone have recommendations for how I might go about doing this? I don’t want the music to play through the TV (I’m willing to buy external speakers). A user friendly interface would be beneficial as well (maybe a way to change tracks, volume, etc from the couch?).

One of my Perl scripts here at work used the Add_Delta_Days subroutine from the Date::Calc module to do some calendar date arithmetic. I’m in the process of building a new machine on which this script will run, and I don’t have access to an external network. Unfortunately, the install process for Date::Calc is fairly difficult. The module relies on a C library which must be compiled with the same compiler as was used to build the local Perl install. To make matters worse, the modules that Date::Calc is dependent on have similar requirements. As a result, I decided to skip installing this non-standard module, and instead use a home-brew replacement. It turns out that Add_Delta_Days is fairly straightforward to replace:

This subroutine isn’t a one-to-one replacement, obviously. Unlike Date::Calc, my home-brew subroutine suffers from the Year 2038 problem (at least on 32-bit operating systems). It likewise can’t go back in time by incredible amounts (I’m bound to the deltas around the epoch). However, this workaround saves me a bunch of setup time, and works just as well.

It’s been quite a while since my last programming tips grab bag article, and it’s high time for another. As promised, I’m discussing PHP this time around. Although simple, each of these tips is geared towards writing cleaner code, which is always a good thing.

It’s no surprise to anyone that obesity in America is getting worse every year. This animated map shows the progression in the US between 1985 and 2007, and it’s quite a depressing sight. Lots of factors are contributing to everyone’s weight gain: poor eating habits, no exercise, etc., but part of the blame certainly lies with food manufacturers. In recent times, food portions have increased by an incredible amount, and they only seem to be getting worse. Not only are the larger portions contributing to our weight gain, they are also making it much harder for people like me to shop in the grocery store.

Before I go much farther, I must confess that I’m not a big eater. Growing up, I knew guys who could eat two or three times as much as I do at each meal. And there are plenty of my peers today who can do the same thing. So I realize that I’m already starting out on the low side of the curve. However, this doesn’t change the fact that food manufacturers have gotten out of control with portion management.

Shopping for one is difficult enough to begin with, but I’ve noticed that it’s gotten more so in recent times. While at the grocery store recently, I picked up some potato chips for lunch through the week. The bag I bought had “20% more chips free,” making it even larger than the normal bag (which is a little too big to begin with). A sign below the bags of chips offered the following deal: buy 2 get 2 free. So, you have to buy four bags of chips to get a deal! Who in their right mind eats four, full-sized bags of potato chips? Even in reasonably sized families, that’s an insane number of chips to buy at once.

Similarly, doughnut manufacturer Krispy Kreme apparently no longer sells their half-dozen doughnut boxes. Instead, they offer a new box of 9. Every once in a while (maybe once every two months), I used to pick up a half-dozen doughnuts and eat them through the week with my breakfast. By the end of that week, the last doughnuts had nearly grown stale, but were still good enough to reheat. A box of 9 would certainly not last the way I eat them.

There are plenty of other examples, but these two stick out in my mind since I encountered them recently. If food manufacturers would provide smaller portions, at somewhat lower prices, I would be able to enjoy their products more often and I wouldn’t be wasting perfectly good food. As an added bonus, I wouldn’t eat as much, and would feel better as a result. Does anyone else feel the way I do?

Jeffrey Zeldman has pointed his readers to an interesting article entitled Digg, Facebook Stealing Content, Traffic, Money From Publishers? The article focuses on the recently launched DiggBar, and the negative effects it’s having on the web. I gave up on Digg long ago, and this just furthers my intent to stay away from the site. With shady practices like this, it doesn’t deserve my attention.

I’ve just rolled out a new version of the software that powers my photo albums. The only external change is a modification of the breadcrumbs when viewing an individual image. Instead of the image file name, you will now see a ‘X of Y’ progress indicator. This should make it a little clearer where you are in the album, and removes unimportant information from the breadcrumb list. Page titles for individual image pages have likewise been updated, making back history a little clearer.

One of the largest back end changes in this release is the ability to reorder album images. Previously, album images relied on their file name for sorting purposes. Albums now default to this when uploading, but the order can be changed after the fact. I plan on making some changes to at least one of my old albums using this new functionality.

I hope to offer a behind-the-scenes look at my photo album software in the coming days. Lots of updates have been made to the admin panel, and I’d like to share what I’ve learned. Stay tuned!

It was great news to hear that captain Richard Phillips was rescued yesterday. I’m amazed that snipers could hit someone on a boat, from another boat, at a distance of nearly 100 feet.

As a result of this hostage situation, there has been a lot of news about pirate attacks around Somalia. It’s clearly a big business for these people, seeing as their country is essentially a nonexistent entity. The problem is that these pirates have yet to be punished for their actions. 100% of their ransom attempts (up until now) have been carried through. In other words, they always win.

The other day, it occurred to me how we can solve this problem. All we need is a throwback to the days of World War 2. It’s fairly apparent that these pirates have little naval power. They aren’t heavily armed, they attack in small boats, and they haven’t (yet) appeared in large numbers. As a direct result, this is a perfect opportunity to employ the use of the convoy system.

All we need to do is establish a perimeter around the problem area. If you want to go inside this perimeter, even if you’re just passing through, you have to be a part of a convoy. Multiple convoys would leave daily, protected by the various naval ships that are already patrolling the area. This would make attacks much harder, much less infrequent, and would (I claim) put a large stop on the activity going on.

I’ve been sitting on a collection of random photos for some time now (some of which are nearly two years old). After all of that time, I have published a new photo album. Locations for the photos vary wildly. One of my top five favorite photos of all time is in this set, as is the source for one of the random header images here at this site (the only one that hasn’t already been published in an album, as a matter of fact).

It looks like Time Warner is expanding their broadband bandwidth caps to new markets. One of those new markets is in Greensboro, NC, about 1 hour from where I live. To add insult to injury, it looks like prices are going up as well. The 40GB tier will cost $55, which is $5 more than what I pay today. As they say, this stuff is getting real.