In need of WD-40

I had some free time today, so I decided to start on a proof-of-concept for my OpenID + Microformats idea. Holy $^#@ am I rusty with PHP. It’s now been about a year since I last done any sort of programming with it and I find myself having to reference the books I was reading when I first began learning PHP 2 years ago. I really need to start fitting time into my schedule for working on programming projects because I’m finding myself having to look up information that has been lost over time.

On another note, I REALLY need to sit down and learn regular expressions. I’m tired of having to google search this sort of thing. I heard O’Reilly’s book on Regular Expressions is a good resource; perhaps I should pick it up. I’m going to have to learn them anyways, the sooner the better I suppose.

Afterthought: Perhaps instead of re-learning everything, I should just learn the PEAR library instead and fill in the gaps along the way. Anyways, I guess I know what books I’ll be ordering soon.

A look at Songbird

Get SongbirdSongbird is a cross-platform, open-source iTunes replacement that is built off of Mozilla. It has a similar look and feel to iTunes, but it extends many of the features. The site actually has a great screencast that introduces the unique features found.

I was introduced to Songbird by Ian McKellar at SHDH15. I’ve been using it for about a week (Version 0.2 Developer Edition on Windows XP) and here are some of my initial thoughts, starting off with things that I like.

  1. Integration with MP3 Blogs. I’ve actually never subscribed to any MP3 blogs before, but I can see that easily changing now. Songbird comes with a list of 6 MP3 blogs. With these blogs, Songbird will scan the posts for MP3s and show them to you in a form of a list at the bottom. From there you can play the MP3s as if they were local media. This is a very handy feature for quickly listening to new music.
  2. Cross platform. I love the fact that I can go from OS to OS and this program will be available. It’s always such a bummer going between my Mac and PC and having to use different programs because one isn’t supported on one OS. Being a cross-platform application eliminates those frustrations.
  3. Works just like iTunes. If you know how to use iTunes, you know the basic functionality of Songbird. This eliminates the frustration of learning a new program, let alone the extra/hidden features. This is a smart move by the developers since their target audience seems to be iTunes users. Any transition will be very smooth (including the fact that you can easily import your iTunes library).
  4. Mozilla updater. When I start the program it will automatically check for updates for the program or any add-ons. Since this program is still in development, this is a very handy feature for distributing bug-fixes or new features without having to go to the site and download an installer.
  5. Last.fm integration. This is only one of many add-ons for Songbird. However, I like this because I don’t need to load a separate application for scrobbling my songs to Last.fm. These guys know what their audience wants.
  6. Ogg Vorbis Support. Unlike iTunes, Songbird supports the open-source MP3 alternative Ogg Vorbis format. Although it’s not as popular as the MP3 format, it’s nice to have support for those alternative formats.

There were a few things I didn’t like or felt were missing. These were mostly features of iTunes that I would like to see implemented.

  1. iPod Sync Support. This should be a no-brainer.
  2. Airtunes Support. I love how I can wirelessly stream music to my speakers with iTunes + Airtunes. I would love the same feature in Songbird
  3. iTunes Share Support. As someone who has multiple libraries, this feature is a very convinient feature on iTunes I would like to see in Songbird. It would be great if somehow a feature was also added to copy music from library to library via shares!
  4. Better Bookmark Support. When bookmarking a site, it doesn’t give me the option of where I would like to save it to. For example, if I want to bookmark a new MP3 blog, I’d prefer it go into that section rather than the bookmark section. Further, how do you add a new MP3 blog?
  5. More Radio Station Support. This kind of goes along with the previous suggestion. I have a few radio station sites I listen to sometimes; it would be nice to be able to easily add those to the radio section when bookmarking.
  6. More Smart Playlists. One smart playlist I would like to see is one that has a list of all MP3s found on MP3 blogs. That way I can play a variety of MP3s on random without much effort.
  7. Last.fm/Audioscrobbler Authentication Confirmation. As someone who uses a variety of passwords, I always forget which password I use where. I started to use Songbird and checked my Last.fm account to see if my tracks were getting scrobbled properly. When I saw they were not, I figured it could either be the feature itself or my password. It turned out that I used the wrong password, but I had no way of knowing. I think a confirmation or a button to test your login credentials should be added to prevent this issue.
  8. Highlighting song in library. When I go between tracks, the library stays at the beginning. Most applications move the library to the location of the currently playing song for you. This is convenient if you want to play other songs of the same artist.

