The Web Gambit

Thoughts on Web Development

Monthly Archives: February 2007

Exporting your online albums to Flickr

I finally completed the transition of moving my digital photos from my self-hosted online photo album to Flickr. This processs involved writing a custom application in .NET 2.0 WinForms and using both the open source FlickrNET libary for .NET as well as the MySQL Connector for .NET. I had decided to make this transition late last year but only recently found the time. My album site was getting very outdated since the PHP-based package that it was based on, 4Images, was no longer being updated. Even the markup was beginning to look ugly in modern browsers. So with AJAX being the new cool thing these days, I was on the hunt for a newer, more "Web 2.0" online photo album. I chose Flickr because it had the best features available and was fully accessible through its well written API. Not only that, it’s blazing fast. In a nutshell, the process involved writing a simple WinForms application that could connect to both my old album site and Flickr, then allowing me to transfer the files from one to the other. Here’s a low res picture of the application.

Flickr Exporter App

The biggest challenge in getting this app completed was figuring out how to connect to Flickr using the Flickr API. After spending some time reading through the API docs and still being quite confused, I came across this gem of a document. Once I got connected, it was a cinch to write up my MySQL queries to my old album and send over the files to Flickr. If you’re interested in the source code for the app, please email me or leave a comment. Its quite buggy and it only works for 4Images, but if you’re considering switching to Flickr but you’ve been holding off due to the need to migrate an old online album, this code should help you get started.

Update: Per request, I am making my latest version of the application available.  Please download the application here and the source here. This application comes with no support and is run at your own risk under the MIT license.
 

Feed now aggregated through FeedBurner

To better keep track of my subscribers, I’ve moved my RSS Feed to go through FeedBurner, a great service that tracks all kinds of Feeds statistics. I have initially been cool to the idea of using FeedBurner but having already been through one Feed URL migration, I can definitely see the value in being able to move my Feed without losing subscribers.

WordPress.com still offers a very good package for tracking Blog stats, but its Feed stats are noticeably lacking. While I am sure they will continue to improve this feature as time goes on, I really would like the flexibilty to move my blog around in the future and not lose any subscribers in the process.

If you are reading this site through an RSS Reader, please re-subscribe through the links which now point to my FeedBurner feed.

Changing themes

I’ve been watching the WordPress.com blog to see if any new themes were coming in and I caught a recent post for the Sunburn theme from Jim Whimpey. Jim seems to dislike the theme and he was actually embarassed that it was put up on WordPress.com as he found it to be incomplete and not a good example of his best work.

Since I have an affinity for darker themes and dark coding environments, it seemed like a very logical choice. I agree that there were some issues with it, but a few tweaks to the CSS were all that was needed to make it a pretty usable theme.

I’m still tweaking it so some parts of the layout may look off while I fix it.  The search bar on the side is frustrating me to no end, but hopefully I’ll have it figured out soon.

Getting started with Yahoo Pipes

Yahoo Pipes

This post is probably about a week late from the hype surrounding Yahoo Pipes, but I got a request to post it and I think many people will find it useful. Pipes is a new tool from Yahoo for aggregating content from multiple sources (RSS, HTML, Geo-data) into one single RSS output feed. Additionally you can add multiple pipes together to further refine your output feed. In this example, I will use a number of sources to create a pipe for aggregated content from a number of Deals-oriented websites. The idea behind this pipe is to aggregate the content of all the feeds and remove any duplicates to show only unique content. It’s not perfect, but it has been successful in filtering out most of the duplicates. I started by grabbing the URLs for RSS feeds from the following websites and placing them in a Fetch Source. Deals 2 Buy SlickDeals.net

Ben’s Bargains

Spoofee

Tech Bargains

Woot.com

I then created two Unique operators where I filtered out duplicates by Link and Title. These two operators will get rid of any deals with the exact same title and those that point to the exact same product link. However, it still leaves many duplicates as some of the feeds will point to a link on the Deals Website which then has another embedded link to the actual product. This is done to keep the RSS feed from stealing too much of the site’s ad revenue. However we still want to get as many unique items as possible.

To do further filtering, we run a Content Analysis operator and then filter out unique items based on its output. The Content Analysis operator will basically analyze the link and generate a meta-data Tag which is then appended on the output. Adding another Unique operator after the Content Analysis allows us to remove duplicate meta-data.

Depending on the feed, the meta-data can be inaccurate. I expect this will improve as Yahoo improves Pipes and the content providers improve their feeds.