Lastly, here is a list of bugs that I found while playing around.

  1. Full Screen Error. When I close my laptop lid, and open it back up, the application goes into a full screen mode that is bigger than my actual screen.
  2. Last.fm Error. Sometimes the following error is triggered: “Some tracks you submitted have not been added to your profile for the following reason: Spam protection triggered: You submitted a track dated earlier than your last submission.”

There is one last note I would like to add. The ability to find and play MP3s found in MP3 blogs makes Songbird a very powerful, and perhaps even revolutionary program. Maybe I’m behind, but I have not seen a program with that sort of functionality. Perhaps this is the time to bring up the idea of implementing semantics within HTML for the purpose of labeling music and finding music in MP3 blogs. I propose the idea of a Microformat-like way of labeling MP3 information within HTML for programs like Songbird. Currently it looks like Songbird gets its information from ID3 tag information, but for the MP3s that are not properly labeled, it shows only the filename. Sometimes the filename doesn’t even hint at the songname or artist of the song! Another benefit of using semantic information within HTML is the fact that you don’t need to download the MP3 (or part of the MP3) to get the information. This can save a lot of bandwidth for the host of the blog and the person browsing the site. The last benefit is that this makes for a format-neutral way of labeling data. You can put an MP3, Ogg Vorbis, Real Media, or WAV file on a site, and still have the information come up.

As a program that’s still being developed, Songbird feels like a very complete cross-platform media player. I can see this easily taking the place of iTunes as new features are developed. I for one have started the transition from iTunes to Songbird. Of course, there are missing features, like the ones noted above, that would seal the deal once implemented.

Google and School

As a computer technician and programmer, if I don’t know the answer to a question, I turn to Google.  I may not know every answer to every question, but I sure know how to get it.  I’ve started to apply this concept to classes I’m taking right now; calculus in particular.

I was stuck on the section titled “The Precise Definition of a Limit.”  My professor breezed over it in class and told us to read the chapter.  As I started to read the chapter, there were parts that did not make sense.  How did they get from step a to step b?  What does that symbol mean?  To answer these questions, I turned to my old friend Google.  From doing a little bit of research I was able to find a forum I could post questions to (if they weren’t already answered in the archive) AND I found a the lecture notes of a professor in Indiana who is using the same book as my professor.  After reading his lecture notes, the concept was clear and the book started to make sense again!

If I never had this mindset when it comes to learning, I would’ve been reading that section in the book over and over again.  I would be right where I was before except with a higher level of stress.  Not all books/professors will teach in a way that I can easily understand, so it’s nice to know there are alternative routes in the journey of understanding a concept.

OpenID + uF epiphany

UPDATE: After an email discussion with Adam Darowski, I revised this post to make it a bit more user-friendly.

I think I might be going about this idea of consolidating your online identity with the OpenID simple registration extension and microformats wrong. I found this microformat library for PHP; It works by by retrieving the microformatted data (in this case hCard) by simply feeding it a URL and it then saves the hCard data for future manipulation. I’m starting to realize this same practice may be another way to consolidate your online identity with OpenID.

Before we get ahead of ourselves, let’s see how the applicable portion of the OpenID protocol works. The first step is to supply our OpenID URL to the consumer site and hit “submit.” For example, I would enter “nickpeters.net” as my OpenID URL to the consumer site ma.gnolia. What is a consumer site exactly? According to the OpenID Specification, the consumer is:

A web service that wants proof that the End User owns the Claimed Identifier.

Pretty much it means a site that wants to find out whether or not we are who we say we are by first asking for our OpenID URL.

After we hit the “Submit” button, an internal script on the consumer site will redirect itself to the given URL and look for two link tags in the head of the given HTML document. For the sake of simplicity, we’re only going to discuss the one of them: rel=”openid.server.” The href value of this link tag is going to be the script that actually authenticates you by asking you for the username and password you use on all OpenID-enabled sites. This practice is useful because you can offload the authentication process to a site like Vox or livejournal instead of setting up a server on your own server. This means I can enter the URL for the livejournal authentication script or a script hosted on my site. It also means your username and password isn’t sent to the consumer site and is only sent to the specified script.

That should be enough information for now, so let’s see how hCards can fit into this. Let’s say we log in to our OpenID consumer site (ma.gnolia) and go through the login process as normal. While the consumer site looks for the and OpenID.server URL in the head of our page, it would also look for some sort of clue as to the location of your hCard information. Perhaps this “clue” could follow in the steps of the existing OpenID protocol and also be a link tag, such as rel=”hcard” in the head of the document. From there, the consumer-site script can retrieve the hCard location by looking at the href value, properly redirect itself, and retrieve your information (Perhaps even using the hKit library).

The pros of this is that you can add as much or as little information as you want about yourself in your hCard. The simple registration data fields are very limited and there maybe some information in there that you don’t want to be shared (such as email address).

The cons is that it requires more administrative overhead. You’ll have to edit the header information of your site. You may not even be able to do this on all OpenID identifiers (such as ones on livejournal) because you don’t have permission to edit the header information.

Right now there are discussions going on in the microformat community about authoritative hCards that could possibly guide this idea in the right direction. I will continue to think about this and would appreciate any ideas from others.

Gates dares anybody to exploit Vista

I saw this article on digg just now and I think it’s a brilliant move by Gates.  Let me just say that Bill Gates is not an idiot.  He knows that there is no such thing as perfect software (perhaps with the exception of QMail?).  He also knows that software testing is also a long and expensive process that is not always complete.  Put those pieces together and you can turn the initial users into software testers!  To further elaborate, I think he’s trying to mock people into finding all of the bugs they can find and submit them to Microsoft to prove him wrong.  Of course they will prove him wrong, but Microsoft will then fix those bugs accordingly and then be able to push their software on businesses because it will truly have no more bugs!

We remember the Windows RPC buffer overflow exploit, right?  Well to refresh our memories, it existed up to Windows XP SP1 and allowed remote access to any vulnerable machine.  That was a big embarrassment to Microsoft right there.  If you encourage people to find as many bugs as possible when the user base is low, it’s not much as an embarrassment and a much smaller fire to extinguish if a major bug is found.

Of course this is all speculation/opinion, but wouldn’t that make for a great strategy?

Blogging and school

I have started the third week of school and already I feel like I need to do homework every day to catch up. Taking Calculus and Physics at Cuesta and two online classes at Cal State Channel Islands has taken its toll on my available free time.  There are some things I’ve given up during the weekdays such as reading non-school related books and of course blog posts.

However, for one of my classes I am writing on various topics of societal issues in computing.  Since most of these papers are based on opinion and research, I figured these would make for great blog posts.  In the future I would like to start posting some of these papers that I write for the sake of sharing with the community.  So get your RSS feeds ready for future posts!

SHDH15 and OpenID

This DevHouse I spent working on an idea that has begun to taken shape in the blogosphere. The idea was to merge OpenID and microformats to manage your online identity. OpenID has a registration extension that stores commonly asked personal information such as full name, email address, date of birth, and time zone. I feel this information could also be used to consolidate your online identity in the form of an hCard on any OpenID-enabled site. Further, if you choose to update any of your personal information, you can change it in one location (your OpenID provider) and it can propagate to all OpenID consumer sites you use (depending on how those OpenID consumer sites are setup).

The problem is that some sites on the internet that implement hCards may contain inconsistent data. This proposed solution will allow sites to retrieve your information from one source. If someone wants to find your personal information, they can go to any site that has your hCard instead of having to find your authoritative hCard (this will be a topic of another blog post I’m sure).

Let’s take the OpenID-enabled site ma.gnolia for example. You can sign-in with OpenID and upon successful login, ma.gnolia can retrieve your personal information from your OpenID identity provider. From there it can turn the resulting information into an hCard microformat. Of course there would have to be some sort of control panel to determine which information gets displayed and which information to hide (such as email).

Now, essentially all I am doing is applying an existing protocol, but I wanted to bring awareness to the idea of using OpenID with the hCard microformat. I also wanted to bring attention to the idea of using OpenID as a way to centralize your personal identity so you have consistent personal information among sites.

The first step I took was to actually learn the entire OpenID protocol. I ended up not learning all of the protocol because I felt the documentation was insufficient. This brings up another project idea: document the OpenID protocol in plain English. It was fun learning as much as I did and learning how to implement it myself in PHP. It also gave a chance to learn/use the cURL library in PHP. Perhaps after I learn the protocol, I’ll use a library to make further development easier.

I spent the rest of my time socializing and meeting new people and talking to people met at previous DevHouses. Highlights include talking to Konstantin Koll about his OS that implements a WinFS-like file system, Jesse Andrews of Flock about the next big release of flock (which I eagerly await!), and Chris Moak about his new sleeping schedule and duct tape accessories.

The night was ended by going out to Dennys where we discussed what made this DevHouse a success and what can be done to improve it for next time.

Pictures can be found at: http://www.flickr.com/photos/tags/shdh15