Finally, I added one last Sort operator to sort everything by the title in ascending order. This results in a Custom RSS Feed aggregated from 6 RSS Feeds with most of the duplicates taken out. While some duplication does remain, I expect Yahoo will add some partial filters which allow you to filter out duplicates based on whether a certain percentage of duplicate words appear in the title. This should get rid of the last few duplicates.

You can view the finished pipe here. I’ve published the pipe so anyone can clone or use my pipe. I’d love to see other interesting pipes that others have found or created. Please let me know in the comments.

 

 

Ruby performance round up

There was a recent blog post by Antonio Cangiano, an IBM developer from Toronto, benchmarking the performance of a number of different Ruby implementations across multiple platforms. The results were very interesting.

To summarize, the following platforms were tested:

Ruby 1.9 on Linux, aka Yarv, came out as the clear winner by far. Ruby 2.0 will build upon Yarv and these tests shows its very promising future.

Interestingly enough, both the JVM and .NET CLR implementations of Ruby, JRuby and Ruby.NET respectively, seem to be in the bottom rung of the performance ladder in these benchmarks. This implies that trying to run Ruby against a virtual machine is performance limiting, possibly discouraging future efforts to bring Ruby to both the Sun and Microsoft development platforms.

Whether this is a good thing or bad thing is debatable. Both companies have been looking for an effective defense against the rise of LAMP and they are likely watching Ruby to see if it is a viable alternative for developers who prefer dynamic typing over static typing. The Rails community would argue that Ruby doesn’t need Microsoft or Sun behind it to succeed as a platform, pointing to PHP as the worthy competitor.

I think Rails still has a very good shot at displacing LAMP as the open source platform of choice for site development.  By emphasizing test driven development and reduced code complexity, it has a lot going for it.  But Ruby by itself will have more difficulty gaining acceptance in the closed source, Enterprisey space unless it can hold its own against the Next Big Language.

Making the jump to Vista Ultimate

Windows Vista

I have decided to go ahead and upgrade to Windows Vista Ultimate on my laptop. A number of factors have affected my decision to do this:

  • Vista is cool to play with. Its no OSX, but it’s no slouch either. With features like .NET 3.0 and AeroGlass, it has won over many converts in the developer community.
  • My Asus G1 notebook is now being sold with Vista Premium pre-installed. Since I was an early adopter, my laptop’s configuration is now in the minority as it came with XP Media Center.
  • Vista makes the most of my graphics card and dual core processor.
  • I needed to reformat my hard drive since Asus preloaded it with 3 partitions (two of which were FAT32 instead of one NTFS partition).

My experience so far has been great as the OS is performing well and I’ve been able to get all the necessary drivers for my laptop. My desktop, being comprised of mostly ethusiast-level hardware, is going to stay on XP for at least the next 6 months. Also I opted to go with the 32bit version of Vista Ultimate as I still game quite a bit and many of the current games are known to suffer a heavy performance penalty under WoW64. My prediction is that we won’t see 64bit computing become ubiquitous in the Windows world until a 64bit operating system becomes the default supported version by Microsoft. At this time, even Intel Core 2 Duo, 64bit capable machines are being shipped with Vista 32bit instead of the 64bit. Additionally, even retail editions of Vista (except Ultimate) are only offered in 32bit. Obtaining the 64bit version requires purchasing a copy of 32bit Vista Home Premium or Businesss and ordering the x64 version from Microsoft for about $10. While its annoying to have to jump through so many hoops to get Vista x64, it is a logical decision for MS to avoid the thousands of support calls from confused users who get the wrong version. With so many machines still being 32bit only, I can’t blame MS for keeping x64 underfoot. However, it’s probably safe to say that the next version of Windows will be a smaller upgrade to Vista (much as XP was to Win2k) and will only come in a 64bit version. At that time, most users will have upgraded to faster 64bit hardware and software emulation of 32bit for legacy applications will be less of an issue.

Snap Previews are annoying everyone

The latest buzz is that the Snap Previews that are enabled on many sites are extremely annoying. I can attest to this and I’m now removing them from my blog. Snap Previews seemed like a cool feature at first, but I think something like this should be implemented at the browser level, not through a Javascript running on the website. That way a user can choose to disable it if they want.

The main complaints with Snap are that it disables right clicking, makes it hard to copy links, and often requires multiple clicks to navigate to the links.

While there is a way to disable these previews, it requires a browser cookie be set to disable it. Snap was a good idea, but it just wasn’t implemented at the right level. Maybe we’ll see it re-appear as a Firefox Extension as it should have in the first place.